Skip to content

Commit

Permalink
boot-image: Pass additional args to the hypervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
YtvwlD committed Jun 14, 2024
1 parent 1a371d8 commit d9429a7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion towbootctl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ pub struct BootImageCommand {
/// use the specified firmware instead of OVMF
#[argh(option)]
firmware: Option<PathBuf>,

/// additional arguments to pass to the hypervisor
#[argh(positional, greedy)]
args: Vec<String>,
}

#[cfg(feature = "args")]
Expand All @@ -195,7 +199,10 @@ impl BootImageCommand {
self.firmware.as_deref(), &self.image, self.x86_64, self.bochs,
self.kvm, self.gdb,
)?;
process.status()?.exit_ok()?;
process
.args(&self.args)
.status()?
.exit_ok()?;
Ok(())
}
}

0 comments on commit d9429a7

Please sign in to comment.