mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Rename CMD_OTHER to CMD_IMMEDIATE
This commit is contained in:
parent
d15223a385
commit
b9f002dec6
@ -2494,25 +2494,25 @@ static const struct {
|
||||
{ .name="--hush",
|
||||
.quiet=1 },
|
||||
{ .name="--version",
|
||||
.command=CMD_OTHER,
|
||||
.command=CMD_IMMEDIATE,
|
||||
.quiet=1 },
|
||||
{ .name="--list-modules",
|
||||
.command=CMD_OTHER,
|
||||
.command=CMD_IMMEDIATE,
|
||||
.quiet=1 },
|
||||
{ .name="--library-versions",
|
||||
.command=CMD_OTHER,
|
||||
.command=CMD_IMMEDIATE,
|
||||
.quiet=1 },
|
||||
{ .name="-h",
|
||||
.command=CMD_OTHER,
|
||||
.command=CMD_IMMEDIATE,
|
||||
.quiet=1 },
|
||||
{ .name="--help",
|
||||
.command=CMD_OTHER,
|
||||
.command=CMD_IMMEDIATE,
|
||||
.quiet=1 },
|
||||
{ .name="--list-torrc-options",
|
||||
.command=CMD_OTHER,
|
||||
.command=CMD_IMMEDIATE,
|
||||
.quiet=1 },
|
||||
{ .name="--list-deprecated-options",
|
||||
.command=CMD_OTHER },
|
||||
.command=CMD_IMMEDIATE },
|
||||
{ .name="--nt-service" },
|
||||
{ .name="-nt-service" },
|
||||
{ .name=NULL },
|
||||
@ -5321,8 +5321,8 @@ options_init_from_torrc(int argc, char **argv)
|
||||
|
||||
int command = global_cmdline->command;
|
||||
const char *command_arg = global_cmdline->command_arg;
|
||||
/* "Other" has already been handled by this point. */
|
||||
tor_assert(command != CMD_OTHER);
|
||||
/* "immediate" has already been handled by this point. */
|
||||
tor_assert(command != CMD_IMMEDIATE);
|
||||
|
||||
if (command == CMD_HASH_PASSWORD) {
|
||||
cf_defaults = tor_strdup("");
|
||||
|
@ -24,7 +24,7 @@ typedef enum {
|
||||
CMD_DUMP_CONFIG, /**< Running --dump-config. */
|
||||
CMD_KEYGEN, /**< Running --keygen */
|
||||
CMD_KEY_EXPIRATION, /**< Running --key-expiration */
|
||||
CMD_OTHER, /**< Special value: indicates a command that is handled
|
||||
CMD_IMMEDIATE, /**< Special value: indicates a command that is handled
|
||||
* immediately during configuration processing. */
|
||||
CMD_RUN_UNITTESTS, /**< Special value: indicates that we have entered
|
||||
* the Tor code from the unit tests, not from the
|
||||
|
@ -1339,7 +1339,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 */
|
||||
case CMD_IMMEDIATE: /* Handled in config.c */
|
||||
default:
|
||||
log_warn(LD_BUG,"Illegal command number %d: internal error.",
|
||||
get_options()->command);
|
||||
|
@ -340,7 +340,7 @@ nt_service_main(void)
|
||||
"or --key-expiration) in NT service.");
|
||||
break;
|
||||
case CMD_RUN_UNITTESTS:
|
||||
case CMD_OTHER:
|
||||
case CMD_IMMEDIATE:
|
||||
default:
|
||||
log_err(LD_CONFIG, "Illegal command number %d: internal error.",
|
||||
get_options()->command);
|
||||
|
Loading…
Reference in New Issue
Block a user