]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/service: reorder two functions
authorMike Yuan <me@yhndnzj.com>
Fri, 1 Mar 2024 13:45:32 +0000 (21:45 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 1 Mar 2024 13:49:08 +0000 (21:49 +0800)
src/core/service.c

index d017515c9299dca0a0e1d094761a8382420fb97c..086404f67523f0ee68b0c2195ee4687e8838e8d2 100644 (file)
@@ -4311,6 +4311,16 @@ static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void
         return 0;
 }
 
+static void service_force_watchdog(Service *s) {
+        if (!UNIT(s)->manager->service_watchdogs)
+                return;
+
+        log_unit_error(UNIT(s), "Watchdog request (last status: %s)!",
+                       s->status_text ?: "<unset>");
+
+        service_enter_signal(s, SERVICE_STOP_WATCHDOG, SERVICE_FAILURE_WATCHDOG);
+}
+
 static bool service_notify_message_authorized(Service *s, pid_t pid, FDSet *fds) {
         assert(s);
 
@@ -4348,16 +4358,6 @@ static bool service_notify_message_authorized(Service *s, pid_t pid, FDSet *fds)
         return true;
 }
 
-static void service_force_watchdog(Service *s) {
-        if (!UNIT(s)->manager->service_watchdogs)
-                return;
-
-        log_unit_error(UNIT(s), "Watchdog request (last status: %s)!",
-                       s->status_text ?: "<unset>");
-
-        service_enter_signal(s, SERVICE_STOP_WATCHDOG, SERVICE_FAILURE_WATCHDOG);
-}
-
 static void service_notify_message(
                 Unit *u,
                 const struct ucred *ucred,