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 1/5] block/qapi: do not redundantly print "actual path"
Date: Mon, 14 Dec 2015 14:55:12 -0500	[thread overview]
Message-ID: <1450122916-4706-2-git-send-email-jsnow@redhat.com> (raw)
In-Reply-To: <1450122916-4706-1-git-send-email-jsnow@redhat.com>

If it happens to match the backing path, that was the actual path.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
 block/qapi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/qapi.c b/block/qapi.c
index 267f147..01569da 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -676,7 +676,9 @@ void bdrv_image_info_dump(fprintf_function func_fprintf, void *f,
 
     if (info->has_backing_filename) {
         func_fprintf(f, "backing file: %s", info->backing_filename);
-        if (info->has_full_backing_filename) {
+        if (info->has_full_backing_filename &&
+            (strcmp(info->backing_filename,
+                    info->full_backing_filename) != 0)) {
             func_fprintf(f, " (actual path: %s)", info->full_backing_filename);
         }
         func_fprintf(f, "\n");
-- 
2.4.3

  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 ` John Snow [this message]
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 ` [Qemu-devel] [PATCH v3 4/5] qemu-img: abort when full_backing_filename not present John Snow
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-2-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).