Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2017 17:29:32 +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-11@freebsd.org
Subject:   svn commit: r320365 - stable/11/sbin/newfs
Message-ID:  <201706261729.v5QHTWME017698@repo.freebsd.org>

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

Log:
  MFC of 320176:
  
  Allow '_' in labels when specifying -L to newfs.
  
  PR: 220163
  Reported by: Keve Nagy
  Reviewed by: kib
  Approved by: re@ (Xin Li)

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

Modified: stable/11/sbin/newfs/newfs.c
==============================================================================
--- stable/11/sbin/newfs/newfs.c	Mon Jun 26 16:28:46 2017	(r320364)
+++ stable/11/sbin/newfs/newfs.c	Mon Jun 26 17:29:32 2017	(r320365)
@@ -150,7 +150,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?201706261729.v5QHTWME017698>