diff --git a/src/hostname/hostname.rs b/src/hostname/hostname.rs index 1519bdbdc..4e01de294 100644 --- a/src/hostname/hostname.rs +++ b/src/hostname/hostname.rs @@ -27,6 +27,7 @@ use std::io::Write; use std::net::ToSocketAddrs; static NAME: &'static str = "hostname"; +static VERSION: &'static str = "1.0.0"; extern { fn gethostname(name: *mut libc::c_char, namelen: libc::size_t) -> libc::c_int; @@ -119,7 +120,7 @@ pub fn uumain(args: Vec) -> i32 { } fn version() { - println!("hostname 1.0.0"); + println!("{} {}", NAME, VERSION); } fn help_menu(program: &str, options: Options) {