Fix: btrfsctl arguments handling

btrfsctl -A
in the current -unstable branch, does not result in the error message
designated for it, namely "-A requires an arg\n"
This commit is contained in:
Ahmed 2008-07-30 09:17:21 -04:00 committed by David Woodhouse
parent 48c2290d4c
commit 26641e8d32

View 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");