[sheepdog] [PATCH] sheep: add --version option for sheep daemon
Liu Yuan
namei.unix at gmail.com
Thu Dec 6 04:11:26 CET 2012
From: Liu Yuan <tailai.ly at taobao.com>
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/sheep.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sheep/sheep.c b/sheep/sheep.c
index dcffba3..294bdd6 100644
--- a/sheep/sheep.c
+++ b/sheep/sheep.c
@@ -54,6 +54,7 @@ static struct sd_option sheep_options[] = {
{'P', "pidfile", true, "create a pid file"},
{'s', "disk-space", true, "specify the free disk space in megabytes"},
{'u', "upgrade", false, "upgrade to the latest data layout"},
+ {'v', "version", false, "show the version"},
{'w', "write-cache", true, "specify the cache type"},
{'y', "myaddr", true, "specify the address advertised to other sheep"},
{'z', "zone", true, "specify the zone id"},
@@ -498,6 +499,10 @@ int main(int argc, char **argv)
case 'h':
usage(0);
break;
+ case 'v':
+ fprintf(stdout, "Sheepdog daemon version %s\n",
+ PACKAGE_VERSION);
+ break;
default:
usage(1);
break;
--
1.7.9.5
More information about the sheepdog
mailing list