From 2314ca37d718b68fca99c7bf5dea2d086fd5d492 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 11 Feb 2022 11:31:37 +0000 Subject: [PATCH] osbuild2: NewLVM2MetadataStage takes map of devices Instead of just passing in a single device, pass in a `Devices` type, i.e. a map of devices, since the LVM can be located on a LUKS2 container which is located inside a partition so multiple devices are needed to access it. Co-Authored-By: Achilleas Koutsou --- internal/osbuild2/lvm2_metadata_stage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/osbuild2/lvm2_metadata_stage.go b/internal/osbuild2/lvm2_metadata_stage.go index b43fd8f9a..4191305b3 100644 --- a/internal/osbuild2/lvm2_metadata_stage.go +++ b/internal/osbuild2/lvm2_metadata_stage.go @@ -33,7 +33,7 @@ func (o LVM2MetadataStageOptions) validate() error { return nil } -func NewLVM2MetadataStage(options *LVM2MetadataStageOptions, device *Device) *Stage { +func NewLVM2MetadataStage(options *LVM2MetadataStageOptions, devices Devices) *Stage { if err := options.validate(); err != nil { panic(err) } @@ -41,6 +41,6 @@ func NewLVM2MetadataStage(options *LVM2MetadataStageOptions, device *Device) *St return &Stage{ Type: "org.osbuild.lvm2.metadata", Options: options, - Devices: Devices{"device": *device}, + Devices: devices, } }