shared/bus-unit-util: use common helper in one more place
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user