Re: [PATCH 2/6] Btrfs-progs: add btrfsck functionality to btrfs

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

 



On Wed, Nov 13, 2013 at 7:13 PM, David Sterba <dsterba@xxxxxxx> wrote:
> Hi,
>
> On Sun, Jun 02, 2013 at 05:47:38PM +0200, Dieter Ries 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.

Hi David,

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.

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux