Fix luks operations.

This commit is contained in:
Andrius Štikonas 2016-05-17 17:38:17 +01:00
parent 5d28790152
commit 094042cc75
2 changed files with 17 additions and 0 deletions

View File

@ -65,6 +65,22 @@ luks::~luks()
delete m_innerFs;
}
void luks::init()
{
// m_Create = findExternal(QStringLiteral("cryptsetup")) ? cmdSupportFileSystem : cmdSupportNone;
m_SetLabel = cmdSupportNone;
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_Copy = cmdSupportCore;
m_Move = cmdSupportCore;
m_Backup = cmdSupportCore;
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
{
m_cryptsetupFound = findExternal(QStringLiteral("cryptsetup")) ? cmdSupportFileSystem : cmdSupportNone;

View File

@ -44,6 +44,7 @@ public:
virtual ~luks();
public:
void init() override;
virtual qint64 readUsedCapacity(const QString& deviceNode) const override;
virtual CommandSupportType supportGetUsed() const override {