mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
Extract common list of flags to use for obsolete variables.
This commit is contained in:
parent
fe5033d3b0
commit
e61bfd0bfd
@ -61,8 +61,7 @@
|
||||
|
||||
#define CONFIG_VAR_OBSOLETE(varname) \
|
||||
{ .member = { .name = varname, .type = CONFIG_TYPE_OBSOLETE }, \
|
||||
.flags = CFLG_NOSET | CFLG_NOLIST | CFLG_NODUMP | CFLG_NOCOPY | \
|
||||
CFLG_NOCMP \
|
||||
.flags = CFLG_GROUP_OBSOLETE \
|
||||
}
|
||||
|
||||
#endif /* !defined(TOR_LIB_CONF_CONFMACROS_H) */
|
||||
|
@ -179,6 +179,12 @@ typedef struct struct_magic_decl_t {
|
||||
*/
|
||||
#define CFLG_NOREPLACE (1u<<5)
|
||||
|
||||
/**
|
||||
* A group of flags that should be set on all obsolete options and types.
|
||||
**/
|
||||
#define CFLG_GROUP_OBSOLETE \
|
||||
(CFLG_NOCOPY|CFLG_NOCMP|CFLG_NODUMP|CFLG_NOSET|CFLG_NOLIST)
|
||||
|
||||
/** A variable allowed in the configuration file or on the command line. */
|
||||
typedef struct config_var_t {
|
||||
struct_member_t member; /** A struct member corresponding to this
|
||||
|
@ -739,7 +739,7 @@ static const var_type_def_t type_definitions_table[] = {
|
||||
.flags=CFLG_NOREPLACE|CFLG_NOSET },
|
||||
[CONFIG_TYPE_OBSOLETE] = {
|
||||
.name="Obsolete", .fns=&ignore_fns,
|
||||
.flags=CFLG_NOCOPY|CFLG_NOCMP|CFLG_NODUMP|CFLG_NOSET|CFLG_NOLIST
|
||||
.flags=CFLG_GROUP_OBSOLETE,
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user