summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-11-27 18:28:12 +0100
committerMike Yuan <me@yhndnzj.com>2024-11-27 18:38:01 +0100
commit67b9a72c60419ffc2163aad2fd1e7243d64079c4 (patch)
treefba6413453f5abe998d52e578fbbdd6d1d9a66ad
parentcgroup-util: use RET_NERRNO where appropriate (diff)
downloadsystemd-67b9a72c60419ffc2163aad2fd1e7243d64079c4.tar.xz
systemd-67b9a72c60419ffc2163aad2fd1e7243d64079c4.zip
nsresourced: log about correct errno in userns_destroy_cgroup()
-rw-r--r--src/nsresourced/userns-registry.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nsresourced/userns-registry.c b/src/nsresourced/userns-registry.c
index 8c62e71708..a77ebc589b 100644
--- a/src/nsresourced/userns-registry.c
+++ b/src/nsresourced/userns-registry.c
@@ -530,11 +530,11 @@ static int userns_destroy_cgroup(uint64_t cgroup_id) {
cgroup_fd = cg_cgroupid_open(/* cgroupfsfd= */ -EBADF, cgroup_id);
if (cgroup_fd == -ESTALE) {
- log_debug_errno(cgroup_fd, "Control group %" PRIu64 " already gone, ignoring: %m", cgroup_id);
+ log_debug_errno(cgroup_fd, "Control group %" PRIu64 " already gone, ignoring.", cgroup_id);
return 0;
}
if (cgroup_fd < 0)
- return log_debug_errno(errno, "Failed to open cgroup %" PRIu64 ", ignoring: %m", cgroup_id);
+ return log_debug_errno(cgroup_fd, "Failed to open cgroup %" PRIu64 ", ignoring: %m", cgroup_id);
_cleanup_free_ char *path = NULL;
r = fd_get_path(cgroup_fd, &path);
@@ -547,7 +547,7 @@ static int userns_destroy_cgroup(uint64_t cgroup_id) {
if (isempty(e))
return log_debug_errno(SYNTHETIC_ERRNO(EPERM), "Got root cgroup path, which can't be right, refusing.");
- log_debug("Path of cgroup %" PRIu64 " is: %s", cgroup_id, path);
+ log_debug("Destroying cgroup %" PRIu64 " (%s)", cgroup_id, path);
_cleanup_free_ char *fname = NULL;
r = path_extract_filename(path, &fname);