]> err.no Git - varnish/commitdiff
Add -V option, fix usage string.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 12:28:59 +0000 (12:28 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 12:28:59 +0000 (12:28 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1013 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishhist/varnishhist.c

index 3100a00550fd60ea8cf269b73e563c3bdd76e9fe..1d3652653d6cbabc42b08a3a672502f1af9c5a1d 100644 (file)
@@ -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;