]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_journal_has_runtime_files.xml
units: simplify rescue.service and emergency.service (#5623)
[thirdparty/systemd.git] / man / sd_journal_has_runtime_files.xml
CommitLineData
39fd5b08
JS
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 This file is part of systemd.
7
8 Copyright 2016 Jan Synáček
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
24<refentry id="sd_journal_has_runtime_files">
25
26 <refentryinfo>
27 <title>sd_journal_has_runtime_files</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Jan</firstname>
34 <surname>Synáček</surname>
35 <email>jan.synacek@gmail.com</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>sd_journal_has_runtime_files</refentrytitle>
42 <manvolnum>3</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>sd_journal_has_runtime_files</refname>
47 <refname>sd_journal_has_persistent_files</refname>
48 <refpurpose>Query availability of runtime or persistent journal files.</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <funcsynopsis>
53 <funcsynopsisinfo>#include &lt;systemd/sd-journal.h&gt;</funcsynopsisinfo>
54
55 <funcprototype>
56 <funcdef>int <function>sd_journal_has_runtime_files</function></funcdef>
57 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
58 </funcprototype>
59
60 <funcprototype>
61 <funcdef>int <function>sd_journal_has_persistent_files</function></funcdef>
62 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
63 </funcprototype>
64
65 </funcsynopsis>
66 </refsynopsisdiv>
67
68 <refsect1>
69 <title>Description</title>
70
71 <para><function>sd_journal_has_runtime_files()</function> returns a positive value
72 if runtime journal files (present in /run/systemd/journal/) have been found.
73 Otherwise returns 0.</para>
74
75 <para><function>sd_journal_has_persistent_files()</function> returns a positive value
76 if persistent journal files (present in /var/log/journal/) have been found.
77 Otherwise returns 0.</para>
78 </refsect1>
79
80 <refsect1>
81 <title>Return value</title>
82 <para>Both <function>sd_journal_has_runtime_files()</function>
83 and <function>sd_journal_has_persistent_files()</function> return -EINVAL
84 if their argument is NULL.
85 </para>
86 </refsect1>
87
a8d46a16
ZJS
88 <refsect1>
89 <title>Notes</title>
90
91 <para>All functions listed here are thread-agnostic and only a single thread may operate
92 on a given <structname>sd_journal</structname> object.</para>
93
94 <para>Functions listed here are available as a shared library, which can be compiled and linked
95 to with the <constant>libsystemd</constant> <citerefentry
96 project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
97 file.</para>
98 </refsect1>
99
39fd5b08
JS
100 <refsect1>
101 <title>See Also</title>
102 <para>
103 <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>
104 </para>
105 </refsect1>
106
107</refentry>