1 <?xml version='
1.0'
?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
8 Copyright © 2016 Jan Synáček
11 <refentry id=
"sd_journal_has_runtime_files" xmlns:
xi=
"http://www.w3.org/2001/XInclude">
14 <title>sd_journal_has_runtime_files
</title>
15 <productname>systemd
</productname>
19 <refentrytitle>sd_journal_has_runtime_files
</refentrytitle>
20 <manvolnum>3</manvolnum>
24 <refname>sd_journal_has_runtime_files
</refname>
25 <refname>sd_journal_has_persistent_files
</refname>
26 <refpurpose>Query availability of runtime or persistent journal files.
</refpurpose>
31 <funcsynopsisinfo>#include
<systemd/sd-journal.h
></funcsynopsisinfo>
34 <funcdef>int
<function>sd_journal_has_runtime_files
</function></funcdef>
35 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
39 <funcdef>int
<function>sd_journal_has_persistent_files
</function></funcdef>
40 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
47 <title>Description
</title>
49 <para><function>sd_journal_has_runtime_files()
</function> returns a positive value
50 if runtime journal files (present in /run/systemd/journal/) have been found.
51 Otherwise returns
0.
</para>
53 <para><function>sd_journal_has_persistent_files()
</function> returns a positive value
54 if persistent journal files (present in /var/log/journal/) have been found.
55 Otherwise returns
0.
</para>
59 <title>Return value
</title>
60 <para>Both
<function>sd_journal_has_runtime_files()
</function>
61 and
<function>sd_journal_has_persistent_files()
</function> return -EINVAL
62 if their argument is NULL.
69 <xi:include href=
"threads-aware.xml" xpointer=
"strict"/>
71 <xi:include href=
"libsystemd-pkgconfig.xml" xpointer=
"pkgconfig-text"/>
75 <title>See Also
</title>
77 <citerefentry><refentrytitle>sd-journal
</refentrytitle><manvolnum>3</manvolnum></citerefentry>