mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-27 07:53:27 +00:00
btrfs-progs: restore: fix wrong return value if it fails to read specified fs root
Steps to reproduce: # mkfs.btrfs -f /dev/sda9 # btrfs restore -f 1 -o /tmp /dev/sda9 # echo $? Fix to return 1 in this failure path. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
d46111425a
commit
c2059f765d
@ -1239,6 +1239,7 @@ int cmd_restore(int argc, char **argv)
|
||||
root->node = read_tree_block(root, fs_location, root->leafsize, 0);
|
||||
if (!root->node) {
|
||||
fprintf(stderr, "Failed to read fs location\n");
|
||||
ret = 1;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user