summaryrefslogtreecommitdiff
path: root/src/journal/journald-native.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald-native.c')
-rw-r--r--src/journal/journald-native.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
index 6b2edc191d..a19f85d182 100644
--- a/src/journal/journald-native.c
+++ b/src/journal/journald-native.c
@@ -336,7 +336,7 @@ void server_process_native_file(
r = readlink_malloc(sl, &k);
if (r < 0) {
- log_error("readlink(%s) failed: %m", sl);
+ log_error_errno(errno, "readlink(%s) failed: %m", sl);
return;
}
@@ -357,7 +357,7 @@ void server_process_native_file(
}
if (fstat(fd, &st) < 0) {
- log_error("Failed to stat passed file, ignoring: %m");
+ log_error_errno(errno, "Failed to stat passed file, ignoring: %m");
return;
}
@@ -383,7 +383,7 @@ void server_process_native_file(
ps = PAGE_ALIGN(st.st_size);
p = mmap(NULL, ps, PROT_READ, MAP_PRIVATE, fd, 0);
if (p == MAP_FAILED) {
- log_error("Failed to map memfd, ignoring: %m");
+ log_error_errno(errno, "Failed to map memfd, ignoring: %m");
return;
}
@@ -425,7 +425,7 @@ int server_open_native_socket(Server*s) {
s->native_fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
if (s->native_fd < 0) {
- log_error("socket() failed: %m");
+ log_error_errno(errno, "socket() failed: %m");
return -errno;
}
@@ -433,7 +433,7 @@ int server_open_native_socket(Server*s) {
r = bind(s->native_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind(%s) failed: %m", sa.un.sun_path);
+ log_error_errno(errno, "bind(%s) failed: %m", sa.un.sun_path);
return -errno;
}
@@ -443,7 +443,7 @@ int server_open_native_socket(Server*s) {
r = setsockopt(s->native_fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one));
if (r < 0) {
- log_error("SO_PASSCRED failed: %m");
+ log_error_errno(errno, "SO_PASSCRED failed: %m");
return -errno;
}
@@ -451,13 +451,13 @@ int server_open_native_socket(Server*s) {
if (mac_selinux_use()) {
r = setsockopt(s->native_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
if (r < 0)
- log_warning("SO_PASSSEC failed: %m");
+ log_warning_errno(errno, "SO_PASSSEC failed: %m");
}
#endif
r = setsockopt(s->native_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one));
if (r < 0) {
- log_error("SO_TIMESTAMP failed: %m");
+ log_error_errno(errno, "SO_TIMESTAMP failed: %m");
return -errno;
}