[Parted-commits] GNU Parted Official Repository: Changes to 'master'
Jim Meyering
meyering at alioth.debian.org
Fri Feb 20 17:07:31 UTC 2009
libparted/labels/gpt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 9685f8ffa7f39700426fd099298a228b426e4a56
Author: Petr Uzel <petr.uzel at suse.cz>
Date: Fri Feb 20 14:52:39 2009 +0100
gpt: avoid failed assertion on big-endian systems
* libparted/labels/gpt.c (_parse_header): Compute last_usable_if_grown
not as an LE64 value but as a CPU-format one, since we're about to
compare it to another.
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
index ae74123..90e5068 100644
--- a/libparted/labels/gpt.c
+++ b/libparted/labels/gpt.c
@@ -676,7 +676,7 @@ _parse_header (PedDisk* disk, GuidPartitionTableHeader_t* gpt,
*/
last_usable_if_grown
- = PED_CPU_TO_LE64 (disk->dev->length - 2 -
+ = (disk->dev->length - 2 -
((PedSector)(PED_LE32_TO_CPU(gpt->NumberOfPartitionEntries)) *
(PedSector)(PED_LE32_TO_CPU(gpt->SizeOfPartitionEntry)) /
disk->dev->sector_size));
More information about the Parted-commits
mailing list