Commit dc5b18b8 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Improve "waiter" parameter description as discussed in param-audit.

parent caac7404
...@@ -1052,8 +1052,8 @@ static const struct parspec input_parspec[] = { ...@@ -1052,8 +1052,8 @@ static const struct parspec input_parspec[] = {
"off", "bool" }, "off", "bool" },
{ "waiter", tweak_waiter, NULL, 0, 0, { "waiter", tweak_waiter, NULL, 0, 0,
"Select the waiter kernel interface.\n", "Select the waiter kernel interface.\n",
EXPERIMENTAL | MUST_RESTART, WIZARD | MUST_RESTART,
"default", NULL }, WAITER_DEFAULT, NULL },
{ "diag_bitmap", tweak_diag_bitmap, 0, 0, 0, { "diag_bitmap", tweak_diag_bitmap, 0, 0, 0,
"Bitmap controlling diagnostics code:\n" "Bitmap controlling diagnostics code:\n"
" 0x00000001 - CNT_Session states.\n" " 0x00000001 - CNT_Session states.\n"
......
...@@ -68,14 +68,14 @@ WAIT_tweak_waiter(struct cli *cli, const char *arg) ...@@ -68,14 +68,14 @@ WAIT_tweak_waiter(struct cli *cli, const char *arg)
else else
VCLI_Out(cli, "%s", waiter->name); VCLI_Out(cli, "%s", waiter->name);
VCLI_Out(cli, " ("); VCLI_Out(cli, " (possible values: ");
for (i = 0; vca_waiters[i] != NULL; i++) for (i = 0; vca_waiters[i] != NULL; i++)
VCLI_Out(cli, "%s%s", i == 0 ? "" : ", ", VCLI_Out(cli, "%s%s", i == 0 ? "" : ", ",
vca_waiters[i]->name); vca_waiters[i]->name);
VCLI_Out(cli, ")"); VCLI_Out(cli, ")");
return; return;
} }
if (!strcmp(arg, "default")) { if (!strcmp(arg, WAITER_DEFAULT)) {
waiter = vca_waiters[0]; waiter = vca_waiters[0];
return; return;
} }
......
...@@ -33,6 +33,8 @@ struct sess; ...@@ -33,6 +33,8 @@ struct sess;
typedef void* waiter_init_f(void); typedef void* waiter_init_f(void);
typedef void waiter_pass_f(void *priv, const struct sess *); typedef void waiter_pass_f(void *priv, const struct sess *);
#define WAITER_DEFAULT "platform dependent"
struct waiter { struct waiter {
const char *name; const char *name;
waiter_init_f *init; waiter_init_f *init;
......
...@@ -30,7 +30,7 @@ varnish v1 -start ...@@ -30,7 +30,7 @@ varnish v1 -start
varnish v1 -cliok "help" varnish v1 -cliok "help"
varnish v1 -cliok "param.set waiter default" varnish v1 -cliok "param.set waiter poll"
varnish v1 -clierr 106 "param.set waiter HASH(0x8839c4c)" varnish v1 -clierr 106 "param.set waiter HASH(0x8839c4c)"
......
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