Disable pasting into LVM VG. It does not yet work.
This commit is contained in:
parent
0c8035f667
commit
a78e6f986e
|
@ -317,6 +317,10 @@ Partition* createUnallocated(const Device& device, PartitionNode& parent, qint64
|
||||||
if (!parent.isRoot())
|
if (!parent.isRoot())
|
||||||
r |= PartitionRole::Logical;
|
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))
|
if (!PartitionTable::getUnallocatedRange(device, parent, start, end))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
|
|
@ -314,6 +314,9 @@ bool CopyOperation::canPaste(const Partition* p, const Partition* source)
|
||||||
if (p->roles().has(PartitionRole::Extended))
|
if (p->roles().has(PartitionRole::Extended))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (p->roles().has(PartitionRole::Lvm_Lv))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (p == source)
|
if (p == source)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue