driver_tools/subcommands/disable/
args.rs1use argh::{ArgsInfo, FromArgs};
6
7#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
8#[argh(
9 subcommand,
10 name = "disable",
11 description = "Disables the given driver, and restart its nodes with rematching.",
12 note = "After this call, nodes that were bound to the requested driver will either have
13another driver (specifically a fallback driver) bound to them, or the node becomes an unbound node
14ready to bind to a driver later, which is generally done with a register call. If there is a
15fallback driver that might take the place of the driver being disabled, and you want to register
16your own driver for the node, the fallback driver should be disabled as well.",
17 example = "To disable a driver
18
19 $ driver disable 'fuchsia-pkg://fuchsia.com/example_driver#meta/example_driver.cm'
20
21This can also be used with boot drivers, but keep in mind if the driver being disabled is
22critical to the system, the system will become unstable.
23
24 $ driver disable 'fuchsia-boot:///#meta/example_driver.cm'",
25 error_code(1, "Failed to connect to the driver development service")
26)]
27pub struct DisableCommand {
28 #[argh(positional, description = "component URL of the driver to be disabled.")]
29 pub url: String,
30
31 #[argh(switch, short = 's', long = "select")]
33 pub select: bool,
34}