summaryrefslogtreecommitdiff
path: root/src/core/dbus-service.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2016-02-02 17:32:31 +0100
committerDaniel Mack <github@zonque.org>2016-02-02 17:32:31 +0100
commit14ddf4207ffece3b0843bd1250a64c41c32ac9ae (patch)
tree4f6863c989de0b55f7305464c154011578e72cc6 /src/core/dbus-service.c
parentb72190e90f0846956e609075fb9113dba9bc8f0f (diff)
parent2c29d3324dbcab7720cc6bb5852b1a01daa6772c (diff)
Merge pull request #2506 from poettering/resolved-and-more
pid 1 fixes, resolved fixes, and more
Diffstat (limited to 'src/core/dbus-service.c')
-rw-r--r--src/core/dbus-service.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c
index 2529689f5a..16f50238a1 100644
--- a/src/core/dbus-service.c
+++ b/src/core/dbus-service.c
@@ -49,6 +49,7 @@ const sd_bus_vtable bus_service_vtable[] = {
SD_BUS_PROPERTY("RestartUSec", "t", bus_property_get_usec, offsetof(Service, restart_usec), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("TimeoutStartUSec", "t", bus_property_get_usec, offsetof(Service, timeout_start_usec), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("TimeoutStopUSec", "t", bus_property_get_usec, offsetof(Service, timeout_stop_usec), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("RuntimeMaxUSec", "t", bus_property_get_usec, offsetof(Service, runtime_max_usec), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("WatchdogUSec", "t", bus_property_get_usec, offsetof(Service, watchdog_usec), SD_BUS_VTABLE_PROPERTY_CONST),
BUS_PROPERTY_DUAL_TIMESTAMP("WatchdogTimestamp", offsetof(Service, watchdog_timestamp), 0),
SD_BUS_PROPERTY("StartLimitInterval", "t", bus_property_get_usec, offsetof(Service, start_limit.interval), SD_BUS_VTABLE_PROPERTY_CONST),
@@ -125,6 +126,19 @@ static int bus_service_set_transient_property(
}
return 1;
+ } else if (streq(name, "RuntimeMaxUSec")) {
+ usec_t u;
+
+ r = sd_bus_message_read(message, "t", &u);
+ if (r < 0)
+ return r;
+
+ if (mode != UNIT_CHECK) {
+ s->runtime_max_usec = u;
+ unit_write_drop_in_private_format(UNIT(s), mode, name, "RuntimeMaxSec=" USEC_FMT "us\n", u);
+ }
+
+ return 1;
} else if (STR_IN_SET(name,
"StandardInputFileDescriptor",