diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-09-30 10:05:42 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-03-26 11:20:20 -0400 |
commit | 8f49943459564a59ca7f60476aef6b0ddd79a56c (patch) | |
tree | cc066f6c119fe541ff315e8b2df6f95985fa5ce8 /src/app/main/subsysmgr.c | |
parent | 3f6e37b1bcb9e5ec70f228a9cb6b01db0b9ad8d5 (diff) | |
download | tor-8f49943459564a59ca7f60476aef6b0ddd79a56c.tar.gz tor-8f49943459564a59ca7f60476aef6b0ddd79a56c.zip |
Implement a function to list the subsystems to stdout.
Diffstat (limited to 'src/app/main/subsysmgr.c')
-rw-r--r-- | src/app/main/subsysmgr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app/main/subsysmgr.c b/src/app/main/subsysmgr.c index 5807cbbaa4..4913949e2c 100644 --- a/src/app/main/subsysmgr.c +++ b/src/app/main/subsysmgr.c @@ -294,6 +294,19 @@ subsystems_thread_cleanup(void) } /** + * Dump a human- and machine-readable list of all the subsystems to stdout, + * in their initialization order, prefixed with their level. + **/ +void +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); + } +} + +/** * Register all subsystem-declared options formats in <b>mgr</b>. * * Return 0 on success, -1 on failure. |