public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: David Sterba <dsterba@suse.cz>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs-progs: -q/--quiet not accepted for "btrfs subvolume" subcommands
Date: Thu, 20 Mar 2025 03:46:13 +0500	[thread overview]
Message-ID: <20250320034613.47d65814@nvm> (raw)
In-Reply-To: <20250319221256.GQ32661@twin.jikos.cz>

On Wed, 19 Mar 2025 23:12:56 +0100
David Sterba <dsterba@suse.cz> wrote:

> On Tue, Dec 17, 2024 at 07:56:49PM +0500, Roman Mamedov wrote:
> > Hello,
> > 
> > # btrfs --version
> > btrfs-progs v6.6.3
> > 
> > # btrfs sub create --help
> > usage: btrfs subvolume create [options] [<dest>/]<name> [[<dest2>/]<name2> ...]

^ This line appears to instruct that there's one place to put all the options;
so if you're looking into a documentation fix, I would suggest modifying that.
Like,

> > usage: btrfs [global-options] subvolume create [local-options] [<dest>/]<name> [[<dest2>/]<name2> ...]

But this looks messy. So IMO the ideal would be to just not require the
separation and accept global options also after the subcommand name.

> >     Create subvolume(s)
> > 
> >     Create subvolume(s) at specified destination.  If <dest> is not given
> >     subvolume <name> will be created in the current directory. Options apply
> >     to all created subvolumes.
> > 
> >     -i <qgroupid>             add the newly created subvolume(s) to a qgroup. This option can be given multiple times.
> >     -p|--parents              create any missing parent directories for each argument (like mkdir -p) 
> >     
> >     Global options:
> >     -q|--quiet                print only errors 
> > 
> > # btrfs sub create -q test
> > btrfs subvolume create: invalid option 'q'
> > Try 'btrfs subvolume create --help' for more information
> > 
> > # btrfs sub create --quiet test
> > btrfs subvolume create: unrecognized option '--quiet'
> > Try 'btrfs subvolume create --help' for more information
> > 
> > Same for "snapshot". Maybe also some or all others, did not check further.
> > 
> > This is the case also on btrfs-progs versions 5.10 and 6.2.
> 
> The global options -q/-v and others are supposed to be right after the
> 'btrfs' term, like
> 
>   $ btrfs -q subvolume create test
> 
> This is mentioned at the top of 'btrfs --help' but maybe it needs to be
> made more visible or repeated at the end of the help too.
> 


-- 
With respect,
Roman

  reply	other threads:[~2025-03-19 22:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-17 14:56 btrfs-progs: -q/--quiet not accepted for "btrfs subvolume" subcommands Roman Mamedov
2025-03-19 22:12 ` David Sterba
2025-03-19 22:46   ` Roman Mamedov [this message]
2025-03-20  1:18     ` David Sterba

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=20250320034613.47d65814@nvm \
    --to=rm@romanrm.net \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@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