]> git.ipfire.org Git - pakfire.git/commitdiff
cgroups: Log the entire path if we encountered a writing error
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Dec 2024 14:25:58 +0000 (14:25 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 14 Dec 2024 14:25:58 +0000 (14:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/cgroup.c

index 7e60d0a13abfbe0496912eeba549128ce87e03d6..0a6f0bed266744481d085e1eb700773546644488 100644 (file)
@@ -240,8 +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",
-                       pakfire_cgroup_name(cgroup), path);
+               DEBUG(cgroup->ctx, "Could not open %s/%s for writing: %m\n", cgroup->path, path);
                r = -errno;
                goto ERROR;
        }
@@ -253,8 +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",
-                       pakfire_cgroup_name(cgroup), path);
+               DEBUG(cgroup->ctx, "Could not write to %s/%s: %m\n", cgroup->path, path);
                r = -errno;
                goto ERROR;
        }