diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-11-10 13:29:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 13:29:04 +0100 |
commit | 394131d5be587858d67764bee65198f4a7fe7442 (patch) | |
tree | 0bcbdc07fcd1990e78183e0d25c719d9f94bafd6 /src/core/dbus-timer.c | |
parent | c9b3e1d3808e67b79cf66d2bb2ad4d322a5faa4f (diff) | |
parent | acf24a1a84e9496e3feb09449f4cc43fe67a9a64 (diff) | |
download | systemd-394131d5be587858d67764bee65198f4a7fe7442.tar.gz |
Merge pull request #17497 from anitazha/randomizeonce
timer: add new feature FixedRandomDelay=
Diffstat (limited to 'src/core/dbus-timer.c')
-rw-r--r-- | src/core/dbus-timer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index 9720237140..8e69c17327 100644 --- a/src/core/dbus-timer.c +++ b/src/core/dbus-timer.c @@ -131,6 +131,7 @@ const sd_bus_vtable bus_timer_vtable[] = { SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Timer, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("AccuracyUSec", "t", bus_property_get_usec, offsetof(Timer, accuracy_usec), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("RandomizedDelayUSec", "t", bus_property_get_usec, offsetof(Timer, random_usec), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("FixedRandomDelay", "b", bus_property_get_bool, offsetof(Timer, fixed_random_delay), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Persistent", "b", bus_property_get_bool, offsetof(Timer, persistent), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("WakeSystem", "b", bus_property_get_bool, offsetof(Timer, wake_system), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("RemainAfterElapse", "b", bus_property_get_bool, offsetof(Timer, remain_after_elapse), SD_BUS_VTABLE_PROPERTY_CONST), @@ -232,6 +233,9 @@ static int bus_timer_set_transient_property( if (streq(name, "RandomizedDelayUSec")) return bus_set_transient_usec(u, name, &t->random_usec, message, flags, error); + if (streq(name, "FixedRandomDelay")) + return bus_set_transient_bool(u, name, &t->fixed_random_delay, message, flags, error); + if (streq(name, "WakeSystem")) return bus_set_transient_bool(u, name, &t->wake_system, message, flags, error); |