summaryrefslogtreecommitdiff
path: root/src/core/dbus-timer.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-05-11 01:41:06 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-05-11 01:41:06 +0900
commit54138a8de1ef098caf9a2847b4c5ee970d1727f3 (patch)
treeac44fec8eb904901aff25ffe5ed8d458f2f9cc27 /src/core/dbus-timer.c
parent79a603758d3b46fa05a4588f0ca19648fa3601d6 (diff)
downloadsystemd-54138a8de1ef098caf9a2847b4c5ee970d1727f3.tar.gz
core: merge duplicated functions
Diffstat (limited to 'src/core/dbus-timer.c')
-rw-r--r--src/core/dbus-timer.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c
index de34febb63..eef060ff0f 100644
--- a/src/core/dbus-timer.c
+++ b/src/core/dbus-timer.c
@@ -103,26 +103,6 @@ static int property_get_calendar_timers(
return sd_bus_message_close_container(reply);
}
-static int property_get_unit(
- sd_bus *bus,
- const char *path,
- const char *interface,
- const char *property,
- sd_bus_message *reply,
- void *userdata,
- sd_bus_error *error) {
-
- Unit *u = userdata, *trigger;
-
- assert(bus);
- assert(reply);
- assert(u);
-
- trigger = UNIT_TRIGGER(u);
-
- return sd_bus_message_append(reply, "s", trigger ? trigger->id : "");
-}
-
static int property_get_next_elapse_monotonic(
sd_bus *bus,
const char *path,
@@ -145,7 +125,7 @@ static int property_get_next_elapse_monotonic(
const sd_bus_vtable bus_timer_vtable[] = {
SD_BUS_VTABLE_START(0),
- SD_BUS_PROPERTY("Unit", "s", property_get_unit, 0, SD_BUS_VTABLE_PROPERTY_CONST),
+ 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("NextElapseUSecRealtime", "t", bus_property_get_usec, offsetof(Timer, next_elapse_realtime), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),