From eb8d6edfbeeb5a091cc15db38bd68c6a3c531645adf48f96acfd42896371165c Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Wed, 21 Nov 2012 15:11:08 +0000 Subject: [PATCH] - add fix-error-informing-the-kernel.patch: Informing the kernel about partition changes still fails if first logical partition starts right after the extended partition. Fix it. OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=69 --- fix-error-informing-the-kernel.patch | 17 +++++++++++++++++ parted.changes | 8 ++++++++ parted.spec | 2 ++ 3 files changed, 27 insertions(+) create mode 100644 fix-error-informing-the-kernel.patch diff --git a/fix-error-informing-the-kernel.patch b/fix-error-informing-the-kernel.patch new file mode 100644 index 0000000..e60a390 --- /dev/null +++ b/fix-error-informing-the-kernel.patch @@ -0,0 +1,17 @@ +--- + libparted/arch/linux.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: parted-2.4/libparted/arch/linux.c +=================================================================== +--- parted-2.4.orig/libparted/arch/linux.c ++++ parted-2.4/libparted/arch/linux.c +@@ -2376,7 +2376,7 @@ _blkpg_add_partition (PedDisk* disk, con + linux_part.start = part->geom.start * disk->dev->sector_size; + /* see fs/partitions/msdos.c:msdos_partition(): "leave room for LILO" */ + if (part->type & PED_PARTITION_EXTENDED) +- linux_part.length = part->geom.length == 1 ? 512 : 1024; ++ linux_part.length = PED_SECTOR_SIZE_DEFAULT; + else + linux_part.length = part->geom.length * disk->dev->sector_size; + linux_part.pno = part->num; diff --git a/parted.changes b/parted.changes index ec13f98..7fd59a9 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Nov 21 10:32:05 UTC 2012 - puzel@suse.com + +- add fix-error-informing-the-kernel.patch: + Informing the kernel about partition changes still fails if first + logical partition starts right after the extended partition. Fix + it. + ------------------------------------------------------------------- Thu Sep 27 13:40:56 UTC 2012 - puzel@suse.com diff --git a/parted.spec b/parted.spec index 96e609d..badffae 100644 --- a/parted.spec +++ b/parted.spec @@ -47,6 +47,7 @@ Patch18: parted-fix-cciss-partition-naming.patch Patch19: dummy-bootcode-only-for-x86.patch Patch20: parted-stdio.h.patch Patch21: parted-workaround-windows7-gpt-implementation.patch +Patch22: fix-error-informing-the-kernel.patch Requires: /sbin/udevadm BuildRequires: check-devel BuildRequires: device-mapper-devel >= 1.02.33 @@ -116,6 +117,7 @@ to develop applications that require these. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 %build export CFLAGS="%{optflags} `ncursesw6-config --cflags`"