mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Make a function for NODUMP.
This commit is contained in:
parent
eb54fe8f97
commit
078ba326a1
@ -169,6 +169,11 @@ config_var_is_invisible(const config_var_t *var)
|
|||||||
{
|
{
|
||||||
return (var->flags & CVFLAG_INVISIBLE) != 0;
|
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.
|
* Functions to assign config options.
|
||||||
@ -646,7 +651,7 @@ config_dump(const config_format_t *fmt, const void *default_options,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Don't save 'hidden' control variables. */
|
/* Don't save 'hidden' control variables. */
|
||||||
if (fmt->vars[i].flags & CVFLAG_NODUMP)
|
if (! config_var_is_dumpable(&fmt->vars[i]))
|
||||||
continue;
|
continue;
|
||||||
if (minimal && config_is_same(fmt, options, defaults,
|
if (minimal && config_is_same(fmt, options, defaults,
|
||||||
fmt->vars[i].member.name))
|
fmt->vars[i].member.name))
|
||||||
|
@ -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_settable(const config_var_t *var);
|
||||||
bool config_var_is_contained(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_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 */
|
/* Helper macros to compare an option across two configuration objects */
|
||||||
#define CFG_EQ_BOOL(a,b,opt) ((a)->opt == (b)->opt)
|
#define CFG_EQ_BOOL(a,b,opt) ((a)->opt == (b)->opt)
|
||||||
|
Loading…
Reference in New Issue
Block a user