diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-03-19 20:40:05 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-03-19 21:06:53 +0100 |
commit | 598459cebac7cc93089769a992e7b03287f77e12 (patch) | |
tree | ab690b534e7578ce1d9421d5127224a43fd5fded /src/core/unit.h | |
parent | ae439c9f9b8a9cbb320d66290e3f9ad0e2f37378 (diff) |
core: rework context initialization/destruction logic
Let's automatically initialize the kill, exec and cgroup contexts of the
various unit types when the object is constructed, instead of
invididually in type-specific code.
Also, when PrivateDevices= is set, set DevicePolicy= to closed.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index 34afe93e65..3e61067f84 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -519,7 +519,7 @@ int unit_load_fragment_and_dropin(Unit *u); int unit_load_fragment_and_dropin_optional(Unit *u); int unit_load(Unit *unit); -int unit_add_default_slice(Unit *u); +int unit_add_default_slice(Unit *u, CGroupContext *c); const char *unit_description(Unit *u) _pure_; @@ -602,12 +602,12 @@ void unit_ref_unset(UnitRef *ref); #define UNIT_DEREF(ref) ((ref).unit) #define UNIT_ISSET(ref) (!!(ref).unit) -int unit_exec_context_patch_defaults(Unit *u, ExecContext *c); -int unit_cgroup_context_init_defaults(Unit *u, CGroupContext *c); +int unit_patch_contexts(Unit *u); ExecContext *unit_get_exec_context(Unit *u) _pure_; KillContext *unit_get_kill_context(Unit *u) _pure_; CGroupContext *unit_get_cgroup_context(Unit *u) _pure_; + ExecRuntime *unit_get_exec_runtime(Unit *u) _pure_; int unit_setup_exec_runtime(Unit *u); |