]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: drop a stray %m specifier from a warning message
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 15 Jul 2022 19:19:42 +0000 (21:19 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 15 Jul 2022 22:00:40 +0000 (07:00 +0900)
since in this specific case (r == 0) `errno` is irrelevant and most likely
set to zero, leading up to a confusing message:

```
[  120.595085] H systemd[1]: session-5.scope: No PIDs left to attach to the scope's control group, refusing: Success
[  120.595144] H systemd[1]: session-5.scope: Failed with result 'resources'.
```

src/core/scope.c

index 63d3288caf16fc8bb3960b8d94d9498f84a6b480..080bb713560e27de0340fde53704d8c575b54c04 100644 (file)
@@ -392,7 +392,7 @@ static int scope_start(Unit *u) {
                 return r;
         }
         if (r == 0) {
-                log_unit_warning(u, "No PIDs left to attach to the scope's control group, refusing: %m");
+                log_unit_warning(u, "No PIDs left to attach to the scope's control group, refusing.");
                 scope_enter_dead(s, SCOPE_FAILURE_RESOURCES);
                 return -ECHILD;
         }