Convert FS::luks static cmdSupport members to non-static.
This commit is contained in:
parent
7c137c36c6
commit
513bbdac4c
|
@ -98,7 +98,7 @@ void FileSystemFactory::init()
|
||||||
FS::hpfs::init();
|
FS::hpfs::init();
|
||||||
FS::jfs::init();
|
FS::jfs::init();
|
||||||
FS::linuxswap::init();
|
FS::linuxswap::init();
|
||||||
FS::luks::init();
|
// FS::luks::init();
|
||||||
FS::lvm2_pv::init();
|
FS::lvm2_pv::init();
|
||||||
FS::nilfs2::init();
|
FS::nilfs2::init();
|
||||||
FS::ntfs::init();
|
FS::ntfs::init();
|
||||||
|
|
|
@ -37,19 +37,6 @@
|
||||||
|
|
||||||
namespace FS
|
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,
|
luks::luks(qint64 firstsector,
|
||||||
qint64 lastsector,
|
qint64 lastsector,
|
||||||
qint64 sectorsused,
|
qint64 sectorsused,
|
||||||
|
@ -59,6 +46,18 @@ luks::luks(qint64 firstsector,
|
||||||
, m_isCryptOpen(false)
|
, m_isCryptOpen(false)
|
||||||
, m_isMounted(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()
|
luks::~luks()
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
virtual ~luks();
|
virtual ~luks();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static void init();
|
void init();
|
||||||
virtual qint64 readUsedCapacity(const QString& deviceNode) const override;
|
virtual qint64 readUsedCapacity(const QString& deviceNode) const override;
|
||||||
|
|
||||||
virtual CommandSupportType supportGetUsed() const override {
|
virtual CommandSupportType supportGetUsed() const override {
|
||||||
|
@ -154,18 +154,18 @@ protected:
|
||||||
virtual QString readOuterUUID(const QString& deviceNode) const;
|
virtual QString readOuterUUID(const QString& deviceNode) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static CommandSupportType m_GetUsed;
|
CommandSupportType m_GetUsed;
|
||||||
static CommandSupportType m_GetLabel;
|
CommandSupportType m_GetLabel;
|
||||||
static CommandSupportType m_Create;
|
CommandSupportType m_Create;
|
||||||
static CommandSupportType m_Grow;
|
CommandSupportType m_Grow;
|
||||||
static CommandSupportType m_Shrink;
|
CommandSupportType m_Shrink;
|
||||||
static CommandSupportType m_Move;
|
CommandSupportType m_Move;
|
||||||
static CommandSupportType m_Check;
|
CommandSupportType m_Check;
|
||||||
static CommandSupportType m_Copy;
|
CommandSupportType m_Copy;
|
||||||
static CommandSupportType m_Backup;
|
CommandSupportType m_Backup;
|
||||||
static CommandSupportType m_SetLabel;
|
CommandSupportType m_SetLabel;
|
||||||
static CommandSupportType m_UpdateUUID;
|
CommandSupportType m_UpdateUUID;
|
||||||
static CommandSupportType m_GetUUID;
|
CommandSupportType m_GetUUID;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable FileSystem* m_innerFs;
|
mutable FileSystem* m_innerFs;
|
||||||
|
|
|
@ -361,6 +361,7 @@ void LibPartedBackend::scanDevicePartitions(Device& d, PedDisk* pedDisk)
|
||||||
if (type == FileSystem::Luks) {
|
if (type == FileSystem::Luks) {
|
||||||
r |= PartitionRole::Luks;
|
r |= PartitionRole::Luks;
|
||||||
FS::luks* luksFs = dynamic_cast<FS::luks*>(fs);
|
FS::luks* luksFs = dynamic_cast<FS::luks*>(fs);
|
||||||
|
luksFs->init();
|
||||||
QString mapperNode = FS::luks::mapperName(node);
|
QString mapperNode = FS::luks::mapperName(node);
|
||||||
bool isCryptOpen = !mapperNode.isEmpty();
|
bool isCryptOpen = !mapperNode.isEmpty();
|
||||||
luksFs->setCryptOpen(isCryptOpen);
|
luksFs->setCryptOpen(isCryptOpen);
|
||||||
|
|
Loading…
Reference in New Issue