diff --git a/src/fs/filesystemfactory.cpp b/src/fs/filesystemfactory.cpp index 91edc2a..5d538d6 100644 --- a/src/fs/filesystemfactory.cpp +++ b/src/fs/filesystemfactory.cpp @@ -98,7 +98,7 @@ void FileSystemFactory::init() FS::hpfs::init(); FS::jfs::init(); FS::linuxswap::init(); - FS::luks::init(); +// FS::luks::init(); FS::lvm2_pv::init(); FS::nilfs2::init(); FS::ntfs::init(); diff --git a/src/fs/luks.cpp b/src/fs/luks.cpp index ecad937..aac6bb3 100644 --- a/src/fs/luks.cpp +++ b/src/fs/luks.cpp @@ -37,19 +37,6 @@ namespace FS { -FileSystem::CommandSupportType luks::m_GetUsed = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_GetLabel = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_Create = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_Grow = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_Shrink = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_Move = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_Check = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_Copy = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_Backup = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_SetLabel = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_UpdateUUID = FileSystem::cmdSupportNone; -FileSystem::CommandSupportType luks::m_GetUUID = FileSystem::cmdSupportNone; - luks::luks(qint64 firstsector, qint64 lastsector, qint64 sectorsused, @@ -59,6 +46,18 @@ luks::luks(qint64 firstsector, , m_isCryptOpen(false) , m_isMounted(false) { + m_GetUsed = FileSystem::cmdSupportNone; + m_GetLabel = FileSystem::cmdSupportNone; + m_Create = FileSystem::cmdSupportNone; + m_Grow = FileSystem::cmdSupportNone; + m_Shrink = FileSystem::cmdSupportNone; + m_Move = FileSystem::cmdSupportNone; + m_Check = FileSystem::cmdSupportNone; + m_Copy = FileSystem::cmdSupportNone; + m_Backup = FileSystem::cmdSupportNone; + m_SetLabel = FileSystem::cmdSupportNone; + m_UpdateUUID = FileSystem::cmdSupportNone; + m_GetUUID = FileSystem::cmdSupportNone; } luks::~luks() diff --git a/src/fs/luks.h b/src/fs/luks.h index 0835f82..22a9d0d 100644 --- a/src/fs/luks.h +++ b/src/fs/luks.h @@ -44,7 +44,7 @@ public: virtual ~luks(); public: - static void init(); + void init(); virtual qint64 readUsedCapacity(const QString& deviceNode) const override; virtual CommandSupportType supportGetUsed() const override { @@ -154,18 +154,18 @@ protected: virtual QString readOuterUUID(const QString& deviceNode) const; public: - static CommandSupportType m_GetUsed; - static CommandSupportType m_GetLabel; - static CommandSupportType m_Create; - static CommandSupportType m_Grow; - static CommandSupportType m_Shrink; - static CommandSupportType m_Move; - static CommandSupportType m_Check; - static CommandSupportType m_Copy; - static CommandSupportType m_Backup; - static CommandSupportType m_SetLabel; - static CommandSupportType m_UpdateUUID; - static CommandSupportType m_GetUUID; + CommandSupportType m_GetUsed; + CommandSupportType m_GetLabel; + CommandSupportType m_Create; + CommandSupportType m_Grow; + CommandSupportType m_Shrink; + CommandSupportType m_Move; + CommandSupportType m_Check; + CommandSupportType m_Copy; + CommandSupportType m_Backup; + CommandSupportType m_SetLabel; + CommandSupportType m_UpdateUUID; + CommandSupportType m_GetUUID; private: mutable FileSystem* m_innerFs; diff --git a/src/plugins/libparted/libpartedbackend.cpp b/src/plugins/libparted/libpartedbackend.cpp index eae3865..da34ab9 100644 --- a/src/plugins/libparted/libpartedbackend.cpp +++ b/src/plugins/libparted/libpartedbackend.cpp @@ -361,6 +361,7 @@ void LibPartedBackend::scanDevicePartitions(Device& d, PedDisk* pedDisk) if (type == FileSystem::Luks) { r |= PartitionRole::Luks; FS::luks* luksFs = dynamic_cast(fs); + luksFs->init(); QString mapperNode = FS::luks::mapperName(node); bool isCryptOpen = !mapperNode.isEmpty(); luksFs->setCryptOpen(isCryptOpen);