Commit graph

3 commits

Author SHA1 Message Date
Christian Kellner
206e030f2c disk: guard against nil pointer dereferencing
Add guards protecting against dereferencing the pointer receiver of
method calls.

Co-Authored-By: Achilleas Koutsou <achilleas@koutsou.net>
2022-02-22 19:23:41 +00:00
Achilleas Koutsou
221cdedebc disk: Entity types must implement Clone()
All disk.Entitity types now implement Clone() which should return a
deep copy of the same object. Add the Clone() method to the entity
interface. The return type is Entity, but callers can assume it's
safe to convert back to the original type.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-22 19:23:41 +00:00
Achilleas Koutsou
f6f54b14ad disk: new types LVMVolumeGroup and LVMLogicalVolume
Types to represent LVM2 setups with logical volumes being contained
in volume groups.

LVMVolumeGroup implements the following disk interfaces:
- Entity
- Container
- VolumeContainer

LVMLogicalVolume implements the following disk interfaces:
- Entity
- Container
- Sizeable

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-22 19:23:41 +00:00