diff options
author | trasz <trasz@FreeBSD.org> | 2014-10-29 12:22:32 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-10-29 12:22:32 +0000 |
commit | 3af53d3840b0f2cf38f6b6c1390f6d7110bd0f5d (patch) | |
tree | 77516c53f56a5d5cd356235de1aeead84b5b93ad | |
parent | a0b8eaf0d7f347c70205b37dbbf8da23e4a5c132 (diff) | |
download | FreeBSD-src-3af53d3840b0f2cf38f6b6c1390f6d7110bd0f5d.zip FreeBSD-src-3af53d3840b0f2cf38f6b6c1390f6d7110bd0f5d.tar.gz |
Fix iscsictl(8) and ctld(8) to correctly handle Windows newlines
(CRLF) in iscsi.conf and ctl.conf.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
-rw-r--r-- | usr.bin/iscsictl/token.l | 1 | ||||
-rw-r--r-- | usr.sbin/ctld/token.l | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/iscsictl/token.l b/usr.bin/iscsictl/token.l index 4866c13..06af167 100644 --- a/usr.bin/iscsictl/token.l +++ b/usr.bin/iscsictl/token.l @@ -90,6 +90,7 @@ chapDigest { return IGNORED; } = { return EQUALS; } ; { return SEMICOLON; } #.*$ /* ignore comments */; +\r\n { lineno++; } \n { lineno++; } [ \t]+ /* ignore whitespace */; . { yylval.str = strdup(yytext); return STR; } diff --git a/usr.sbin/ctld/token.l b/usr.sbin/ctld/token.l index b63ce42..822d1ac 100644 --- a/usr.sbin/ctld/token.l +++ b/usr.sbin/ctld/token.l @@ -82,6 +82,7 @@ timeout { return TIMEOUT; } \{ { return OPENING_BRACKET; } \} { return CLOSING_BRACKET; } #.*$ /* ignore comments */; +\r\n { lineno++; } \n { lineno++; } ; { return SEMICOLON; } [ \t]+ /* ignore whitespace */; |