summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-09 18:45:42 +0300
committerLennart Poettering <lennart@poettering.net>2015-10-09 18:45:42 +0300
commite930d14ac87cbd9280719a30c9ae549821f3adaa (patch)
tree0cba3824184c969dc7dd17530ff4d5c39a309d66 /src/nspawn/nspawn-mount.c
parent88ef5e639b30b53b3663f766874dc519908de74d (diff)
parent88e105728653ee3aa3e4d8f038293dca3e6ae79e (diff)
Merge pull request #1510 from mirco/fix-nspawn
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)