| 1 |
'\" t |
| 2 |
.TH "SD_JOURNAL_HAS_RUNTIME_FILES" "3" "" "systemd 261~rc3" "sd_journal_has_runtime_files" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
sd_journal_has_runtime_files, sd_journal_has_persistent_files \- Query availability of runtime or persistent journal files |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.sp |
| 26 |
.ft B |
| 27 |
.nf |
| 28 |
#include <systemd/sd\-journal\&.h> |
| 29 |
.fi |
| 30 |
.ft |
| 31 |
.HP \w'int\ sd_journal_has_runtime_files('u |
| 32 |
.BI "int sd_journal_has_runtime_files(sd_journal\ *" "j" ");" |
| 33 |
.HP \w'int\ sd_journal_has_persistent_files('u |
| 34 |
.BI "int sd_journal_has_persistent_files(sd_journal\ *" "j" ");" |
| 35 |
.SH "DESCRIPTION" |
| 36 |
.PP |
| 37 |
\fBsd_journal_has_runtime_files()\fR |
| 38 |
returns a positive value if runtime journal files (present in /run/systemd/journal/) have been found\&. Otherwise, returns 0\&. |
| 39 |
.PP |
| 40 |
\fBsd_journal_has_persistent_files()\fR |
| 41 |
returns a positive value if persistent journal files (present in /var/log/journal/) have been found\&. Otherwise, returns 0\&. |
| 42 |
.SH "RETURN VALUE" |
| 43 |
.PP |
| 44 |
Both |
| 45 |
\fBsd_journal_has_runtime_files()\fR |
| 46 |
and |
| 47 |
\fBsd_journal_has_persistent_files()\fR |
| 48 |
return \-EINVAL if their argument is |
| 49 |
\fBNULL\fR\&. |
| 50 |
.SH "NOTES" |
| 51 |
.PP |
| 52 |
All functions listed here are thread\-agnostic and only a single thread may operate on a given object at any given time\&. Different threads may access the same object at different times\&. Multiple independent objects may be used from different threads in parallel\&. |
| 53 |
.PP |
| 54 |
Functions described here are available as a shared library, which can be compiled against and linked to with the |
| 55 |
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1) |
| 56 |
file\&. |
| 57 |
.SH "HISTORY" |
| 58 |
.PP |
| 59 |
\fBsd_journal_has_runtime_files()\fR |
| 60 |
and |
| 61 |
\fBsd_journal_has_persistent_files()\fR |
| 62 |
were added in version 229\&. |
| 63 |
.SH "SEE ALSO" |
| 64 |
.PP |
| 65 |
\fBsystemd\fR(1), \fBsd-journal\fR(3) |