pid1: also encode whether to send plymouth notifications in UnitVTable

This commit is contained in:
Lennart Poettering
2023-06-30 22:01:02 +02:00
parent d52b8493c2
commit b2bfd121b7
5 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -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
+2
View File
@@ -2398,4 +2398,6 @@ const UnitVTable mount_vtable = {
},
.can_start = mount_can_start,
.notify_plymouth = true,
};
+2
View File
@@ -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,
};
+2
View File
@@ -1687,4 +1687,6 @@ const UnitVTable swap_vtable = {
},
.can_start = swap_can_start,
.notify_plymouth = true,
};
+3
View File
@@ -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;