From cd29c58eae881e96a4b9f5349daa35c812aefc68 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Sat, 26 Jan 2019 22:27:12 +0000 Subject: [PATCH] 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 --- sbin/newfs/newfs.c | 3 ++- sbin/tunefs/tunefs.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 472b740d385b..3c5d4fa08ca1 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -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.", diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 0bd5f314f4b6..d1f1c36cf787 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -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.",