From d7413b7708db727c63014de6d96c71a52315b230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 1 May 2016 14:32:00 +0100 Subject: [PATCH] Remove workaround for ancient parted 2.1. --- src/plugins/libparted/libpartedpartitiontable.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/plugins/libparted/libpartedpartitiontable.cpp b/src/plugins/libparted/libpartedpartitiontable.cpp index 6cc2421..d75f185 100644 --- a/src/plugins/libparted/libpartedpartitiontable.cpp +++ b/src/plugins/libparted/libpartedpartitiontable.cpp @@ -67,20 +67,9 @@ bool LibPartedPartitionTable::commit(PedDisk* pd, quint32 timeout) bool rval = ped_disk_commit_to_dev(pd); - // The GParted authors have found a bug in libparted that causes it to intermittently - // not commit changes to the Linux kernel, probably a race. Until this is fixed in - // libparted, the following patch should help alleviate the consequences by just re-trying - // committing to the OS if it fails the first time after a short pause. - // See: http://git.gnome.org/browse/gparted/commit/?id=bf86fd3f9ceb0096dfe87a8c9a38403c13b13f00 - if (rval) { + if (rval) rval = ped_disk_commit_to_os(pd); - if (!rval) { - sleep(1); - rval = ped_disk_commit_to_os(pd); - } - } - if (!ExternalCommand(QStringLiteral("udevadm"), QStringList() << QStringLiteral("settle") << QStringLiteral("--timeout=") + QString::number(timeout)).run() && !ExternalCommand(QStringLiteral("udevsettle"), QStringList() << QStringLiteral("--timeout=") + QString::number(timeout)).run()) sleep(timeout);