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