From 94effa8fbd2882263edb501c0cc420849f6a317a Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 4 Mar 2008 08:54:53 +0000 Subject: [PATCH] Polish CLI output git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2548 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/mgt_param.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/varnish-cache/bin/varnishd/mgt_param.c b/varnish-cache/bin/varnishd/mgt_param.c index 4cdca97c..2861861b 100644 --- a/varnish-cache/bin/varnishd/mgt_param.c +++ b/varnish-cache/bin/varnishd/mgt_param.c @@ -159,12 +159,12 @@ tweak_generic_uint(struct cli *cli, volatile unsigned *dest, const char *arg, un else u = strtoul(arg, NULL, 0); if (u < min) { - cli_out(cli, "Must be at least %u", min); + cli_out(cli, "Must be at least %u\n", min); cli_result(cli, CLIS_PARAM); return; } if (u > max) { - cli_out(cli, "Must be no more than %u", max); + cli_out(cli, "Must be no more than %u\n", max); cli_result(cli, CLIS_PARAM); return; } @@ -747,12 +747,14 @@ MCF_ParamSet(struct cli *cli, const char *param, const char *val) for (pp = parspec; pp->name != NULL; pp++) { if (!strcmp(pp->name, param)) { pp->func(cli, pp, val); - if (pp->flags & MUST_RESTART) - cli_out(cli, "change will take effect" + if (cli->result != CLIS_OK) { + } else if (child_pid >= 0 && pp->flags & MUST_RESTART) { + cli_out(cli, "Change will take effect" " when child is restarted"); - if (pp->flags & MUST_RELOAD) - cli_out(cli, "change will take effect" + } else if (pp->flags & MUST_RELOAD) { + cli_out(cli, "Change will take effect" " when VCL script is reloaded"); + } MCF_ParamSync(); return; } -- 2.39.5