summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-10-11 21:47:38 +0200
committerGitHub <noreply@github.com>2022-10-11 21:47:38 +0200
commitda6018275903434ced990eb956423bc70e61796b (patch)
tree3682ede24865553e1e58f2e149327c71439d6a87 /src/journal
parent2c03055e990abdb36d81a48122e31f2062a75cea (diff)
parent0b6a47957bd4f1dd4801ee6d7eb337e09dcf7099 (diff)
downloadsystemd-da6018275903434ced990eb956423bc70e61796b.tar.gz
Merge pull request #24933 from keszybz/erradicate-strerror
Erradicate strerror
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journalctl.c2
-rw-r--r--src/journal/journald-server.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index f0d28fd48b..11de07fcfa 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1460,7 +1460,7 @@ static int add_boot(sd_journal *j) {
r = get_boots(j, NULL, &boot_id, arg_boot_offset);
assert(r <= 1);
if (r <= 0) {
- const char *reason = (r == 0) ? "No such boot ID in journal" : strerror_safe(r);
+ const char *reason = (r == 0) ? "No such boot ID in journal" : STRERROR(r);
if (sd_id128_is_null(arg_boot_id))
log_error("Data from the specified boot (%+i) is not available: %s",
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index bfa9f44a83..71d7a59bda 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1094,7 +1094,8 @@ void server_driver_message(Server *s, pid_t object_pid, const char *message_id,
/* We failed to format the message. Emit a warning instead. */
char buf[LINE_MAX];
- xsprintf(buf, "MESSAGE=Entry printing failed: %s", strerror_safe(r));
+ errno = -r;
+ xsprintf(buf, "MESSAGE=Entry printing failed: %m");
n = 3;
iovec[n++] = IOVEC_MAKE_STRING("PRIORITY=4");