diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-03-14 21:36:47 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-04-02 08:20:10 +0200 |
commit | efebb613c70e7b3a2870411732754a235373b3a5 (patch) | |
tree | f64f499ed35508008e5933df35e744c8275c075b /src/core/dbus-timer.c | |
parent | 787be190a87a59669854e44094b0e9063564cce1 (diff) | |
download | systemd-efebb613c70e7b3a2870411732754a235373b3a5.tar.gz |
core: optionally, trigger .timer units on timezone and clock changes
Fixes: #6228
Diffstat (limited to 'src/core/dbus-timer.c')
-rw-r--r-- | src/core/dbus-timer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index faed632e90..807ca8022a 100644 --- a/src/core/dbus-timer.c +++ b/src/core/dbus-timer.c @@ -123,6 +123,8 @@ const sd_bus_vtable bus_timer_vtable[] = { SD_BUS_PROPERTY("Unit", "s", bus_property_get_triggered_unit, 0, SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("TimersMonotonic", "a(stt)", property_get_monotonic_timers, 0, SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION), SD_BUS_PROPERTY("TimersCalendar", "a(sst)", property_get_calendar_timers, 0, SD_BUS_VTABLE_PROPERTY_EMITS_INVALIDATION), + SD_BUS_PROPERTY("OnClockChange", "b", bus_property_get_bool, offsetof(Timer, on_clock_change), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("OnTimezoneChange", "b", bus_property_get_bool, offsetof(Timer, on_timezone_change), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("NextElapseUSecRealtime", "t", bus_property_get_usec, offsetof(Timer, next_elapse_realtime), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("NextElapseUSecMonotonic", "t", property_get_next_elapse_monotonic, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), BUS_PROPERTY_DUAL_TIMESTAMP("LastTriggerUSec", offsetof(Timer, last_trigger), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), @@ -171,6 +173,12 @@ static int bus_timer_set_transient_property( if (streq(name, "RemainAfterElapse")) return bus_set_transient_bool(u, name, &t->remain_after_elapse, message, flags, error); + if (streq(name, "OnTimezoneChange")) + return bus_set_transient_bool(u, name, &t->on_timezone_change, message, flags, error); + + if (streq(name, "OnClockChange")) + return bus_set_transient_bool(u, name, &t->on_clock_change, message, flags, error); + if (streq(name, "TimersMonotonic")) { const char *base_name; usec_t usec = 0; |