commit parted for openSUSE:Factory
Hello community, here is the log from the commit of package parted for openSUSE:Factory checked in at 2014-05-10 08:31:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/parted (Old) and /work/SRC/openSUSE:Factory/.parted.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "parted" Changes: -------- --- /work/SRC/openSUSE:Factory/parted/parted.changes 2014-02-19 11:36:17.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.parted.new/parted.changes 2014-05-10 08:32:00.000000000 +0200 @@ -1,0 +2,8 @@ +Tue Apr 29 13:06:09 UTC 2014 - puzel@suse.com + +- Support setting boot flag in pMBR (bnc#872054): + - drop: revert-gpt-add-commands-to-manipulate-pMBR-boot-flag.patch + - add: libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch + - refresh patches + +------------------------------------------------------------------- @@ -31,0 +40 @@ + New: ---- libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ parted.spec ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -43,9 +43,6 @@ Patch16: do-not-create-dm-nodes.patch #PATCH-FEATURE-SUSE more-reliable-informing-the-kernel.patch bnc#657360 petr.uzel@suse.cz Patch17: more-reliable-informing-the-kernel.patch -#PATCH-FEATURE-SUSE revert-gpt-add-commands-to-manipulate-pMBR-boot-flag.patch -# (clashes with our hybrid pMBR patches) -Patch18: revert-gpt-add-commands-to-manipulate-pMBR-boot-flag.patch Patch19: parted-gpt-mbr-sync.patch Patch20: libparted-ppc-prepboot-in-syncmbr.patch Patch21: parted-workaround-windows7-gpt-implementation.patch @@ -59,6 +56,7 @@ Patch29: libparted-dasd-do-not-use-first-tracks.patch Patch30: libparted-initialize-dasd-part-type.patch Patch31: libparted-use-BLKRRPART-for-DASD.patch.patch +Patch32: libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch Patch100: parted-fatresize-autoconf.patch Requires: /sbin/udevadm BuildRequires: check-devel @@ -124,7 +122,6 @@ %patch15 -p1 %patch16 -p1 %patch17 -p1 -%patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 @@ -138,6 +135,7 @@ %patch29 -p1 %patch30 -p1 %patch31 -p1 +%patch32 -p1 %patch100 -p1 %build ++++++ dummy-bootcode-only-for-x86.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -1,7 +1,11 @@ -Index: parted-2.4/libparted/labels/dos.c +--- + libparted/labels/dos.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: parted-3.1/libparted/labels/dos.c =================================================================== ---- parted-2.4.orig/libparted/labels/dos.c -+++ parted-2.4/libparted/labels/dos.c +--- parted-3.1.orig/libparted/labels/dos.c ++++ parted-3.1/libparted/labels/dos.c @@ -1260,6 +1260,12 @@ msdos_write (const PedDisk* disk) return 0; DosRawTable *table = (DosRawTable *) s0; ++++++ libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch ++++++
From c261a9b340e2982a49e055ea6332fd0f49f3d531 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" <bcl@redhat.com> Date: Wed, 11 Sep 2013 12:24:51 -0700 Subject: [PATCH] libparted: copy pmbr_boot when duplicating GPT disk
* libparted/labels/gpt.c (gpt_duplicate): copy pmbr_boot flag --- libparted/labels/gpt.c | 1 + 1 file changed, 1 insertion(+) Index: parted-3.1/libparted/labels/gpt.c =================================================================== --- parted-3.1.orig/libparted/labels/gpt.c +++ parted-3.1/libparted/labels/gpt.c @@ -660,6 +660,7 @@ gpt_duplicate (const PedDisk *disk) old_disk_data->data_area.length); new_disk_data->entry_count = old_disk_data->entry_count; new_disk_data->uuid = old_disk_data->uuid; + new_disk_data->pmbr_boot = old_disk_data->pmbr_boot; return new_disk; } ++++++ libparted-ppc-prepboot-in-syncmbr.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -6,7 +6,7 @@ =================================================================== --- parted-3.1.orig/libparted/labels/gpt.c +++ parted-3.1/libparted/labels/gpt.c -@@ -1181,6 +1181,9 @@ _part_to_ostype (PedPartition* part) +@@ -1183,6 +1183,9 @@ _part_to_ostype (PedPartition* part) if (strncmp (part->fs_type->name, "hfs", 3) == 0) return 0xaf; if (strstr (part->fs_type->name, "swap")) return 0x82; } ++++++ parted-Add-Intel-Rapid-Start-Technology-partition.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -50,7 +50,7 @@ =================================================================== --- parted-3.1.orig/libparted/disk.c +++ parted-3.1/libparted/disk.c -@@ -2473,6 +2473,8 @@ ped_partition_flag_get_name (PedPartitio +@@ -2474,6 +2474,8 @@ ped_partition_flag_get_name (PedPartitio return N_("diag"); case PED_PARTITION_LEGACY_BOOT: return N_("legacy_boot"); @@ -176,7 +176,7 @@ struct __attribute__ ((packed)) _GuidPartitionTableHeader_t { -@@ -282,6 +286,7 @@ typedef struct _GPTPartitionData +@@ -283,6 +287,7 @@ typedef struct _GPTPartitionData int atvrecv; int msftrecv; int legacy_boot; @@ -184,7 +184,7 @@ } GPTPartitionData; static PedDiskType gpt_disk_type; -@@ -883,6 +888,7 @@ _parse_part_entry (PedDisk *disk, GuidPa +@@ -885,6 +890,7 @@ _parse_part_entry (PedDisk *disk, GuidPa = gpt_part_data->hidden = gpt_part_data->msftres = gpt_part_data->msftrecv = gpt_part_data->legacy_boot @@ -192,7 +192,7 @@ = gpt_part_data->bios_grub = gpt_part_data->atvrecv = 0; if (pte->Attributes.RequiredToFunction & 0x1) -@@ -906,6 +912,8 @@ _parse_part_entry (PedDisk *disk, GuidPa +@@ -908,6 +914,8 @@ _parse_part_entry (PedDisk *disk, GuidPa gpt_part_data->msftrecv = 1; else if (!guid_cmp (gpt_part_data->type, PARTITION_APPLE_TV_RECOVERY_GUID)) gpt_part_data->atvrecv = 1; @@ -201,7 +201,7 @@ return part; } -@@ -1518,6 +1526,7 @@ gpt_partition_new (const PedDisk *disk, +@@ -1531,6 +1539,7 @@ gpt_partition_new (const PedDisk *disk, gpt_part_data->msftrecv = 0; gpt_part_data->atvrecv = 0; gpt_part_data->legacy_boot = 0; @@ -209,7 +209,7 @@ uuid_generate ((unsigned char *) &gpt_part_data->uuid); swap_uuid_and_efi_guid ((unsigned char *) (&gpt_part_data->uuid)); memset (gpt_part_data->name, 0, sizeof gpt_part_data->name); -@@ -1621,6 +1630,11 @@ gpt_partition_set_system (PedPartition * +@@ -1634,6 +1643,11 @@ gpt_partition_set_system (PedPartition * gpt_part_data->type = PARTITION_APPLE_TV_RECOVERY_GUID; return 1; } @@ -221,7 +221,7 @@ if (fs_type) { -@@ -1721,6 +1735,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1774,6 +1788,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -229,7 +229,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_BIOS_GRUB: -@@ -1732,6 +1747,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1785,6 +1800,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -237,7 +237,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_RAID: -@@ -1743,6 +1759,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1796,6 +1812,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -245,7 +245,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_LVM: -@@ -1754,6 +1771,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1807,6 +1824,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -253,7 +253,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_HPSERVICE: -@@ -1765,6 +1783,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1818,6 +1836,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -261,7 +261,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_MSFT_RESERVED: -@@ -1776,6 +1795,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1829,6 +1848,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftrecv @@ -269,7 +269,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_DIAG: -@@ -1787,6 +1807,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1840,6 +1860,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftres @@ -277,7 +277,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_APPLE_TV_RECOVERY: -@@ -1798,8 +1819,21 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1851,8 +1872,21 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftres @@ -299,7 +299,7 @@ case PED_PARTITION_HIDDEN: gpt_part_data->hidden = state; return 1; -@@ -1844,6 +1878,8 @@ gpt_partition_get_flag (const PedPartiti +@@ -1897,6 +1931,8 @@ gpt_partition_get_flag (const PedPartiti return gpt_part_data->hidden; case PED_PARTITION_LEGACY_BOOT: return gpt_part_data->legacy_boot; @@ -308,7 +308,7 @@ case PED_PARTITION_SWAP: case PED_PARTITION_LBA: case PED_PARTITION_ROOT: -@@ -1869,6 +1905,7 @@ gpt_partition_is_flag_available (const P +@@ -1922,6 +1958,7 @@ gpt_partition_is_flag_available (const P case PED_PARTITION_APPLE_TV_RECOVERY: case PED_PARTITION_HIDDEN: case PED_PARTITION_LEGACY_BOOT: ++++++ parted-GPT-add-support-for-PReP-GUID.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -60,7 +60,7 @@ #define PARTITION_IRST_GUID \ ((efi_guid_t) { PED_CPU_TO_LE32 (0xD3BFE2DE), PED_CPU_TO_LE16 (0x3DAF), \ PED_CPU_TO_LE16 (0x11DF), 0xba, 0x40, \ -@@ -286,6 +290,7 @@ typedef struct _GPTPartitionData +@@ -287,6 +291,7 @@ typedef struct _GPTPartitionData int atvrecv; int msftrecv; int legacy_boot; @@ -68,7 +68,7 @@ int irst; } GPTPartitionData; -@@ -888,6 +893,7 @@ _parse_part_entry (PedDisk *disk, GuidPa +@@ -890,6 +895,7 @@ _parse_part_entry (PedDisk *disk, GuidPa = gpt_part_data->hidden = gpt_part_data->msftres = gpt_part_data->msftrecv = gpt_part_data->legacy_boot @@ -76,7 +76,7 @@ = gpt_part_data->irst = gpt_part_data->bios_grub = gpt_part_data->atvrecv = 0; -@@ -912,6 +918,8 @@ _parse_part_entry (PedDisk *disk, GuidPa +@@ -914,6 +920,8 @@ _parse_part_entry (PedDisk *disk, GuidPa gpt_part_data->msftrecv = 1; else if (!guid_cmp (gpt_part_data->type, PARTITION_APPLE_TV_RECOVERY_GUID)) gpt_part_data->atvrecv = 1; @@ -85,7 +85,7 @@ else if (!guid_cmp (gpt_part_data->type, PARTITION_IRST_GUID)) gpt_part_data->irst = 1; -@@ -1526,6 +1534,7 @@ gpt_partition_new (const PedDisk *disk, +@@ -1539,6 +1547,7 @@ gpt_partition_new (const PedDisk *disk, gpt_part_data->msftrecv = 0; gpt_part_data->atvrecv = 0; gpt_part_data->legacy_boot = 0; @@ -93,7 +93,7 @@ gpt_part_data->irst = 0; uuid_generate ((unsigned char *) &gpt_part_data->uuid); swap_uuid_and_efi_guid ((unsigned char *) (&gpt_part_data->uuid)); -@@ -1600,6 +1609,11 @@ gpt_partition_set_system (PedPartition * +@@ -1613,6 +1622,11 @@ gpt_partition_set_system (PedPartition * gpt_part_data->type = PARTITION_RAID_GUID; return 1; } @@ -105,7 +105,7 @@ if (gpt_part_data->boot) { gpt_part_data->type = PARTITION_SYSTEM_GUID; -@@ -1735,6 +1749,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1788,6 +1802,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -113,7 +113,7 @@ = gpt_part_data->irst = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); -@@ -1747,6 +1762,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1800,6 +1815,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -121,7 +121,7 @@ = gpt_part_data->irst = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); -@@ -1759,6 +1775,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1812,6 +1828,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -129,7 +129,7 @@ = gpt_part_data->irst = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); -@@ -1771,6 +1788,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1824,6 +1841,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -137,7 +137,7 @@ = gpt_part_data->irst = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); -@@ -1783,6 +1801,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1836,6 +1854,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -145,7 +145,7 @@ = gpt_part_data->irst = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); -@@ -1795,6 +1814,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1848,6 +1867,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftrecv @@ -153,7 +153,7 @@ = gpt_part_data->irst = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); -@@ -1807,6 +1827,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1860,6 +1880,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftres @@ -161,7 +161,7 @@ = gpt_part_data->irst = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); -@@ -1819,9 +1840,22 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1872,9 +1893,22 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->bios_grub = gpt_part_data->hp_service = gpt_part_data->msftres @@ -184,7 +184,7 @@ case PED_PARTITION_IRST: gpt_part_data->irst = state; if (state) -@@ -1832,6 +1866,7 @@ gpt_partition_set_flag (PedPartition *pa +@@ -1885,6 +1919,7 @@ gpt_partition_set_flag (PedPartition *pa = gpt_part_data->hp_service = gpt_part_data->msftres = gpt_part_data->msftrecv @@ -192,7 +192,7 @@ = gpt_part_data->atvrecv = 0; return gpt_partition_set_system (part, part->fs_type); case PED_PARTITION_HIDDEN: -@@ -1878,6 +1913,8 @@ gpt_partition_get_flag (const PedPartiti +@@ -1931,6 +1966,8 @@ gpt_partition_get_flag (const PedPartiti return gpt_part_data->hidden; case PED_PARTITION_LEGACY_BOOT: return gpt_part_data->legacy_boot; @@ -201,7 +201,7 @@ case PED_PARTITION_IRST: return gpt_part_data->irst; case PED_PARTITION_SWAP: -@@ -1906,6 +1943,7 @@ gpt_partition_is_flag_available (const P +@@ -1959,6 +1996,7 @@ gpt_partition_is_flag_available (const P case PED_PARTITION_HIDDEN: case PED_PARTITION_LEGACY_BOOT: case PED_PARTITION_IRST: ++++++ parted-gpt-mbr-sync.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -1,12 +1,12 @@ --- - libparted/labels/gpt.c | 239 ++++++++++++++++++++++++++++++++++++++++++++++++- - 1 file changed, 235 insertions(+), 4 deletions(-) + libparted/labels/gpt.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 236 insertions(+), 4 deletions(-) Index: parted-3.1/libparted/labels/gpt.c =================================================================== --- parted-3.1.orig/libparted/labels/gpt.c +++ parted-3.1/libparted/labels/gpt.c -@@ -285,6 +285,7 @@ typedef struct _GPTPartitionData +@@ -286,6 +286,7 @@ typedef struct _GPTPartitionData } GPTPartitionData; static PedDiskType gpt_disk_type; @@ -14,7 +14,7 @@ static inline uint32_t pth_get_size (const PedDevice *dev) -@@ -453,8 +454,50 @@ _pmbr_is_valid (const LegacyMBR_t *mbr) +@@ -454,8 +455,50 @@ _pmbr_is_valid (const LegacyMBR_t *mbr) return 0; } @@ -66,7 +66,7 @@ { GuidPartitionTableHeader_t *gpt = NULL; int gpt_sig_found = 0; -@@ -507,6 +550,19 @@ gpt_probe (const PedDevice *dev) +@@ -508,6 +551,19 @@ gpt_probe (const PedDevice *dev) return ok; } @@ -86,7 +86,7 @@ static PedDisk * gpt_alloc (const PedDevice *dev) { -@@ -544,6 +600,36 @@ error: +@@ -546,6 +602,36 @@ error: } static PedDisk * @@ -123,7 +123,7 @@ gpt_duplicate (const PedDisk *disk) { PedDisk *new_disk; -@@ -920,7 +1006,7 @@ gpt_read (PedDisk *disk) +@@ -930,7 +1016,7 @@ gpt_read (PedDisk *disk) /* motivation: let the user decide about the pmbr... during ped_disk_probe(), they probably didn't get a choice... */ @@ -132,7 +132,7 @@ goto error; GuidPartitionTableHeader_t *gpt = NULL; -@@ -1077,11 +1163,59 @@ error: +@@ -1087,11 +1173,59 @@ error: return 0; } @@ -179,21 +179,21 @@ #ifndef DISCOVER_ONLY /* Write the protective MBR (to keep DOS happy) */ static int --_write_pmbr (PedDevice *dev) -+_write_pmbr (const PedDisk *disk) +-_write_pmbr (PedDevice *dev, bool pmbr_boot) ++_write_pmbr (const PedDisk *disk, bool pmbr_boot) { -+ PedDevice * dev = disk->dev; ++ PedDevice * dev = disk->dev; + -+ /* need sync GPT -> hybrid pMBR ? */ -+ int sync_pmbr = !strcmp(disk->type->name, "gpt_sync_mbr") ? 1 : 0; ++ /* need sync GPT -> hybrid pMBR ? */ ++ int sync_pmbr = !strcmp(disk->type->name, "gpt_sync_mbr") ? 1 : 0; + -+ int i, pmbr_id, first_entry = 0, last_entry = 3; -+ PedPartition *part = NULL, *esp; ++ int i, pmbr_id, first_entry = 0, last_entry = 3; ++ PedPartition *part = NULL, *esp; + /* 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). -@@ -1095,6 +1229,8 @@ _write_pmbr (PedDevice *dev) +@@ -1105,6 +1239,8 @@ _write_pmbr (PedDevice *dev, bool pmbr_b memset (pmbr->PartitionRecord, 0, sizeof pmbr->PartitionRecord); pmbr->Signature = PED_CPU_TO_LE16 (MSDOS_MBR_SIGNATURE); @@ -202,10 +202,10 @@ pmbr->PartitionRecord[0].OSType = EFI_PMBR_OSTYPE_EFI; pmbr->PartitionRecord[0].StartSector = 1; pmbr->PartitionRecord[0].EndHead = 0xFE; -@@ -1105,7 +1241,60 @@ _write_pmbr (PedDevice *dev) - pmbr->PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32 (0xFFFFFFFF); - else +@@ -1117,6 +1253,60 @@ _write_pmbr (PedDevice *dev, bool pmbr_b pmbr->PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32 (dev->length - 1UL); + if (pmbr_boot) + pmbr->PartitionRecord[0].BootIndicator = 0x80; + } else { + /* Search for an EFI System Partition */ + esp = _find_first_part(disk); @@ -246,7 +246,7 @@ + (part->geom.end - part->geom.start + 1) > 0xFFFFFFFF) { + continue; + } - ++ + pmbr->PartitionRecord[i].OSType = _part_to_ostype(part); + pmbr->PartitionRecord[i].StartHead = 0xFE; + pmbr->PartitionRecord[i].StartSector = 0xFF; @@ -260,19 +260,19 @@ + pmbr->PartitionRecord[i].SizeInLBA = PED_CPU_TO_LE32 (_part_32bitmax(part->geom.end - part->geom.start + 1)); + } + } + int write_ok = ped_device_write (dev, pmbr, GPT_PMBR_LBA, GPT_PMBR_SECTORS); - free (s0); -@@ -1225,7 +1414,7 @@ gpt_write (const PedDisk *disk) +@@ -1237,7 +1427,7 @@ gpt_write (const PedDisk *disk) ptes_crc = efi_crc32 (ptes, ptes_bytes); /* Write protective MBR */ -- if (!_write_pmbr (disk->dev)) -+ if (!_write_pmbr (disk)) +- if (!_write_pmbr (disk->dev, gpt_disk_data->pmbr_boot)) ++ if (!_write_pmbr (disk, gpt_disk_data->pmbr_boot)) goto error_free_ptes; /* Write PTH and PTEs */ -@@ -1802,6 +1991,38 @@ static PedDiskOps gpt_disk_ops = +@@ -1857,6 +2047,38 @@ static PedDiskOps gpt_disk_ops = PT_op_function_initializers (gpt) }; @@ -311,7 +311,7 @@ static PedDiskType gpt_disk_type = { next: NULL, -@@ -1810,16 +2031,26 @@ static PedDiskType gpt_disk_type = +@@ -1865,16 +2087,26 @@ static PedDiskType gpt_disk_type = features: PED_DISK_TYPE_PARTITION_NAME }; ++++++ parted-mac.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -46,7 +46,7 @@ =================================================================== --- parted-3.1.orig/libparted/disk.c +++ parted-3.1/libparted/disk.c -@@ -1179,6 +1179,39 @@ _disk_pop_update_mode (PedDisk* disk) +@@ -1180,6 +1180,39 @@ _disk_pop_update_mode (PedDisk* disk) * @{ */ ++++++ parted-resize-command.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -105,7 +105,7 @@ static int do_rm (PedDevice** dev) { -@@ -1899,6 +1977,14 @@ NULL), +@@ -1948,6 +2026,14 @@ NULL), str_list_create (_(start_end_msg), NULL), 1)); command_register (commands, command_create ( ++++++ parted-type.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -28,7 +28,7 @@ =================================================================== --- parted-3.1.orig/libparted/disk.c +++ parted-3.1/libparted/disk.c -@@ -2426,6 +2426,8 @@ ped_partition_flag_get_name (PedPartitio +@@ -2427,6 +2427,8 @@ ped_partition_flag_get_name (PedPartitio return N_("lba"); case PED_PARTITION_HPSERVICE: return N_("hp-service"); @@ -134,7 +134,7 @@ } static int -@@ -1623,12 +1635,19 @@ do_set (PedDevice** dev) +@@ -1660,12 +1672,19 @@ do_set (PedDevice** dev) goto error_destroy_disk; if (!command_line_get_part_flag (_("Flag to Invert?"), part, &flag)) goto error_destroy_disk; ++++++ parted-workaround-windows7-gpt-implementation.patch ++++++ --- /var/tmp/diff_new_pack.PkWunO/_old 2014-05-10 08:32:01.000000000 +0200 +++ /var/tmp/diff_new_pack.PkWunO/_new 2014-05-10 08:32:01.000000000 +0200 @@ -1,9 +1,13 @@ bnc#781688 -Index: parted-2.4/libparted/labels/gpt.c +--- + libparted/labels/gpt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: parted-3.1/libparted/labels/gpt.c =================================================================== ---- parted-2.4.orig/libparted/labels/gpt.c -+++ parted-2.4/libparted/labels/gpt.c -@@ -488,7 +488,7 @@ _has_hybrid_pmbr (const PedDevice *dev) +--- parted-3.1.orig/libparted/labels/gpt.c ++++ parted-3.1/libparted/labels/gpt.c +@@ -489,7 +489,7 @@ _has_hybrid_pmbr (const PedDevice *dev) if ((mbr.PartitionRecord[0].OSType == EFI_PMBR_OSTYPE_EFI) && (mbr.PartitionRecord[0].StartingLBA == PED_CPU_TO_LE32(1)) && -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de