OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=5cc4bfbfddbfa27955f42a59e6b75f56
23 lines
809 B
Diff
23 lines
809 B
Diff
Index: parted-1.9.0/libparted/arch/linux.c
|
|
===================================================================
|
|
--- parted-1.9.0.orig/libparted/arch/linux.c 2010-01-25 16:24:54.000000000 +0100
|
|
+++ parted-1.9.0/libparted/arch/linux.c 2010-01-25 16:26:35.000000000 +0100
|
|
@@ -2360,8 +2360,17 @@ _disk_sync_part_table (PedDisk* disk)
|
|
int i;
|
|
|
|
for (i = 1; i <= lpn; i++) {
|
|
+ /* try to BLKPG_REMOVE the partition
|
|
+ * retry once more after short sleep if EBUSY
|
|
+ */
|
|
rets[i - 1] = _blkpg_remove_partition (disk, i);
|
|
errnums[i - 1] = errno;
|
|
+
|
|
+ if ( !rets[i - 1] && errnums[i - 1] == EBUSY ) {
|
|
+ sleep(1);
|
|
+ rets[i - 1] = _blkpg_remove_partition (disk, i);
|
|
+ errnums[i - 1] = errno;
|
|
+ }
|
|
}
|
|
|
|
for (i = 1; i <= lpn; i++) {
|