From owner-svn-src-all@freebsd.org Tue Feb 12 14:03:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EB9D14E7958; Tue, 12 Feb 2019 14:03:41 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 200C98D612; Tue, 12 Feb 2019 14:03:41 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BE8218FFA; Tue, 12 Feb 2019 14:03:41 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1CE3ePE052694; Tue, 12 Feb 2019 14:03:40 GMT (envelope-from marck@FreeBSD.org) Received: (from marck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1CE3efp052690; Tue, 12 Feb 2019 14:03:40 GMT (envelope-from marck@FreeBSD.org) Message-Id: <201902121403.x1CE3efp052690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marck set sender to marck@FreeBSD.org using -f From: Dmitry Morozovsky Date: Tue, 12 Feb 2019 14:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r344052 - in stable/11/sbin: newfs tunefs X-SVN-Group: stable-11 X-SVN-Commit-Author: marck X-SVN-Commit-Paths: in stable/11/sbin: newfs tunefs X-SVN-Commit-Revision: 344052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 200C98D612 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2019 14:03:41 -0000 Author: marck (doc committer) Date: Tue Feb 12 14:03:39 2019 New Revision: 344052 URL: https://svnweb.freebsd.org/changeset/base/344052 Log: MFC 343548: Allow dashes as a valid character in UFS labels. Modified: stable/11/sbin/newfs/newfs.8 stable/11/sbin/newfs/newfs.c stable/11/sbin/tunefs/tunefs.8 stable/11/sbin/tunefs/tunefs.c Modified: stable/11/sbin/newfs/newfs.8 ============================================================================== --- stable/11/sbin/newfs/newfs.8 Tue Feb 12 13:58:16 2019 (r344051) +++ stable/11/sbin/newfs/newfs.8 Tue Feb 12 14:03:39 2019 (r344052) @@ -28,7 +28,7 @@ .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd July 15, 2015 +.Dd January 29, 2019 .Dt NEWFS 8 .Os .Sh NAME @@ -91,7 +91,7 @@ See for details. .It Fl L Ar volname Add a volume label to the new file system. -Legal characters are alphanumerics and underscores. +Legal characters are alphanumerics, dashes, and underscores. .It Fl N Cause the file system parameters to be printed out without really creating the file system. Modified: stable/11/sbin/newfs/newfs.c ============================================================================== --- stable/11/sbin/newfs/newfs.c Tue Feb 12 13:58:16 2019 (r344051) +++ stable/11/sbin/newfs/newfs.c Tue Feb 12 14:03:39 2019 (r344052) @@ -151,10 +151,10 @@ main(int argc, char *argv[]) volumelabel = optarg; i = -1; while (isalnum(volumelabel[++i]) || - volumelabel[i] == '_'); + volumelabel[i] == '_' || volumelabel[i] == '-'); if (volumelabel[i] != '\0') { errx(1, "bad volume label. Valid characters " - "are alphanumerics and underscores."); + "are alphanumerics, dashes, and underscores."); } if (strlen(volumelabel) >= MAXVOLLEN) { errx(1, "bad volume label. Length is longer than %d.", Modified: stable/11/sbin/tunefs/tunefs.8 ============================================================================== --- stable/11/sbin/tunefs/tunefs.8 Tue Feb 12 13:58:16 2019 (r344051) +++ stable/11/sbin/tunefs/tunefs.8 Tue Feb 12 14:03:39 2019 (r344052) @@ -28,7 +28,7 @@ .\" @(#)tunefs.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd April 19, 2016 +.Dd January 29, 2019 .Dt TUNEFS 8 .Os .Sh NAME @@ -112,7 +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. +Legal characters are alphanumerics, dashes, and underscores. .It Fl l Cm enable | disable Turn on/off MAC multilabel flag. .It Fl m Ar minfree Modified: stable/11/sbin/tunefs/tunefs.c ============================================================================== --- stable/11/sbin/tunefs/tunefs.c Tue Feb 12 13:58:16 2019 (r344051) +++ stable/11/sbin/tunefs/tunefs.c Tue Feb 12 14:03:39 2019 (r344052) @@ -184,10 +184,13 @@ main(int argc, char *argv[]) name = "volume label"; Lvalue = optarg; i = -1; - while (isalnum(Lvalue[++i]) || Lvalue[i] == '_'); + while (isalnum(Lvalue[++i]) || Lvalue[i] == '_' || + Lvalue[i] == '-') + ; if (Lvalue[i] != '\0') { errx(10, "bad %s. Valid characters are " - "alphanumerics and underscores.", name); + "alphanumerics, dashes, and underscores.", + name); } if (strlen(Lvalue) >= MAXVOLLEN) { errx(10, "bad %s. Length is longer than %d.",