core: Turn manager unit log fields into unit functions
There's no need for these to be fields inside the manager struct, let's turn them into functions in unit.h instead, again to allow forward declaring the Manager struct in a later commit.
This commit is contained in:
@@ -928,15 +928,6 @@ int manager_new(RuntimeScope runtime_scope, ManagerTestRunFlags test_run_flags,
|
||||
m->timestamps + MANAGER_TIMESTAMP_LOADER);
|
||||
#endif
|
||||
|
||||
/* Prepare log fields we can use for structured logging */
|
||||
if (MANAGER_IS_SYSTEM(m)) {
|
||||
m->unit_log_field = "UNIT=";
|
||||
m->invocation_log_field = "INVOCATION_ID=";
|
||||
} else {
|
||||
m->unit_log_field = "USER_UNIT=";
|
||||
m->invocation_log_field = "USER_INVOCATION_ID=";
|
||||
}
|
||||
|
||||
/* Reboot immediately if the user hits C-A-D more often than 7x per 2s */
|
||||
m->ctrl_alt_del_ratelimit = (const RateLimit) { .interval = 2 * USEC_PER_SEC, .burst = 7 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user