summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus/bus-util.c')
-rw-r--r--src/libsystemd/sd-bus/bus-util.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
index 6220934bd8..6c9548f9aa 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/libsystemd/sd-bus/bus-util.c
@@ -1274,40 +1274,10 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
r = sd_bus_message_append(m, "v", "t", (usec_t) percent * USEC_PER_SEC / 100);
} else {
- usec_t us;
-
- r = parse_sec(eq, &us);
- if (r < 0) {
- log_error("CPU quota '%s' invalid.", eq);
- return -EINVAL;
- }
-
- r = sd_bus_message_append_basic(m, SD_BUS_TYPE_STRING, "CPUQuotaUSec");
- if (r < 0)
- return bus_log_create_error(r);
-
- r = sd_bus_message_append(m, "v", "t", us);
- }
-
- if (r < 0)
- return bus_log_create_error(r);
-
- return 0;
-
- } else if (streq(field, "CPUQuotaPeriodSec")) {
- usec_t us;
-
- r = parse_sec(eq, &us);
- if (r < 0) {
- log_error("CPU period '%s' invalid.", eq);
+ log_error("CPU quota needs to be in percent.");
return -EINVAL;
}
- r = sd_bus_message_append_basic(m, SD_BUS_TYPE_STRING, "CPUQuotaPeriodUSec");
- if (r < 0)
- return bus_log_create_error(r);
-
- r = sd_bus_message_append(m, "v", "t", us);
if (r < 0)
return bus_log_create_error(r);