mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-12-13 14:13:30 +08:00
btrfs-progs: image: Fix error output to show correct return value
We can easily get confusing error message like: ERROR: restore failed: Success This is caused by wrong "%m" usage, as we normally use ret to indicate error, without populating errno. This patch will fix it by output the return value directly as normally we have extra error message to show more meaning message than the return value. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
4dd66c7991
commit
d216266340
@ -2735,7 +2735,7 @@ int BOX_MAIN(image)(int argc, char *argv[])
|
||||
0, target, multi_devices);
|
||||
}
|
||||
if (ret) {
|
||||
error("%s failed: %m", (create) ? "create" : "restore");
|
||||
error("%s failed: %d", (create) ? "create" : "restore", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user