Use blockdev --rereadpt instead of partx --update.
This commit is contained in:
parent
24e1e83152
commit
6b558f49d8
|
@ -61,6 +61,8 @@ bool SetFileSystemLabelJob::run(Report& parent)
|
||||||
partition().fileSystem().setLabel(label());
|
partition().fileSystem().setLabel(label());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: need to commit to device
|
||||||
|
|
||||||
jobFinished(*report, rval);
|
jobFinished(*report, rval);
|
||||||
|
|
||||||
return rval;
|
return rval;
|
||||||
|
|
|
@ -55,8 +55,8 @@ bool SfdiskPartitionTable::open()
|
||||||
bool SfdiskPartitionTable::commit(quint32 timeout)
|
bool SfdiskPartitionTable::commit(quint32 timeout)
|
||||||
{
|
{
|
||||||
if ( !(ExternalCommand(QStringLiteral("udevadm"), { QStringLiteral("settle"), QStringLiteral("--timeout=") + QString::number(timeout) }).run() &&
|
if ( !(ExternalCommand(QStringLiteral("udevadm"), { QStringLiteral("settle"), QStringLiteral("--timeout=") + QString::number(timeout) }).run() &&
|
||||||
ExternalCommand(QStringLiteral("partx"), { QStringLiteral("--update"), m_device->deviceNode() }).run()) )
|
ExternalCommand(QStringLiteral("blockdev"), { QStringLiteral("--rereadpt"), m_device->deviceNode() }).run()))
|
||||||
sleep(timeout);
|
sleep(1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue