Skip to content

Commit

Permalink
Merge branch 'tor-github/pr/1951'
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoulet-tor committed Jun 25, 2020
2 parents 374626c + 50abc06 commit 069566b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 4 additions & 0 deletions changes/ticket33398
@@ -0,0 +1,4 @@
o Deprecated features:
- The "non-builtin" argument to the "--dump-config" command is now
deprecated. When it works, it behaves the same as "short", which
you should use instead. Closes ticket 33398.
7 changes: 3 additions & 4 deletions doc/tor.1.txt
Expand Up @@ -97,11 +97,10 @@ The following options in this section are only recognized on the
[[opt-verify-config]] **`--verify-config`**::
Verify whether the configuration file is valid.

[[opt-dump-config]] **`--dump-config`** **`short`**|**`full`**|**`non-builtin`**::
Write a complete list of Tor's configured options to standard output.
[[opt-dump-config]] **`--dump-config`** **`short`**|**`full`**::
Write a list of Tor's configured options to standard output.
When the `short` flag is selected, only write the options that
are different from their default values. When `non-builtin` is selected,
write options that are not zero or the empty string.
are different from their default values
When `full` is selected, write every option.

[[opt-serviceinstall]] **`--service install`** [**`--options`** __command-line options__]::
Expand Down
4 changes: 0 additions & 4 deletions src/app/config/config.c
Expand Up @@ -2771,10 +2771,6 @@ options_dump(const or_options_t *options, int how_to_dump)
use_defaults = global_default_options;
minimal = 1;
break;
case OPTIONS_DUMP_DEFAULTS:
use_defaults = NULL;
minimal = 1;
break;
case OPTIONS_DUMP_ALL:
use_defaults = NULL;
minimal = 0;
Expand Down
3 changes: 1 addition & 2 deletions src/app/config/config.h
Expand Up @@ -58,8 +58,7 @@ setopt_err_t options_trial_assign(struct config_line_t *list, unsigned flags,
void options_init(or_options_t *options);

#define OPTIONS_DUMP_MINIMAL 1
#define OPTIONS_DUMP_DEFAULTS 2
#define OPTIONS_DUMP_ALL 3
#define OPTIONS_DUMP_ALL 2
char *options_dump(const or_options_t *options, int how_to_dump);
int options_init_from_torrc(int argc, char **argv);
setopt_err_t options_init_from_string(const char *cf_defaults, const char *cf,
Expand Down
6 changes: 4 additions & 2 deletions src/app/main/main.c
Expand Up @@ -775,12 +775,14 @@ do_dump_config(void)
if (!strcmp(arg, "short")) {
how = OPTIONS_DUMP_MINIMAL;
} else if (!strcmp(arg, "non-builtin")) {
how = OPTIONS_DUMP_DEFAULTS;
// Deprecated since 0.4.5.1-alpha.
fprintf(stderr, "'non-builtin' is deprecated; use 'short' instead.\n");
how = OPTIONS_DUMP_MINIMAL;
} else if (!strcmp(arg, "full")) {
how = OPTIONS_DUMP_ALL;
} else {
fprintf(stderr, "No valid argument to --dump-config found!\n");
fprintf(stderr, "Please select 'short', 'non-builtin', or 'full'.\n");
fprintf(stderr, "Please select 'short' or 'full'.\n");

return -1;
}
Expand Down

0 comments on commit 069566b

Please sign in to comment.