svn commit: r273822 - in head: usr.bin/iscsictl usr.sbin/ctld

Edward Tomasz Napierala trasz at FreeBSD.org
Wed Oct 29 12:22:33 UTC 2014


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 */;


More information about the svn-src-head mailing list