aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-12-14 14:55:14 -0500
committerMax Reitz <mreitz@redhat.com>2015-12-18 14:36:17 +0100
commit5c9d9ca59735d245599884cf1db744c2b403367c (patch)
treedfe0a9429d410f7d3e4d471f66c7cf304310e19e /block
parent12dcb1c0183bba4499d9c8bd37fa7112549cafd7 (diff)
block/qapi: explicitly warn if !has_full_backing_filename
Disambiguate "Backing filename and full backing filename are equivalent" from "full backing filename could not be determined." Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1450122916-4706-4-git-send-email-jsnow@redhat.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/qapi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/qapi.c b/block/qapi.c
index 3d8e4341c3..5587c6471c 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -677,9 +677,10 @@ 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 &&
- (strcmp(info->backing_filename,
- info->full_backing_filename) != 0)) {
+ if (!info->has_full_backing_filename) {
+ func_fprintf(f, " (cannot determine actual path)");
+ } else if (strcmp(info->backing_filename,
+ info->full_backing_filename) != 0) {
func_fprintf(f, " (actual path: %s)", info->full_backing_filename);
}
func_fprintf(f, "\n");