aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2012-04-28 15:38:08 +0800
committerMichael Roth <mdroth@linux.vnet.ibm.com>2012-06-25 08:55:25 -0500
commit02fe741375d4993b3d6870ff6466cc775b409ba1 (patch)
tree73f201f60d8d435d4538d4f6ef6f21a0b9f63292
parentpci_bridge_dev: fix error path in pci_bridge_dev_initfn() (diff)
downloadqemu-kvm-02fe741375d4993b3d6870ff6466cc775b409ba1.tar.gz
qemu-kvm-02fe741375d4993b3d6870ff6466cc775b409ba1.tar.bz2
qemu-kvm-02fe741375d4993b3d6870ff6466cc775b409ba1.zip
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> (cherry picked from commit 87267753a36798e25262ee48264bea2ab70921aa) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-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 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 */