X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flogs-show.c;h=54179e94c9e5d00611c99858a63808868f957fc5;hb=15925386d387b6ed9c1f174d4b08c767acad8117;hp=e179b8a7b4e20ddbca46bba2672b8c53c16a3907;hpb=01c94c5d0aff09b4c0e429d483c8eeba40017071;p=elogind.git diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index e179b8a7b..54179e94c 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -32,6 +32,8 @@ #include "hashmap.h" #include "journal-internal.h" #include "formats-util.h" +#include "process-util.h" +#include "terminal-util.h" /* up to three lines (each up to 100 characters), or 300 characters, whichever is less */ @@ -407,8 +409,8 @@ static int output_verbose( if (r == -ENOENT) log_debug("Source realtime timestamp not found"); else if (r < 0) { - log_full(r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_ERR, - "Failed to get source realtime timestamp: %s", strerror(-r)); + log_full_errno(r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_ERR, r, + "Failed to get source realtime timestamp: %m"); return r; } else { _cleanup_free_ char *value = NULL; @@ -427,8 +429,8 @@ static int output_verbose( if (r < 0) { r = sd_journal_get_realtime_usec(j, &realtime); if (r < 0) { - log_full(r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_ERR, - "Failed to get realtime timestamp: %s", strerror(-r)); + log_full_errno(r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_ERR, r, + "Failed to get realtime timestamp: %m"); return r; } }