summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2012-04-04 05:23:51 +0200
committerKay Sievers <kay.sievers@vrfy.org>2012-04-04 05:23:51 +0200
commit6df831f25ebc9f55cd939f04392dad9237706e45 (patch)
treea7a3da9674ca7b231e29ab04825b84079c50a649 /src
parentfc863deadaf07da24f3593fca6c6e09b62cd772c (diff)
parent112301ae4433b59ae602556f455c4065bddb6ad6 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/systemd/systemd
Diffstat (limited to 'src')
-rw-r--r--src/logs-show.c24
-rw-r--r--src/special.h2
2 files changed, 19 insertions, 7 deletions
diff --git a/src/logs-show.c b/src/logs-show.c
index 0a07a77bed..a6220351b6 100644
--- a/src/logs-show.c
+++ b/src/logs-show.c
@@ -348,9 +348,9 @@ static int output_export(sd_journal *j, unsigned line, unsigned n_columns, bool
}
printf("__CURSOR=%s\n"
- "__REALTIME=%llu\n"
- "__MONOTONIC=%llu\n"
- "__BOOT_ID=%s\n",
+ "__REALTIME_TIMESTAMP=%llu\n"
+ "__MONOTONIC_TIMESTAMP=%llu\n"
+ "_BOOT_ID=%s\n",
cursor,
(unsigned long long) realtime,
(unsigned long long) monotonic,
@@ -360,6 +360,12 @@ static int output_export(sd_journal *j, unsigned line, unsigned n_columns, bool
SD_JOURNAL_FOREACH_DATA(j, data, length) {
+ /* We already printed the boot id, from the data in
+ * the header, hence let's suppress it here */
+ if (length >= 9 &&
+ memcmp(data, "_BOOT_ID=", 9) == 0)
+ continue;
+
if (contains_unprintable(data, length)) {
const char *c;
uint64_t le64;
@@ -460,9 +466,9 @@ static int output_json(sd_journal *j, unsigned line, unsigned n_columns, bool sh
printf("{\n"
"\t\"__CURSOR\" : \"%s\",\n"
- "\t\"__REALTIME\" : \"%llu\",\n"
- "\t\"__MONOTONIC\" : \"%llu\",\n"
- "\t\"__BOOT_ID\" : \"%s\"",
+ "\t\"__REALTIME_TIMESTAMP\" : \"%llu\",\n"
+ "\t\"__MONOTONIC_TIMESTAMP\" : \"%llu\",\n"
+ "\t\"_BOOT_ID\" : \"%s\"",
cursor,
(unsigned long long) realtime,
(unsigned long long) monotonic,
@@ -473,6 +479,12 @@ static int output_json(sd_journal *j, unsigned line, unsigned n_columns, bool sh
SD_JOURNAL_FOREACH_DATA(j, data, length) {
const char *c;
+ /* We already printed the boot id, from the data in
+ * the header, hence let's suppress it here */
+ if (length >= 9 &&
+ memcmp(data, "_BOOT_ID=", 9) == 0)
+ continue;
+
c = memchr(data, '=', length);
if (!c) {
log_error("Invalid field.");
diff --git a/src/special.h b/src/special.h
index 8185eaf60e..43e2e6f6d7 100644
--- a/src/special.h
+++ b/src/special.h
@@ -55,7 +55,7 @@
#define SPECIAL_NETWORK_TARGET "network.target" /* LSB's $network */
#define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named */
#define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */
-#define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog; Should pull in syslog.socket or syslog.service */
+#define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog */
#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
#define SPECIAL_DISPLAY_MANAGER_SERVICE "display-manager.service" /* Debian's $x-display-manager */
#define SPECIAL_MAIL_TRANSFER_AGENT_TARGET "mail-transfer-agent.target" /* Debian's $mail-{transport|transfer-agent */