Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
parted
libparted-remove-extraneous-blkpg-add-part-exce...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libparted-remove-extraneous-blkpg-add-part-exception.patch of Package parted
From: Phillip Susi <psusi@ubuntu.com> Date: Sun, 14 Oct 2012 23:59:59 -0400 Subject: libparted: remove extraneous blkpg add partition ped exception References: bsc#501773, bsc#1092327 Patch-mainline: v3.2 Git-commit: f87ff28d1aa8eff085e737ab22d031b0519e5510 _blkpg_add_partition was throwing an exception if it failed to add the new partition, in addition to _disk_sync_part_table throwing one, and then bailing out. Instead of bailing out, just log the error for reporting later and continue. Acked-by: Sebastian Parschauer <sparschauer@suse.de> --- libparted/arch/linux.c | 21 +++------------------ tests/t2310-dos-extended-2-sector-min-offset.sh | 3 +-- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c index 70b26a91578c..5721d4b1f3d0 100644 --- a/libparted/arch/linux.c +++ b/libparted/arch/linux.c @@ -2407,18 +2407,7 @@ _blkpg_add_partition (PedDisk* disk, const PedPartition *part) if (!_blkpg_part_command (disk->dev, &linux_part, BLKPG_ADD_PARTITION)) { - return ped_exception_throw ( - PED_EXCEPTION_ERROR, - PED_EXCEPTION_IGNORE_CANCEL, - _("Error informing the kernel about modifications to " - "partition %s -- %s. This means Linux won't know " - "about any changes you made to %s until you reboot " - "-- so you shouldn't mount it or use it in any way " - "before rebooting."), - linux_part.devname, - strerror (errno), - linux_part.devname) - == PED_EXCEPTION_IGNORE; + return 0; } return 1; @@ -2790,12 +2779,8 @@ _disk_sync_part_table (PedDisk* disk) /* add the (possibly modified or new) partition */ if (!add_partition (disk, part)) { - ped_exception_throw ( - PED_EXCEPTION_ERROR, - PED_EXCEPTION_RETRY_CANCEL, - _("Failed to add partition %d (%s)"), - i, strerror (errno)); - goto cleanup; + ok[i - 1] = 0; + errnums[i - 1] = errno; } } } diff --git a/tests/t2310-dos-extended-2-sector-min-offset.sh b/tests/t2310-dos-extended-2-sector-min-offset.sh index 89453ae7bdea..17c777c12be4 100644 --- a/tests/t2310-dos-extended-2-sector-min-offset.sh +++ b/tests/t2310-dos-extended-2-sector-min-offset.sh @@ -39,8 +39,7 @@ $scsi_dev:2048s:scsi:512:512:msdos:Linux scsi_debug:; EOF cat <<EOF > err.exp || framework_failure -Error: Error informing the kernel about modifications to partition $p5 -- Device or resource busy. This means Linux won't know about any changes you made to $p5 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. -Error: Failed to add partition 5 (Device or resource busy) +Error: Partition(s) 5 on $scsi_dev have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes. EOF # Create a DOS label with an extended partition starting at sector 64.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor