[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/3] qemu-img: fix img_commit() error return value
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 1/3] qemu-img: fix img_commit() error return value |
Date: |
Tue, 26 Aug 2014 19:17:54 +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>
---
qemu-img.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index c843420..dc3adb5 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -771,7 +771,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