[master] 89428d077 Remove brackets from dynamic param bounds reasons

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Oct 29 15:21:06 UTC 2019


commit 89428d0775d063022d3425d260541e39e11aeaf7
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Oct 29 16:11:16 2019 +0100

    Remove brackets from dynamic param bounds reasons
    
    Instead, they are added where they are needed: only in error messages
    involving them.
    
    Refs #3099

diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c
index fcb9a3bd5..30e58e2fc 100644
--- a/bin/varnishd/mgt/mgt_param_tweak.c
+++ b/bin/varnishd/mgt/mgt_param_tweak.c
@@ -194,14 +194,14 @@ tweak_generic_uint(struct vsb *vsb, volatile unsigned *dest, const char *arg,
 		if (min != NULL && u < minv) {
 			VSB_printf(vsb, "Must be at least %s", min);
 			if (min_reason != NULL)
-				VSB_printf(vsb, " %s", min_reason);
+				VSB_printf(vsb, " (%s)", min_reason);
 			VSB_putc(vsb, '\n');
 			return (-1);
 		}
 		if (max != NULL && u > maxv) {
 			VSB_printf(vsb, "Must be no more than %s", max);
 			if (max_reason != NULL)
-				VSB_printf(vsb, " %s", max_reason);
+				VSB_printf(vsb, " (%s)", max_reason);
 			VSB_putc(vsb, '\n');
 			return (-1);
 		}
diff --git a/bin/varnishd/mgt/mgt_pool.c b/bin/varnishd/mgt/mgt_pool.c
index 7bbc1f959..8367453b6 100644
--- a/bin/varnishd/mgt/mgt_pool.c
+++ b/bin/varnishd/mgt/mgt_pool.c
@@ -114,7 +114,7 @@ struct parspec WRK_parspec[] = {
 		"in the way of getting work done.",
 		DELAYED_EFFECT,
 		"5000", "threads",
-		"(thread_pool_min)" },
+		"thread_pool_min" },
 	{ "thread_pool_min", tweak_thread_pool_min, &mgt_param.wthread_min,
 		NULL, NULL,
 		"The minimum number of worker threads in each pool. The "
@@ -126,7 +126,7 @@ struct parspec WRK_parspec[] = {
 		"Minimum is 10 threads.",
 		DELAYED_EFFECT,
 		"100", "threads",
-		NULL, "(thread_pool_max)" },
+		NULL, "thread_pool_max" },
 	{ "thread_pool_reserve", tweak_uint,
 		&mgt_param.wthread_reserve,
 		NULL, NULL,
@@ -147,7 +147,7 @@ struct parspec WRK_parspec[] = {
 		"Minimum is 1 otherwise, maximum is 95% of thread_pool_min.",
 		DELAYED_EFFECT,
 		"0", "threads",
-		NULL, "(95% of thread_pool_min)" },
+		NULL, "95% of thread_pool_min" },
 	{ "thread_pool_timeout",
 		tweak_timeout, &mgt_param.wthread_timeout,
 		"10", NULL,


More information about the varnish-commit mailing list