From: Zhi Yong Wu Date: Sat, 28 Apr 2012 07:38:08 +0000 (+0800) Subject: qcow2: fix endianness conversion X-Git-Tag: v1.2.0-rc0~269^2~37 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=87267753a36798e25262ee48264bea2ab70921aa;p=qemu.git qcow2: fix endianness conversion Signed-off-by: Zhi Yong Wu Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 812c93c5c..443c02145 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -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 */