aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/config/config.c')
-rw-r--r--src/app/config/config.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 3525597591..68493e847d 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -2474,6 +2474,7 @@ static const struct {
{ "--quiet", TAKES_NO_ARGUMENT },
{ "--hush", TAKES_NO_ARGUMENT },
{ "--version", TAKES_NO_ARGUMENT },
+ { "--list-modules", TAKES_NO_ARGUMENT },
{ "--library-versions", TAKES_NO_ARGUMENT },
{ "-h", TAKES_NO_ARGUMENT },
{ "--help", TAKES_NO_ARGUMENT },
@@ -2695,6 +2696,13 @@ list_deprecated_options(void)
}
}
+/** Print all compile-time modules and their enabled/disabled status. */
+static void
+list_enabled_modules(void)
+{
+ printf("%s: %s\n", "dirauth", have_module_dirauth() ? "yes" : "no");
+}
+
/** Last value actually set by resolve_my_address. */
static uint32_t last_resolved_addr = 0;
@@ -5198,6 +5206,11 @@ options_init_from_torrc(int argc, char **argv)
return 1;
}
+ if (config_line_find(cmdline_only_options, "--list-modules")) {
+ list_enabled_modules();
+ return 1;
+ }
+
if (config_line_find(cmdline_only_options, "--library-versions")) {
printf("Tor version %s. \n", get_version());
printf("Library versions\tCompiled\t\tRuntime\n");