]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_journal_has_runtime_files.xml
core: use the correct APIs to determine whether a dual timestamp is initialized
[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
88 <refsect1>
89 <title>See Also</title>
90 <para>
91 <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>
92 </para>
93 </refsect1>
94
95</refentry>