aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-12-14 14:55:15 -0500
committerMax Reitz <mreitz@redhat.com>2015-12-18 14:36:17 +0100
commit92d617abc53180cbfa88482382e8f0c13853cc1d (patch)
tree1fe047bb408d1b4b76fa113df3759eabfef3fd76 /qemu-img.c
parent5c9d9ca59735d245599884cf1db744c2b403367c (diff)
qemu-img: abort when full_backing_filename not present
...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 <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1450122916-4706-5-git-send-email-jsnow@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c
index b6b4c9e304..3d48b4f00e 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;