]> err.no Git - varnish/commitdiff
-c collides with one of the standard VSL options, so replace it with -1,
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 12:59:41 +0000 (12:59 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 12:59:41 +0000 (12:59 +0000)
which has the opposite meaning (IMHO, the continuous display is the most
useful)

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1018 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishstat/varnishstat.c

index 5d7999efee851309b6fba4a7c0489748663cc067..5d275c915cc844e3d5fceda8dbc5c42e7a9f664f 100644 (file)
@@ -99,7 +99,7 @@ do_curses(struct varnish_stats *VSL_stats)
 static void
 usage(void)
 {
-       fprintf(stderr, "usage: varnishstat [-cV]\n");
+       fprintf(stderr, "usage: varnishstat [-1V]\n");
        exit(1);
 }
 
@@ -108,14 +108,14 @@ main(int argc, char **argv)
 {
        int c;
        struct varnish_stats *VSL_stats;
-       int c_flag = 0;
+       int once = 0;
 
        VSL_stats = VSL_OpenStats();
 
-       while ((c = getopt(argc, argv, "cV")) != -1) {
+       while ((c = getopt(argc, argv, "1V")) != -1) {
                switch (c) {
-               case 'c':
-                       c_flag = 1;
+               case '1':
+                       once = 1;
                        break;
                case 'V':
                        varnish_version("varnishstat");
@@ -125,7 +125,7 @@ main(int argc, char **argv)
                }
        }
 
-       if (c_flag) {
+       if (!once) {
                do_curses(VSL_stats);
        } else {