mirror of https://github.com/proxmox/mirror_qemu
qcow2: insert assert into qcow2_get_specific_info()
s->qcow_version is always set to 2 or 3. Let's assert if this is wrong. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Roman Kagan <rkagan@virtuozzo.com> CC: Max Reitz <mreitz@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>master
parent
e9dbdc5e46
commit
b1fc8f934b
|
@ -2803,6 +2803,10 @@ static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs)
|
||||||
.has_corrupt = true,
|
.has_corrupt = true,
|
||||||
.refcount_bits = s->refcount_bits,
|
.refcount_bits = s->refcount_bits,
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
/* if this assertion fails, this probably means a new version was
|
||||||
|
* added without having it covered here */
|
||||||
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return spec_info;
|
return spec_info;
|
||||||
|
|
Loading…
Reference in New Issue