summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-mount.c
diff options
context:
space:
mode:
authorMirco Tischler <mt-ml@gmx.de>2015-10-09 13:12:08 +0200
committerMirco Tischler <mt-ml@gmx.de>2015-10-09 13:12:08 +0200
commit88e105728653ee3aa3e4d8f038293dca3e6ae79e (patch)
tree0bb848c022c334d146f387311d4f767834d15e00 /src/nspawn/nspawn-mount.c
parent3a3f71e5f09073552dd9b0de2058d8894e1bb4f9 (diff)
nspawn: create /sys/fs/cgroup for unified hierarchy as well
Diffstat (limited to 'src/nspawn/nspawn-mount.c')
-rw-r--r--src/nspawn/nspawn-mount.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c
index 3d302ef9ad..6c8b1d7a26 100644
--- a/src/nspawn/nspawn-mount.c
+++ b/src/nspawn/nspawn-mount.c
@@ -710,13 +710,15 @@ static int mount_unified_cgroups(const char *dest) {
assert(dest);
- p = strjoina(dest, "/sys/fs/cgroup");
+ p = prefix_roota(dest, "/sys/fs/cgroup");
+
+ (void) mkdir_p(p, 0755);
r = path_is_mount_point(p, AT_SYMLINK_FOLLOW);
if (r < 0)
return log_error_errno(r, "Failed to determine if %s is mounted already: %m", p);
if (r > 0) {
- p = strjoina(dest, "/sys/fs/cgroup/cgroup.procs");
+ p = prefix_roota(dest, "/sys/fs/cgroup/cgroup.procs");
if (access(p, F_OK) >= 0)
return 0;
if (errno != ENOENT)