r2909 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jul 9 11:06:57 CEST 2008


Author: phk
Date: 2008-07-09 11:06:57 +0200 (Wed, 09 Jul 2008)
New Revision: 2909

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vcl.c
Log:
Change the layout of the "vcl.list" to explicitly say "active",
"available" or "discarded".



Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vcl.c	2008-07-09 08:56:46 UTC (rev 2908)
+++ trunk/varnish-cache/bin/varnishd/cache_vcl.c	2008-07-09 09:06:57 UTC (rev 2909)
@@ -214,13 +214,20 @@
 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);
 	}




More information about the varnish-commit mailing list