]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd_journal_has_runtime_files.xml
man: xinclude the generic text to talk about libsystemd pkgconfig
[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 This file is part of systemd.
9
10 Copyright 2016 Jan Synáček
11 -->
12
13 <refentry id="sd_journal_has_runtime_files" xmlns:xi="http://www.w3.org/2001/XInclude">
14
15 <refentryinfo>
16 <title>sd_journal_has_runtime_files</title>
17 <productname>systemd</productname>
18
19 <authorgroup>
20 <author>
21 <contrib>Developer</contrib>
22 <firstname>Jan</firstname>
23 <surname>Synáček</surname>
24 <email>jan.synacek@gmail.com</email>
25 </author>
26 </authorgroup>
27 </refentryinfo>
28
29 <refmeta>
30 <refentrytitle>sd_journal_has_runtime_files</refentrytitle>
31 <manvolnum>3</manvolnum>
32 </refmeta>
33
34 <refnamediv>
35 <refname>sd_journal_has_runtime_files</refname>
36 <refname>sd_journal_has_persistent_files</refname>
37 <refpurpose>Query availability of runtime or persistent journal files.</refpurpose>
38 </refnamediv>
39
40 <refsynopsisdiv>
41 <funcsynopsis>
42 <funcsynopsisinfo>#include &lt;systemd/sd-journal.h&gt;</funcsynopsisinfo>
43
44 <funcprototype>
45 <funcdef>int <function>sd_journal_has_runtime_files</function></funcdef>
46 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
47 </funcprototype>
48
49 <funcprototype>
50 <funcdef>int <function>sd_journal_has_persistent_files</function></funcdef>
51 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
52 </funcprototype>
53
54 </funcsynopsis>
55 </refsynopsisdiv>
56
57 <refsect1>
58 <title>Description</title>
59
60 <para><function>sd_journal_has_runtime_files()</function> returns a positive value
61 if runtime journal files (present in /run/systemd/journal/) have been found.
62 Otherwise returns 0.</para>
63
64 <para><function>sd_journal_has_persistent_files()</function> returns a positive value
65 if persistent journal files (present in /var/log/journal/) have been found.
66 Otherwise returns 0.</para>
67 </refsect1>
68
69 <refsect1>
70 <title>Return value</title>
71 <para>Both <function>sd_journal_has_runtime_files()</function>
72 and <function>sd_journal_has_persistent_files()</function> return -EINVAL
73 if their argument is NULL.
74 </para>
75 </refsect1>
76
77 <refsect1>
78 <title>Notes</title>
79
80 <para>All functions listed here are thread-agnostic and only a single thread may operate
81 on a given <structname>sd_journal</structname> object.</para>
82
83 <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
84 </refsect1>
85
86 <refsect1>
87 <title>See Also</title>
88 <para>
89 <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>
90 </para>
91 </refsect1>
92
93 </refentry>