From: Michael Tremer Date: Sat, 14 Dec 2024 14:30:18 +0000 (+0000) Subject: cgroups: Use the correct function to retrieve the path X-Git-Tag: 0.9.30~713 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aecefebc0fb7a10cbeac24c562850db82c3459fd;p=pakfire.git cgroups: Use the correct function to retrieve the path Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/cgroup.c b/src/libpakfire/cgroup.c index 0a6f0bed2..e0280a9dc 100644 --- a/src/libpakfire/cgroup.c +++ b/src/libpakfire/cgroup.c @@ -177,7 +177,7 @@ static int __pakfire_cgroup_open(struct pakfire_cgroup* cgroup) { // 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; } @@ -240,7 +240,7 @@ static int pakfire_cgroup_write(struct pakfire_cgroup* cgroup, // 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; } @@ -252,7 +252,7 @@ static int pakfire_cgroup_write(struct pakfire_cgroup* cgroup, // 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; } @@ -521,7 +521,7 @@ int pakfire_cgroup_destroy(struct pakfire_cgroup* cgroup) { // 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; }