diff --git a/parted-gpt-mbr-sync.patch b/parted-gpt-mbr-sync.patch index 8dab874..b679671 100644 --- a/parted-gpt-mbr-sync.patch +++ b/parted-gpt-mbr-sync.patch @@ -4,9 +4,9 @@ Index: libparted/labels/gpt.c =================================================================== ---- libparted/labels/gpt.c.orig 2010-05-06 15:46:05.000000000 +0200 -+++ libparted/labels/gpt.c 2010-07-08 13:29:33.000000000 +0200 -@@ -50,6 +50,11 @@ +--- libparted/labels/gpt.c.orig ++++ libparted/labels/gpt.c +@@ -51,6 +51,11 @@ # define _(String) (String) #endif /* ENABLE_NLS */ @@ -18,7 +18,7 @@ Index: libparted/labels/gpt.c #define EFI_PMBR_OSTYPE_EFI 0xEE #define MSDOS_MBR_SIGNATURE 0xaa55 -@@ -1056,11 +1061,60 @@ error: +@@ -1072,11 +1077,60 @@ error: return 0; } @@ -80,7 +80,7 @@ Index: libparted/labels/gpt.c /* The UEFI spec is not clear about what to do with the following elements of the Protective MBR (pmbr): BootCode (0-440B), UniqueMBRSignature (440B-444B) and Unknown (444B-446B). -@@ -1070,10 +1124,13 @@ _write_pmbr (PedDevice *dev) +@@ -1086,10 +1140,13 @@ _write_pmbr (PedDevice *dev) return 0; LegacyMBR_t *pmbr = s0; @@ -94,7 +94,7 @@ Index: libparted/labels/gpt.c pmbr->PartitionRecord[0].OSType = EFI_PMBR_OSTYPE_EFI; pmbr->PartitionRecord[0].StartSector = 1; pmbr->PartitionRecord[0].EndHead = 0xFE; -@@ -1084,6 +1141,54 @@ _write_pmbr (PedDevice *dev) +@@ -1100,6 +1157,53 @@ _write_pmbr (PedDevice *dev) pmbr->PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32 (0xFFFFFFFF); else pmbr->PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32 (dev->length - 1UL); @@ -133,7 +133,6 @@ Index: libparted/labels/gpt.c + continue; + } + pmbr->PartitionRecord[i].OSType = _part_to_ostype(part); -+ pmbr->PartitionRecord[i].StartSector = 1; + pmbr->PartitionRecord[i].StartHead = 0xFE; + pmbr->PartitionRecord[i].StartSector = 0xFF; + pmbr->PartitionRecord[i].StartTrack = 0xFF; @@ -143,13 +142,13 @@ Index: libparted/labels/gpt.c + pmbr->PartitionRecord[i].StartingLBA = _part_32bitmax(part->geom.start); + if(((GPTPartitionData*)part->disk_specific)->boot) + pmbr->PartitionRecord[i].BootIndicator = 0x80; -+ pmbr->PartitionRecord[i].SizeInLBA = _part_32bitmax(part->geom.end - part->geom.start); ++ pmbr->PartitionRecord[i].SizeInLBA = _part_32bitmax(part->geom.end - part->geom.start + 1); + } +#endif int write_ok = ped_device_write (dev, pmbr, GPT_PMBR_LBA, GPT_PMBR_SECTORS); -@@ -1198,7 +1303,7 @@ gpt_write (const PedDisk *disk) +@@ -1216,7 +1320,7 @@ gpt_write (const PedDisk *disk) ptes_crc = efi_crc32 (ptes, ptes_size); /* Write protective MBR */ diff --git a/parted.changes b/parted.changes index fe9ce39..3bf2e90 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 16 09:07:50 UTC 2011 - puzel@novell.com + +- update parted-gpt-mbr-sync.patch so that it no longer + creates synced partitions one sector shorter (bnc#700465) + ------------------------------------------------------------------- Sun Jul 31 01:50:07 UTC 2011 - crrodriguez@opensuse.org