[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 02/21] qemu-img: Improve commit invalid base message
From: |
Max Reitz |
Subject: |
[Qemu-block] [PULL 02/21] qemu-img: Improve commit invalid base message |
Date: |
Sun, 12 Feb 2017 02:34:21 +0100 |
When trying to invoke qemu-img commit with a base image file name that
is not part of the top image's backing chain, the user receives a rather
plain "Base not found" error message. This is not really helpful because
it does not explain what "not found" means, potentially leaving the user
wondering why qemu cannot find a file despite it clearly existing in the
file system.
Improve the error message by clarifying that "not found" means "not
found in the top image's backing chain".
Reported-by: Ala Hino <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
qemu-img.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 74e3362653..933876cfe1 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -912,7 +912,9 @@ static int img_commit(int argc, char **argv)
if (base) {
base_bs = bdrv_find_backing_image(bs, base);
if (!base_bs) {
- error_setg(&local_err, QERR_BASE_NOT_FOUND, base);
+ error_setg(&local_err,
+ "Did not find '%s' in the backing chain of '%s'",
+ base, filename);
goto done;
}
} else {
--
2.11.0
- [Qemu-block] [PULL 00/21] Block patches, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 01/21] iotests: Fix a problem in common.filter, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 02/21] qemu-img: Improve commit invalid base message,
Max Reitz <=
- [Qemu-block] [PULL 03/21] qapi: Tweak error message of bdrv_query_image_info, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 04/21] iotests: Fix reference output for 059, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 05/21] iotests: record separate timings per format, protocol pair, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 06/21] block/vmdk: Fix the endian problem of buf_len and lba, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 07/21] block: check full backing filename when searching protocol filenames, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 08/21] qemu-iotests: Don't create fifos / pidfiles with protocol paths, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 09/21] qemu-iotest: test to lookup protocol-based image with relative backing, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 11/21] block/qapi: reduce the execution time of qmp_query_blockstats, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 10/21] block/qapi: reduce the coupling between the bdrv_query_stats and bdrv_query_bds_stats, Max Reitz, 2017/02/11
- [Qemu-block] [PULL 12/21] block: bdrv_invalidate_cache: invalidate children first, Max Reitz, 2017/02/11