> Author: mckusick > Date: Fri Jan 25 20:07:18 2019 > New Revision: 343449 > URL: https://svnweb.freebsd.org/changeset/base/343449 > > Log: > Allow tunefs to include '_' as a legal character in label names > to make it consistent with newfs. Document the legality of '_' > in label names in both tunefs(8) and newfs(8). > > PR: 235182 > Submitted by: dar...@dons.net.au > Reviewed by: Conrad Meyer > MFC after: 3 days > Sponsored by: Netflix > > Modified: > head/sbin/newfs/newfs.8 > head/sbin/tunefs/tunefs.8 > head/sbin/tunefs/tunefs.c > > Modified: head/sbin/newfs/newfs.8 > ============================================================================== > --- head/sbin/newfs/newfs.8 Fri Jan 25 20:02:55 2019 (r343448) > +++ head/sbin/newfs/newfs.8 Fri Jan 25 20:07:18 2019 (r343449) > @@ -89,6 +89,7 @@ See > for details. > .It Fl L Ar volname > Add a volume label to the new file system. > +Legal characters are alphanumerics and underscores. > .It Fl N > Cause the file system parameters to be printed out > without really creating the file system. > > Modified: head/sbin/tunefs/tunefs.8 > ============================================================================== > --- head/sbin/tunefs/tunefs.8 Fri Jan 25 20:02:55 2019 (r343448) > +++ head/sbin/tunefs/tunefs.8 Fri Jan 25 20:07:18 2019 (r343449) > @@ -112,6 +112,7 @@ By default > sets it to half of the space reserved to minfree. > .It Fl L Ar volname > Add/modify an optional file system volume label. > +Legal characters are alphanumerics and underscores. > .It Fl l Cm enable | disable > Turn on/off MAC multilabel flag. > .It Fl m Ar minfree > > Modified: head/sbin/tunefs/tunefs.c > ============================================================================== > --- head/sbin/tunefs/tunefs.c Fri Jan 25 20:02:55 2019 (r343448) > +++ head/sbin/tunefs/tunefs.c Fri Jan 25 20:07:18 2019 (r343449) > @@ -189,7 +189,7 @@ main(int argc, char *argv[]) > name = "volume label"; > Lvalue = optarg; > i = -1; > - while (isalnum(Lvalue[++i])); > + while (isalnum(Lvalue[++i]) || Lvalue[i] == '_'); > if (Lvalue[i] != '\0') { > errx(10, > "bad %s. Valid characters are alphanumerics.", ^^^^^^^^^^^^ This message is now incorrect.
-- Rod Grimes rgri...@freebsd.org _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"