Date: Wed, 29 Oct 2014 12:22:32 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273822 - in head: usr.bin/iscsictl usr.sbin/ctld Message-ID: <201410291222.s9TCMWhW008020@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Wed Oct 29 12:22:32 2014 New Revision: 273822 URL: https://svnweb.freebsd.org/changeset/base/273822 Log: 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 Modified: head/usr.bin/iscsictl/token.l head/usr.sbin/ctld/token.l Modified: head/usr.bin/iscsictl/token.l ============================================================================== --- head/usr.bin/iscsictl/token.l Wed Oct 29 12:12:27 2014 (r273821) +++ head/usr.bin/iscsictl/token.l Wed Oct 29 12:22:32 2014 (r273822) @@ -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; } Modified: head/usr.sbin/ctld/token.l ============================================================================== --- head/usr.sbin/ctld/token.l Wed Oct 29 12:12:27 2014 (r273821) +++ head/usr.sbin/ctld/token.l Wed Oct 29 12:22:32 2014 (r273822) @@ -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 */;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410291222.s9TCMWhW008020>