mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 17:44:10 +00:00
crosvm: rename DevicesCommand to DeviceCommand
This is the structure for the "device" command, and since we are going to introduce a "devices" one we would like to take over the name. BUG=b:218223240 TEST=cargo check Change-Id: I9e3ef1ad3738f7090126bbfc215930e82547ac3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3716016 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
8b9fc10192
commit
44fd232dbc
2 changed files with 7 additions and 7 deletions
|
@ -66,7 +66,7 @@ pub enum Command {
|
|||
#[cfg(feature = "composite-disk")]
|
||||
CreateComposite(CreateCompositeCommand),
|
||||
CreateQcow2(CreateQcow2Command),
|
||||
Device(DevicesCommand),
|
||||
Device(DeviceCommand),
|
||||
Disk(DiskCommand),
|
||||
MakeRT(MakeRTCommand),
|
||||
Resume(ResumeCommand),
|
||||
|
@ -301,9 +301,9 @@ pub struct VfioCrosvmCommand {
|
|||
#[derive(FromArgs)]
|
||||
#[argh(subcommand, name = "device")]
|
||||
/// Start a device process
|
||||
pub struct DevicesCommand {
|
||||
pub struct DeviceCommand {
|
||||
#[argh(subcommand)]
|
||||
pub command: DevicesSubcommand,
|
||||
pub command: DeviceSubcommand,
|
||||
}
|
||||
|
||||
#[derive(FromArgs)]
|
||||
|
@ -315,7 +315,7 @@ pub enum CrossPlatformDevicesCommands {
|
|||
}
|
||||
|
||||
#[derive(argh_helpers::FlattenSubcommand)]
|
||||
pub enum DevicesSubcommand {
|
||||
pub enum DeviceSubcommand {
|
||||
CrossPlatform(CrossPlatformDevicesCommands),
|
||||
Sys(super::sys::cmdline::DevicesSubcommand),
|
||||
}
|
||||
|
|
|
@ -333,13 +333,13 @@ fn create_qcow2(cmd: cmdline::CreateQcow2Command) -> std::result::Result<(), ()>
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn start_device(opts: cmdline::DevicesCommand) -> std::result::Result<(), ()> {
|
||||
fn start_device(opts: cmdline::DeviceCommand) -> std::result::Result<(), ()> {
|
||||
let result = match opts.command {
|
||||
cmdline::DevicesSubcommand::CrossPlatform(command) => match command {
|
||||
cmdline::DeviceSubcommand::CrossPlatform(command) => match command {
|
||||
cmdline::CrossPlatformDevicesCommands::Block(cfg) => run_block_device(cfg),
|
||||
cmdline::CrossPlatformDevicesCommands::Net(cfg) => run_net_device(cfg),
|
||||
},
|
||||
cmdline::DevicesSubcommand::Sys(command) => sys::start_device(command),
|
||||
cmdline::DeviceSubcommand::Sys(command) => sys::start_device(command),
|
||||
};
|
||||
|
||||
result.map_err(|e| {
|
||||
|
|
Loading…
Reference in a new issue