Message ID | 20190704061103.20096-3-wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: image: Enhancement with new data dump feature | expand |
diff --git a/image/main.c b/image/main.c index fb407f33f858..7c499c0853d0 100644 --- a/image/main.c +++ b/image/main.c @@ -2734,7 +2734,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; }
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> --- image/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)