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