[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/35] qemu-img: fix img_commit() error return value
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 03/35] qemu-img: fix img_commit() error return value |
Date: |
Fri, 29 Aug 2014 17:29:31 +0100 |
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 <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
qemu-img.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 2052b14..863798e 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);
--
1.9.3
- [Qemu-devel] [PULL 00/35] Block patches, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 01/35] ide: Fix bootindex for bus_id > 9, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 02/35] block.curl: adding 'timeout' option, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 03/35] qemu-img: fix img_commit() error return value,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 04/35] qemu-img: fix img_compare() flags error path, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 05/35] qemu-img: always goto out in img_snapshot() error paths, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 08/35] qapi: add read-pattern enum for quorum, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 10/35] coroutine: Drop co_sleep_ns, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 09/35] block/quorum: add simple read pattern support, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 11/35] blockdev: fix drive-mirror 'granularity' error message, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 12/35] AioContext: take bottom halves into account when computing aio_poll timeout, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 07/35] sheepdog: improve error handling for a case of failed lock, Stefan Hajnoczi, 2014/08/29
- [Qemu-devel] [PULL 13/35] aio-win32: Evaluate timers after handles, Stefan Hajnoczi, 2014/08/29