From 10936f03ce539d89173e5717c583b3d737ee2bb9 Mon Sep 17 00:00:00 2001 From: des Date: Sat, 16 Sep 2006 12:59:41 +0000 Subject: [PATCH] -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 --- varnish-cache/bin/varnishstat/varnishstat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 { -- 2.39.5