From: Stefan Hajnoczi Date: Tue, 26 Aug 2014 18:17:54 +0000 (+0100) Subject: qemu-img: fix img_commit() error return value X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a3981eb978b76e75aca3d04f6c6e26de8322001b;p=qemu.git qemu-img: fix img_commit() error return value The img_commit() return value is a process exit code. Use 1 for failure instead of -1. The other failure paths in this function already use 1. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz --- diff --git a/qemu-img.c b/qemu-img.c index 2052b14b84..863798e54b 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -752,7 +752,7 @@ static int img_commit(int argc, char **argv) ret = bdrv_parse_cache_flags(cache, &flags); if (ret < 0) { error_report("Invalid cache option: %s", cache); - return -1; + return 1; } bs = bdrv_new_open("image", filename, fmt, flags, true, quiet);