Re: Improvement suggestion for mkfs.8 manpage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 08, 2019 at 10:47:47AM +0100, Johannes Unglert wrote:
> 
> I think I described the error the wrong way.
> In the mkfs manpage there are two -V options:
> One for 'verbose' and one for 'version'.
> 
> The two -V options are both written with a capital letter.
> It is ambiguous and I think this should not be intentional.
> 
> Please correct me if I'm missing anything here.

I noticed this, and it's weird, but what's there is technically
correct in that it accurately described how mkfs works:

       -V, --verbose
              Produce  verbose  output, including all filesystem-specific com‐
              mands that are executed.  Specifying this option more than  once
              inhibits execution of any filesystem-specific commands.  This is
              really only useful for testing.

       -V, --version
              Display version information and exit.  (Option -V  will  display
              version  information  only when it is the only parameter, other‐
              wise it will work as --verbose.)

That is, "mkfs -V" == "mkfs --version".

However "mkfs --verbose -- -Fq -t ext4 /tmp/foo.img 4M" is the same as:
"mkfs -V -- -Fq -t ext4 /tmp/foo.img 4M"

I don't think most people notice this because most people they tend
not to use the mkfs wrapper in this mode.  In general, they will use
"mkfs.ext4" instead of "mkfs -t ext4".  Which is good because it's
actually a bit buggy:

% mkfs -V -t ext4 -Fq /tmp/foo.img 4M
mkfs from util-linux 2.33.1
mkfs.ext4 ext4 -Fq /tmp/foo.img 4M 
mkfs.ext4: invalid blocks '/tmp/foo.img' on device 'ext4'

In general, I generally recommend that people use /sbin/mkfs.ext4 or
/sbin/mke2fs -t ext4, because the mkfs wrapper doesn't add much value,
and it gets confusing which options are parameters are grabbed by
mkfs, and which will get passed to the back-end mkfs program.

Cheers,

					- Ted



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux