diff options
author | Kirk McKusick <mckusick@FreeBSD.org> | 2019-01-25 20:07:18 +0000 |
---|---|---|
committer | Kirk McKusick <mckusick@FreeBSD.org> | 2019-01-25 20:07:18 +0000 |
commit | 0cde0ab2d3fa54d2c2d059bd3c7551db284c5447 (patch) | |
tree | c94aa62f7c01b9b69afbfb917308996f827bf42b /sbin/tunefs | |
parent | 04a50a52721a3c30757c36556dc1c1b9d3e85eac (diff) | |
download | src-0cde0ab2d3fa54d2c2d059bd3c7551db284c5447.tar.gz src-0cde0ab2d3fa54d2c2d059bd3c7551db284c5447.zip |
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: darius@dons.net.au
Reviewed by: Conrad Meyer
MFC after: 3 days
Sponsored by: Netflix
Notes
Notes:
svn path=/head/; revision=343449
Diffstat (limited to 'sbin/tunefs')
-rw-r--r-- | sbin/tunefs/tunefs.8 | 1 | ||||
-rw-r--r-- | sbin/tunefs/tunefs.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8 index 0c63382cace8..00b9f41fb7f2 100644 --- a/sbin/tunefs/tunefs.8 +++ b/sbin/tunefs/tunefs.8 @@ -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 diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 6a6b7f767ede..0bd5f314f4b6 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -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.", |