[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v3 4/5] qemu-img: abort when full_backing_filename n
From: |
John Snow |
Subject: |
[Qemu-block] [PATCH v3 4/5] qemu-img: abort when full_backing_filename not present |
Date: |
Mon, 14 Dec 2015 14:55:15 -0500 |
...But only if we have the backing_filename. It means something Scary
happened and we can't really be quite exactly sure if we can trust the
backing_filename.
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
qemu-img.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 033011c..272bb0b 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2040,7 +2040,10 @@ static ImageInfoList *collect_image_info_list(const char
*filename,
if (info->has_full_backing_filename) {
filename = info->full_backing_filename;
} else if (info->has_backing_filename) {
- filename = info->backing_filename;
+ error_report("Could not determine absolute backing filename,"
+ " but backing filename '%s' present",
+ info->backing_filename);
+ goto err;
}
if (info->has_backing_filename_format) {
fmt = info->backing_filename_format;
--
2.4.3
- [Qemu-block] [PATCH v3 0/5] block: allow partial info-block query, John Snow, 2015/12/14
- [Qemu-block] [PATCH v3 1/5] block/qapi: do not redundantly print "actual path", John Snow, 2015/12/14
- [Qemu-block] [PATCH v3 3/5] block/qapi: explicitly warn if !has_full_backing_filename, John Snow, 2015/12/14
- [Qemu-block] [PATCH v3 5/5] block/qapi: allow best-effort query, John Snow, 2015/12/14
- [Qemu-block] [PATCH v3 2/5] block/qapi: always report full_backing_filename, John Snow, 2015/12/14
- [Qemu-block] [PATCH v3 4/5] qemu-img: abort when full_backing_filename not present,
John Snow <=
- Re: [Qemu-block] [PATCH v3 0/5] block: allow partial info-block query, Max Reitz, 2015/12/14