Add qemu command

This commit is contained in:
Roey Darwish Dror
2019-06-02 14:31:19 +03:00
parent 7f6a0c0a0f
commit 91215703bf
3 changed files with 50 additions and 0 deletions

View File

@@ -19,6 +19,9 @@ pub enum Command {
#[structopt(name = "chroot", about = "Chroot into exiting Live USB")]
Chroot(ChrootCommand),
#[structopt(name = "qemu", about = "Boot the USB with Qemu")]
Qemu(QemuCommand),
}
#[derive(StructOpt)]
@@ -54,3 +57,14 @@ pub struct ChrootCommand {
#[structopt()]
pub command: Vec<String>,
}
#[derive(StructOpt)]
pub struct QemuCommand {
/// Path starting with /dev/disk/by-id for the USB drive
#[structopt(parse(from_os_str))]
pub block_device: PathBuf,
/// Arguments to pass to qemu
#[structopt()]
pub args: Vec<String>,
}