summaryrefslogtreecommitdiff
path: root/cleopatre
diff options
context:
space:
mode:
authorsave2009-11-26 18:29:54 +0000
committersave2009-11-26 18:29:54 +0000
commit9c0ff93a569327148a4a2dcbbbeb6c7af41fa2cb (patch)
treeb07c66ed3f4b884117c6fa9042cb605058b7ebc8 /cleopatre
parent8492bc835fd26a0f3c6e5099caf904b2499d5f8f (diff)
cleo/devkit/plcd: add --version option that show version number
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6479 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cleopatre')
-rw-r--r--cleopatre/devkit/plcd/src/plcd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/cleopatre/devkit/plcd/src/plcd.c b/cleopatre/devkit/plcd/src/plcd.c
index 531584d38d..004f790901 100644
--- a/cleopatre/devkit/plcd/src/plcd.c
+++ b/cleopatre/devkit/plcd/src/plcd.c
@@ -39,7 +39,8 @@ static void print_usage (const char *cmd)
fprintf (stderr, "Usage : %s " \
"[ -h --hw_file hardware_info_file ]" \
"[ -c --conf_file hpav_conf_file ]" \
- "[ -i --info_file hpav_info_file ]\n",
+ "[ -i --info_file hpav_info_file ]" \
+ "[ -v --version show version number ]\n",
cmd);
}
@@ -119,7 +120,8 @@ void plcd_uninit(plcd_ctx_t *ctx)
struct option long_opts[] =
{ { "hw_file", required_argument, NULL, 'h' },
{ "conf_file", required_argument, NULL, 'c' },
- { "info_file", required_argument, NULL, 'i' }
+ { "info_file", required_argument, NULL, 'i' },
+ { "version", no_argument, NULL, 'v' }
};
/* show PLCD version */
@@ -136,7 +138,7 @@ void plcd_uninit(plcd_ctx_t *ctx)
/*process options */
while((c = getopt_long_only (argc, argv,
- "h:c:i:",
+ "h:c:i:v:",
long_opts, &opt_index)) != -1)
{
switch(c)
@@ -150,6 +152,9 @@ void plcd_uninit(plcd_ctx_t *ctx)
case 'i': /* HP AV info file */
ctx.hpav_info_path = optarg;
break;
+ case 'v': /* version number */
+ fprintf (stdout, "%s\n", VERSION);
+ return 0;
default:
print_usage (argv[0]);
return 1;