mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
mount: do not try to mount disable cgroup controllers
https://bugzilla.redhat.com/show_bug.cgi?id=655222
This commit is contained in:
parent
c8b2e52cf6
commit
600a328fc2
2
TODO
2
TODO
@ -28,7 +28,7 @@
|
||||
|
||||
* set_put(), hashmap_put() return values check. i.e. == 0 doesn't free()!
|
||||
|
||||
* chkconfig/systemd-install glue
|
||||
* chkconfig/systemd enable glue
|
||||
|
||||
* io priority during initialization
|
||||
|
||||
|
@ -138,8 +138,9 @@ static int mount_cgroup_controllers(void) {
|
||||
for (;;) {
|
||||
MountPoint p;
|
||||
char *controller, *where;
|
||||
int enabled = false;
|
||||
|
||||
if (fscanf(f, "%ms %*i %*i %*i", &controller) != 1) {
|
||||
if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 1) {
|
||||
|
||||
if (feof(f))
|
||||
break;
|
||||
@ -149,6 +150,11 @@ static int mount_cgroup_controllers(void) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
if (!enabled) {
|
||||
free(controller);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (asprintf(&where, "/sys/fs/cgroup/%s", controller) < 0) {
|
||||
free(controller);
|
||||
r = -ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user