summaryrefslogtreecommitdiff
path: root/src/journal/journald-kmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald-kmsg.c')
-rw-r--r--src/journal/journald-kmsg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
index 363c5de869..aca4571ece 100644
--- a/src/journal/journald-kmsg.c
+++ b/src/journal/journald-kmsg.c
@@ -88,7 +88,7 @@ void server_forward_kmsg(
IOVEC_SET_STRING(iovec[n++], "\n");
if (writev(s->dev_kmsg_fd, iovec, n) < 0)
- log_debug("Failed to write to /dev/kmsg for logging: %m");
+ log_debug_errno(errno, "Failed to write to /dev/kmsg for logging: %m");
free(ident_buf);
}
@@ -342,7 +342,7 @@ static int server_read_dev_kmsg(Server *s) {
if (errno == EAGAIN || errno == EINTR || errno == EPIPE)
return 0;
- log_error("Failed to read from kernel: %m");
+ log_error_errno(errno, "Failed to read from kernel: %m");
return -errno;
}
@@ -446,18 +446,18 @@ int server_open_kernel_seqnum(Server *s) {
fd = open("/run/systemd/journal/kernel-seqnum", O_RDWR|O_CREAT|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, 0644);
if (fd < 0) {
- log_error("Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
+ log_error_errno(errno, "Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m");
return 0;
}
if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
- log_error("Failed to allocate sequential number file, ignoring: %m");
+ log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
return 0;
}
p = mmap(NULL, sizeof(uint64_t), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
if (p == MAP_FAILED) {
- log_error("Failed to map sequential number file, ignoring: %m");
+ log_error_errno(errno, "Failed to map sequential number file, ignoring: %m");
return 0;
}