'bad negation' during config file processing

This fixes the problem with reporting "the <foo> option may not
both have a value and be negated" to stdout if delivered before the
interface has been set up, so possibly not be seen.  It has been
using pline_The() but that uses rawprint() during startup.

Unfortunately testing it has uncovered another config file error
reporting issue and this one won't be so easy to fix.  For a logical
line that uses backslash+newline continuations to span multiple
physical lines, when there is a problem it reports the line number
and text of the last segment rather than of the first or of the
specific segment containing the problem.  That isn't necessarily
wrong but is suboptimal.
This commit is contained in:
PatR
2022-11-02 15:56:10 -07:00
parent dd36d765b6
commit 5ac048c8a6

View File

@@ -5812,8 +5812,8 @@ string_for_env_opt(const char *optname, char *opts, boolean val_optional)
static void
bad_negation(const char *optname, boolean with_parameter)
{
pline_The("%s option may not %sbe negated.", optname,
with_parameter ? "both have a value and " : "");
config_error_add("The %s option may not %sbe negated.", optname,
with_parameter ? "both have a value and " : "");
}
/* go through all of the options and set the minmatch value