[PATCH] Fixed improper data conversion in _parse_header()
Petr Uzel
puzel at foxbat.suse.cz
Mon Oct 20 09:09:28 UTC 2008
---
libparted/labels/gpt.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index 13d2e88..5ba4be9 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -675,11 +675,10 @@ _parse_header (PedDisk* disk, GuidPartitionTableHeader_t* gpt,
parted invocation.
*/
- last_usable_if_grown
- = PED_CPU_TO_LE64 (disk->dev->length - 2 -
+ last_usable_if_grown = disk->dev->length - 2 -
((PedSector)(PED_LE32_TO_CPU(gpt->NumberOfPartitionEntries)) *
(PedSector)(PED_LE32_TO_CPU(gpt->SizeOfPartitionEntry)) /
- disk->dev->sector_size));
+ disk->dev->sector_size);
last_usable_min_default = disk->dev->length - 2 -
GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE / disk->dev->sector_size;
--
1.6.0.2
--SLDf9lqlvOQaIe6s--
More information about the parted-devel
mailing list