microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
flowey/flowey_cli/src/cli/debug/mod.rs
28lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | pub mod dump_stage0_dag; |
| 5 | pub mod interrogate; |
| 6 | pub mod list_nodes; |
| 7 | pub mod list_patches; |
| 8 | |
| 9 | /// Debug commands internal to flowey. Unless you're debugging / developing |
| 10 | /// flowey internals, it's unlikely you'll need to use these. |
| 11 | #[derive(clap::Subcommand)] |
| 12 | pub enum DebugCommands { |
| 13 | DumpStage0Dag(dump_stage0_dag::DumpStage0Dag), |
| 14 | Interrogate(interrogate::Interrogate), |
| 15 | ListNodes(list_nodes::ListNodes), |
| 16 | ListPatches(list_patches::ListPatches), |
| 17 | } |
| 18 | |
| 19 | impl DebugCommands { |
| 20 | pub fn run(self) -> anyhow::Result<()> { |
| 21 | match self { |
| 22 | DebugCommands::Interrogate(cmd) => cmd.run(), |
| 23 | DebugCommands::ListNodes(cmd) => cmd.run(), |
| 24 | DebugCommands::ListPatches(cmd) => cmd.run(), |
| 25 | DebugCommands::DumpStage0Dag(cmd) => cmd.run(), |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | |