From 0674d7111df98a51e50d1bf15a5b290f3ac7c067 Mon Sep 17 00:00:00 2001 From: trasz Date: Sat, 29 Nov 2014 15:39:31 +0000 Subject: [PATCH] MFC r273822: Fix iscsictl(8) and ctld(8) to correctly handle Windows newlines (CRLF) in iscsi.conf and ctl.conf. Sponsored by: The FreeBSD Foundation git-svn-id: svn://svn.freebsd.org/base/stable/10@275248 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.bin/iscsictl/token.l | 1 + usr.sbin/ctld/token.l | 1 + 2 files changed, 2 insertions(+) diff --git a/usr.bin/iscsictl/token.l b/usr.bin/iscsictl/token.l index 4866c1313..06af16773 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 b63ce421a..822d1ac7e 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 */; -- 2.45.0