From bff8ce00e07f1c6189bc5e7a1c3f023ed229e5a7 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 9 Jul 2008 09:06:57 +0000 Subject: [PATCH] Change the layout of the "vcl.list" to explicitly say "active", "available" or "discarded". git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2909 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_vcl.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_vcl.c b/varnish-cache/bin/varnishd/cache_vcl.c index 491f4921..3c874881 100644 --- a/varnish-cache/bin/varnishd/cache_vcl.c +++ b/varnish-cache/bin/varnishd/cache_vcl.c @@ -214,13 +214,20 @@ static void ccf_config_list(struct cli *cli, const char * const *av, void *priv) { struct vcls *vcl; + const char *flg; (void)av; (void)priv; ASSERT_CLI(); VTAILQ_FOREACH(vcl, &vcl_head, list) { - cli_out(cli, "%s %6u %s\n", - vcl == vcl_active ? "* " : " ", + if (vcl == vcl_active) { + flg = "active"; + } else if (vcl->conf->discard) { + flg = "discarded"; + } else + flg = "available"; + cli_out(cli, "%-10s %6u %s\n", + flg, vcl->conf->busy, vcl->name); } -- 2.39.5