diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-24 00:24:47 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-05-24 00:24:47 -0700 |
commit | 4eefcaf3f6471972dbb8c1c6e037ae62c7cb5ce9 (patch) | |
tree | 7c8d30f42f32e49fe2db4a882e33b30235cdcba1 | |
parent | 6467f86493ac3d0effe216fb5f8c1a623af8f1fa (diff) |
Add -version option to print program version
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | misc.c | 7 | ||||
-rw-r--r-- | xfwp.man | 3 |
2 files changed, 9 insertions, 1 deletions
@@ -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", @@ -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 |