[PATCH:iceauth 12/17] Add -V flag to print version
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Nov 15 18:38:41 PST 2013
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
iceauth.c | 4 ++++
man/iceauth.man | 2 ++
2 files changed, 6 insertions(+)
diff --git a/iceauth.c b/iceauth.c
index e729ed5..c1688c0 100644
--- a/iceauth.c
+++ b/iceauth.c
@@ -63,6 +63,7 @@ usage (void)
" -q turn off extra messages\n"
" -i ignore locks on authority file\n"
" -b break locks on authority file\n"
+" -V print version and exit\n"
"\n"
"and commands have the following syntax:\n";
static const char suffixmsg[] =
@@ -104,6 +105,9 @@ main (int argc, char *argv[])
if (++i >= argc) usage ();
authfilename = argv[i];
continue;
+ case 'V': /* -V */
+ printf("%s\n", PACKAGE_STRING);
+ exit(0);
case 'v': /* -v */
verbose = 1;
continue;
diff --git a/man/iceauth.man b/man/iceauth.man
index c91fc24..2621b23 100644
--- a/man/iceauth.man
+++ b/man/iceauth.man
@@ -51,6 +51,8 @@ on the \fIiceauth\fP command line, or in scripts.
.PP
\fB\-u\fP Print basic usage instructions
.PP
+\fB\-V\fP Print version and exit
+.PP
.SH USAGE
.PP
When \fIiceauth\fP is run it will allow the following set of commands
--
1.7.9.2
More information about the xorg-devel
mailing list