diff options
Diffstat (limited to 'src/shared/bus-unit-util.c')
-rw-r--r-- | src/shared/bus-unit-util.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index 1b6c6f0566..ed73950355 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -147,7 +147,7 @@ static int bus_append_string(sd_bus_message *m, const char *field, const char *e return 1; } -static int bus_append_strv(sd_bus_message *m, const char *field, const char *eq, ExtractFlags flags) { +static int bus_append_strv(sd_bus_message *m, const char *field, const char *eq, const char *separator, ExtractFlags flags) { const char *p; int r; @@ -170,7 +170,7 @@ static int bus_append_strv(sd_bus_message *m, const char *field, const char *eq, for (p = eq;;) { _cleanup_free_ char *word = NULL; - r = extract_first_word(&p, &word, NULL, flags); + r = extract_first_word(&p, &word, separator, flags); if (r == 0) break; if (r == -ENOMEM) @@ -613,12 +613,12 @@ static int bus_append_cgroup_property(sd_bus_message *m, const char *field, cons return bus_append_cg_blkio_weight_parse(m, field, eq); if (streq(field, "DisableControllers")) - return bus_append_strv(m, "DisableControllers", eq, EXTRACT_UNQUOTE); + return bus_append_strv(m, "DisableControllers", eq, /* separator= */ NULL, EXTRACT_UNQUOTE); if (streq(field, "Delegate")) { r = parse_boolean(eq); if (r < 0) - return bus_append_strv(m, "DelegateControllers", eq, EXTRACT_UNQUOTE); + return bus_append_strv(m, "DelegateControllers", eq, /* separator= */ NULL, EXTRACT_UNQUOTE); r = sd_bus_message_append(m, "(sv)", "Delegate", "b", r); if (r < 0) @@ -1116,7 +1116,7 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con "ConfigurationDirectory", "SupplementaryGroups", "SystemCallArchitectures")) - return bus_append_strv(m, field, eq, EXTRACT_UNQUOTE); + return bus_append_strv(m, field, eq, /* separator= */ NULL, EXTRACT_UNQUOTE); if (STR_IN_SET(field, "SyslogLevel", "LogLevelMax")) @@ -1175,7 +1175,7 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con if (STR_IN_SET(field, "Environment", "UnsetEnvironment", "PassEnvironment")) - return bus_append_strv(m, field, eq, EXTRACT_UNQUOTE|EXTRACT_CUNESCAPE); + return bus_append_strv(m, field, eq, /* separator= */ NULL, EXTRACT_UNQUOTE|EXTRACT_CUNESCAPE); if (streq(field, "EnvironmentFile")) { if (isempty(eq)) @@ -2333,6 +2333,9 @@ static int bus_append_mount_property(sd_bus_message *m, const char *field, const "ReadwriteOnly")) return bus_append_parse_boolean(m, field, eq); + if (streq(field, "GracefulOptions")) + return bus_append_strv(m, field, eq, /* separator= */ ",", 0); + return 0; } @@ -2615,7 +2618,7 @@ static int bus_append_socket_property(sd_bus_message *m, const char *field, cons return bus_append_string(m, field, eq); if (streq(field, "Symlinks")) - return bus_append_strv(m, field, eq, EXTRACT_UNQUOTE); + return bus_append_strv(m, field, eq, /* separator= */ NULL, EXTRACT_UNQUOTE); if (streq(field, "SocketProtocol")) return bus_append_parse_ip_protocol(m, field, eq); @@ -2749,7 +2752,7 @@ static int bus_append_unit_property(sd_bus_message *m, const char *field, const "RequiresMountsFor", "WantsMountsFor", "Markers")) - return bus_append_strv(m, field, eq, EXTRACT_UNQUOTE); + return bus_append_strv(m, field, eq, /* separator= */ NULL, EXTRACT_UNQUOTE); t = condition_type_from_string(field); if (t >= 0) |