diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2014-08-26 19:17:54 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-08-29 10:46:57 +0100 |
commit | a3981eb978b76e75aca3d04f6c6e26de8322001b (patch) | |
tree | d180dcaccd6945d42f34cba63746f8ebbec2a355 /qemu-img.c | |
parent | 212aefaa53d142baa9a22f5aadd2e72eb916c0c0 (diff) | |
download | qemu-a3981eb978b76e75aca3d04f6c6e26de8322001b.zip qemu-a3981eb978b76e75aca3d04f6c6e26de8322001b.tar.gz qemu-a3981eb978b76e75aca3d04f6c6e26de8322001b.tar.bz2 |
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 <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |