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">
6 SPDX-License-Identifier: LGPL-2.1+
8 This file is part of systemd.
10 Copyright 2016 Jan Synáček
13 <refentry id=
"sd_journal_has_runtime_files" xmlns:
xi=
"http://www.w3.org/2001/XInclude">
16 <title>sd_journal_has_runtime_files
</title>
17 <productname>systemd
</productname>
21 <contrib>Developer
</contrib>
22 <firstname>Jan
</firstname>
23 <surname>Synáček
</surname>
24 <email>jan.synacek@gmail.com
</email>
30 <refentrytitle>sd_journal_has_runtime_files
</refentrytitle>
31 <manvolnum>3</manvolnum>
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>
42 <funcsynopsisinfo>#include
<systemd/sd-journal.h
></funcsynopsisinfo>
45 <funcdef>int
<function>sd_journal_has_runtime_files
</function></funcdef>
46 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
50 <funcdef>int
<function>sd_journal_has_persistent_files
</function></funcdef>
51 <paramdef>sd_journal *
<parameter>j
</parameter></paramdef>
58 <title>Description
</title>
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>
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>
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.
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>
83 <xi:include href=
"libsystemd-pkgconfig.xml" xpointer=
"pkgconfig-text"/>
87 <title>See Also
</title>
89 <citerefentry><refentrytitle>sd-journal
</refentrytitle><manvolnum>3</manvolnum></citerefentry>