]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journald-server: use generic NOTIFY_READY message
authorMike Yuan <me@yhndnzj.com>
Sun, 27 Apr 2025 18:17:08 +0000 (20:17 +0200)
committerMike Yuan <me@yhndnzj.com>
Sun, 27 Apr 2025 18:21:09 +0000 (20:21 +0200)
src/journal/journald-server.c

index 6a8c8505403538f87aae06917d14fa6369be1e76..a267136eb3c05714027bb69f4ef7fce84647e5ef 100644 (file)
@@ -19,6 +19,7 @@
 #include "cgroup-util.h"
 #include "conf-parser.h"
 #include "creds-util.h"
+#include "daemon-util.h"
 #include "dirent-util.h"
 #include "event-util.h"
 #include "extract-word.h"
@@ -2056,10 +2057,7 @@ static int dispatch_notify_event(sd_event_source *es, int fd, uint32_t revents,
          * there's something to send it will be turned on again. */
 
         if (!s->sent_notify_ready) {
-                static const char p[] = "READY=1\n"
-                                        "STATUS=Processing requests...";
-
-                if (send(s->notify_fd, p, strlen(p), MSG_DONTWAIT) < 0) {
+                if (send(s->notify_fd, NOTIFY_READY, strlen(NOTIFY_READY), MSG_DONTWAIT) < 0) {
                         if (errno == EAGAIN)
                                 return 0;