chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
btrfs-util: fix creating recursive read-only snapshots
[elogind.git]
/
src
/
shared
/
logs-show.c
diff --git
a/src/shared/logs-show.c
b/src/shared/logs-show.c
index d3ee1398806223c594457fcbc1baa1f9e6a05a3d..54179e94c9e5d00611c99858a63808868f957fc5 100644
(file)
--- a/
src/shared/logs-show.c
+++ b/
src/shared/logs-show.c
@@
-31,6
+31,9
@@
#include "utf8.h"
#include "hashmap.h"
#include "journal-internal.h"
#include "utf8.h"
#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 */
/* up to three lines (each up to 100 characters),
or 300 characters, whichever is less */
@@
-406,8
+409,8
@@
static int output_verbose(
if (r == -ENOENT)
log_debug("Source realtime timestamp not found");
else if (r < 0) {
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;
return r;
} else {
_cleanup_free_ char *value = NULL;
@@
-426,8
+429,8
@@
static int output_verbose(
if (r < 0) {
r = sd_journal_get_realtime_usec(j, &realtime);
if (r < 0) {
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;
}
}
return r;
}
}
@@
-990,7
+993,7
@@
static int show_journal(FILE *f,
if (warn_cutoff && line < how_many && not_before > 0) {
sd_id128_t boot_id;
if (warn_cutoff && line < how_many && not_before > 0) {
sd_id128_t boot_id;
- usec_t cutoff;
+ usec_t cutoff
= 0
;
/* Check whether the cutoff line is too early */
/* Check whether the cutoff line is too early */
@@
-1165,7
+1168,7
@@
static int get_boot_id_for_machine(const char *machine, sd_id128_t *boot_id) {
r = loop_read_exact(fd, buf, 36, false);
safe_close(fd);
r = loop_read_exact(fd, buf, 36, false);
safe_close(fd);
- if (
k
< 0)
+ if (
r
< 0)
_exit(EXIT_FAILURE);
k = send(pair[1], buf, 36, MSG_NOSIGNAL);
_exit(EXIT_FAILURE);
k = send(pair[1], buf, 36, MSG_NOSIGNAL);