diff --git a/src/bin/stratisd-tools.rs b/src/bin/stratisd-tools.rs index 281b5a6360..e057929a57 100644 --- a/src/bin/stratisd-tools.rs +++ b/src/bin/stratisd-tools.rs @@ -11,6 +11,8 @@ use env_logger::Builder; use crate::tools::cmds; +use stratisd::stratis::VERSION; + fn basename(path: &str) -> Option<&Path> { Path::new(path).file_name().map(Path::new) } @@ -42,6 +44,8 @@ fn main() { .unwrap_or(false) { let command = Command::new(executable_name) + .version(VERSION) + .about("Top-level command used to invoke one of a set of stratisd tools") .arg( Arg::new("executable") .required(true) diff --git a/src/bin/tools/cmds.rs b/src/bin/tools/cmds.rs index 792c539486..790fe9c6de 100644 --- a/src/bin/tools/cmds.rs +++ b/src/bin/tools/cmds.rs @@ -8,6 +8,8 @@ use clap::{Arg, ArgAction, Command}; use crate::tools::dump_metadata; +use stratisd::stratis::VERSION; + pub trait ToolCommand<'a> { fn name(&self) -> &'a str; fn run(&self, command_line_args: Vec) -> Result<(), String>; @@ -18,6 +20,8 @@ struct StratisDumpMetadata; impl StratisDumpMetadata { fn cmd() -> Command { Command::new("stratis-dumpmetadata") + .version(VERSION) + .about("Reads Stratis metadata from a Stratis device and displays it") .next_line_help(true) .arg( Arg::new("dev")