Skip to content

Commit

Permalink
qemuexec: allow specifying --kargs multiple times
Browse files Browse the repository at this point in the history
Seems like a natural thing to do, so let's support it.

See: #2430
  • Loading branch information
jlebon authored and cgwalters committed Sep 14, 2021
1 parent 7a0a7fd commit cf4b1ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mantle/cmd/kola/qemuexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var (
hostname string
ignition string
butane string
kargs string
kargs []string
knetargs string

ignitionFragments []string
Expand All @@ -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")
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit cf4b1ed

Please sign in to comment.