summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-08 18:15:50 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-08 18:15:50 +0200
commit3905f12713df17195118d9caa321299d963ee315 (patch)
tree6665066944fc02697e9b3ca555fa9a27e11e089a /src
parentda323858ef34a0216aa96f4089810053c90f09ce (diff)
cgroups: make sure the "devices" controller's enum is named the same way as the controller in the kernel
Follow-up to 5bf8002a3a6723ce50331c024122078552fb600a.
Diffstat (limited to 'src')
-rw-r--r--src/basic/cgroup-util.c2
-rw-r--r--src/basic/cgroup-util.h4
-rw-r--r--src/core/cgroup.c4
-rw-r--r--src/core/dbus-cgroup.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index f661a54d99..94a25585b2 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -2211,7 +2211,7 @@ static const char *cgroup_controller_table[_CGROUP_CONTROLLER_MAX] = {
[CGROUP_CONTROLLER_CPUACCT] = "cpuacct",
[CGROUP_CONTROLLER_BLKIO] = "blkio",
[CGROUP_CONTROLLER_MEMORY] = "memory",
- [CGROUP_CONTROLLER_DEVICE] = "devices",
+ [CGROUP_CONTROLLER_DEVICES] = "devices",
};
DEFINE_STRING_TABLE_LOOKUP(cgroup_controller, CGroupController);
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h
index 6fd6d80590..16d439fd9d 100644
--- a/src/basic/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -34,7 +34,7 @@ typedef enum CGroupController {
CGROUP_CONTROLLER_CPUACCT,
CGROUP_CONTROLLER_BLKIO,
CGROUP_CONTROLLER_MEMORY,
- CGROUP_CONTROLLER_DEVICE,
+ CGROUP_CONTROLLER_DEVICES,
_CGROUP_CONTROLLER_MAX,
_CGROUP_CONTROLLER_INVALID = -1,
} CGroupController;
@@ -47,7 +47,7 @@ typedef enum CGroupMask {
CGROUP_MASK_CPUACCT = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUACCT),
CGROUP_MASK_BLKIO = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BLKIO),
CGROUP_MASK_MEMORY = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_MEMORY),
- CGROUP_MASK_DEVICE = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_DEVICE),
+ CGROUP_MASK_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_DEVICES),
_CGROUP_MASK_ALL = CGROUP_CONTROLLER_TO_MASK(_CGROUP_CONTROLLER_MAX) - 1
} CGroupMask;
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 9a025cf929..baa7cc5488 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -404,7 +404,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupMask mask, const char *path, M
"Failed to set memory.limit_in_bytes/memory.max on %s: %m", path);
}
- if ((mask & CGROUP_MASK_DEVICE) && !is_root) {
+ if ((mask & CGROUP_MASK_DEVICES) && !is_root) {
CGroupDeviceAllow *a;
/* Changing the devices list of a populated cgroup
@@ -492,7 +492,7 @@ CGroupMask cgroup_context_get_mask(CGroupContext *c) {
if (c->device_allow ||
c->device_policy != CGROUP_AUTO)
- mask |= CGROUP_MASK_DEVICE;
+ mask |= CGROUP_MASK_DEVICES;
return mask;
}
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
index e8fd44e294..ba2f4e53b9 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/core/dbus-cgroup.c
@@ -572,7 +572,7 @@ int bus_cgroup_set_property(
char *buf;
c->device_policy = p;
- u->cgroup_realized_mask &= ~CGROUP_MASK_DEVICE;
+ u->cgroup_realized_mask &= ~CGROUP_MASK_DEVICES;
buf = strjoina("DevicePolicy=", policy);
unit_write_drop_in_private(u, mode, name, buf);
@@ -651,7 +651,7 @@ int bus_cgroup_set_property(
cgroup_context_free_device_allow(c, c->device_allow);
}
- u->cgroup_realized_mask &= ~CGROUP_MASK_DEVICE;
+ u->cgroup_realized_mask &= ~CGROUP_MASK_DEVICES;
f = open_memstream(&buf, &size);
if (!f)