svn commit: r262749 - head/usr.sbin/makefs
Simon J. Gerraty
sjg at FreeBSD.org
Tue Mar 4 20:09:23 UTC 2014
Author: sjg
Date: Tue Mar 4 20:09:23 2014
New Revision: 262749
URL: http://svnweb.freebsd.org/changeset/base/262749
Log:
Allow comments at end of line.
Reviewed by: marcel
Modified:
head/usr.sbin/makefs/mtree.c
Modified: head/usr.sbin/makefs/mtree.c
==============================================================================
--- head/usr.sbin/makefs/mtree.c Tue Mar 4 20:07:36 2014 (r262748)
+++ head/usr.sbin/makefs/mtree.c Tue Mar 4 20:09:23 2014 (r262749)
@@ -348,6 +348,13 @@ read_word(FILE *fp, char *buf, size_t bu
if (error == -1)
mtree_error("unexpected end of file");
return (error);
+ case '#': /* comment -- skip to end of line. */
+ if (!esc) {
+ error = skip_to(fp, "\n");
+ if (!error)
+ continue;
+ }
+ break;
case '\\':
esc++;
if (esc == 1)
More information about the svn-src-all
mailing list