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/main | |
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/main')
-rw-r--r-- | src/app/main/main.c | 1 | ||||
-rw-r--r-- | src/app/main/ntmain.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c index 0edda66fd0..ad8253cc7e 100644 --- a/src/app/main/main.c +++ b/src/app/main/main.c @@ -1357,6 +1357,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) result = do_dump_config(); break; case CMD_RUN_UNITTESTS: /* only set by test.c */ + case CMD_OTHER: /* Handled in config.c */ default: log_warn(LD_BUG,"Illegal command number %d: internal error.", get_options()->command); diff --git a/src/app/main/ntmain.c b/src/app/main/ntmain.c index a2de5bb87e..16dc72acc5 100644 --- a/src/app/main/ntmain.c +++ b/src/app/main/ntmain.c @@ -340,6 +340,7 @@ nt_service_main(void) "or --key-expiration) in NT service."); break; case CMD_RUN_UNITTESTS: + case CMD_OTHER: default: log_err(LD_CONFIG, "Illegal command number %d: internal error.", get_options()->command); |