Commit bd6ea3c8f32b3f1127026ecdd813b87baf649483
1 parent
02aab46a
vmdk endianness fix (Benoit Poulot-Cazajous)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1589 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
block-vmdk.c
... | ... | @@ -123,8 +123,8 @@ static int vmdk_open(BlockDriverState *bs, const char *filename) |
123 | 123 | |
124 | 124 | if (read(fd, &header, sizeof(header)) != sizeof(header)) |
125 | 125 | goto fail; |
126 | - bs->total_sectors = le32_to_cpu(header.capacity); | |
127 | - s->cluster_sectors = le32_to_cpu(header.granularity); | |
126 | + bs->total_sectors = le64_to_cpu(header.capacity); | |
127 | + s->cluster_sectors = le64_to_cpu(header.granularity); | |
128 | 128 | s->l2_size = le32_to_cpu(header.num_gtes_per_gte); |
129 | 129 | s->l1_entry_sectors = s->l2_size * s->cluster_sectors; |
130 | 130 | if (s->l1_entry_sectors <= 0) | ... | ... |