diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-10-08 16:05:04 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-10-17 12:01:40 -0400 |
commit | c529b3f8f1d882b29c6b505de1a61d24c6a0943c (patch) | |
tree | b9092de18de45a66b5370edd4dd58430dd3e7f8b /src/app/config/config.h | |
parent | 9826fb19815794507cbc55358439758fbf700291 (diff) | |
download | tor-c529b3f8f1d882b29c6b505de1a61d24c6a0943c.tar.gz tor-c529b3f8f1d882b29c6b505de1a61d24c6a0943c.zip |
Make the command-line parser understand "commands".
Previously these were implemented with a search in
options_init_from_torrc(), but that led to each option being
declared more than needed: once to say that it was a valid option,
and once to say what it meant.
Diffstat (limited to 'src/app/config/config.h')
-rw-r--r-- | src/app/config/config.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/config/config.h b/src/app/config/config.h index fe4e272d87..582b97d74b 100644 --- a/src/app/config/config.h +++ b/src/app/config/config.h @@ -204,6 +204,10 @@ typedef struct { /** List of other options, to be handled by the general Tor configuration system. */ struct config_line_t *other_opts; + /** Subcommand that Tor has been told to run */ + tor_cmdline_mode_t command; + /** Argument for the command mode, if any. */ + const char *command_arg; } parsed_cmdline_t; parsed_cmdline_t *config_parse_commandline(int argc, char **argv, |