[4.1] dffd38a Reserve space for the "cooling" state in vcl.list

Lasse Karstensen lkarsten at varnish-software.com
Thu Jan 14 15:15:07 CET 2016


commit dffd38afb926320e7f212060d0f62122757a2024
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Dec 1 12:30:16 2015 +0100

    Reserve space for the "cooling" state in vcl.list
    
    A VCL may show up as auto/cooling in the CLI, breaking the columns align
    in the output.
    
    Also for 4.1

diff --git a/bin/varnishd/cache/cache_vcl.c b/bin/varnishd/cache/cache_vcl.c
index de39d60..cdd4124 100644
--- a/bin/varnishd/cache/cache_vcl.c
+++ b/bin/varnishd/cache/cache_vcl.c
@@ -554,7 +554,7 @@ ccf_config_list(struct cli *cli, const char * const *av, void *priv)
 			flg = "discarded";
 		} else
 			flg = "available";
-		VCLI_Out(cli, "%-10s %4s/%s  %6u %s\n",
+		VCLI_Out(cli, "%-10s %4s/%-8s %6u %s\n",
 		    flg, vcl->state, vcl->temp, vcl->busy, vcl->loaded_name);
 	}
 }
diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index bb298bb..b12bdb6 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -414,7 +414,7 @@ mcf_vcl_list(struct cli *cli, const char * const *av, void *priv)
 		free(p);
 	} else {
 		VTAILQ_FOREACH(vp, &vclhead, list) {
-			VCLI_Out(cli, "%-10s %4s/%s  %6s %s\n",
+			VCLI_Out(cli, "%-10s %4s/%-8s %6s %s\n",
 			    vp == active_vcl ? "active" : "available",
 			    vp->state,
 			    vp->warm ? "warm" : "cold", "", vp->name);



More information about the varnish-commit mailing list