From 7fd04bd93a1ea3e86c90c396151424719f3e1b63 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Wed, 6 Mar 2013 09:31:15 +0100 Subject: [PATCH] config: add comment note about advanced and unsupported config nodes This shows up in the output as a short commentary: $ lvm dumpconfig --type default --withcomments metadata/disk_areas # Configuration option metadata/disk_areas. # This configuration option is advanced. # This configuration option is not officially supported. disk_areas="" --- lib/config/config.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/config/config.c b/lib/config/config.c index e8e03793a..1960b0086 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -838,6 +838,12 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi if (cfg_def->comment) fprintf(out->fp, "%s# %s\n", line, cfg_def->comment); + + if (cfg_def->flags & CFG_ADVANCED) + fprintf(out->fp, "%s# This configuration %s is advanced.\n", line, node_type_name); + + if (cfg_def->flags & CFG_UNSUPPORTED) + fprintf(out->fp, "%s# This configuration %s is not officially supported.\n", line, node_type_name); } if (out->withversion) {