summaryrefslogtreecommitdiff
path: root/block/qcow2-refcount.c
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2012-04-28 15:38:08 +0800
committerKevin Wolf <kwolf@redhat.com>2012-06-15 14:03:42 +0200
commit87267753a36798e25262ee48264bea2ab70921aa (patch)
tree274f2819328686f87983a6abbf0681df36cdb249 /block/qcow2-refcount.c
parent833e40858cb9501c5e76b3aa345e4bb5be34385a (diff)
downloadqemu-87267753a36798e25262ee48264bea2ab70921aa.tar.gz
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>
Diffstat (limited to 'block/qcow2-refcount.c')
-rw-r--r--block/qcow2-refcount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 812c93c5c7..443c02145a 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 */