mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Add --dbg-dump-subsystem-list command to list the subsystems.
I'm prefixing this with --dbg-* because it is not meant to be used externally.
This commit is contained in:
parent
8f49943459
commit
ac72ecd581
@ -2498,6 +2498,9 @@ static const struct {
|
||||
.command=CMD_IMMEDIATE },
|
||||
{ .name="--nt-service" },
|
||||
{ .name="-nt-service" },
|
||||
{ .name="--dbg-dump-subsystem-list",
|
||||
.command=CMD_IMMEDIATE,
|
||||
.quiet=QUIET_HUSH },
|
||||
{ .name=NULL },
|
||||
};
|
||||
|
||||
@ -4604,6 +4607,10 @@ options_init_from_torrc(int argc, char **argv)
|
||||
list_deprecated_options();
|
||||
return 1;
|
||||
}
|
||||
if (config_line_find(cmdline_only_options, "--dbg-dump-subsystem-list")) {
|
||||
subsystems_dump_list();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (config_line_find(cmdline_only_options, "--version")) {
|
||||
printf("Tor version %s.\n",get_version());
|
||||
|
@ -302,7 +302,8 @@ subsystems_dump_list(void)
|
||||
{
|
||||
for (unsigned i = 0; i < n_tor_subsystems - 1; ++i) {
|
||||
const subsys_fns_t *sys = tor_subsystems[i];
|
||||
printf("% 4d\t%s\n", sys->level, sys->name);
|
||||
printf("% 4d\t%16s\t%s\n", sys->level, sys->name,
|
||||
sys->location?sys->location:"");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user