mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
config: explain automatic default values
Before printing a commented automatic config value, print a line describing what it is. Otherwise, the commented value can look like it's a part of an example preceding it.
This commit is contained in:
parent
12acf852c5
commit
5243a81c29
@ -1717,6 +1717,9 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
|
|||||||
if (cfg_def->flags & CFG_DEFAULT_UNDEFINED)
|
if (cfg_def->flags & CFG_DEFAULT_UNDEFINED)
|
||||||
fprintf(out->fp, "%s# This configuration %s does not have a default value defined.\n", line, node_type_name);
|
fprintf(out->fp, "%s# This configuration %s does not have a default value defined.\n", line, node_type_name);
|
||||||
|
|
||||||
|
if (cfg_def->flags & CFG_DEFAULT_COMMENTED)
|
||||||
|
fprintf(out->fp, "%s# This configuration %s has an automatic default value.\n", line, node_type_name);
|
||||||
|
|
||||||
if ((out->tree_spec->type == CFG_DEF_TREE_FULL) &&
|
if ((out->tree_spec->type == CFG_DEF_TREE_FULL) &&
|
||||||
(out->tree_spec->check_status[cn->id] & CFG_USED))
|
(out->tree_spec->check_status[cn->id] & CFG_USED))
|
||||||
fprintf(out->fp, "%s# Value defined in existing configuration has been used for this setting.\n", line);
|
fprintf(out->fp, "%s# Value defined in existing configuration has been used for this setting.\n", line);
|
||||||
|
Loading…
Reference in New Issue
Block a user