Commit 9f93e4f3 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

-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: http://www.varnish-cache.org/svn/trunk/varnish-cache@1018 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c688f4f0
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment