mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-11 08:19:32 +00:00
btrfs-progs: restore: don't allow users to specify -r and -f at the same time
These two options are used for same purpose, but they are exclusive with each other. Make it clear to common users. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
4cb5168ba6
commit
958bd97a55
@ -1218,6 +1218,11 @@ int cmd_restore(int argc, char **argv)
|
||||
else if (list_roots && optind >= argc)
|
||||
usage(cmd_restore_usage);
|
||||
|
||||
if (fs_location && root_objectid) {
|
||||
fprintf(stderr, "don't use -f and -r at the same time.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((ret = check_mounted(argv[optind])) < 0) {
|
||||
fprintf(stderr, "Could not check mount status: %s\n",
|
||||
strerror(-ret));
|
||||
|
Loading…
Reference in New Issue
Block a user