qcow2: fix endianness conversion

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Zhi Yong Wu 2012-04-28 15:38:08 +08:00 committed by Kevin Wolf
parent 833e40858c
commit 87267753a3

View File

@ -367,7 +367,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
}
for(i = 0; i < table_size; i++) {
cpu_to_be64s(&new_table[i]);
be64_to_cpus(&new_table[i]);
}
/* Hook up the new refcount table in the qcow2 header */