btrfs: implement updateUUID.

This commit is contained in:
Andrius Štikonas 2017-11-05 20:42:40 +00:00
parent 9ea983654c
commit 89a5308686
1 changed files with 3 additions and 5 deletions

View File

@ -57,7 +57,7 @@ void btrfs::init()
m_Shrink = (m_Grow != cmdSupportNone && m_GetUsed != cmdSupportNone) ? cmdSupportFileSystem : cmdSupportNone;
m_SetLabel = findExternal(QStringLiteral("btrfs")) ? cmdSupportFileSystem : cmdSupportNone;
m_UpdateUUID = cmdSupportNone;
m_UpdateUUID = findExternal(QStringLiteral("btrfstune")) ? cmdSupportFileSystem : cmdSupportNone;
m_Copy = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
@ -191,9 +191,7 @@ bool btrfs::writeLabelOnline(Report& report, const QString& deviceNode, const QS
bool btrfs::updateUUID(Report& report, const QString& deviceNode) const
{
Q_UNUSED(report);
Q_UNUSED(deviceNode);
return false;
ExternalCommand cmd(report, QStringLiteral("btrfstune"), { QStringLiteral("-f"), QStringLiteral("-u"), deviceNode });
return cmd.run(-1) && cmd.exitCode() == 0;
}
}