Rename CMD_OTHER to CMD_IMMEDIATE

This commit is contained in:
Nick Mathewson 2019-10-16 16:39:58 -04:00
parent d15223a385
commit b9f002dec6
4 changed files with 13 additions and 13 deletions

View File

@ -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("");

View File

@ -24,8 +24,8 @@ 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
* immediately during configuration processing. */
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
* regular Tor binary at all. */

View File

@ -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);

View File

@ -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);