The btrfs-rescue accepts exactly one arg for both
chunk-recover & super-recover, use check_argc_exact clearly.
---
cmds-rescue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-rescue.c b/cmds-rescue.c
index 9491d0c..3629141 100644
--- a/cmds-rescue.c
+++ b/cmds-rescue.c
@@ -85,7 +85,7 @@ int cmd_chunk_recover(int argc, char *argv[])
}
argc = argc - optind;
- if (argc == 0)
+ if (check_argc_exact(argc, 1))
usage(cmd_chunk_recover_usage);
file = argv[optind];
@@ -141,7 +141,7 @@ int cmd_super_recover(int argc, char **argv)
}
}
argc = argc - optind;
- if (argc != 1)
+ if (check_argc_exact(argc, 1))
usage(cmd_super_recover_usage);
dname = argv[optind];
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html