mirror of
https://github.com/kdave/btrfs-progs
synced 2025-03-22 19:06:29 +00:00
btrfs-progs: restore: output resason why it fails to read root
Previously if restore could not read users specified fs root, it would output following message: Error reading root With this patch, it will output message like: Fail to read root 1000: No such file or directory Signed-off-byr Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
c2059f765d
commit
4cb5168ba6
@ -1263,7 +1263,8 @@ int cmd_restore(int argc, char **argv)
|
||||
key.offset = (u64)-1;
|
||||
root = btrfs_read_fs_root(orig_root->fs_info, &key);
|
||||
if (IS_ERR(root)) {
|
||||
fprintf(stderr, "Error reading root\n");
|
||||
fprintf(stderr, "fail to read root %llu: %s\n",
|
||||
root_objectid, strerror(-PTR_ERR(root)));
|
||||
root = orig_root;
|
||||
ret = 1;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user