driver_tools/subcommands/dump/
args.rs1use argh::{ArgsInfo, FromArgs};
6
7#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
8#[argh(
9 subcommand,
10 name = "dump",
11 description = "Dump device tree",
12 example = "To dump the device tree:
13
14 $ driver dump\n",
15 example = "To dump the subtree of the device tree under a node:
16
17 $ driver dump my-node-name\n",
18 error_code(1, "Failed to connect to the driver development service"),
19 example = "To graph device tree:
20
21 $ driver dump --graph | dot -Tpng | display"
22)]
23pub struct DumpCommand {
24 #[argh(positional)]
27 pub device: Option<String>,
28
29 #[argh(switch, short = 'g', long = "graph")]
31 pub graph: bool,
32
33 #[argh(switch, short = 's', long = "select")]
35 pub select: bool,
36}