commit 3f6e37b1bcb9e5ec70f228a9cb6b01db0b9ad8d5 Author: Nick Mathewson nickm@torproject.org Date: Fri Feb 14 09:57:46 2020 -0500
Add a SUBSYS_DECLARE_LOCATION() to every subsystem. --- src/core/mainloop/mainloop_sys.c | 1 + src/core/or/or_sys.c | 1 + src/feature/control/btrack.c | 1 + src/feature/dirauth/dirauth_stub.c | 1 + src/feature/dirauth/dirauth_sys.c | 1 + src/feature/relay/relay_stub.c | 1 + src/feature/relay/relay_sys.c | 1 + src/lib/compress/compress.c | 1 + src/lib/crypt_ops/crypto_init.c | 1 + src/lib/err/torerr_sys.c | 1 + src/lib/evloop/evloop_sys.c | 1 + src/lib/llharden/winprocess_sys.c | 1 + src/lib/log/log_sys.c | 1 + src/lib/net/network_sys.c | 1 + src/lib/process/process_sys.c | 1 + src/lib/thread/compat_threads.c | 1 + src/lib/time/time_sys.c | 1 + src/lib/tls/tortls.c | 1 + src/lib/wallclock/approx_time.c | 1 + 19 files changed, 19 insertions(+)
diff --git a/src/core/mainloop/mainloop_sys.c b/src/core/mainloop/mainloop_sys.c index 4b78c90b9..884bae1c5 100644 --- a/src/core/mainloop/mainloop_sys.c +++ b/src/core/mainloop/mainloop_sys.c @@ -78,6 +78,7 @@ mainloop_flush_state(void *arg)
const struct subsys_fns_t sys_mainloop = { .name = "mainloop", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = 5, .initialize = subsys_mainloop_initialize, diff --git a/src/core/or/or_sys.c b/src/core/or/or_sys.c index 126f5448c..73c6087dc 100644 --- a/src/core/or/or_sys.c +++ b/src/core/or/or_sys.c @@ -47,6 +47,7 @@ subsys_or_add_pubsub(struct pubsub_connector_t *connector)
const struct subsys_fns_t sys_or = { .name = "or", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = 20, .initialize = subsys_or_initialize, diff --git a/src/feature/control/btrack.c b/src/feature/control/btrack.c index 3595af0fc..405630ecd 100644 --- a/src/feature/control/btrack.c +++ b/src/feature/control/btrack.c @@ -56,6 +56,7 @@ btrack_add_pubsub(pubsub_connector_t *connector)
const subsys_fns_t sys_btrack = { .name = "btrack", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = 55, .initialize = btrack_init, diff --git a/src/feature/dirauth/dirauth_stub.c b/src/feature/dirauth/dirauth_stub.c index 15a195b0f..9f48ce14f 100644 --- a/src/feature/dirauth/dirauth_stub.c +++ b/src/feature/dirauth/dirauth_stub.c @@ -26,6 +26,7 @@ static const config_format_t dirauth_options_stub_fmt = {
const struct subsys_fns_t sys_dirauth = { .name = "dirauth", + SUBSYS_DECLARE_LOCATION(), .supported = false, .level = DIRAUTH_SUBSYS_LEVEL,
diff --git a/src/feature/dirauth/dirauth_sys.c b/src/feature/dirauth/dirauth_sys.c index 56ac501e1..07c574387 100644 --- a/src/feature/dirauth/dirauth_sys.c +++ b/src/feature/dirauth/dirauth_sys.c @@ -60,6 +60,7 @@ dirauth_set_options(void *arg)
const struct subsys_fns_t sys_dirauth = { .name = "dirauth", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = DIRAUTH_SUBSYS_LEVEL, .initialize = subsys_dirauth_initialize, diff --git a/src/feature/relay/relay_stub.c b/src/feature/relay/relay_stub.c index 42e08fcb6..283aaf6e4 100644 --- a/src/feature/relay/relay_stub.c +++ b/src/feature/relay/relay_stub.c @@ -15,6 +15,7 @@
const struct subsys_fns_t sys_relay = { .name = "relay", + SUBSYS_DECLARE_LOCATION(), .supported = false, .level = RELAY_SUBSYS_LEVEL, }; diff --git a/src/feature/relay/relay_sys.c b/src/feature/relay/relay_sys.c index 34489cf5a..2e9074092 100644 --- a/src/feature/relay/relay_sys.c +++ b/src/feature/relay/relay_sys.c @@ -41,6 +41,7 @@ subsys_relay_shutdown(void)
const struct subsys_fns_t sys_relay = { .name = "relay", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = RELAY_SUBSYS_LEVEL, .initialize = subsys_relay_initialize, diff --git a/src/lib/compress/compress.c b/src/lib/compress/compress.c index 84e960192..7ce3910d8 100644 --- a/src/lib/compress/compress.c +++ b/src/lib/compress/compress.c @@ -694,6 +694,7 @@ subsys_compress_initialize(void)
const subsys_fns_t sys_compress = { .name = "compress", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = -55, .initialize = subsys_compress_initialize, diff --git a/src/lib/crypt_ops/crypto_init.c b/src/lib/crypt_ops/crypto_init.c index f09bf07c4..a836bd864 100644 --- a/src/lib/crypt_ops/crypto_init.c +++ b/src/lib/crypt_ops/crypto_init.c @@ -317,6 +317,7 @@ crypto_set_options(void *arg)
const struct subsys_fns_t sys_crypto = { .name = "crypto", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = -60, .initialize = subsys_crypto_initialize, diff --git a/src/lib/err/torerr_sys.c b/src/lib/err/torerr_sys.c index 46fc85355..8ee1521f3 100644 --- a/src/lib/err/torerr_sys.c +++ b/src/lib/err/torerr_sys.c @@ -34,6 +34,7 @@ subsys_torerr_shutdown(void)
const subsys_fns_t sys_torerr = { .name = "err", + SUBSYS_DECLARE_LOCATION(), /* Low-level error handling is a diagnostic feature, we want it to init * right after windows process security, and shutdown last. * (Security never shuts down.) */ diff --git a/src/lib/evloop/evloop_sys.c b/src/lib/evloop/evloop_sys.c index fecec2f26..b639810c2 100644 --- a/src/lib/evloop/evloop_sys.c +++ b/src/lib/evloop/evloop_sys.c @@ -41,6 +41,7 @@ subsys_evloop_shutdown(void)
const struct subsys_fns_t sys_evloop = { .name = "evloop", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = -20, .initialize = subsys_evloop_initialize, diff --git a/src/lib/llharden/winprocess_sys.c b/src/lib/llharden/winprocess_sys.c index a5f22c182..f2c88d8c7 100644 --- a/src/lib/llharden/winprocess_sys.c +++ b/src/lib/llharden/winprocess_sys.c @@ -58,6 +58,7 @@ subsys_winprocess_initialize(void)
const subsys_fns_t sys_winprocess = { .name = "winprocess", + SUBSYS_DECLARE_LOCATION(), /* HeapEnableTerminationOnCorruption and setdeppolicy() are security * features, we want them to run first. */ .level = -100, diff --git a/src/lib/log/log_sys.c b/src/lib/log/log_sys.c index 1be4f5b7d..021c05d3e 100644 --- a/src/lib/log/log_sys.c +++ b/src/lib/log/log_sys.c @@ -28,6 +28,7 @@ subsys_logging_shutdown(void)
const subsys_fns_t sys_logging = { .name = "log", + SUBSYS_DECLARE_LOCATION(), .supported = true, /* Logging depends on threads, approx time, raw logging, and security. * Most other lib modules depend on logging. */ diff --git a/src/lib/net/network_sys.c b/src/lib/net/network_sys.c index f0421385b..e95c3ba81 100644 --- a/src/lib/net/network_sys.c +++ b/src/lib/net/network_sys.c @@ -37,6 +37,7 @@ subsys_network_shutdown(void)
const subsys_fns_t sys_network = { .name = "network", + SUBSYS_DECLARE_LOCATION(), /* Network depends on logging, and a lot of other modules depend on network. */ .level = -55, diff --git a/src/lib/process/process_sys.c b/src/lib/process/process_sys.c index 015ffadea..c8332ba91 100644 --- a/src/lib/process/process_sys.c +++ b/src/lib/process/process_sys.c @@ -26,6 +26,7 @@ subsys_process_shutdown(void)
const subsys_fns_t sys_process = { .name = "process", + SUBSYS_DECLARE_LOCATION(), .level = -18, .supported = true, .initialize = subsys_process_initialize, diff --git a/src/lib/thread/compat_threads.c b/src/lib/thread/compat_threads.c index 21125bdda..75ade9c9f 100644 --- a/src/lib/thread/compat_threads.c +++ b/src/lib/thread/compat_threads.c @@ -129,6 +129,7 @@ subsys_threads_initialize(void)
const subsys_fns_t sys_threads = { .name = "threads", + SUBSYS_DECLARE_LOCATION(), .supported = true, .level = -89, .initialize = subsys_threads_initialize, diff --git a/src/lib/time/time_sys.c b/src/lib/time/time_sys.c index 044d328f8..1c1bc4cd1 100644 --- a/src/lib/time/time_sys.c +++ b/src/lib/time/time_sys.c @@ -20,6 +20,7 @@ subsys_time_initialize(void)
const subsys_fns_t sys_time = { .name = "time", + SUBSYS_DECLARE_LOCATION(), /* Monotonic time depends on logging, and a lot of other modules depend on * monotonic time. */ .level = -80, diff --git a/src/lib/tls/tortls.c b/src/lib/tls/tortls.c index fd41a84cf..9e70e5472 100644 --- a/src/lib/tls/tortls.c +++ b/src/lib/tls/tortls.c @@ -456,6 +456,7 @@ subsys_tortls_shutdown(void)
const subsys_fns_t sys_tortls = { .name = "tortls", + SUBSYS_DECLARE_LOCATION(), .level = -50, .shutdown = subsys_tortls_shutdown }; diff --git a/src/lib/wallclock/approx_time.c b/src/lib/wallclock/approx_time.c index d9f90ab2f..c815f20e5 100644 --- a/src/lib/wallclock/approx_time.c +++ b/src/lib/wallclock/approx_time.c @@ -59,6 +59,7 @@ subsys_wallclock_initialize(void) **/ const subsys_fns_t sys_wallclock = { .name = "wallclock", + SUBSYS_DECLARE_LOCATION(), .supported = true, /* Approximate time is a diagnostic feature, we want it to init right after * low-level error handling. */