svn commit: r343537 - in stable/12/sbin: newfs tunefs
Kirk McKusick
mckusick at FreeBSD.org
Mon Jan 28 21:46:07 UTC 2019
Author: mckusick
Date: Mon Jan 28 21:46:05 2019
New Revision: 343537
URL: https://svnweb.freebsd.org/changeset/base/343537
Log:
MFC of 343449 and 343483
Update tunefs to allow '_' in label names.
Update tunefs and newfs error messages to note that '_' is allowed
in label names.
Sponsored by: Netflix
Modified:
stable/12/sbin/newfs/newfs.8
stable/12/sbin/newfs/newfs.c
stable/12/sbin/tunefs/tunefs.8
stable/12/sbin/tunefs/tunefs.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sbin/newfs/newfs.8
==============================================================================
--- stable/12/sbin/newfs/newfs.8 Mon Jan 28 21:36:45 2019 (r343536)
+++ stable/12/sbin/newfs/newfs.8 Mon Jan 28 21:46:05 2019 (r343537)
@@ -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.
Modified: stable/12/sbin/newfs/newfs.c
==============================================================================
--- stable/12/sbin/newfs/newfs.c Mon Jan 28 21:36:45 2019 (r343536)
+++ stable/12/sbin/newfs/newfs.c Mon Jan 28 21:46:05 2019 (r343537)
@@ -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.",
Modified: stable/12/sbin/tunefs/tunefs.8
==============================================================================
--- stable/12/sbin/tunefs/tunefs.8 Mon Jan 28 21:36:45 2019 (r343536)
+++ stable/12/sbin/tunefs/tunefs.8 Mon Jan 28 21:46:05 2019 (r343537)
@@ -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
Modified: stable/12/sbin/tunefs/tunefs.c
==============================================================================
--- stable/12/sbin/tunefs/tunefs.c Mon Jan 28 21:36:45 2019 (r343536)
+++ stable/12/sbin/tunefs/tunefs.c Mon Jan 28 21:46:05 2019 (r343537)
@@ -189,11 +189,10 @@ 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.",
- 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.",
More information about the svn-src-stable
mailing list