mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qcow2: Fix DEBUG_* compilation
By introducing BlockDriverState compiling qcow2 with DEBUG_ALLOC and DEBUG_EXT defined got broken. Define a BdrvCheckResult structure locally which is now needed as the second argument. Also fix qcow2_read_extensions() needing BDRVQcowState. Signed-off-by: Philipp Hahn <hahn@univention.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
92196b2f56
commit
6cbc3031c8
2 changed files with 17 additions and 4 deletions
|
@ -87,6 +87,7 @@ static int qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset,
|
|||
while (offset < end_offset) {
|
||||
|
||||
#ifdef DEBUG_EXT
|
||||
BDRVQcowState *s = bs->opaque;
|
||||
/* Sanity check */
|
||||
if (offset > s->cluster_size)
|
||||
printf("qcow2_read_extension: suspicious offset %lu\n", offset);
|
||||
|
@ -280,7 +281,10 @@ static int qcow2_open(BlockDriverState *bs, int flags)
|
|||
qemu_co_mutex_init(&s->lock);
|
||||
|
||||
#ifdef DEBUG_ALLOC
|
||||
qcow2_check_refcounts(bs);
|
||||
{
|
||||
BdrvCheckResult result = {0};
|
||||
qcow2_check_refcounts(bs, &result);
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue