qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org, mreitz@redhat.com
Subject: [Qemu-devel] [PATCH v3 4/5] qemu-img: abort when full_backing_filename not present
Date: Mon, 14 Dec 2015 14:55:15 -0500	[thread overview]
Message-ID: <1450122916-4706-5-git-send-email-jsnow@redhat.com> (raw)
In-Reply-To: <1450122916-4706-1-git-send-email-jsnow@redhat.com>

...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>
---
 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

  parent reply	other threads:[~2015-12-14 19:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 19:55 [Qemu-devel] [PATCH v3 0/5] block: allow partial info-block query John Snow
2015-12-14 19:55 ` [Qemu-devel] [PATCH v3 1/5] block/qapi: do not redundantly print "actual path" John Snow
2015-12-14 19:55 ` [Qemu-devel] [PATCH v3 2/5] block/qapi: always report full_backing_filename John Snow
2015-12-14 19:55 ` [Qemu-devel] [PATCH v3 3/5] block/qapi: explicitly warn if !has_full_backing_filename John Snow
2015-12-14 20:06   ` Max Reitz
2015-12-14 20:11   ` Max Reitz
2015-12-14 19:55 ` John Snow [this message]
2015-12-14 19:55 ` [Qemu-devel] [PATCH v3 5/5] block/qapi: allow best-effort query John Snow
2015-12-14 20:06   ` Max Reitz
2015-12-14 20:46 ` [Qemu-devel] [PATCH v3 0/5] block: allow partial info-block query Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450122916-4706-5-git-send-email-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).