btrfs-progs: Fix the argument requirement for '--subvol-extents'

The following commit changed the argument requirement for
'--subvol-extents', which causes it to call arg_strtou64() on NULL,
resulting a segfault.
d34cbe76 btrfs-progs: check: do not require argument for --subvol-extents

This patch revert the patch and change the help string and man page to
make it no longer confusing.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
master
Qu Wenruo 2014-10-30 14:34:06 +08:00 committed by David Sterba
parent 8a26f850cd
commit 0f70b67a0c
2 changed files with 4 additions and 2 deletions

View File

@ -32,6 +32,8 @@ create a new CRC tree.
create a new extent tree.
--check-data-csum::
verify checkums of data blocks.
--subvol-extents <subvolid>::
show extent state for a subvolume.
EXIT STATUS
-----------

View File

@ -7544,7 +7544,7 @@ static struct option long_options[] = {
{ "init-extent-tree", 0, NULL, 0 },
{ "check-data-csum", 0, NULL, 0 },
{ "backup", 0, NULL, 0 },
{ "subvol-extents", no_argument, NULL, 'E' },
{ "subvol-extents", 1, NULL, 'E' },
{ "qgroup-report", 0, NULL, 'Q' },
{ NULL, 0, NULL, 0}
};
@ -7560,7 +7560,7 @@ const char * const cmd_check_usage[] = {
"--init-extent-tree create a new extent tree",
"--check-data-csum verify checkums of data blocks",
"--qgroup-report print a report on qgroup consistency",
"--subvol-extents print subvolume extents and sharing state",
"--subvol-extents <subvolid> print subvolume extents and sharing state",
NULL
};