Mailing List Archive

r1018 - trunk/varnish-cache/bin/varnishstat
Author: des
Date: 2006-09-16 14:59:41 +0200 (Sat, 16 Sep 2006)
New Revision: 1018

Modified:
trunk/varnish-cache/bin/varnishstat/varnishstat.c
Log:
-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)

Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c
===================================================================
--- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-16 12:45:00 UTC (rev 1017)
+++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-16 12:59:41 UTC (rev 1018)
@@ -99,7 +99,7 @@
static void
usage(void)
{
- fprintf(stderr, "usage: varnishstat [-cV]\n");
+ fprintf(stderr, "usage: varnishstat [-1V]\n");
exit(1);
}

@@ -108,14 +108,14 @@
{
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 @@
}
}

- if (c_flag) {
+ if (!once) {
do_curses(VSL_stats);
} else {