summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>2016-03-08 17:19:40 -0800
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commitda3ae9c69ab4e557e625cabe8894e442def60b62 (patch)
tree20969cbbbf083feb2a13c8269b48f67b88d11e19
parentd08c73d40c9f25ef2d58d3f245e2ada7c8117a35 (diff)
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>
-rw-r--r--cmds-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 3f800e6d..fff05e4c 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -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);