]> git.proxmox.com Git - qemu.git/commitdiff
qcow2: fix endianness conversion
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Sat, 28 Apr 2012 07:38:08 +0000 (15:38 +0800)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Jun 2012 12:03:42 +0000 (14:03 +0200)
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>
block/qcow2-refcount.c

index 812c93c5c7abdb365f113d4ed860926b9d87f222..443c02145ac3a0b6882a29bf57ebe28326f08f25 100644 (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 */