summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index 3465f84..8e8afc5 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -1214,9 +1214,10 @@ int cmd_restore(int argc, char **argv)
}
}
- if (!list_roots && optind + 1 >= argc)
+ set_argv0(argv);
+ if (!list_roots && check_argc_min(argc - optind, 2))
usage(cmd_restore_usage);
- else if (list_roots && optind >= argc)
+ else if (list_roots && check_argc_min(argc - optind, 1))
usage(cmd_restore_usage);
if (fs_location && root_objectid) {