forked from pool/parted
- parted-fix-gpt-sync-on-BE-systems.patch - detect btrfs filesystem (bnc#810779) - parted-btrfs-support.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=73
34 lines
1.7 KiB
Diff
34 lines
1.7 KiB
Diff
---
|
|
libparted/labels/gpt.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
Index: parted-2.4/libparted/labels/gpt.c
|
|
===================================================================
|
|
--- parted-2.4.orig/libparted/labels/gpt.c
|
|
+++ parted-2.4/libparted/labels/gpt.c
|
|
@@ -1256,9 +1256,9 @@ _write_pmbr (const PedDisk *disk)
|
|
pmbr->PartitionRecord[pmbr_id].EndSector = 0xFF;
|
|
pmbr->PartitionRecord[pmbr_id].EndTrack = 0xFF;
|
|
pmbr->PartitionRecord[pmbr_id].StartingLBA = PED_CPU_TO_LE32(1);
|
|
- pmbr->PartitionRecord[pmbr_id].SizeInLBA = 1;
|
|
+ pmbr->PartitionRecord[pmbr_id].SizeInLBA = PED_CPU_TO_LE32 (1);
|
|
if (esp)
|
|
- pmbr->PartitionRecord[pmbr_id].SizeInLBA = esp->geom.end - 1;
|
|
+ pmbr->PartitionRecord[pmbr_id].SizeInLBA = PED_CPU_TO_LE32 (esp->geom.end - 1);
|
|
|
|
/* sync the first 3 GPT entries to MBR primary partitions */
|
|
for (i=first_entry; i < last_entry; i++) {
|
|
@@ -1284,10 +1284,10 @@ _write_pmbr (const PedDisk *disk)
|
|
pmbr->PartitionRecord[i].EndHead = 0xFE;
|
|
pmbr->PartitionRecord[i].EndSector = 0xFF;
|
|
pmbr->PartitionRecord[i].EndTrack = 0xFF;
|
|
- pmbr->PartitionRecord[i].StartingLBA = _part_32bitmax(part->geom.start);
|
|
+ pmbr->PartitionRecord[i].StartingLBA = PED_CPU_TO_LE32 (_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 + 1);
|
|
+ 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,
|