diff options
author | mckusick <mckusick@FreeBSD.org> | 2017-06-26 17:33:33 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2017-06-26 17:33:33 +0000 |
commit | 87d6d55994615f4c2ecda411eebc8a873419678a (patch) | |
tree | 9d550060759a4e691dc31c164993ab9f05db5d48 | |
parent | 224b446d37054a07f45ee4aca27fd67b9f3910a8 (diff) | |
download | FreeBSD-src-87d6d55994615f4c2ecda411eebc8a873419678a.zip FreeBSD-src-87d6d55994615f4c2ecda411eebc8a873419678a.tar.gz |
MFC of 320176:
Allow '_' in labels when specifying -L to newfs.
PR: 220163
Reported by: Keve Nagy
Reviewed by: kib
-rw-r--r-- | sbin/newfs/newfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 59b7e61..7662474 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -153,7 +153,8 @@ main(int argc, char *argv[]) case 'L': volumelabel = optarg; i = -1; - while (isalnum(volumelabel[++i])); + while (isalnum(volumelabel[++i]) || + volumelabel[i] == '_'); if (volumelabel[i] != '\0') { errx(1, "bad volume label. Valid characters are alphanumerics."); } |