mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
[partition] Including new LVM PVs in LVM VG creation GUI.
This commit is contained in:
parent
e5351cdf3c
commit
f8897e0e0b
2 changed files with 26 additions and 2 deletions
|
@ -50,6 +50,7 @@
|
|||
#include <kpmcore/backend/corebackend.h>
|
||||
#include <kpmcore/backend/corebackendmanager.h>
|
||||
#include <kpmcore/fs/filesystemfactory.h>
|
||||
#include <kpmcore/fs/luks.h>
|
||||
#include <kpmcore/fs/lvm2_pv.h>
|
||||
|
||||
// Qt
|
||||
|
@ -604,6 +605,30 @@ PartitionCoreModule::scanForLVMPVs()
|
|||
|
||||
for ( auto p : LVM::pvList )
|
||||
m_lvmPVs << p.partition().data();
|
||||
|
||||
for ( DeviceInfo* d : m_deviceInfos )
|
||||
{
|
||||
for ( auto job : d->jobs )
|
||||
{
|
||||
// Including new LVM PVs
|
||||
CreatePartitionJob* partJob = dynamic_cast<CreatePartitionJob*>( job.data() );
|
||||
if ( partJob )
|
||||
{
|
||||
Partition* p = partJob->partition();
|
||||
|
||||
if ( p->fileSystem().type() == FileSystem::Type::Lvm2_PV )
|
||||
m_lvmPVs << p;
|
||||
else if ( p->fileSystem().type() == FileSystem::Type::Luks || p->fileSystem().type() == FileSystem::Type::Luks2 )
|
||||
{
|
||||
// Encrypted LVM PVs
|
||||
FileSystem* innerFS = static_cast<const FS::luks*>(&p->fileSystem())->innerFS();
|
||||
|
||||
if ( innerFS && innerFS->type() == FileSystem::Type::Lvm2_PV )
|
||||
m_lvmPVs << p;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PartitionCoreModule::DeviceInfo*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue