mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
ctdb-common: Log a message for unknown conf option
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
421d828f6c
commit
ebb28c57a1
@ -1113,8 +1113,14 @@ static bool conf_load_option(const char *name,
|
||||
opt = conf_option_find(state->s, name);
|
||||
if (opt == NULL) {
|
||||
if (state->conf->ignore_unknown) {
|
||||
D_DEBUG("conf: unknown option [%s] -> \"%s\"\n",
|
||||
state->s->name,
|
||||
name);
|
||||
return true;
|
||||
} else {
|
||||
D_ERR("conf: unknown option [%s] -> \"%s\"\n",
|
||||
state->s->name,
|
||||
name);
|
||||
state->err = ENOENT;
|
||||
return false;
|
||||
}
|
||||
|
@ -121,6 +121,7 @@ cat > "$conffile" <<EOF
|
||||
EOF
|
||||
|
||||
required_result 2 <<EOF
|
||||
conf: unknown option [section1] -> "foo"
|
||||
[section1]
|
||||
# key1 = value1
|
||||
# key2 = 10
|
||||
|
@ -102,6 +102,7 @@ cat > "$conffile" <<EOF
|
||||
EOF
|
||||
|
||||
required_result 2 <<EOF
|
||||
conf: unknown option [database] -> "unknown key"
|
||||
Failed to load config file $conffile
|
||||
EOF
|
||||
unit_test ctdb-config validate
|
||||
|
Loading…
x
Reference in New Issue
Block a user