Disable pasting into LVM VG. It does not yet work.

This commit is contained in:
Andrius Štikonas 2016-11-10 14:52:02 +00:00
parent 0c8035f667
commit a78e6f986e
2 changed files with 7 additions and 0 deletions

View File

@ -317,6 +317,10 @@ Partition* createUnallocated(const Device& device, PartitionNode& parent, qint64
if (!parent.isRoot())
r |= PartitionRole::Logical;
// Mark unallocated space in LVM VG as LVM LV so that pasting can be easily disabled (it does not work yet)
if (device.type() == Device::LVM_Device)
r |= PartitionRole::Lvm_Lv;
if (!PartitionTable::getUnallocatedRange(device, parent, start, end))
return nullptr;

View File

@ -314,6 +314,9 @@ bool CopyOperation::canPaste(const Partition* p, const Partition* source)
if (p->roles().has(PartitionRole::Extended))
return false;
if (p->roles().has(PartitionRole::Lvm_Lv))
return false;
if (p == source)
return false;