FYI, I've just pushed this fix. Without it, "make check" would fail on big-endian systems.
>From 97c69934bb8c5fb2fdbe326618034dba79b1cfca Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Tue, 10 Nov 2009 15:20:08 +0100 Subject: [PATCH] gpt: fix a bug in the new PE-array CRC checks on big-endian systems * libparted/labels/gpt.c (check_PE_array_CRC, gpt_read): Always convert the PartitionEntryArrayCRC32 to CPU endianness before comparing with a just-computed CRC. --- libparted/labels/gpt.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c index 8b77c51..5037d9b 100644 --- a/libparted/labels/gpt.c +++ b/libparted/labels/gpt.c @@ -642,7 +642,7 @@ check_PE_array_CRC (PedDisk const *disk, return 1; uint32_t ptes_crc = efi_crc32 (ptes, ptes_bytes); - *valid = (ptes_crc == gpt->PartitionEntryArrayCRC32); + *valid = (ptes_crc == PED_LE32_TO_CPU (gpt->PartitionEntryArrayCRC32)); free (ptes); return 0; } @@ -1032,7 +1032,7 @@ gpt_read (PedDisk *disk) goto error_free_gpt; uint32_t ptes_crc = efi_crc32 (ptes, ptes_bytes); - if (ptes_crc != gpt->PartitionEntryArrayCRC32) + if (ptes_crc != PED_LE32_TO_CPU (gpt->PartitionEntryArrayCRC32)) { ped_exception_throw (PED_EXCEPTION_ERROR, -- 1.6.5.2.351.g0943 _______________________________________________ parted-devel mailing list parted-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/parted-devel