Fix: btrfsctl arguments handling
authorAhmed <email.ahmedkamal@googlemail.com>
Wed, 30 Jul 2008 13:17:21 +0000 (09:17 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Wed, 30 Jul 2008 13:17:21 +0000 (09:17 -0400)
btrfsctl -A
in the current -unstable branch, does not result in the error message
designated for it, namely "-A requires an arg\n"

btrfsctl.c

index 0cdf272..cc1b1ff 100644 (file)
@@ -75,7 +75,7 @@ int main(int ac, char **av)
                btrfs_scan_one_dir("/dev", 1);
                exit(0);
        }
-       for (i = 1; i < ac - 1; i++) {
+       for (i = 1; i < ac; i++) {
                if (strcmp(av[i], "-s") == 0) {
                        if (i + 1 >= ac - 1) {
                                fprintf(stderr, "-s requires an arg");