aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/qemu-img.c b/qemu-img.c
index a9b3a81..439d8de 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2915,15 +2915,15 @@ static ImageInfoList *collect_image_info_list(bool image_opts,
image_opts = false;
if (chain) {
- if (info->has_full_backing_filename) {
+ if (info->full_backing_filename) {
filename = info->full_backing_filename;
- } else if (info->has_backing_filename) {
+ } else if (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) {
+ if (info->backing_filename_format) {
fmt = info->backing_filename_format;
}
}
@@ -3046,7 +3046,7 @@ static int dump_map_entry(OutputFormat output_format, MapEntry *e,
printf("%#-16"PRIx64"%#-16"PRIx64"%#-16"PRIx64"%s\n",
e->start, e->length,
e->has_offset ? e->offset : 0,
- e->has_filename ? e->filename : "");
+ e->filename ?: "");
}
/* This format ignores the distinction between 0, ZERO and ZERO|DATA.
* Modify the flags here to allow more coalescing.
@@ -3127,7 +3127,6 @@ static int get_block_status(BlockDriverState *bs, int64_t offset,
.has_offset = has_offset,
.depth = depth,
.present = !!(ret & BDRV_BLOCK_ALLOCATED),
- .has_filename = filename,
.filename = filename,
};
@@ -3143,11 +3142,11 @@ static inline bool entry_mergeable(const MapEntry *curr, const MapEntry *next)
curr->data != next->data ||
curr->depth != next->depth ||
curr->present != next->present ||
- curr->has_filename != next->has_filename ||
+ !curr->filename != !next->filename ||
curr->has_offset != next->has_offset) {
return false;
}
- if (curr->has_filename && strcmp(curr->filename, next->filename)) {
+ if (curr->filename && strcmp(curr->filename, next->filename)) {
return false;
}
if (curr->has_offset && curr->offset + curr->length != next->offset) {