Skip to content

Commit

Permalink
Allow tunefs to include '_' as a legal character in label names
Browse files Browse the repository at this point in the history
to make it consistent with newfs. Document the legality of '_'
in label names in both tunefs(8) and newfs(8).

PR:           235182
Submitted by: [email protected]
Reviewed by:  Conrad Meyer
MFC after:    3 days
Sponsored by: Netflix
  • Loading branch information
Kirk McKusick authored and Kirk McKusick committed Jan 25, 2019
1 parent 04a50a5 commit 0cde0ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions sbin/newfs/newfs.8
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions sbin/tunefs/tunefs.8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sbin/tunefs/tunefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit 0cde0ab

Please sign in to comment.