]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Be slightly more verbose in error message 6257/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 2 Jul 2017 16:03:25 +0000 (12:03 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 2 Jul 2017 16:03:56 +0000 (12:03 -0400)
Including the full path is always useful.

Also use PID_FMT in one more place.

src/basic/cgroup-util.c
src/nspawn/nspawn-cgroup.c

index c828d1014946378772e4dc535b2b5f6948e1ec28..6344372610b70508d46132f27eb2c439249ac3f9 100644 (file)
@@ -840,7 +840,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
         if (r > 0 && streq(controller, SYSTEMD_CGROUP_CONTROLLER)) {
                 r = cg_attach(SYSTEMD_CGROUP_CONTROLLER_LEGACY, path, pid);
                 if (r < 0)
-                        log_warning_errno(r, "Failed to attach %d to compat systemd cgroup %s: %m", pid, path);
+                        log_warning_errno(r, "Failed to attach "PID_FMT" to compat systemd cgroup %s: %m", pid, path);
         }
 
         return 0;
index d749756437c5f867d121ebd5e4c9b5c7389ffdf2..fd565c09cdff77b5081600a0c366b6a4f36e5c78 100644 (file)
@@ -49,7 +49,7 @@ static int chown_cgroup_path(const char *path, uid_t uid_shift) {
                        "cgroup.subtree_control")
                 if (fchownat(fd, fn, uid_shift, uid_shift, 0) < 0)
                         log_full_errno(errno == ENOENT ? LOG_DEBUG :  LOG_WARNING, errno,
-                                       "Failed to chown() cgroup file %s, ignoring: %m", fn);
+                                       "Failed to chown \"%s/%s\", ignoring: %m", path, fn);
 
         return 0;
 }