From: Mike Yuan Date: Sun, 19 Oct 2025 19:56:33 +0000 (+0200) Subject: core/service: add missing serialization for notify_state X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d888e2dadae56a3d4423ea2252a2f8da3d3b6b2;p=thirdparty%2Fsystemd.git core/service: add missing serialization for notify_state This really should be persisted across daemon-reload since it might contain deferred state transitions. --- diff --git a/src/core/service.c b/src/core/service.c index a8c6883294e..644c9e41556 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -3298,6 +3298,8 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) { if (s->notify_access_override >= 0) (void) serialize_item(f, "notify-access-override", notify_access_to_string(s->notify_access_override)); + if (s->notify_state >= 0) + (void) serialize_item(f, "notify-state", notify_state_to_string(s->notify_state)); r = serialize_item_escaped(f, "status-text", s->status_text); if (r < 0) @@ -3608,6 +3610,16 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, log_unit_debug(u, "Failed to parse notify-access-override value: %s", value); else s->notify_access_override = notify_access; + + } else if (streq(key, "notify-state")) { + NotifyState notify_state; + + notify_state = notify_state_from_string(value); + if (notify_state < 0) + log_unit_debug(u, "Failed to parse notify-state value: %s", value); + else + s->notify_state = notify_state; + } else if (streq(key, "n-restarts")) { r = safe_atou(value, &s->n_restarts); if (r < 0)