提交 b1fc8f93 编写于 作者: D Denis V. Lunev 提交者: Kevin Wolf

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: NDenis 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: NEric Blake <eblake@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 e9dbdc5e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册