btrfs-progs: fix broken 'device scan' arguments parsing

Commit 52179e4fea41e55f31c92cd033a0b53a5107b4f4 'btrfs-progs: unify argc
min/max checking' breaks 'btrfs device scan' command when no argument
was given. Fix this.

Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Yauhen Kharuzhy 2016-03-08 17:19:40 -08:00 committed by David Sterba
parent d08c73d40c
commit da3ae9c69a
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ static int cmd_device_scan(int argc, char **argv)
if (all && check_argc_max(argc - optind, 1))
usage(cmd_device_scan_usage);
if (all || argc - optind == 1) {
if (all || argc - optind == 0) {
printf("Scanning for Btrfs filesystems\n");
ret = btrfs_scan_lblkid();
error_on(ret, "error %d while scanning", ret);