Typo in newfs
Bruce Evans
brde at optusnet.com.au
Sun Feb 7 14:09:44 UTC 2010
On Mon, 8 Feb 2010, Bruce Evans wrote:
> On Sun, 7 Feb 2010, Edwin Groothuis wrote:
>
>> On Fri, Feb 05, 2010 at 04:40:37PM -0600, Brandon Falk wrote:
>>> In the function newfs (/sbin/newfs) there is a typo on the help page.
>>> Should be a simple fix, and will make the world a better place.
>>>
>>> usage: newfs [ -fsoptions ] special-device [device-type]
>>> where fsoptions are:
>>> -E Erase previuos disk content <-- should be previous
>>>
>>> Freebsd 8.0 amd64
>>
>> Fixed in revision r203534 by delphij@
>
> Any chance of fixing the entire error contents of all changed lines?
> The man page has the same miscontent.
Here is a more complete list of errors in newfs usage output. The -E
commit implemented an especially high density of new ones.
% newfs: illegal option -- ?
% usage: newfs [ -fsoptions ] special-device [device-type]
^^(1) ^(2) ^(2) ^^^^^^^^^^^^^^(3)
(1) newfs perpetrates use of getprogname() to print this.
(2) Bogus spaces.
(3) Garbage (part of mfs support). This was removed in the code and the
man page, but not here.
% where fsoptions are:
% -E Erase previuos disk content
^(1) ^^^(2) ^(3)
(1) Capitalized, unlike all old descriptions.
(2) In the PR.
(3) Should be "contents".
% -J Enable journaling via gjournal
^
Capitalized, unlike all old descriptions including several other "enable"s.
% -L volume label to add to superblock
% -N do not create file system, just print out parameters
^
Grammar error (comma splice). Should use either a semicolon or a
conjunction (e.g., ", but just...").
% -O file system format: 1 => UFS1, 2 => UFS2
% -R regression test, supress random factors
^(1)^^(2)
(1) Grammar error (comma splice). Should use a semicolon or maybe a dash,
or parentheses. It is hard to tell what this means, since -R is
missing in the man page. My version just uses a semicolon.
(2) Not in the PR, but fixed in the same commit as the one in the PR.
% -S sector size
Correct here, but unsorted in the man page.
% -T disktype
^
Missing space. "disktype" is correct in the synopsis, but it should be
spelled out in the description like other options are (e.g., sector-size
is expanded to "sector size", and maxcontig is expanded to
"maximum contiguous blocks".
% -U enable soft updates
% -a maximum contiguous blocks
% -b block size
% -c blocks per cylinders group
% -d maximum extent size
% -e maximum blocks per file in a cylinder group
% -f frag size
% -g average file size
% -h average files per directory
% -i number of bytes per inode
% -l enable multilabel MAC
% -n do not create .snap directory
% -m minimum free space %
% -o optimization preference (`space' or `time')
% -p partition name (a..h)
Someone expanded MAXPARTITIONS in bsdlabel to support a-z, but MAXPARTITIONS
is bogusly ifdefed in <sys/disklabel.h>, so this and the correspoding
hard-coded a-h in the man page still matches the code (which uses the
soft-coded MAXPARTITIONS), but if bsdlabel or something creates i-z then
-p here won't actually work.
% -r reserved sectors at the end of device
% -s file system size (sectors)
Bruce
More information about the freebsd-bugs
mailing list