diff options
author | Anita Zhang <the.anitazha@gmail.com> | 2021-11-09 15:26:28 -0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-10 10:52:08 +0100 |
commit | 899acf5c2d4b89caa891d05ccfa4be828a999c2d (patch) | |
tree | 542704b65d167750da9a4d9e72616e22d947e16b /src/core/unit.h | |
parent | 4d544a0c879a2f1a983cc5e6960c4a53fa565772 (diff) | |
download | systemd-899acf5c2d4b89caa891d05ccfa4be828a999c2d.tar.gz |
core: replace slice dependencies as they get added
Defines a "UNIT_DEPENDENCY_SLICE_PROPERTY" UnitDependencyMask type that
is used when adding slices to the dependencies hashmap. This type is
used to remove slice dependencies when they get overridden by new ones.
Fixes #20182
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index b49ae7c1b8..3f3a75d33b 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -89,7 +89,10 @@ typedef enum UnitDependencyMask { /* A dependency created because of data read from /proc/swaps and no other configuration source */ UNIT_DEPENDENCY_PROC_SWAP = 1 << 7, - _UNIT_DEPENDENCY_MASK_FULL = (1 << 8) - 1, + /* A dependency for units in slices assigned by directly setting Slice= */ + UNIT_DEPENDENCY_SLICE_PROPERTY = 1 << 8, + + _UNIT_DEPENDENCY_MASK_FULL = (1 << 9) - 1, } UnitDependencyMask; /* The Unit's dependencies[] hashmaps use this structure as value. It has the same size as a void pointer, and thus can @@ -782,7 +785,7 @@ Unit *unit_follow_merge(Unit *u) _pure_; int unit_load_fragment_and_dropin(Unit *u, bool fragment_required); int unit_load(Unit *unit); -int unit_set_slice(Unit *u, Unit *slice, UnitDependencyMask mask); +int unit_set_slice(Unit *u, Unit *slice); int unit_set_default_slice(Unit *u); const char *unit_description(Unit *u) _pure_; |