Bug 235182 - tunefs does not agree with newfs about what a legal label is
Summary: tunefs does not agree with newfs about what a legal label is
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2019-01-25 00:16 UTC by Daniel O'Connor
Modified: 2019-01-28 21:49 UTC (History)
2 users (show)

See Also:


Attachments
Patch for tunefs (405 bytes, patch)
2019-01-25 00:16 UTC, Daniel O'Connor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel O'Connor 2019-01-25 00:16:44 UTC
Created attachment 201383 [details]
Patch for tunefs

Currently tunefs only accepts alphanumerics, however newfs accepts these and underscores.

The attached patch fixes it for me.

The man pages should also be updated with something like..
newfs ->
.It Fl L Ar volname
Add a volume label to the new file system. Legal characters are
alphanumerics and underscores.

tunefs ->
.It Fl L Ar volname
Add/modify an optional file system volume label. Legal characters
are alphanumerics and underscores.
Comment 1 Kirk McKusick freebsd_committer freebsd_triage 2019-01-25 07:23:07 UTC
This patch looks good
Conrad, would you like to make the updates or would you prefer me to make it?
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2019-01-25 14:53:16 UTC
(In reply to Kirk McKusick from comment #1)
I'm happy to leave it to you. :-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-01-25 20:08:06 UTC
A commit references this bug:

Author: mckusick
Date: Fri Jan 25 20:07:19 UTC 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

Changes:
  head/sbin/newfs/newfs.8
  head/sbin/tunefs/tunefs.8
  head/sbin/tunefs/tunefs.c
Comment 4 Kirk McKusick freebsd_committer freebsd_triage 2019-01-25 20:10:36 UTC
Will close this bug once change has been MFC'ed to 11-stable and 12-stable.
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-01-26 22:27:18 UTC
A commit references this bug:

Author: mckusick
Date: Sat Jan 26 22:27:12 UTC 2019
New revision: 343483
URL: https://svnweb.freebsd.org/changeset/base/343483

Log:
  Update tunefs and newfs error messages for the -L (volume label) option
  to note that underscores are valid.

  PR:           235182
  Reported by:  Rodney W. Grimes (rgrimes@)
  Sponsored by: Netflix

Changes:
  head/sbin/newfs/newfs.c
  head/sbin/tunefs/tunefs.c
Comment 6 Kirk McKusick freebsd_committer freebsd_triage 2019-01-28 21:49:51 UTC
This change has been MFC'ed to 11-stable and 12-stable.