microsoft/openvmm

Public

mirrored from https://github.com/microsoft/openvmmAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
bc046e1ea621f83b97afc2694de8eed2ed249869

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

flowey/flowey_cli/src/cli/debug/mod.rs

28lines · modepreview

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

pub mod dump_stage0_dag;
pub mod interrogate;
pub mod list_nodes;
pub mod list_patches;

/// Debug commands internal to flowey. Unless you're debugging / developing
/// flowey internals, it's unlikely you'll need to use these.
#[derive(clap::Subcommand)]
pub enum DebugCommands {
    DumpStage0Dag(dump_stage0_dag::DumpStage0Dag),
    Interrogate(interrogate::Interrogate),
    ListNodes(list_nodes::ListNodes),
    ListPatches(list_patches::ListPatches),
}

impl DebugCommands {
    pub fn run(self) -> anyhow::Result<()> {
        match self {
            DebugCommands::Interrogate(cmd) => cmd.run(),
            DebugCommands::ListNodes(cmd) => cmd.run(),
            DebugCommands::ListPatches(cmd) => cmd.run(),
            DebugCommands::DumpStage0Dag(cmd) => cmd.run(),
        }
    }
}