aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-10-30 20:53:51 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-10-30 20:53:51 +0000
commitbd6ea3c8f32b3f1127026ecdd813b87baf649483 (patch)
tree809ff7c21821bb61dc475d882de8f090285cf56f
parent02aab46a362acd041006776e322a85a7753e4c14 (diff)
downloadqemu-bd6ea3c8f32b3f1127026ecdd813b87baf649483.zip
qemu-bd6ea3c8f32b3f1127026ecdd813b87baf649483.tar.gz
qemu-bd6ea3c8f32b3f1127026ecdd813b87baf649483.tar.bz2
vmdk endianness fix (Benoit Poulot-Cazajous)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1589 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--block-vmdk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block-vmdk.c b/block-vmdk.c
index 3bbd149..fc87be3 100644
--- a/block-vmdk.c
+++ b/block-vmdk.c
@@ -123,8 +123,8 @@ static int vmdk_open(BlockDriverState *bs, const char *filename)
if (read(fd, &header, sizeof(header)) != sizeof(header))
goto fail;
- bs->total_sectors = le32_to_cpu(header.capacity);
- s->cluster_sectors = le32_to_cpu(header.granularity);
+ bs->total_sectors = le64_to_cpu(header.capacity);
+ s->cluster_sectors = le64_to_cpu(header.granularity);
s->l2_size = le32_to_cpu(header.num_gtes_per_gte);
s->l1_entry_sectors = s->l2_size * s->cluster_sectors;
if (s->l1_entry_sectors <= 0)