// Try opening the cgroup
fd = openat(cgroup->parent->fd, cgroup->name, O_DIRECTORY|O_PATH|O_CLOEXEC);
if (fd < 0) {
- ERROR(cgroup->ctx, "Could not open cgroup %s: %m\n", cgroup->path);
+ ERROR(cgroup->ctx, "Could not open cgroup %s: %m\n", pakfire_cgroup_path(cgroup));
return -errno;
}
// Open the file
fd = openat(cgroup->fd, path, O_WRONLY|O_CLOEXEC);
if (fd < 0) {
- DEBUG(cgroup->ctx, "Could not open %s/%s for writing: %m\n", cgroup->path, path);
+ DEBUG(cgroup->ctx, "Could not open %s/%s for writing: %m\n", pakfire_cgroup_path(cgroup), path);
r = -errno;
goto ERROR;
}
// Check if content was written okay
if (bytes_written < 0) {
- DEBUG(cgroup->ctx, "Could not write to %s/%s: %m\n", cgroup->path, path);
+ DEBUG(cgroup->ctx, "Could not write to %s/%s: %m\n", pakfire_cgroup_path(cgroup), path);
r = -errno;
goto ERROR;
}
// Delete the directory
r = unlinkat(cgroup->parent->fd, cgroup->name, AT_REMOVEDIR);
if (r) {
- ERROR(cgroup->ctx, "Could not destroy cgroup %s: %m\n", cgroup->path);
+ ERROR(cgroup->ctx, "Could not destroy cgroup %s: %m\n", pakfire_cgroup_path(cgroup));
return -errno;
}