degesch: mark all unrecognized config values
This commit is contained in:
parent
ff20e74868
commit
15d3129ea3
12
degesch.c
12
degesch.c
|
@ -6223,17 +6223,18 @@ config_dump_item (struct config_item_ *item, struct config_dump_data *data)
|
|||
for (; iter; iter = iter->next)
|
||||
str_append_printf (&line, ".%s", iter->name);
|
||||
|
||||
struct str value;
|
||||
str_init (&value);
|
||||
config_item_write (item, false, &value);
|
||||
|
||||
// Don't bother writing out null values everywhere
|
||||
struct config_schema *schema = item->schema;
|
||||
bool has_default = schema && schema->default_;
|
||||
if (item->type != CONFIG_ITEM_NULL || has_default)
|
||||
{
|
||||
str_append (&line, " = ");
|
||||
|
||||
struct str value;
|
||||
str_init (&value);
|
||||
config_item_write (item, false, &value);
|
||||
str_append_str (&line, &value);
|
||||
}
|
||||
|
||||
if (!schema)
|
||||
str_append (&line, " (unrecognized)");
|
||||
|
@ -6241,9 +6242,8 @@ config_dump_item (struct config_item_ *item, struct config_dump_data *data)
|
|||
str_append_printf (&line, " (default: %s)", schema->default_);
|
||||
else if (!has_default && item->type != CONFIG_ITEM_NULL)
|
||||
str_append_printf (&line, " (default: %s)", "null");
|
||||
str_free (&value);
|
||||
}
|
||||
|
||||
str_free (&value);
|
||||
str_vector_add_owned (data->output, str_steal (&line));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue