[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 01/23] block: failed qemu-img command should return n
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 01/23] block: failed qemu-img command should return non-zero exit code |
Date: |
Mon, 24 Oct 2016 19:01:49 +0200 |
From: Xu Tian <address@hidden>
If the backing file cannot be opened when doing qemu-img rebase, the
variable 'ret' was not assigned a non-zero value, and the qemu-img
process terminated with exit code zero. Fix this.
Signed-off-by: Xu Tian <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
qemu-img.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qemu-img.c b/qemu-img.c
index 67e8512..ab395a9 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2956,6 +2956,7 @@ static int img_rebase(int argc, char **argv)
error_reportf_err(local_err,
"Could not open old backing file '%s': ",
backing_name);
+ ret = -1;
goto out;
}
@@ -2973,6 +2974,7 @@ static int img_rebase(int argc, char **argv)
error_reportf_err(local_err,
"Could not open new backing file '%s': ",
out_baseimg);
+ ret = -1;
goto out;
}
}
--
1.8.3.1
- [Qemu-block] [PULL 00/23] Block layer patches, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 01/23] block: failed qemu-img command should return non-zero exit code,
Kevin Wolf <=
- [Qemu-block] [PULL 04/23] block: improve error handling in raw_open, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 02/23] qcow2: Support BDRV_REQ_MAY_UNMAP, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 03/23] block: Remove "options" indirection from blockdev-add, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 05/23] qapi: fix memory leak in bdrv_image_info_specific_dump, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 08/23] qemu-nbd: Add --fork option, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 09/23] iotests: Remove raciness from 162, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 10/23] iotests: Do not rely on unavailable domains in 162, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 06/23] throttle: Correct access to wrong BlockBackendPublic structures, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 07/23] qemu-iotests: Test I/O in a single drive from a throttling group, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 13/23] block: Hide HBitmap in block dirty bitmap interface, Kevin Wolf, 2016/10/24