Commit 89428d07 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Remove brackets from dynamic param bounds reasons

Instead, they are added where they are needed: only in error messages
involving them.

Refs #3099
parent c59b8066
...@@ -194,14 +194,14 @@ tweak_generic_uint(struct vsb *vsb, volatile unsigned *dest, const char *arg, ...@@ -194,14 +194,14 @@ tweak_generic_uint(struct vsb *vsb, volatile unsigned *dest, const char *arg,
if (min != NULL && u < minv) { if (min != NULL && u < minv) {
VSB_printf(vsb, "Must be at least %s", min); VSB_printf(vsb, "Must be at least %s", min);
if (min_reason != NULL) if (min_reason != NULL)
VSB_printf(vsb, " %s", min_reason); VSB_printf(vsb, " (%s)", min_reason);
VSB_putc(vsb, '\n'); VSB_putc(vsb, '\n');
return (-1); return (-1);
} }
if (max != NULL && u > maxv) { if (max != NULL && u > maxv) {
VSB_printf(vsb, "Must be no more than %s", max); VSB_printf(vsb, "Must be no more than %s", max);
if (max_reason != NULL) if (max_reason != NULL)
VSB_printf(vsb, " %s", max_reason); VSB_printf(vsb, " (%s)", max_reason);
VSB_putc(vsb, '\n'); VSB_putc(vsb, '\n');
return (-1); return (-1);
} }
......
...@@ -114,7 +114,7 @@ struct parspec WRK_parspec[] = { ...@@ -114,7 +114,7 @@ struct parspec WRK_parspec[] = {
"in the way of getting work done.", "in the way of getting work done.",
DELAYED_EFFECT, DELAYED_EFFECT,
"5000", "threads", "5000", "threads",
"(thread_pool_min)" }, "thread_pool_min" },
{ "thread_pool_min", tweak_thread_pool_min, &mgt_param.wthread_min, { "thread_pool_min", tweak_thread_pool_min, &mgt_param.wthread_min,
NULL, NULL, NULL, NULL,
"The minimum number of worker threads in each pool. The " "The minimum number of worker threads in each pool. The "
...@@ -126,7 +126,7 @@ struct parspec WRK_parspec[] = { ...@@ -126,7 +126,7 @@ struct parspec WRK_parspec[] = {
"Minimum is 10 threads.", "Minimum is 10 threads.",
DELAYED_EFFECT, DELAYED_EFFECT,
"100", "threads", "100", "threads",
NULL, "(thread_pool_max)" }, NULL, "thread_pool_max" },
{ "thread_pool_reserve", tweak_uint, { "thread_pool_reserve", tweak_uint,
&mgt_param.wthread_reserve, &mgt_param.wthread_reserve,
NULL, NULL, NULL, NULL,
...@@ -147,7 +147,7 @@ struct parspec WRK_parspec[] = { ...@@ -147,7 +147,7 @@ struct parspec WRK_parspec[] = {
"Minimum is 1 otherwise, maximum is 95% of thread_pool_min.", "Minimum is 1 otherwise, maximum is 95% of thread_pool_min.",
DELAYED_EFFECT, DELAYED_EFFECT,
"0", "threads", "0", "threads",
NULL, "(95% of thread_pool_min)" }, NULL, "95% of thread_pool_min" },
{ "thread_pool_timeout", { "thread_pool_timeout",
tweak_timeout, &mgt_param.wthread_timeout, tweak_timeout, &mgt_param.wthread_timeout,
"10", NULL, "10", NULL,
......
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