]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
qemu-img: abort when full_backing_filename not present
authorJohn Snow <jsnow@redhat.com>
Mon, 14 Dec 2015 19:55:15 +0000 (14:55 -0500)
committerMax Reitz <mreitz@redhat.com>
Fri, 18 Dec 2015 13:36:17 +0000 (14:36 +0100)
...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>
qemu-img.c

index b6b4c9e3046d269b088923768cd83d8f99cbffad..3d48b4f00e00e098cd728d363842c54e6f426f16 100644 (file)
@@ -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;