diff --git a/usr.bin/units/units.1 b/usr.bin/units/units.1 index 4b73da4eb09..a7173a5c586 100644 --- a/usr.bin/units/units.1 +++ b/usr.bin/units/units.1 @@ -149,7 +149,7 @@ The program will not detect infinite loops that could be caused by careless unit definitions. Comments in the unit definition file -begin with a '/' character at the beginning of a line. +begin with a '#' or '/' character at the beginning of a line. .Pp Prefixes are defined in the same was as standard units, but with a trailing dash at the end of the prefix name. diff --git a/usr.bin/units/units.c b/usr.bin/units/units.c index f8e4f11bb24..94a976f98ce 100644 --- a/usr.bin/units/units.c +++ b/usr.bin/units/units.c @@ -166,7 +166,7 @@ readunits(const char *userfile) break; linenum++; lineptr = line; - if (*lineptr == '/') + if (*lineptr == '/' || *lineptr == '#') continue; lineptr += strspn(lineptr, " \n\t"); len = strcspn(lineptr, " \n\t");