From cab2aca3e7dc9966eb9f45416f34729719f01dd4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 1 Feb 2016 21:37:28 +0100 Subject: 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. --- src/nspawn/nspawn-register.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/nspawn') diff --git a/src/nspawn/nspawn-register.c b/src/nspawn/nspawn-register.c index 65ca9c762b..a89de4b324 100644 --- a/src/nspawn/nspawn-register.c +++ b/src/nspawn/nspawn-register.c @@ -166,17 +166,9 @@ int register_machine( } STRV_FOREACH(i, properties) { - r = sd_bus_message_open_container(m, 'r', "sv"); - if (r < 0) - return bus_log_create_error(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 bus_log_create_error(r); } r = sd_bus_message_close_container(m); -- cgit v1.2.3-54-g00ecf