From cf4b1ed9fc8f45d353a77c72922cf60dc6c7909c Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 14 Sep 2021 14:59:17 -0400 Subject: [PATCH] qemuexec: allow specifying `--kargs` multiple times Seems like a natural thing to do, so let's support it. See: #2430 --- mantle/cmd/kola/qemuexec.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mantle/cmd/kola/qemuexec.go b/mantle/cmd/kola/qemuexec.go index 88ee6661a9..2717b4f92d 100644 --- a/mantle/cmd/kola/qemuexec.go +++ b/mantle/cmd/kola/qemuexec.go @@ -49,7 +49,7 @@ var ( hostname string ignition string butane string - kargs string + kargs []string knetargs string ignitionFragments []string @@ -75,7 +75,7 @@ const maxSecondaryNics = 16 func init() { root.AddCommand(cmdQemuExec) cmdQemuExec.Flags().StringVarP(&knetargs, "knetargs", "", "", "Arguments for Ignition networking on kernel commandline") - cmdQemuExec.Flags().StringVarP(&kargs, "kargs", "", "", "Additional kernel arguments applied") + cmdQemuExec.Flags().StringArrayVar(&kargs, "kargs", nil, "Additional kernel arguments applied") cmdQemuExec.Flags().BoolVarP(&usernet, "usernet", "U", false, "Enable usermode networking") cmdQemuExec.Flags().StringSliceVar(&ignitionFragments, "add-ignition", nil, "Append well-known Ignition fragment: [\"autologin\"]") cmdQemuExec.Flags().StringVarP(&hostname, "hostname", "", "", "Set hostname via DHCP") @@ -262,7 +262,7 @@ func runQemuExec(cmd *cobra.Command, args []string) error { if len(knetargs) > 0 { builder.IgnitionNetworkKargs = knetargs } - builder.AppendKernelArguments = kargs + builder.AppendKernelArguments = strings.Join(kargs, " ") builder.Firmware = kola.QEMUOptions.Firmware if kola.QEMUOptions.DiskImage != "" { channel := "virtio"