summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/config/confparse.c7
-rw-r--r--src/app/config/confparse.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c
index 7127e62cde..6e2624466a 100644
--- a/src/app/config/confparse.c
+++ b/src/app/config/confparse.c
@@ -169,6 +169,11 @@ config_var_is_invisible(const config_var_t *var)
{
return (var->flags & CVFLAG_INVISIBLE) != 0;
}
+bool
+config_var_is_dumpable(const config_var_t *var)
+{
+ return (var->flags & CVFLAG_NODUMP) == 0;
+}
/*
* Functions to assign config options.
@@ -646,7 +651,7 @@ config_dump(const config_format_t *fmt, const void *default_options,
continue;
}
/* Don't save 'hidden' control variables. */
- if (fmt->vars[i].flags & CVFLAG_NODUMP)
+ if (! config_var_is_dumpable(&fmt->vars[i]))
continue;
if (minimal && config_is_same(fmt, options, defaults,
fmt->vars[i].member.name))
diff --git a/src/app/config/confparse.h b/src/app/config/confparse.h
index 0ae675bcdf..d6571692f9 100644
--- a/src/app/config/confparse.h
+++ b/src/app/config/confparse.h
@@ -108,6 +108,7 @@ bool config_var_is_cumulative(const config_var_t *var);
bool config_var_is_settable(const config_var_t *var);
bool config_var_is_contained(const config_var_t *var);
bool config_var_is_invisible(const config_var_t *var);
+bool config_var_is_dumpable(const config_var_t *var);
/* Helper macros to compare an option across two configuration objects */
#define CFG_EQ_BOOL(a,b,opt) ((a)->opt == (b)->opt)