From 2c7723772ef7c9655285a86ad92670c2b837f419 Mon Sep 17 00:00:00 2001 From: Nikita Dubrovski Date: Mon, 9 Oct 2023 12:32:35 +0200 Subject: [PATCH] Update translate.go --- config/fcos/v1_6_exp/translate.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/config/fcos/v1_6_exp/translate.go b/config/fcos/v1_6_exp/translate.go index 806422b7..99316cbc 100644 --- a/config/fcos/v1_6_exp/translate.go +++ b/config/fcos/v1_6_exp/translate.go @@ -124,7 +124,6 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio var wantBIOSPart bool var wantEFIPart bool var wantPRePPart bool - var wantS390x bool layout := c.BootDevice.Layout switch { case layout == nil || *layout == "x86_64": @@ -134,10 +133,6 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio wantEFIPart = true case *layout == "ppc64le": wantPRePPart = true - case *layout == "s390x-eckd": - wantS390x = true - case *layout == "s390x-zfcp": - wantS390x = true case *layout == "s390x-virt": wantBIOSPart = true wantEFIPart = true @@ -248,12 +243,12 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio // encrypted root partition if wantLuks { var luksDevice string - var device_s390x string switch { - case wantS390x: - //Luks Device for dasd and zFCP-scsi - device_s390x = *c.BootDevice.Luks.Device - luksDevice = device_s390x + "2" + //Luks Device for dasd and zFCP-scsi + case layout != nil && *layout == "s390x-eckd": + luksDevice = *c.BootDevice.Luks.Device + "2" + case layout != nil && *layout == "s390x-zfcp": + luksDevice = *c.BootDevice.Luks.Device + "4" case wantMirror: luksDevice = "/dev/md/md-root" default: