diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-11-11 11:54:14 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-11-11 11:54:14 -0500 |
commit | 4462766d32eb3ee4505e300b116dcb7493bf3b0b (patch) | |
tree | e3146d9d4f63e4402ec6d6333cffee31c5328c83 /src/lib/conf | |
parent | 2b3dc3384c41a1e8961b9303b5fa533edf4922c3 (diff) | |
parent | 9d562bba40d1e56ba459467611c815ab8d27f27e (diff) | |
download | tor-4462766d32eb3ee4505e300b116dcb7493bf3b0b.tar.gz tor-4462766d32eb3ee4505e300b116dcb7493bf3b0b.zip |
Merge branch 'ticket32404'
Diffstat (limited to 'src/lib/conf')
-rw-r--r-- | src/lib/conf/confdecl.h | 1 | ||||
-rw-r--r-- | src/lib/conf/conftypes.h | 21 |
2 files changed, 20 insertions, 2 deletions
diff --git a/src/lib/conf/confdecl.h b/src/lib/conf/confdecl.h index 695f9f307f..26c71e1d43 100644 --- a/src/lib/conf/confdecl.h +++ b/src/lib/conf/confdecl.h @@ -191,6 +191,7 @@ extern const struct var_type_def_t CSV_INTERVAL_type_defn; extern const struct var_type_def_t LINELIST_type_defn; extern const struct var_type_def_t LINELIST_V_type_defn; extern const struct var_type_def_t LINELIST_S_type_defn; +extern const struct var_type_def_t IGNORE_type_defn; extern const struct var_type_def_t OBSOLETE_type_defn; /**@}*/ diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h index dfe51cfba1..19ea997316 100644 --- a/src/lib/conf/conftypes.h +++ b/src/lib/conf/conftypes.h @@ -64,7 +64,18 @@ typedef enum config_type_t { CONFIG_TYPE_LINELIST_V, /**< Catch-all "virtual" option to summarize * context-sensitive config lines when fetching. */ - CONFIG_TYPE_OBSOLETE, /**< Obsolete (ignored) option. */ + /** Ignored (obsolete) option. Uses no storage. + * + * Reported as "obsolete" when its type is queried. + */ + CONFIG_TYPE_OBSOLETE, + /** Ignored option. Uses no storage. + * + * Reported as "ignored" when its type is queried. For use with options used + * by disabled modules. + **/ + CONFIG_TYPE_IGNORE, + /** * Extended type: definition appears in the <b>type_def</b> pointer * of the corresponding struct_member_t. @@ -183,12 +194,18 @@ typedef struct struct_magic_decl_t { * running. **/ #define CFLG_IMMUTABLE (1u<<6) +/** + * Flag to indicate that we should warn that an option or type is obsolete + * whenever the user tries to use it. + **/ +#define CFLG_WARN_OBSOLETE (1u<<7) /** * 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) + (CFLG_NOCOPY|CFLG_NOCMP|CFLG_NODUMP|CFLG_NOSET|CFLG_NOLIST|\ + CFLG_WARN_OBSOLETE) /** A variable allowed in the configuration file or on the command line. */ typedef struct config_var_t { |