summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2014-10-31 14:01:23 -0400
committerDavid Sterba <dsterba@suse.cz>2014-11-14 11:00:24 +0100
commit6d6a3e79917487fd3c8945b82e785f77ac84882b (patch)
tree6a03e8ca95878f98ed29893866d02bb92a1af7c0
parent4fa068bcdb0e6714361b969367d6805fbeeba57d (diff)
Btrfs-progs: spit out the broken file when ignoring errors
It's nice to ignore errors on restore, but spit out the filename so the user knows which files of his aren't going to look right. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r--cmds-restore.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index 38a131e8..b52d5c8b 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -840,6 +840,8 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
ret = copy_file(root, fd, &location, path_name);
close(fd);
if (ret) {
+ fprintf(stderr, "Error copying data for %s\n",
+ path_name);
if (ignore_errors)
goto next;
btrfs_free_path(path);
@@ -917,6 +919,8 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
output_rootdir, dir, mreg);
free(dir);
if (ret) {
+ fprintf(stderr, "Error searching %s\n",
+ path_name);
if (ignore_errors)
goto next;
btrfs_free_path(path);