Update tunefs and newfs error messages for the -L (volume label) option

to note that underscores are valid.

PR:           235182
Reported by:  Rodney W. Grimes (rgrimes@)
Sponsored by: Netflix
This commit is contained in:
mckusick 2019-01-26 22:27:12 +00:00
parent 72986d9f4b
commit 435d72996d
2 changed files with 4 additions and 4 deletions

View File

@ -155,7 +155,8 @@ main(int argc, char *argv[])
while (isalnum(volumelabel[++i]) ||
volumelabel[i] == '_');
if (volumelabel[i] != '\0') {
errx(1, "bad volume label. Valid characters are alphanumerics.");
errx(1, "bad volume label. Valid characters "
"are alphanumerics and underscores.");
}
if (strlen(volumelabel) >= MAXVOLLEN) {
errx(1, "bad volume label. Length is longer than %d.",

View File

@ -191,9 +191,8 @@ main(int argc, char *argv[])
i = -1;
while (isalnum(Lvalue[++i]) || Lvalue[i] == '_');
if (Lvalue[i] != '\0') {
errx(10,
"bad %s. Valid characters are alphanumerics.",
name);
errx(10, "bad %s. Valid characters are "
"alphanumerics and underscores.", name);
}
if (strlen(Lvalue) >= MAXVOLLEN) {
errx(10, "bad %s. Length is longer than %d.",