From: des Date: Sat, 16 Sep 2006 12:28:59 +0000 (+0000) Subject: Add -V option, fix usage string. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fee70ee7d850641cd575c2673ae443109e80e56a;p=varnish Add -V option, fix usage string. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1013 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishhist/varnishhist.c b/varnish-cache/bin/varnishhist/varnishhist.c index 3100a005..1d365265 100644 --- a/varnish-cache/bin/varnishhist/varnishhist.c +++ b/varnish-cache/bin/varnishhist/varnishhist.c @@ -145,7 +145,7 @@ static void usage(void) { fprintf(stderr, - "usage: varnishhist"); + "usage: varnishhist %s [-V] [-w delay]\n", VSL_USAGE); exit(1); } @@ -157,8 +157,11 @@ main(int argc, char **argv) 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;