Update to 3.5

This commit is contained in:
Zht-Try 2022-10-26 20:32:43 +08:00
parent ab5ffe2f9a
commit c51f5c7d6f
4 changed files with 13 additions and 3 deletions

View File

@ -5,6 +5,13 @@ Subject: [PATCH] add-support-of-gpt_sync_mbr
Hybrid MBR support is support by adding a new type of 'gpt_sync_mbr' for mklabel command.
This feature is migrated from the path of "parted-gpt-mbr-sync.patch" of SUSE 12 SP1.
Compilation Error:
gpt.c:1345:50: error: 'GPTPartitionData' {aka 'struct _GPTPartitionData'}
has no member named 'boot'
This code has been refactored.'boot' is removed.
So we should call ped_partition_get_flag to instead.
Signed-off-by: Hongtao Zhang <zhanghongtao22@huawei.com>
---
libparted/labels/gpt.c | 246 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 242 insertions(+), 4 deletions(-)
@ -268,7 +275,7 @@ index 4f922b2..b2dad71 100644
+ pmbr->PartitionRecord[i].EndSector = 0xFF;
+ pmbr->PartitionRecord[i].EndTrack = 0xFF;
+ pmbr->PartitionRecord[i].StartingLBA = PED_CPU_TO_LE32 (_part_32bitmax(part->geom.start));
+ if(((GPTPartitionData*)part->disk_specific)->boot)
+ if(ped_partition_get_flag(part, PED_PARTITION_BOOT))
+ pmbr->PartitionRecord[i].BootIndicator = 0x80;
+ pmbr->PartitionRecord[i].SizeInLBA = PED_CPU_TO_LE32 (_part_32bitmax(part->geom.end - part->geom.start + 1));
+ }

Binary file not shown.

BIN
parted-3.5.tar.xz Normal file

Binary file not shown.

View File

@ -15,8 +15,8 @@
Summary: The GNU disk partition manipulation program
Name: parted
Version: 3.4
Release: 4
Version: 3.5
Release: 1
URL: https://www.gnu.org/software/parted/
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
License: GPLv3+
@ -119,6 +119,9 @@ fi
%{_libdir}/pkgconfig/libparted*.pc
%changelog
* Wed Oct 26 2022 Hongtao Zhang <zhanghongtao22@huawei.com> - 3.5-1
- update to 3.5
* Thu Mar 3 2022 Li Jinlin <lijinlin3@huawei.com> - 3.4-4
- fix memory leak in libparted