summaryrefslogtreecommitdiff
path: root/src/system
diff options
context:
space:
mode:
authorStefan Vacek <stefan.vacek@intel.com>2015-12-01 09:49:57 +0100
committerLutz Helwing <lutz_helwing@mentor.com>2015-12-08 10:03:45 +0100
commit4251a7db0b2a576316a2a5435b72a709fd6101b0 (patch)
tree24bf28cdd0fc2ae3507694de3282cf3cfd69a655 /src/system
parent98ab520a0d3a36f4a7cfa081742f5aef1f411bf0 (diff)
downloadDLT-daemon-4251a7db0b2a576316a2a5435b72a709fd6101b0.tar.gz
Fix register context before application is registered
Additional: - include sd-daemon.h if watchdog is enabled - fix formatting for printf 64bit values Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
Diffstat (limited to 'src/system')
-rw-r--r--src/system/dlt-system-journal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/system/dlt-system-journal.c b/src/system/dlt-system-journal.c
index 52e1554..cc7ada0 100644
--- a/src/system/dlt-system-journal.c
+++ b/src/system/dlt-system-journal.c
@@ -57,6 +57,7 @@
#include <systemd/sd-journal.h>
#include <systemd/sd-id128.h>
+#include <inttypes.h> /* for PRI formatting macro */
extern DltSystemThreads threads;
@@ -177,7 +178,6 @@ void dlt_system_journal_get_timestamp(sd_journal *journal, MessageTimestamp *tim
snprintf(timestamp->real, sizeof(timestamp->real), "%s.%06"PRIu64, buffer_realtime_formatted, time_usecs % 1000000);
-
/* Try to get monotonic time from message source and if not successful try to get monotonic time from journal entry */
ret = dlt_system_journal_get(journal, buffer_monotime, "_SOURCE_MONOTONIC_TIMESTAMP", sizeof(buffer_monotime));
if (ret == 0 && strlen(buffer_monotime) > 0)
@@ -200,7 +200,7 @@ void dlt_system_journal_get_timestamp(sd_journal *journal, MessageTimestamp *tim
}
}
- snprintf(timestamp->monotonic, sizeof(timestamp->monotonic), "%"PRIu64".%06"PRIu64, time_usecs / 1000000, time_usecs % 1000000);
+ snprintf(timestamp->monotonic, sizeof(timestamp->monotonic), "%llu.%06llu", time_usecs / 1000000, time_usecs % 1000000);
}
void journal_thread(void *v_conf)