]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: debug log about received fds 17351/head
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Oct 2020 14:35:37 +0000 (16:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Oct 2020 14:41:37 +0000 (16:41 +0200)
src/core/manager.c

index d85d938e7bab25f665bc3e4194da3b671636b2aa..6a8c4bf3626db9e81529a20c236980bd67e274ca 100644 (file)
@@ -3492,6 +3492,24 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
         assert(m);
         assert(f);
 
+        if (DEBUG_LOGGING) {
+                if (fdset_isempty(fds))
+                        log_debug("No file descriptors passed");
+                else {
+                        int fd;
+
+                        FDSET_FOREACH(fd, fds) {
+                                _cleanup_free_ char *fn = NULL;
+
+                                r = fd_get_path(fd, &fn);
+                                if (r < 0)
+                                        log_debug_errno(r, "Received serialized fd %i → %m", fd);
+                                else
+                                        log_debug("Received serialized fd %i → %s", fd, strna(fn));
+                        }
+                }
+        }
+
         log_debug("Deserializing state...");
 
         /* If we are not in reload mode yet, enter it now. Not that this is recursive, a caller might already have