Add qemu command
This commit is contained in:
14
src/args.rs
14
src/args.rs
@@ -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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user