[sheepdog] [PATCH] dog: print dog version with -h option
Hitoshi Mitake
mitake.hitoshi at gmail.com
Sun Jan 12 10:33:08 CET 2014
This patch lets dog print its version with -h option (or when it isn't
passed any parameters). It is useful for trouble shooting.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
dog/dog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dog/dog.c b/dog/dog.c
index 3f1e2e4..a4859f4 100644
--- a/dog/dog.c
+++ b/dog/dog.c
@@ -251,7 +251,8 @@ static void usage(const struct command *commands, int status)
if (status)
sd_err("Try '%s --help' for more information.", program_name);
else {
- printf("Sheepdog administrator utility\n");
+ printf("Sheepdog administrator utility (version %s)\n",
+ PACKAGE_VERSION);
printf("Usage: %s <command> <subcommand> [options]\n", program_name);
printf("\nAvailable commands:\n");
for (i = 0; commands[i].name; i++) {
--
1.8.1.2
More information about the sheepdog
mailing list