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.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
9 <refentry id=
"sd_journal_has_runtime_files" xmlns:
xi=
"http://www.w3.org/2001/XInclude">
12 <title>sd_journal_has_runtime_files
</title>
13 <productname>systemd
</productname>
17 <refentrytitle>sd_journal_has_runtime_files
</refentrytitle>
18 <manvolnum>3</manvolnum>
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>
29 <funcsynopsisinfo>#include
<systemd/sd-journal.h
></funcsynopsisinfo>
32 <funcdef>int
<function>sd_journal_has_runtime_files
</function></funcdef>
33 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
37 <funcdef>int
<function>sd_journal_has_persistent_files
</function></funcdef>
38 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
45 <title>Description
</title>
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>
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>
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 NULL.
67 <xi:include href=
"threads-aware.xml" xpointer=
"strict"/>
69 <xi:include href=
"libsystemd-pkgconfig.xml" xpointer=
"pkgconfig-text"/>
73 <title>See Also
</title>
75 <citerefentry><refentrytitle>sd-journal
</refentrytitle><manvolnum>3</manvolnum></citerefentry>