1:255.13-alt1
[systemd_ALT.git] / man / sd_journal_has_runtime_files.xml
blob90110bebcf6f2486cd69910c0d89b145427e3ff6
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">
5 <!--
6   SPDX-License-Identifier: LGPL-2.1-or-later
7 -->
9 <refentry id="sd_journal_has_runtime_files" xmlns:xi="http://www.w3.org/2001/XInclude">
11   <refentryinfo>
12     <title>sd_journal_has_runtime_files</title>
13     <productname>systemd</productname>
14   </refentryinfo>
16   <refmeta>
17     <refentrytitle>sd_journal_has_runtime_files</refentrytitle>
18     <manvolnum>3</manvolnum>
19   </refmeta>
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>
27   <refsynopsisdiv>
28     <funcsynopsis>
29       <funcsynopsisinfo>#include &lt;systemd/sd-journal.h&gt;</funcsynopsisinfo>
31       <funcprototype>
32         <funcdef>int <function>sd_journal_has_runtime_files</function></funcdef>
33         <paramdef>sd_journal *<parameter>j</parameter></paramdef>
34       </funcprototype>
36       <funcprototype>
37         <funcdef>int <function>sd_journal_has_persistent_files</function></funcdef>
38         <paramdef>sd_journal *<parameter>j</parameter></paramdef>
39       </funcprototype>
41     </funcsynopsis>
42   </refsynopsisdiv>
44   <refsect1>
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>
54   </refsect1>
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>
64   <refsect1>
65     <title>Notes</title>
67     <xi:include href="threads-aware.xml" xpointer="strict"/>
69     <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
70   </refsect1>
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>
78   <refsect1>
79     <title>See Also</title>
80     <para>
81       <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>
82     </para>
83   </refsect1>
85 </refentry>