- improve parted-gpt-sync-mbr-label.patch: do not
sync partitions that can not be represented by the DOS label (bnc#710402) OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=52
This commit is contained in:
parent
b5ef70a57e
commit
c61974b09f
@ -195,7 +195,21 @@ Index: parted-2.4/libparted/labels/gpt.c
|
|||||||
/* Search for an EFI System Partition */
|
/* Search for an EFI System Partition */
|
||||||
esp = _find_first_part(disk);
|
esp = _find_first_part(disk);
|
||||||
if (!esp || !esp->fs_type || strncmp (esp->fs_type->name, "fat", 3) != 0)
|
if (!esp || !esp->fs_type || strncmp (esp->fs_type->name, "fat", 3) != 0)
|
||||||
@@ -1203,8 +1282,7 @@ _write_pmbr (const PedDisk *disk)
|
@@ -1191,6 +1270,13 @@ _write_pmbr (const PedDisk *disk)
|
||||||
|
i--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ /* partition can not be represented by dos label - don't sync it */
|
||||||
|
+ if (part->geom.start > 0xFFFFFFFF ||
|
||||||
|
+ (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;
|
||||||
|
@@ -1203,8 +1289,7 @@ _write_pmbr (const PedDisk *disk)
|
||||||
pmbr->PartitionRecord[i].BootIndicator = 0x80;
|
pmbr->PartitionRecord[i].BootIndicator = 0x80;
|
||||||
pmbr->PartitionRecord[i].SizeInLBA = _part_32bitmax(part->geom.end - part->geom.start + 1);
|
pmbr->PartitionRecord[i].SizeInLBA = _part_32bitmax(part->geom.end - part->geom.start + 1);
|
||||||
}
|
}
|
||||||
@ -205,7 +219,7 @@ Index: parted-2.4/libparted/labels/gpt.c
|
|||||||
int write_ok = ped_device_write (dev, pmbr, GPT_PMBR_LBA,
|
int write_ok = ped_device_write (dev, pmbr, GPT_PMBR_LBA,
|
||||||
GPT_PMBR_SECTORS);
|
GPT_PMBR_SECTORS);
|
||||||
free (s0);
|
free (s0);
|
||||||
@@ -1902,6 +1980,38 @@ static PedDiskOps gpt_disk_ops =
|
@@ -1902,6 +1987,38 @@ static PedDiskOps gpt_disk_ops =
|
||||||
PT_op_function_initializers (gpt)
|
PT_op_function_initializers (gpt)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -244,7 +258,7 @@ Index: parted-2.4/libparted/labels/gpt.c
|
|||||||
static PedDiskType gpt_disk_type =
|
static PedDiskType gpt_disk_type =
|
||||||
{
|
{
|
||||||
next: NULL,
|
next: NULL,
|
||||||
@@ -1910,16 +2020,26 @@ static PedDiskType gpt_disk_type =
|
@@ -1910,16 +2027,26 @@ static PedDiskType gpt_disk_type =
|
||||||
features: PED_DISK_TYPE_PARTITION_NAME
|
features: PED_DISK_TYPE_PARTITION_NAME
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 26 08:41:49 UTC 2011 - puzel@suse.com
|
||||||
|
|
||||||
|
- improve parted-gpt-sync-mbr-label.patch: do not
|
||||||
|
sync partitions that can not be represented by the DOS label
|
||||||
|
(bnc#710402)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 7 15:05:08 UTC 2011 - puzel@suse.com
|
Wed Sep 7 15:05:08 UTC 2011 - puzel@suse.com
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user