]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/service: fix error cause in the log
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 8 May 2023 15:21:20 +0000 (00:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 8 May 2023 21:08:14 +0000 (06:08 +0900)
Fixes a bug caused by a5648b809457d120500b2acb18b31e2168a4817a.
Fixes #27575.

src/core/service.c

index a7fd518feeb6d65af9e643dbdf2894eca77d6aa8..5a06cc8a1d77fc5b49f6f422e2404ff0ad9f7e6e 100644 (file)
@@ -1115,7 +1115,7 @@ static int service_load_pid_file(Service *s, bool may_warn) {
                 r = chase(s->pid_file, NULL, 0, NULL, &fd);
         }
         if (r < 0)
-                return log_unit_full_errno(UNIT(s), prio, fd,
+                return log_unit_full_errno(UNIT(s), prio, r,
                                            "Can't open PID file %s (yet?) after %s: %m", s->pid_file, service_state_to_string(s->state));
 
         /* Let's read the PID file now that we chased it down. But we need to convert the O_PATH fd