Cache lvm2_pv and luks result to finding external tool #5
|
@ -69,18 +69,21 @@ luks::~luks()
|
||||||
|
|
||||||
void luks::init()
|
void luks::init()
|
||||||
{
|
{
|
||||||
m_Create = findExternal(QStringLiteral("cryptsetup")) ? cmdSupportFileSystem : cmdSupportNone;
|
CommandSupportType cryptsetupFound = findExternal(QStringLiteral("cryptsetup")) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
|
|
||||||
|
m_Create = cryptsetupFound;
|
||||||
|
m_UpdateUUID = cryptsetupFound;
|
||||||
|
m_GetUUID = cryptsetupFound;
|
||||||
|
m_Grow = cryptsetupFound;
|
||||||
|
m_Shrink = cryptsetupFound;
|
||||||
|
|
||||||
m_SetLabel = cmdSupportNone;
|
m_SetLabel = cmdSupportNone;
|
||||||
m_GetLabel = cmdSupportFileSystem;
|
m_GetLabel = cmdSupportFileSystem;
|
||||||
m_UpdateUUID = findExternal(QStringLiteral("cryptsetup")) ? cmdSupportFileSystem : cmdSupportNone;
|
|
||||||
m_Grow = findExternal(QStringLiteral("cryptsetup")) ? cmdSupportFileSystem : cmdSupportNone;
|
|
||||||
m_Shrink = m_Grow;
|
|
||||||
m_Check = cmdSupportCore;
|
m_Check = cmdSupportCore;
|
||||||
m_Copy = cmdSupportCore;
|
m_Copy = cmdSupportCore;
|
||||||
m_Move = cmdSupportCore;
|
m_Move = cmdSupportCore;
|
||||||
m_Backup = cmdSupportCore;
|
m_Backup = cmdSupportCore;
|
||||||
m_GetUsed = cmdSupportNone; // libparted does not support LUKS, we do this as a special case
|
m_GetUsed = cmdSupportNone; // libparted does not support LUKS, we do this as a special case
|
||||||
m_GetUUID = findExternal(QStringLiteral("cryptsetup")) ? cmdSupportFileSystem : cmdSupportNone;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool luks::supportToolFound() const
|
bool luks::supportToolFound() const
|
||||||
|
|
|
@ -45,18 +45,20 @@ lvm2_pv::lvm2_pv(qint64 firstsector, qint64 lastsector, qint64 sectorsused, cons
|
||||||
|
|
||||||
void lvm2_pv::init()
|
void lvm2_pv::init()
|
||||||
{
|
{
|
||||||
m_Create = findExternal(QStringLiteral("lvm")) ? cmdSupportFileSystem : cmdSupportNone;
|
CommandSupportType lvmFound = findExternal(QStringLiteral("lvm")) ? cmdSupportFileSystem : cmdSupportNone;
|
||||||
m_Check = findExternal(QStringLiteral("lvm")) ? cmdSupportFileSystem : cmdSupportNone;
|
|
||||||
|
|
||||||
m_GetLabel = cmdSupportCore;
|
m_Create = lvmFound;
|
||||||
m_UpdateUUID = findExternal(QStringLiteral("lvm")) ? cmdSupportFileSystem : cmdSupportNone;
|
m_Check = lvmFound;
|
||||||
|
m_UpdateUUID = lvmFound;
|
||||||
|
|
||||||
m_Copy = cmdSupportNone; // Copying PV can confuse LVM
|
|
||||||
m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
m_Move = (m_Check != cmdSupportNone) ? cmdSupportCore : cmdSupportNone;
|
||||||
|
|
||||||
|
m_GetLabel = cmdSupportCore;
|
||||||
|
m_Backup = cmdSupportCore;
|
||||||
|
m_GetUUID = cmdSupportCore;
|
||||||
|
|
||||||
m_GetLabel = cmdSupportNone;
|
m_GetLabel = cmdSupportNone;
|
||||||
m_Backup = cmdSupportCore;
|
m_Copy = cmdSupportNone; // Copying PV can confuse LVM
|
||||||
m_GetUUID = cmdSupportCore;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lvm2_pv::supportToolFound() const
|
bool lvm2_pv::supportToolFound() const
|
||||||
|
|
Loading…
Reference in New Issue