summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-04-29 16:48:04 +0200
committerDavid Sterba <dsterba@suse.cz>2015-04-29 16:48:04 +0200
commit630a917aa1369d39f0f3311b2437bd97ff05c057 (patch)
tree91a8ff75d35da72ce5a4947c6bc8ab2689ca4e02 /cmds-restore.c
parent1b7dd327f43777bcdd217a0500e6bda78128a290 (diff)
btrfs-progs: restore: don't misreport errors from search_dir
The logic around return value has changed in the metadata restore patches. The return value from btrfs_search_slot may remain non-zero and is returned. This is incorrectly interpreted as an error. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index 8cf7a1fa..e1411e91 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -812,6 +812,8 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
goto out;
}
+ ret = 0;
+
leaf = path->nodes[0];
while (!leaf) {
if (verbose > 1)