r1013 - trunk/varnish-cache/bin/varnishhist

des at projects.linpro.no des at projects.linpro.no
Sat Sep 16 14:28:59 CEST 2006


Author: des
Date: 2006-09-16 14:28:59 +0200 (Sat, 16 Sep 2006)
New Revision: 1013

Modified:
   trunk/varnish-cache/bin/varnishhist/varnishhist.c
Log:
Add -V option, fix usage string.

Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c
===================================================================
--- trunk/varnish-cache/bin/varnishhist/varnishhist.c	2006-09-16 12:28:34 UTC (rev 1012)
+++ trunk/varnish-cache/bin/varnishhist/varnishhist.c	2006-09-16 12:28:59 UTC (rev 1013)
@@ -145,7 +145,7 @@
 usage(void)
 {
 	fprintf(stderr,
-	    "usage: varnishhist");
+	    "usage: varnishhist %s [-V] [-w delay]\n", VSL_USAGE);
 	exit(1);
 }
 
@@ -157,8 +157,11 @@
 
 	vd = VSL_New();
 	
-	while ((c = getopt(argc, argv, VSL_ARGS "w:")) != -1) {
+	while ((c = getopt(argc, argv, VSL_ARGS "Vw:")) != -1) {
 		switch (c) {
+		case 'V':
+			varnish_version("varnishhist");
+			exit(0);
 		case 'w':
 			delay = atoi(optarg);
 			break;




More information about the varnish-commit mailing list