From: David Sterba <dsterba@suse.cz>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: Dieter Ries <lists@dieterries.net>,
Ian Kumlien <pomac@demius.net>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/6] Btrfs-progs: add btrfsck functionality to btrfs
Date: Thu, 14 Nov 2013 13:49:21 +0100 [thread overview]
Message-ID: <20131114124921.GI18494@suse.cz> (raw)
In-Reply-To: <CAOi1vP_jpK4mW0HcuJtZnCOaFmQPimzA+PAXQXPxg-m7M-3YNg@mail.gmail.com>
On Thu, Nov 14, 2013 at 11:25:55AM +0200, Ilya Dryomov wrote:
> On Wed, Nov 13, 2013 at 7:13 PM, David Sterba <dsterba@suse.cz> wrote:
> >> For this to have any effect, 'h' must be added to getopt_long(), see
> >> attached patch 1.
> >>
> >> However, this results in btrfsck -h and --help doing different things:
> >>
> >> --help prints the usage message to stdout and exits with exit(0).
> >> -h prints the usage message to stderr and exits with exit(129).
> >>
> >> I made a patch to fix this, see attached patch 2.
> >> What it doesn't fix though is, that -h/--help and -? don't do the same
> >> thing. This is more complicated, as getop_long returns '?' for unknown
> >> options.
> >
> > FYI, both patchess added to integration.
>
> FWIW, I think none of the btrfs sub-commands treat -h as a help option.
> (This is an artifact that was inherited from the the old btrfs-progs
> utility.) -h vs --help is actually consistent: -h results in a "btrfs
> check: invalid option -- 'h'" message, and therefore exits with 129.
> Since 'btrfs check -h' has clearly never worked we might want to keep
> the status quo.
Good point, I'll drop the patches.
david
next prev parent reply other threads:[~2013-11-14 12:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 0:36 Btrfs-progs: Merge btrfs-restore, btrfsck, btrfs-select-super, btrfs-dump-super and btrfs-debug-tree in to btrfs Ian Kumlien
2013-02-08 0:36 ` [PATCH 1/6] Btrfs-progs: Rename btrfsck.c -> cmds-check.c Ian Kumlien
2013-02-08 0:36 ` [PATCH 2/6] Btrfs-progs: add btrfsck functionality to btrfs Ian Kumlien
2013-02-08 17:39 ` Goffredo Baroncelli
2013-02-08 18:17 ` Ian Kumlien
2013-02-08 23:07 ` David Sterba
2013-02-08 23:37 ` Ian Kumlien
2013-02-12 16:39 ` David Sterba
2013-02-12 17:37 ` Filipe Brandenburger
2013-02-12 18:01 ` Goffredo Baroncelli
2013-02-12 22:52 ` David Sterba
2013-02-12 23:07 ` Goffredo Baroncelli
2013-06-02 15:47 ` Dieter Ries
2013-11-13 17:13 ` David Sterba
2013-11-14 9:25 ` Ilya Dryomov
2013-11-14 12:49 ` David Sterba [this message]
2013-11-14 12:56 ` Ian Kumlien
2013-02-08 0:36 ` [PATCH 3/6] Btrfs-progs: move btrfs-select-super.c Ian Kumlien
2013-02-08 0:37 ` [PATCH 4/6] Btrfs-progs: move debug-tree.c -> cmds-rescue-debug-tree.c Ian Kumlien
2013-02-08 0:37 ` [PATCH 5/6] Btrfs-progs: restore.c -> cmds-restore.c Ian Kumlien
2013-02-08 0:37 ` [PATCH 6/6] Btrfs-progs: add the rescue section to btrfs Ian Kumlien
2013-02-08 17:39 ` Goffredo Baroncelli
2013-02-08 18:07 ` Ian Kumlien
2013-02-08 19:57 ` Ilya Dryomov
2013-02-08 20:48 ` Hugo Mills
2013-02-08 22:30 ` David Sterba
2013-02-12 15:26 ` David Sterba
2013-02-08 17:40 ` Btrfs-progs: Merge btrfs-restore, btrfsck, btrfs-select-super, btrfs-dump-super and btrfs-debug-tree in " Goffredo Baroncelli
2013-02-08 18:05 ` Ian Kumlien
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=20131114124921.GI18494@suse.cz \
--to=dsterba@suse.cz \
--cc=idryomov@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@dieterries.net \
--cc=pomac@demius.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.