mod cmdline;
mod kargs;
mod rootmap;
mod stream_hash;
mod unique_fs;
use anyhow::{Context, Result};
use clap::Parser;
use crate::cmdline::*;
fn main() -> Result<()> {
match Cmd::parse() {
Cmd::Kargs(c) => kargs::kargs(c),
Cmd::Rootmap(c) => rootmap::rootmap(c).context("Configuring rootmap"),
Cmd::BindBoot(c) => rootmap::bind_boot(c).context("Failed to bind boot"),
Cmd::StreamHash(c) => stream_hash::stream_hash(c),
Cmd::VerifyUniqueFsLabel(c) => unique_fs::verify_unique_fs(c),
#[cfg(target_arch = "s390x")]
Cmd::Zipl(c) => kargs::zipl(c),
}
}