osbuild2: fix LVM device constructor arguments

NewLVM2LVDevice should take `LVM2LVDeviceOptions`. Also add a parent
argument to be able to specify the parent device for the LVM2 device.

Co-Authored-By: Christian Kellner <christian@kellner.me>
This commit is contained in:
Christian Kellner 2022-02-19 12:09:01 +01:00 committed by Tom Gundersen
parent 5de4276c9c
commit 8a73ab5980

View file

@ -9,9 +9,10 @@ type LVM2LVDeviceOptions struct {
func (LVM2LVDeviceOptions) isDeviceOptions() {}
func NewLVM2LVDevice(options *LoopbackDeviceOptions) *Device {
func NewLVM2LVDevice(parent string, options *LVM2LVDeviceOptions) *Device {
return &Device{
Type: "org.osbuild.lvm2.lv",
Parent: parent,
Options: options,
}
}