]>
Commit | Line | Data |
---|---|---|
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 | |
39fd5b08 JS |
11 | --> |
12 | ||
13 | <refentry id="sd_journal_has_runtime_files"> | |
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 <systemd/sd-journal.h></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 | ||
a8d46a16 ZJS |
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 | <para>Functions listed here are available as a shared library, which can be compiled and linked | |
84 | to with the <constant>libsystemd</constant> <citerefentry | |
85 | project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
86 | file.</para> | |
87 | </refsect1> | |
88 | ||
39fd5b08 JS |
89 | <refsect1> |
90 | <title>See Also</title> | |
91 | <para> | |
92 | <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
93 | </para> | |
94 | </refsect1> | |
95 | ||
96 | </refentry> |