| 1 |
<?xml version='1.0'?> <!--*-nxml-*--> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
SPDX-License-Identifier: LGPL-2.1-or-later |
| 7 |
--> |
| 8 |
|
| 9 |
<refentry id="sd_journal_has_runtime_files" xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 10 |
|
| 11 |
<refentryinfo> |
| 12 |
<title>sd_journal_has_runtime_files</title> |
| 13 |
<productname>systemd</productname> |
| 14 |
</refentryinfo> |
| 15 |
|
| 16 |
<refmeta> |
| 17 |
<refentrytitle>sd_journal_has_runtime_files</refentrytitle> |
| 18 |
<manvolnum>3</manvolnum> |
| 19 |
</refmeta> |
| 20 |
|
| 21 |
<refnamediv> |
| 22 |
<refname>sd_journal_has_runtime_files</refname> |
| 23 |
<refname>sd_journal_has_persistent_files</refname> |
| 24 |
<refpurpose>Query availability of runtime or persistent journal files</refpurpose> |
| 25 |
</refnamediv> |
| 26 |
|
| 27 |
<refsynopsisdiv> |
| 28 |
<funcsynopsis> |
| 29 |
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo> |
| 30 |
|
| 31 |
<funcprototype> |
| 32 |
<funcdef>int <function>sd_journal_has_runtime_files</function></funcdef> |
| 33 |
<paramdef>sd_journal *<parameter>j</parameter></paramdef> |
| 34 |
</funcprototype> |
| 35 |
|
| 36 |
<funcprototype> |
| 37 |
<funcdef>int <function>sd_journal_has_persistent_files</function></funcdef> |
| 38 |
<paramdef>sd_journal *<parameter>j</parameter></paramdef> |
| 39 |
</funcprototype> |
| 40 |
|
| 41 |
</funcsynopsis> |
| 42 |
</refsynopsisdiv> |
| 43 |
|
| 44 |
<refsect1> |
| 45 |
<title>Description</title> |
| 46 |
|
| 47 |
<para><function>sd_journal_has_runtime_files()</function> returns a positive value |
| 48 |
if runtime journal files (present in /run/systemd/journal/) have been found. |
| 49 |
Otherwise, returns 0.</para> |
| 50 |
|
| 51 |
<para><function>sd_journal_has_persistent_files()</function> returns a positive value |
| 52 |
if persistent journal files (present in /var/log/journal/) have been found. |
| 53 |
Otherwise, returns 0.</para> |
| 54 |
</refsect1> |
| 55 |
|
| 56 |
<refsect1> |
| 57 |
<title>Return value</title> |
| 58 |
<para>Both <function>sd_journal_has_runtime_files()</function> |
| 59 |
and <function>sd_journal_has_persistent_files()</function> return -EINVAL |
| 60 |
if their argument is <constant>NULL</constant>. |
| 61 |
</para> |
| 62 |
</refsect1> |
| 63 |
|
| 64 |
<refsect1> |
| 65 |
<title>Notes</title> |
| 66 |
|
| 67 |
<xi:include href="threads-aware.xml" xpointer="strict"/> |
| 68 |
|
| 69 |
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/> |
| 70 |
</refsect1> |
| 71 |
|
| 72 |
<refsect1> |
| 73 |
<title>History</title> |
| 74 |
<para><function>sd_journal_has_runtime_files()</function> and |
| 75 |
<function>sd_journal_has_persistent_files()</function> were added in version 229.</para> |
| 76 |
</refsect1> |
| 77 |
|
| 78 |
<refsect1> |
| 79 |
<title>See Also</title> |
| 80 |
<para><simplelist type="inline"> |
| 81 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 82 |
<member><citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> |
| 83 |
</simplelist></para> |
| 84 |
</refsect1> |
| 85 |
|
| 86 |
</refentry> |