Make initLUKS function non-static.
This commit is contained in:
parent
52b356e45f
commit
2e960d5c00
|
@ -131,8 +131,10 @@ Partition* LvmDevice::scanPartition(const QString& lvPath, PartitionTable* pTabl
|
|||
// Handle LUKS partition
|
||||
if (fs->type() == FileSystem::Luks) {
|
||||
r |= PartitionRole::Luks;
|
||||
FS::luks::initLUKS(fs);
|
||||
QString mapperNode = static_cast<FS::luks*>(fs)->mapperName();
|
||||
FS::luks* luksFs = static_cast<FS::luks*>(fs);
|
||||
luksFs->initLUKS();
|
||||
|
||||
QString mapperNode = luksFs->mapperName();
|
||||
mountPoint = FileSystem::detectMountPoint(fs, mapperNode);
|
||||
mounted = FileSystem::detectMountStatus(fs, mapperNode);
|
||||
} else {
|
||||
|
|
|
@ -642,17 +642,14 @@ bool luks::canEncryptType(FileSystem::Type type)
|
|||
}
|
||||
}
|
||||
|
||||
void luks::initLUKS(FileSystem* fs)
|
||||
void luks::initLUKS()
|
||||
{
|
||||
if (fs->type() == FileSystem::Luks) {
|
||||
FS::luks* luksFS = static_cast<FS::luks*>(fs);
|
||||
QString mapperNode = luksFS->mapperName();
|
||||
QString mapperNode = mapperName();
|
||||
bool isCryptOpen = !mapperNode.isEmpty();
|
||||
luksFS->setCryptOpen(isCryptOpen);
|
||||
setCryptOpen(isCryptOpen);
|
||||
if (isCryptOpen) {
|
||||
luksFS->loadInnerFileSystem(mapperNode);
|
||||
luksFS->setMounted(detectMountStatus(luksFS->innerFS(), mapperNode));
|
||||
}
|
||||
loadInnerFileSystem(mapperNode);
|
||||
setMounted(detectMountStatus(innerFS(), mapperNode));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ public:
|
|||
qint64 payloadOffset() const { return m_PayloadOffset; }
|
||||
|
||||
static bool canEncryptType(FileSystem::Type type);
|
||||
static void initLUKS(FileSystem* fs);
|
||||
void initLUKS();
|
||||
|
||||
protected:
|
||||
virtual QString readOuterUUID(const QString& deviceNode) const;
|
||||
|
|
|
@ -340,8 +340,9 @@ void LibPartedBackend::scanDevicePartitions(Device& d, PedDisk* pedDisk)
|
|||
// libparted does not handle LUKS partitions
|
||||
if (fs->type() == FileSystem::Luks) {
|
||||
r |= PartitionRole::Luks;
|
||||
FS::luks::initLUKS(fs);
|
||||
QString mapperNode = static_cast<FS::luks*>(fs)->mapperName();
|
||||
FS::luks* luksFs = static_cast<FS::luks*>(fs);
|
||||
luksFs->initLUKS();
|
||||
QString mapperNode = luksFs->mapperName();
|
||||
mountPoint = FileSystem::detectMountPoint(fs, mapperNode);
|
||||
mounted = FileSystem::detectMountStatus(fs, mapperNode);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue