shared/bus-unit-util: use common helper in one more place

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-07-03 10:37:33 +02:00
parent e47fb4abd2
commit 010d2e42c2
+2 -13
View File
@@ -717,19 +717,8 @@ static int bus_append_cgroup_property(sd_bus_message *m, const char *field, cons
return 1;
}
if (streq(field, "CPUQuotaPeriodSec")) {
usec_t u = USEC_INFINITY;
r = parse_sec_def_infinity(eq, &u);
if (r < 0)
return log_error_errno(r, "CPU quota period '%s' invalid.", eq);
r = sd_bus_message_append(m, "(sv)", "CPUQuotaPeriodUSec", "t", u);
if (r < 0)
return bus_log_create_error(r);
return 1;
}
if (streq(field, "CPUQuotaPeriodSec"))
return bus_append_parse_sec_rename(m, field, isempty(eq) ? "infinity" : eq);
if (streq(field, "DeviceAllow")) {
if (isempty(eq))