Add ability to pass arbitrary args to qemu
CI / build (push) Successful in 14s

This commit is contained in:
hulthe committed 2026-10-26 10:30:14 +01:00
1 parent fe6b03e268
commit 3eb5cd434c
1 file changed
+6 -1
+6 -1
View File
@@ -35,6 +35,9 @@ pub struct BootCmd {
/// relative to the image's WORKINGDIR. Can be repeated. /// relative to the image's WORKINGDIR. Can be repeated.
#[clap(long)] #[clap(long)]
mount: Vec<String>, mount: Vec<String>,
/// Extra arguments to qemu
extra: Vec<String>,
} }
/// Invoke `qemu` to boot a boco image. See [`BootCmd`] for options /// Invoke `qemu` to boot a boco image. See [`BootCmd`] for options
@@ -48,6 +51,7 @@ pub(crate) fn boot(
forward, forward,
cmd, cmd,
mount, mount,
extra,
}: BootCmd, }: BootCmd,
) -> Result<()> { ) -> Result<()> {
let reg_dir = registry_dir(&name)?; let reg_dir = registry_dir(&name)?;
@@ -165,7 +169,8 @@ pub(crate) fn boot(
.args(["-no-reboot"]) .args(["-no-reboot"])
.args(["-append", &cmdline]) .args(["-append", &cmdline])
.args(["-nographic"]) .args(["-nographic"])
.args(["-nic", &network]); .args(["-nic", &network])
.args(&extra);
println!("{command:?}"); println!("{command:?}");