summaryrefslogtreecommitdiffstats
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-10-06 18:15:56 +0200
committerLennart Poettering <lennart@poettering.net>2023-10-06 18:15:56 +0200
commitc6f2dca68c698065df7ba7bf44a5b01aa710427e (patch)
tree80150305dd3a9f9dbf2992f6716c517653fe3387 /src/core/unit.c
parentcgroup: rename TasksMax structure to CGroupTasksMax (diff)
downloadsystemd-c6f2dca68c698065df7ba7bf44a5b01aa710427e.tar.xz
systemd-c6f2dca68c698065df7ba7bf44a5b01aa710427e.zip
cgroup: rename cgroup_add_* to cgroup_context_*
They add settings to a CGroupContext, hence give them the expected context, to make clear they do not operate on anything else than the structure (i.e. not on a kernel cgroup or so).
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 2d096cbaef..eed092b4dc 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -4385,12 +4385,12 @@ int unit_patch_contexts(Unit *u) {
/* When RootImage= or MountImages= is specified, the following devices are touched. */
FOREACH_STRING(p, "/dev/loop-control", "/dev/mapper/control") {
- r = cgroup_add_device_allow(cc, p, "rw");
+ r = cgroup_context_add_device_allow(cc, p, "rw");
if (r < 0)
return r;
}
FOREACH_STRING(p, "block-loop", "block-blkext", "block-device-mapper") {
- r = cgroup_add_device_allow(cc, p, "rwm");
+ r = cgroup_context_add_device_allow(cc, p, "rwm");
if (r < 0)
return r;
}
@@ -4405,14 +4405,14 @@ int unit_patch_contexts(Unit *u) {
}
if (ec->protect_clock) {
- r = cgroup_add_device_allow(cc, "char-rtc", "r");
+ r = cgroup_context_add_device_allow(cc, "char-rtc", "r");
if (r < 0)
return r;
}
/* If there are encrypted credentials we might need to access the TPM. */
if (exec_context_has_encrypted_credentials(ec)) {
- r = cgroup_add_device_allow(cc, "char-tpm", "rw");
+ r = cgroup_context_add_device_allow(cc, "char-tpm", "rw");
if (r < 0)
return r;
}