From: Lennart Poettering Date: Fri, 30 Jun 2023 13:35:49 +0000 (+0200) Subject: pid1: also encode whether to send plymouth notifications in UnitVTable X-Git-Tag: v254-rc1~62^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2bfd121b740d9f47c30118bcc216a5f091fb540;p=thirdparty%2Fsystemd.git pid1: also encode whether to send plymouth notifications in UnitVTable --- diff --git a/src/core/manager.c b/src/core/manager.c index 21d2e092fa1..35b90e21594 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -3386,7 +3386,7 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) { if (detect_container() > 0) return; - if (!IN_SET(u->type, UNIT_SERVICE, UNIT_MOUNT, UNIT_SWAP)) + if (!UNIT_VTABLE(u)->notify_plymouth) return; /* We set SOCK_NONBLOCK here so that we rather drop the diff --git a/src/core/mount.c b/src/core/mount.c index 542c39e1863..1424ad2bf47 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -2398,4 +2398,6 @@ const UnitVTable mount_vtable = { }, .can_start = mount_can_start, + + .notify_plymouth = true, }; diff --git a/src/core/service.c b/src/core/service.c index 3f27e28a7d7..93545a252ab 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -5168,6 +5168,8 @@ const UnitVTable service_vtable = { .can_start = service_can_start, + .notify_plymouth = true, + .audit_start_message_type = AUDIT_SERVICE_START, .audit_stop_message_type = AUDIT_SERVICE_STOP, }; diff --git a/src/core/swap.c b/src/core/swap.c index a57176b1a39..73cf320bfd2 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -1687,4 +1687,6 @@ const UnitVTable swap_vtable = { }, .can_start = swap_can_start, + + .notify_plymouth = true, }; diff --git a/src/core/unit.h b/src/core/unit.h index 20b00799b74..3a7330c24ff 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -783,6 +783,9 @@ typedef struct UnitVTable { /* True if systemd-oomd can monitor and act on this unit's recursive children's cgroups */ bool can_set_managed_oom; + /* If true, we'll notify plymouth about this unit */ + bool notify_plymouth; + /* The audit events to generate on start + stop (or 0 if none shall be generated) */ int audit_start_message_type; int audit_stop_message_type;