Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jan 2019 12:15:45 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net>
To:        Kirk McKusick <mckusick@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r343449 - in head/sbin: newfs tunefs
Message-ID:  <201901252015.x0PKFjeT090038@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <201901252007.x0PK7IVr092925@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Author: mckusick
> Date: Fri Jan 25 20:07:18 2019
> New Revision: 343449
> URL: https://svnweb.freebsd.org/changeset/base/343449
> 
> Log:
>   Allow tunefs to include '_' as a legal character in label names
>   to make it consistent with newfs. Document the legality of '_'
>   in label names in both tunefs(8) and newfs(8).
>   
>   PR:           235182
>   Submitted by: darius@dons.net.au
>   Reviewed by:  Conrad Meyer
>   MFC after:    3 days
>   Sponsored by: Netflix
> 
> Modified:
>   head/sbin/newfs/newfs.8
>   head/sbin/tunefs/tunefs.8
>   head/sbin/tunefs/tunefs.c
> 
> Modified: head/sbin/newfs/newfs.8
> ==============================================================================
> --- head/sbin/newfs/newfs.8	Fri Jan 25 20:02:55 2019	(r343448)
> +++ head/sbin/newfs/newfs.8	Fri Jan 25 20:07:18 2019	(r343449)
> @@ -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: head/sbin/tunefs/tunefs.8
> ==============================================================================
> --- head/sbin/tunefs/tunefs.8	Fri Jan 25 20:02:55 2019	(r343448)
> +++ head/sbin/tunefs/tunefs.8	Fri Jan 25 20:07:18 2019	(r343449)
> @@ -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: head/sbin/tunefs/tunefs.c
> ==============================================================================
> --- head/sbin/tunefs/tunefs.c	Fri Jan 25 20:02:55 2019	(r343448)
> +++ head/sbin/tunefs/tunefs.c	Fri Jan 25 20:07:18 2019	(r343449)
> @@ -189,7 +189,7 @@ 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.",
                                                              ^^^^^^^^^^^^
This message is now incorrect.

-- 
Rod Grimes                                                 rgrimes@freebsd.org



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