Fix handling of encrypted LVM physical volumes.

This commit is contained in:
Andrius Štikonas 2016-11-03 14:22:11 +00:00
parent 46ae0c73a8
commit 2602e0620c
2 changed files with 5 additions and 3 deletions

View File

@ -29,8 +29,8 @@
#include <KLocalizedString>
#include <KSharedConfig>
CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, QString& vgName, QList<const Partition*>& pvList, qint32& peSize, QList<Device*> devices)
: VolumeGroupDialog(parent, vgName, pvList)
CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, QString& vgName, QList<const Partition*>& partList, qint32& peSize, QList<Device*> devices)
: VolumeGroupDialog(parent, vgName, partList)
, m_PESize(peSize)
, m_Devices(devices)
{
@ -50,7 +50,7 @@ CreateVolumeGroupDialog::CreateVolumeGroupDialog(QWidget* parent, QString& vgNam
void CreateVolumeGroupDialog::setupDialog()
{
for (const auto &p : LVM::pvList) // FIXME: qAsConst
if (p.vgName() == QString() && !LvmDevice::s_DirtyPVs.contains(p.partition()))
if (!p.isLuks() && p.vgName() == QString() && !LvmDevice::s_DirtyPVs.contains(p.partition()))
dialogWidget().listPV().addPartition(*p.partition(), false);
}

View File

@ -51,6 +51,8 @@ void ResizeVolumeGroupDialog::setupDialog()
{
if (dialogWidget().volumeType().currentText() == QStringLiteral("LVM")) {
for (const auto &p : LVM::pvList) { // FIXME: qAsConst
if (p.isLuks())
continue;
if (p.vgName() == device()->name())
dialogWidget().listPV().addPartition(*p.partition(), true);
else if (p.vgName() == QString() && !LvmDevice::s_DirtyPVs.contains(p.partition())) // TODO: Remove LVM PVs in current VG