diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-04-07 21:35:37 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-04-07 21:35:37 +0200 |
commit | b21a0ef8fc3d78ca3cc9d08e8ec8e41705d9902e (patch) | |
tree | 1b1083c4f456d18a702d69b8921345b7b6ba07ef /src/systemctl.c | |
parent | f1d19aa412b34fe025dfd48a5c79d34fdd0f9528 (diff) |
dbus: expose monotonic timestamps on the bus
Diffstat (limited to 'src/systemctl.c')
-rw-r--r-- | src/systemctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index 00db47f125..0a72874145 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -1735,7 +1735,7 @@ static void exec_status_info_free(ExecStatusInfo *i) { } static int exec_status_info_deserialize(DBusMessageIter *sub, ExecStatusInfo *i) { - uint64_t start_timestamp, exit_timestamp; + uint64_t start_timestamp, exit_timestamp, start_timestamp_monotonic, exit_timestamp_monotonic; DBusMessageIter sub2, sub3; const char*path; unsigned n; @@ -1789,7 +1789,9 @@ static int exec_status_info_deserialize(DBusMessageIter *sub, ExecStatusInfo *i) if (!dbus_message_iter_next(&sub2) || bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_BOOLEAN, &ignore, true) < 0 || bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_UINT64, &start_timestamp, true) < 0 || + bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_UINT64, &start_timestamp_monotonic, true) < 0 || bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_UINT64, &exit_timestamp, true) < 0 || + bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_UINT64, &exit_timestamp_monotonic, true) < 0 || bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_UINT32, &pid, true) < 0 || bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_INT32, &code, true) < 0 || bus_iter_get_basic_and_next(&sub2, DBUS_TYPE_INT32, &status, false) < 0) @@ -2278,7 +2280,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")) { + if (endswith(name, "Timestamp")) { char timestamp[FORMAT_TIMESTAMP_MAX], *t; if ((t = format_timestamp(timestamp, sizeof(timestamp), u)) || arg_all) |