]> err.no Git - systemd/commitdiff
dbus: include NextElapse field in timer properties
authorLennart Poettering <lennart@poettering.net>
Sun, 4 Jul 2010 14:48:24 +0000 (16:48 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 4 Jul 2010 14:48:24 +0000 (16:48 +0200)
src/dbus-timer.c
src/systemctl.c

index af0ae72f4f20a36c4556d092236262d49d75a96b..d548227b5ae31ef419f6f0b4e47455f9fef019f7 100644 (file)
@@ -29,6 +29,7 @@
         " <interface name=\"org.freedesktop.systemd1.Timer\">\n"        \
         "  <property name=\"Unit\" type=\"s\" access=\"read\"/>\n"      \
         "  <property name=\"Timers\" type=\"a(stt)\" access=\"read\"/>\n" \
+        "  <property name=\"NextElapse\" type=\"t\" access=\"read\"/>\n" \
         " </interface>\n"
 
 #define INTROSPECTION                                                   \
@@ -77,6 +78,7 @@ DBusHandlerResult bus_timer_message_handler(Unit *u, DBusConnection *c, DBusMess
                 BUS_UNIT_PROPERTIES,
                 { "org.freedesktop.systemd1.Timer", "Unit",       bus_property_append_string, "s",      u->timer.unit->meta.id },
                 { "org.freedesktop.systemd1.Timer", "Timers",     bus_timer_append_timers,    "a(stt)", u                      },
+                { "org.freedesktop.systemd1.Timer", "NextElapse", bus_property_append_usec,   "t",      &u->timer.next_elapse  },
                 { NULL, NULL, NULL, NULL, NULL }
         };
 
index 392ecf2c92ef43f11f7e529b0b5716396d9fd104..f97fa10390936b5bf1c863bae46c85a1b7846b31 100644 (file)
@@ -1024,7 +1024,7 @@ static int print_property(const char *name, DBusMessageIter *iter) {
                 /* Yes, heuristics! But we can change this check
                  * should it turn out to not be sufficient */
 
-                if (strstr(name, "Timestamp") || strstr(name, "Elapse")) {
+                if (strstr(name, "Timestamp")) {
                         char timestamp[FORMAT_TIMESTAMP_MAX], *t;
 
                         if ((t = format_timestamp(timestamp, sizeof(timestamp), u)) || arg_all)