summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-24 00:24:47 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-24 00:24:47 -0700
commit4eefcaf3f6471972dbb8c1c6e037ae62c7cb5ce9 (patch)
tree7c8d30f42f32e49fe2db4a882e33b30235cdcba1
parent6467f86493ac3d0effe216fb5f8c1a623af8f1fa (diff)
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--misc.c7
-rw-r--r--xfwp.man3
2 files changed, 9 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index a8278eb..c7e609e 100644
--- a/misc.c
+++ b/misc.c
@@ -71,7 +71,7 @@ Usage(void)
(void) fprintf (stderr,
"\t[-cdt <#secs>] [-pmport <port#>] [-config <path>]\\\n");
(void) fprintf (stderr,
- "\t[-logfile <path>] [-loglevel <0|1>] [-verify]\n");
+ "\t[-logfile <path>] [-loglevel <0|1>] [-verify] [-version]\n");
exit (0);
}
@@ -1344,6 +1344,11 @@ doProcessInputArgs (
}
config_info->log_level = atoi(argv[arg_counter + 1]);
}
+ else if (!strcmp("-version", argv[arg_counter]))
+ {
+ puts(PACKAGE_STRING);
+ exit(0);
+ }
else
{
fprintf(stderr, "%s: Unrecognized command line argument '%s'\n",
diff --git a/xfwp.man b/xfwp.man
index 5d3ddb2..f738d5e 100644
--- a/xfwp.man
+++ b/xfwp.man
@@ -94,6 +94,9 @@ default is 10.
.B \-max_pm_conns \fInum_connections\fP
Used to specify the maximum number of X server connections. The
default is 100.
+.TP 8
+.B \-version
+Used to print the program version and exit.
.PP
.SH DESCRIPTION
The X firewall proxy (xfwp) is an application layer gateway proxy