]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd_journal_has_runtime_files.xml
5abad317aaa1d78dada6a899bd9267b87e84eb54
[thirdparty/systemd.git] / man / sd_journal_has_runtime_files.xml
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">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7
8 Copyright 2016 Jan Synáček
9 -->
10
11 <refentry id="sd_journal_has_runtime_files" xmlns:xi="http://www.w3.org/2001/XInclude">
12
13 <refentryinfo>
14 <title>sd_journal_has_runtime_files</title>
15 <productname>systemd</productname>
16
17 <authorgroup>
18 <author>
19 <contrib>Developer</contrib>
20 <firstname>Jan</firstname>
21 <surname>Synáček</surname>
22 <email>jan.synacek@gmail.com</email>
23 </author>
24 </authorgroup>
25 </refentryinfo>
26
27 <refmeta>
28 <refentrytitle>sd_journal_has_runtime_files</refentrytitle>
29 <manvolnum>3</manvolnum>
30 </refmeta>
31
32 <refnamediv>
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>
36 </refnamediv>
37
38 <refsynopsisdiv>
39 <funcsynopsis>
40 <funcsynopsisinfo>#include &lt;systemd/sd-journal.h&gt;</funcsynopsisinfo>
41
42 <funcprototype>
43 <funcdef>int <function>sd_journal_has_runtime_files</function></funcdef>
44 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
45 </funcprototype>
46
47 <funcprototype>
48 <funcdef>int <function>sd_journal_has_persistent_files</function></funcdef>
49 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
50 </funcprototype>
51
52 </funcsynopsis>
53 </refsynopsisdiv>
54
55 <refsect1>
56 <title>Description</title>
57
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>
61
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>
65 </refsect1>
66
67 <refsect1>
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.
72 </para>
73 </refsect1>
74
75 <refsect1>
76 <title>Notes</title>
77
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>
80
81 <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
82 </refsect1>
83
84 <refsect1>
85 <title>See Also</title>
86 <para>
87 <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>
88 </para>
89 </refsect1>
90
91 </refentry>