diff options
| author | Denis V. Lunev | 2015-12-10 10:55:48 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2015-12-18 14:34:43 +0100 |
| commit | b1fc8f934ba3fcdc8381b89413ad4df2e90d5312 (patch) | |
| tree | f6d503f2a2f9621e79b702ab307a7547c2abbf12 | |
| parent | iotests: Extend test 112 for qemu-img amend (diff) | |
| download | qemu-b1fc8f934ba3fcdc8381b89413ad4df2e90d5312.tar.gz qemu-b1fc8f934ba3fcdc8381b89413ad4df2e90d5312.tar.xz qemu-b1fc8f934ba3fcdc8381b89413ad4df2e90d5312.zip | |
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>
| -rw-r--r-- | block/qcow2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 0304de65a7..1789af43d2 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2803,6 +2803,10 @@ static ImageInfoSpecific *qcow2_get_specific_info(BlockDriverState *bs) .has_corrupt = true, .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; |
