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 <contrib>Developer
</contrib>
20 <firstname>Jan
</firstname>
21 <surname>Synáček
</surname>
22 <email>jan.synacek@gmail.com
</email>
28 <refentrytitle>sd_journal_has_runtime_files
</refentrytitle>
29 <manvolnum>3</manvolnum>
33 <refname>sd_journal_has_runtime_files
</refname>
34 <refname>sd_journal_has_persistent_files
</refname>
35 <refpurpose>Query availability of runtime or persistent journal files.
</refpurpose>
40 <funcsynopsisinfo>#include
<systemd/sd-journal.h
></funcsynopsisinfo>
43 <funcdef>int
<function>sd_journal_has_runtime_files
</function></funcdef>
44 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
48 <funcdef>int
<function>sd_journal_has_persistent_files
</function></funcdef>
49 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
56 <title>Description
</title>
58 <para><function>sd_journal_has_runtime_files()
</function> returns a positive value
59 if runtime journal files (present in /run/systemd/journal/) have been found.
60 Otherwise returns
0.
</para>
62 <para><function>sd_journal_has_persistent_files()
</function> returns a positive value
63 if persistent journal files (present in /var/log/journal/) have been found.
64 Otherwise returns
0.
</para>
68 <title>Return value
</title>
69 <para>Both
<function>sd_journal_has_runtime_files()
</function>
70 and
<function>sd_journal_has_persistent_files()
</function> return -EINVAL
71 if their argument is NULL.
78 <para>All functions listed here are thread-agnostic and only a single thread may operate
79 on a given
<structname>sd_journal
</structname> object.
</para>
81 <xi:include href=
"libsystemd-pkgconfig.xml" xpointer=
"pkgconfig-text"/>
85 <title>See Also
</title>
87 <citerefentry><refentrytitle>sd-journal
</refentrytitle><manvolnum>3</manvolnum></citerefentry>