Bug 23335

Summary: [PATCH] Error messages from tunefs could be more informative
Product: Base System Reporter: Mark Peek <mark>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Mark Peek 2000-12-06 19:30:01 UTC
Error messages from tunefs could be more informative. For instance, running
"tunefs -n enable" produces this error:
    tunefs: /dev//enable: No such file or directory

A standard usage message would be more useful.

Fix: The tunefs code assumed that the last argument was the device specification.
The patch below will parse the arguments first, then open the device (if
specified) and then apply the changes. This change will disallow the
(undocumented) use of multiple instances of the same argument on the
same command line for the sack of a better error message.
How-To-Repeat: Run "tunefs -n enable"
Comment 1 charnier freebsd_committer freebsd_triage 2000-12-10 21:01:22 UTC
State Changed
From-To: open->closed

Changes applied in the 1.14 revision of tunefs.c