summaryrefslogtreecommitdiff
path: root/src/run
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-01 21:37:28 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-01 22:18:16 +0100
commitcab2aca3e7dc9966eb9f45416f34729719f01dd4 (patch)
tree628ed8287d73714e6889058b260e9c67843d02d5 /src/run
parentfb8a9fc9b5ec53b13f9c2acad48b9a7f6579acfa (diff)
downloadsystemd-cab2aca3e7dc9966eb9f45416f34729719f01dd4.tar.gz
core: fix support for transient resource limit properties
Make sure we can properly process resource limit properties. Specifically, allow transient configuration of both the soft and hard limit, the same way from the unit files. Previously, only the the hard rlimits could be configured but they'd implicitly spill into the soft hard rlimits. This also updates the client-side code to be able to parse hard/soft resource limit specifications. Since we need to serialize two properties in bus_append_unit_property_assignment() now, the marshalling of the container around it is now moved into the function itself. This has the benefit of shortening the calling code. As a side effect this now beefs up the rlimit parser of "systemctl set-property" to understand time and disk sizes where that's appropriate.
Diffstat (limited to 'src/run')
-rw-r--r--src/run/run.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/run/run.c b/src/run/run.c
index 92a1d5373c..080c15466c 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -422,17 +422,9 @@ static int transient_unit_set_properties(sd_bus_message *m, char **properties) {
return r;
STRV_FOREACH(i, properties) {
- r = sd_bus_message_open_container(m, 'r', "sv");
- if (r < 0)
- return r;
-
r = bus_append_unit_property_assignment(m, *i);
if (r < 0)
return r;
-
- r = sd_bus_message_close_container(m);
- if (r < 0)
- return r;
}
return 0;