Util-Linux package development
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Johannes Unglert <unglert@b1-systems.de>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: Improvement suggestion for mkfs.8 manpage
Date: Fri, 8 Feb 2019 10:20:02 -0500	[thread overview]
Message-ID: <20190208152002.GA23000@mit.edu> (raw)
In-Reply-To: <3ee93fe9-e024-ef49-92d0-0167318bba36@b1-systems.de>

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

  reply	other threads:[~2019-02-08 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 15:43 Improvement suggestion for mkfs.8 manpage Johannes Unglert
2019-02-07 16:13 ` Theodore Y. Ts'o
2019-02-08  9:47   ` Johannes Unglert
2019-02-08 15:20     ` Theodore Y. Ts'o [this message]
2019-02-11  9:41       ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190208152002.GA23000@mit.edu \
    --to=tytso@mit.edu \
    --cc=unglert@b1-systems.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox