systemctl: distinguish reload and reexec
authorChristian Hesse <mail@eworm.de>
Wed, 22 Nov 2023 13:19:12 +0000 (14:19 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 22 Nov 2023 17:45:04 +0000 (17:45 +0000)
This used to log about reload, for reload and reexecution. Let's
distinguish the two cases.

src/systemctl/systemctl-daemon-reload.c

index 4f025ac..7e9b456 100644 (file)
@@ -45,11 +45,13 @@ int daemon_reload(enum action action, bool graceful) {
                 return 1;
         if (r < 0) {
                 if (graceful) { /* If graceful mode is selected, debug log, but don't fail */
-                        log_debug_errno(r, "Failed to reload daemon via the bus, ignoring: %s", bus_error_message(&error, r));
+                        log_debug_errno(r, "%s daemon failed via the bus, ignoring: %s",
+                                        method, bus_error_message(&error, r));
                         return 0;
                 }
 
-                return log_error_errno(r, "Failed to reload daemon: %s", bus_error_message(&error, r));
+                return log_error_errno(r, "%s daemon failed: %s",
+                                       method, bus_error_message(&error, r));
         }
 
         return 1;