mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-09 09:57:26 +03:00
bus-unit-util: properly serialize EnvironmentFile= empty assignment
In that case we need to generate an empty array.
This commit is contained in:
parent
7ae8162f29
commit
5716965132
@ -134,9 +134,12 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
|
||||
|
||||
} else if (streq(field, "EnvironmentFile")) {
|
||||
|
||||
r = sd_bus_message_append(m, "sv", "EnvironmentFiles", "a(sb)", 1,
|
||||
eq[0] == '-' ? eq + 1 : eq,
|
||||
eq[0] == '-');
|
||||
if (isempty(eq))
|
||||
r = sd_bus_message_append(m, "sv", "EnvironmentFiles", "a(sb)", 0);
|
||||
else
|
||||
r = sd_bus_message_append(m, "sv", "EnvironmentFiles", "a(sb)", 1,
|
||||
eq[0] == '-' ? eq + 1 : eq,
|
||||
eq[0] == '-');
|
||||
goto finish;
|
||||
|
||||
} else if (STR_IN_SET(field, "AccuracySec", "RandomizedDelaySec", "RuntimeMaxSec")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user