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 */;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to