Files
s390-tools/rust/pvattest/src/cmd.rs
T
Steffen Eiden 16610a211f rust: pvattest-Rust
Add a CLI compatible Rust implementation of pvattest-C.
 - All (non-experimental) options are supported and work exactly as in
   the C implementation. For some options/parameters new variants are
   available.
 - `perform` now also accepts positional arguments, while keep accepting
   -i and -o  that was mandatory in the C implementation.
 - `version` may also be a command instead of an option now.
 - -V is deprecated
 - -v increases verbosity instead of showing the version
 - all experimental options are dropped

Acked-by: Qi Feng Huo <huoqif@cn.ibm.com>
Acked-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2024-05-27 16:54:01 +02:00

34 lines
717 B
Rust

// SPDX-License-Identifier: MIT
//
// Copyright IBM Corp. 2024
//
pub mod create;
#[cfg(target_arch = "s390x")]
pub mod perform;
pub mod verify;
pub use create::create;
pub use verify::verify;
pub const CMD_FN: &[&str] = &["+create", "+verify"];
// s390 branch
#[cfg(target_arch = "s390x")]
mod uv_cmd {
pub use super::perform::perform;
pub const UV_CMD_FN: &[&str] = &["+perform"];
}
// non s390-branch
#[cfg(not(target_arch = "s390x"))]
mod uv_cmd {
use std::process::ExitCode;
use anyhow::{bail, Result};
pub fn perform(_: &crate::cli::PerformAttOpt) -> Result<ExitCode> {
bail!("Command only available on s390x")
}
pub const UV_CMD_FN: &[&str] = &[];
}
pub use uv_cmd::*;