Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2017 17:33:33 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r320366 - stable/10/sbin/newfs
Message-ID:  <201706261733.v5QHXXTk021627@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Mon Jun 26 17:33:33 2017
New Revision: 320366
URL: https://svnweb.freebsd.org/changeset/base/320366

Log:
  MFC of 320176:
  
  Allow '_' in labels when specifying -L to newfs.
  
  PR: 220163
  Reported by: Keve Nagy
  Reviewed by: kib

Modified:
  stable/10/sbin/newfs/newfs.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/newfs/newfs.c
==============================================================================
--- stable/10/sbin/newfs/newfs.c	Mon Jun 26 17:29:32 2017	(r320365)
+++ stable/10/sbin/newfs/newfs.c	Mon Jun 26 17:33:33 2017	(r320366)
@@ -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.");
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706261733.v5QHXXTk021627>