diff --git a/largest_partition_number.patch b/largest_partition_number.patch new file mode 100644 index 0000000..6eb9301 --- /dev/null +++ b/largest_partition_number.patch @@ -0,0 +1,22 @@ +diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c +index 4c9a2d3..b6453a5 100644 +--- a/libparted/arch/linux.c ++++ b/libparted/arch/linux.c +@@ -2212,7 +2212,7 @@ static int + _disk_sync_part_table (PedDisk* disk) + { + int i; +- int last = PED_MAX (ped_disk_get_last_partition_num (disk), 16); ++ int last = PED_MIN (ped_disk_get_last_partition_num (disk), 16); + int* rets = ped_malloc(sizeof(int) * last); + int* errnums = ped_malloc(sizeof(int) * last); + int ret = 1; +@@ -2432,7 +2432,7 @@ static int + _dm_reread_part_table (PedDisk* disk) + { + int rc = 1; +- int last = PED_MAX (ped_disk_get_last_partition_num (disk), 16); ++ int last = PED_MIN (ped_disk_get_last_partition_num (disk), 16); + int i; + + sync(); diff --git a/parted.changes b/parted.changes index 8ed520b..3264236 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 8 12:08:30 CEST 2008 - puzel@suse.cz + +- added largest_partition_number.patch + * fixes computation of largest partition number (bnc#397210) + ------------------------------------------------------------------- Fri May 9 17:19:58 CEST 2008 - schwab@suse.de diff --git a/parted.spec b/parted.spec index 374d112..6cbf4e9 100644 --- a/parted.spec +++ b/parted.spec @@ -18,7 +18,7 @@ License: GPL v2 or later Group: System/Filesystems Summary: GNU partitioner Version: 1.8.8 -Release: 42 +Release: 50 Source0: %{name}-%{version}.tar.bz2 Patch: always-resize-part.dif Patch1: parted-type.patch @@ -34,6 +34,7 @@ Patch11: fix-function-def.patch Patch12: gnulib.diff Patch51: parted.tty.patch Patch52: parted.no-O_DIRECT.patch +Patch53: largest_partition_number.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://www.gnu.org/software/parted/ PreReq: %install_info_prereq @@ -85,6 +86,7 @@ Authors: %patch12 %patch51 -p1 %patch52 -p1 +%patch53 -p1 %build AUTOPOINT=true autoreconf --force --install @@ -128,6 +130,9 @@ rm -rf "$RPM_BUILD_ROOT" %{_libdir}/*.so %changelog +* Tue Jul 08 2008 puzel@suse.cz +- added largest_partition_number.patch + * fixes computation of largest partition number (bnc#397210) * Fri May 09 2008 schwab@suse.de - Fix gnulib macro and use autoreconf. * Thu Apr 10 2008 ro@suse.de