tree-wide: prefer sending pifds over pids when creating scope units

This commit is contained in:
Lennart Poettering
2023-10-05 17:10:00 +02:00
parent b0ae589b3e
commit 7eda208ffe
10 changed files with 62 additions and 15 deletions
+16
View File
@@ -2817,6 +2817,22 @@ int bus_append_unit_property_assignment_many(sd_bus_message *m, UnitType t, char
return 0;
}
int bus_append_scope_pidref(sd_bus_message *m, const PidRef *pidref) {
assert(m);
if (!pidref_is_set(pidref))
return -ESRCH;
if (pidref->fd >= 0)
return sd_bus_message_append(
m, "(sv)",
"PIDFDs", "ah", 1, pidref->fd);
return sd_bus_message_append(
m, "(sv)",
"PIDs", "au", 1, pidref->pid);
}
int bus_deserialize_and_dump_unit_file_changes(sd_bus_message *m, bool quiet) {
const char *type, *path, *source;
InstallChange *changes = NULL;