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:
parent
59ba78ccae
commit
cd29c58eae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343483
@ -155,7 +155,8 @@ main(int argc, char *argv[])
|
|||||||
while (isalnum(volumelabel[++i]) ||
|
while (isalnum(volumelabel[++i]) ||
|
||||||
volumelabel[i] == '_');
|
volumelabel[i] == '_');
|
||||||
if (volumelabel[i] != '\0') {
|
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) {
|
if (strlen(volumelabel) >= MAXVOLLEN) {
|
||||||
errx(1, "bad volume label. Length is longer than %d.",
|
errx(1, "bad volume label. Length is longer than %d.",
|
||||||
|
@ -191,9 +191,8 @@ main(int argc, char *argv[])
|
|||||||
i = -1;
|
i = -1;
|
||||||
while (isalnum(Lvalue[++i]) || Lvalue[i] == '_');
|
while (isalnum(Lvalue[++i]) || Lvalue[i] == '_');
|
||||||
if (Lvalue[i] != '\0') {
|
if (Lvalue[i] != '\0') {
|
||||||
errx(10,
|
errx(10, "bad %s. Valid characters are "
|
||||||
"bad %s. Valid characters are alphanumerics.",
|
"alphanumerics and underscores.", name);
|
||||||
name);
|
|
||||||
}
|
}
|
||||||
if (strlen(Lvalue) >= MAXVOLLEN) {
|
if (strlen(Lvalue) >= MAXVOLLEN) {
|
||||||
errx(10, "bad %s. Length is longer than %d.",
|
errx(10, "bad %s. Length is longer than %d.",
|
||||||
|
Loading…
Reference in New Issue
Block a user