From 55e53275730153929409145741d614b9e8b4379c Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Wed, 25 Nov 2015 04:01:53 -0500 Subject: [PATCH] Use name/version when showing hostname's usage. --- src/hostname/hostname.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {