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
@@ -42,7 +42,7 @@ static void timer_init(Unit *u) {
|
||||
|
||||
t->next_elapse_monotonic_or_boottime = USEC_INFINITY;
|
||||
t->next_elapse_realtime = USEC_INFINITY;
|
||||
t->accuracy_usec = u->manager->default_timer_accuracy_usec;
|
||||
t->accuracy_usec = u->manager->defaults.timer_accuracy_usec;
|
||||
t->remain_after_elapse = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user