manager: move various fields that declare unit defaults into a new structure UnitDefaults
This adds a new structure UnitDefaults which embedds the various default settings for units we maintain. We so far maintained two sets of variables for this, one in main.c as static variables and one in the Manager structure. This moves them into a common structure. This is most just search/replace, i.e. very dumb refactoring. The fact that we now use a common structure for this allows us further refactorings later. Inspired by the discussions on #27890
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ static void device_init(Unit *u) {
|
||||
* indefinitely for plugged in devices, something which cannot
|
||||
* happen for the other units since their operations time out
|
||||
* anyway. */
|
||||
u->job_running_timeout = u->manager->default_device_timeout_usec;
|
||||
u->job_running_timeout = u->manager->defaults.device_timeout_usec;
|
||||
|
||||
u->ignore_on_isolate = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user