From: des Date: Sat, 16 Sep 2006 12:59:41 +0000 (+0000) Subject: -c collides with one of the standard VSL options, so replace it with -1, X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10936f03ce539d89173e5717c583b3d737ee2bb9;p=varnish -c collides with one of the standard VSL options, so replace it with -1, 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 --- diff --git a/varnish-cache/bin/varnishstat/varnishstat.c b/varnish-cache/bin/varnishstat/varnishstat.c index 5d7999ef..5d275c91 100644 --- a/varnish-cache/bin/varnishstat/varnishstat.c +++ b/varnish-cache/bin/varnishstat/varnishstat.c @@ -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 {