From owner-svn-src-stable@freebsd.org Mon Jan 28 21:46:07 2019 Return-Path: Delivered-To: svn-src-stable@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 8067914C0968; Mon, 28 Jan 2019 21:46:07 +0000 (UTC) (envelope-from mckusick@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 260BC814E2; Mon, 28 Jan 2019 21:46:07 +0000 (UTC) (envelope-from mckusick@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 026C525A24; Mon, 28 Jan 2019 21:46:07 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0SLk6e6053390; Mon, 28 Jan 2019 21:46:06 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0SLk6E9053385; Mon, 28 Jan 2019 21:46:06 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201901282146.x0SLk6E9053385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Mon, 28 Jan 2019 21:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r343537 - in stable/12/sbin: newfs tunefs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in stable/12/sbin: newfs tunefs X-SVN-Commit-Revision: 343537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 260BC814E2 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(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2019 21:46:07 -0000 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.",