diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:52:33 +0000 |
commit | 2c3307fb903f427be3d021c5780b75cac9af2ce8 (patch) | |
tree | 65cf431f40b7481d81ae2dfce9576342686448f7 /upstream/fedora-rawhide/man3/sd_journal_next.3 | |
parent | Releasing progress-linux version 4.22.0-1~progress7.99u1. (diff) | |
download | manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.tar.xz manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.zip |
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/fedora-rawhide/man3/sd_journal_next.3')
-rw-r--r-- | upstream/fedora-rawhide/man3/sd_journal_next.3 | 16 |
1 files changed, 5 insertions, 11 deletions
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) |