OBS User unknown 2008-11-07 14:39:14 +00:00 committed by Git OBS Bridge
parent 6db9b44096
commit 5fda340a32
3 changed files with 10 additions and 37 deletions

View File

@ -1,34 +0,0 @@
--- ./libparted/arch/linux.c.orig 2008-10-07 10:47:43.000000000 +0200
+++ ./libparted/arch/linux.c 2008-10-07 10:45:04.000000000 +0200
@@ -2163,11 +2163,15 @@ _blkpg_remove_partition (PedDisk* disk,
static int
_disk_sync_part_table (PedDisk* disk)
{
- int i;
- int last = PED_MAX (ped_disk_get_last_partition_num (disk), 16);
+ int largest_partnum = ped_disk_get_last_partition_num (disk);
+ if (largest_partnum <= 0)
+ return 1;
+
+ int last = PED_MIN (largest_partnum, 16);
int* rets = ped_malloc(sizeof(int) * last);
int* errnums = ped_malloc(sizeof(int) * last);
int ret = 1;
+ int i;
for (i = 1; i <= last; i++) {
rets[i - 1] = _blkpg_remove_partition (disk, i);
@@ -2384,8 +2388,12 @@ err:
static int
_dm_reread_part_table (PedDisk* disk)
{
+ int largest_partnum = ped_disk_get_last_partition_num (disk);
+ if (largest_partnum <= 0)
+ return 1;
+
int rc = 1;
- int last = PED_MAX (ped_disk_get_last_partition_num (disk), 16);
+ int last = PED_MIN (largest_partnum, 16);
int i;
sync();

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Nov 5 12:42:57 CET 2008 - puzel@suse.cz
- disabled largest_partition_number.patch (bnc#440141)
-------------------------------------------------------------------
Mon Oct 20 11:27:45 CEST 2008 - puzel@suse.cz

View File

@ -26,7 +26,7 @@ License: GPL v2 or later
Group: System/Filesystems
Summary: GNU partitioner
Version: 1.8.8
Release: 88
Release: 89
Source0: %{name}-%{version}.tar.bz2
Patch: always-resize-part.dif
Patch1: parted-type.patch
@ -42,7 +42,7 @@ Patch11: fix-function-def.patch
Patch12: gnulib.diff
Patch51: parted.tty.patch
Patch52: parted.no-O_DIRECT.patch
Patch53: largest_partition_number.patch
#Patch53: largest_partition_number.patch
Patch54: parted-gpt-mbr-sync.patch
Patch55: parted-fdasd-compile-fixes
Patch56: parted-no-inttypes-include
@ -98,7 +98,7 @@ Authors:
%patch12
%patch51 -p1
%patch52 -p1
%patch53
#%#patch53
%patch54
%patch55 -p1
%patch56 -p1
@ -147,6 +147,8 @@ rm -rf "$RPM_BUILD_ROOT"
%{_libdir}/*.so
%changelog
* Wed Nov 05 2008 puzel@suse.cz
- disabled largest_partition_number.patch (bnc#440141)
* Mon Oct 20 2008 puzel@suse.cz
- fix improper data conversion (bnc#435702)
* Tue Oct 07 2008 puzel@suse.cz