chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: remove unused variables
[elogind.git]
/
src
/
journal
/
journald-kmsg.c
diff --git
a/src/journal/journald-kmsg.c
b/src/journal/journald-kmsg.c
index 94866f10d3009c66f19a466d165b1166f7c1eef9..aca4571ecec7f6a3de31954ee55e71a6b7eefb8d 100644
(file)
--- 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)
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);
}
free(ident_buf);
}
@@
-342,7
+342,7
@@
static int server_read_dev_kmsg(Server *s) {
if (errno == EAGAIN || errno == EINTR || errno == EPIPE)
return 0;
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;
}
return -errno;
}
@@
-413,13
+413,13
@@
int server_open_dev_kmsg(Server *s) {
goto fail;
}
goto fail;
}
- log_error_errno(
-
r, "Failed to add /dev/kmsg fd to event loop: %m");
+ log_error_errno(r, "Failed to add /dev/kmsg fd to event loop: %m");
goto fail;
}
r = sd_event_source_set_priority(s->dev_kmsg_event_source, SD_EVENT_PRIORITY_IMPORTANT+10);
if (r < 0) {
goto fail;
}
r = sd_event_source_set_priority(s->dev_kmsg_event_source, SD_EVENT_PRIORITY_IMPORTANT+10);
if (r < 0) {
- log_error_errno(
-
r, "Failed to adjust priority of kmsg event source: %m");
+ log_error_errno(r, "Failed to adjust priority of kmsg event source: %m");
goto fail;
}
goto fail;
}
@@
-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) {
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) {
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) {
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;
}
return 0;
}