projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d461114
)
btrfs-progs: restore: fix wrong return value if it fails to read specified fs root
author
Wang Shilong
<wangsl.fnst@cn.fujitsu.com>
Thu, 19 Jun 2014 01:27:06 +0000
(09:27 +0800)
committer
David Sterba
<dsterba@suse.cz>
Fri, 22 Aug 2014 12:43:09 +0000
(14:43 +0200)
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>
cmds-restore.c
patch
|
blob
|
history
diff --git
a/cmds-restore.c
b/cmds-restore.c
index
c84ac17
..
52c79f9
100644
(file)
--- a/
cmds-restore.c
+++ b/
cmds-restore.c
@@
-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;
}
}