diff cli-runopts.c @ 946:17d874ae93a1

Add '-V' for version -h should exit with success Update manpages
author Matt Johnston <matt@ucc.asn.au>
date Sun, 27 Jul 2014 22:06:26 +0800
parents a0819ecfee0b
children 1bf92da7a2a0
line wrap: on
line diff
--- a/cli-runopts.c	Sat Jul 26 10:18:55 2014 +0800
+++ b/cli-runopts.c	Sun Jul 27 22:06:26 2014 +0800
@@ -90,6 +90,7 @@
 					"-c <cipher list> Specify preferred ciphers ('-c help' to list options)\n"
 					"-m <MAC list> Specify preferred MACs for packet verification (or '-m help')\n"
 #endif
+					"-V    Version\n"
 #ifdef DEBUG_TRACE
 					"-v    verbose (compiled with DEBUG_TRACE)\n"
 #endif
@@ -324,6 +325,10 @@
 #ifndef ENABLE_CLI_LOCALTCPFWD
 				case 'L':
 #endif
+				case 'V':
+					print_version();
+					exit(EXIT_SUCCESS);
+					break;
 				case 'o':
 				case 'b':
 					next = &dummy;