From 2c3307fb903f427be3d021c5780b75cac9af2ce8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 17 Jun 2024 12:52:33 +0200 Subject: Merging upstream version 4.23.0. Signed-off-by: Daniel Baumann --- upstream/fedora-rawhide/man3/sd_journal_next.3 | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'upstream/fedora-rawhide/man3/sd_journal_next.3') diff --git a/upstream/fedora-rawhide/man3/sd_journal_next.3 b/upstream/fedora-rawhide/man3/sd_journal_next.3 index 535266b6..fbb4bd6d 100644 --- a/upstream/fedora-rawhide/man3/sd_journal_next.3 +++ b/upstream/fedora-rawhide/man3/sd_journal_next.3 @@ -1,5 +1,5 @@ '\" t -.TH "SD_JOURNAL_NEXT" "3" "" "systemd 255" "sd_journal_next" +.TH "SD_JOURNAL_NEXT" "3" "" "systemd 256~rc3" "sd_journal_next" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -129,10 +129,10 @@ Iterating through the journal: int main(int argc, char *argv[]) { int r; sd_journal *j; + r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY); if (r < 0) { - errno = \-r; - fprintf(stderr, "Failed to open journal: %m\en"); + fprintf(stderr, "Failed to open journal: %s\en", strerror(\-r)); return 1; } SD_JOURNAL_FOREACH(j) { @@ -141,8 +141,7 @@ int main(int argc, char *argv[]) { r = sd_journal_get_data(j, "MESSAGE", (const void **)&d, &l); if (r < 0) { - errno = \-r; - fprintf(stderr, "Failed to read message field: %m\en"); + fprintf(stderr, "Failed to read message field: %s\en", strerror(\-r)); continue; } @@ -169,9 +168,4 @@ were added in version 187\&. was added in version 254\&. .SH "SEE ALSO" .PP -\fBsystemd\fR(1), -\fBsd-journal\fR(3), -\fBsd_journal_open\fR(3), -\fBsd_journal_get_data\fR(3), -\fBsd_journal_get_realtime_usec\fR(3), -\fBsd_journal_get_cursor\fR(3) +\fBsystemd\fR(1), \fBsd-journal\fR(3), \fBsd_journal_open\fR(3), \fBsd_journal_get_data\fR(3), \fBsd_journal_get_realtime_usec\fR(3), \fBsd_journal_get_cursor\fR(3) -- cgit v1.2.3