[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [patch] VMDK endian fix
From: |
Benoit Poulot-Cazajous |
Subject: |
[Qemu-devel] [patch] VMDK endian fix |
Date: |
24 Sep 2005 17:56:28 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hi,
This fix allowed me to use VMDK disks on Linux/PPC.
-- Benoit
--- orig/block-vmdk.c
+++ mod/block-vmdk.c
@@ -123,8 +123,8 @@
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [patch] VMDK endian fix,
Benoit Poulot-Cazajous <=