mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-05 11:39:54 +00:00
vmdk endianness fix (Benoit Poulot-Cazajous)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1589 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
02aab46a36
commit
bd6ea3c8f3
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user