]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/sd_journal_open.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[thirdparty/systemd.git] / man / sd_journal_open.xml
index fef453f8dcbf53910c9b766a9152728aaa8f67ba..5e7ae45688e710c82c9a152d34c969c3d7b99c8f 100644 (file)
@@ -3,6 +3,8 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
+  SPDX-License-Identifier: LGPL-2.1+
+
   This file is part of systemd.
 
   Copyright 2012 Lennart Poettering
   <refnamediv>
     <refname>sd_journal_open</refname>
     <refname>sd_journal_open_directory</refname>
+    <refname>sd_journal_open_directory_fd</refname>
     <refname>sd_journal_open_files</refname>
-    <refname>sd_journal_open_container</refname>
+    <refname>sd_journal_open_files_fd</refname>
     <refname>sd_journal_close</refname>
     <refname>sd_journal</refname>
     <refname>SD_JOURNAL_LOCAL_ONLY</refname>
     <refname>SD_JOURNAL_RUNTIME_ONLY</refname>
     <refname>SD_JOURNAL_SYSTEM</refname>
     <refname>SD_JOURNAL_CURRENT_USER</refname>
+    <refname>SD_JOURNAL_OS_ROOT</refname>
     <refpurpose>Open the system journal for reading</refpurpose>
   </refnamediv>
 
         <paramdef>int <parameter>flags</parameter></paramdef>
       </funcprototype>
 
+      <funcprototype>
+        <funcdef>int <function>sd_journal_open_directory_fd</function></funcdef>
+        <paramdef>sd_journal **<parameter>ret</parameter></paramdef>
+        <paramdef>int <parameter>fd</parameter></paramdef>
+        <paramdef>int <parameter>flags</parameter></paramdef>
+      </funcprototype>
+
       <funcprototype>
         <funcdef>int <function>sd_journal_open_files</function></funcdef>
         <paramdef>sd_journal **<parameter>ret</parameter></paramdef>
       </funcprototype>
 
       <funcprototype>
-        <funcdef>int <function>sd_journal_open_container</function></funcdef>
+        <funcdef>int <function>sd_journal_open_files_fd</function></funcdef>
         <paramdef>sd_journal **<parameter>ret</parameter></paramdef>
-        <paramdef>const char *<parameter>machine</parameter></paramdef>
+        <paramdef>int <parameter>fds[]</parameter></paramdef>
+        <paramdef>unsigned <parameter>n_fds</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
       </funcprototype>
 
     <constant>SD_JOURNAL_CURRENT_USER</constant> are specified, all
     journal file types will be opened.</para>
 
-    <para><function>sd_journal_open_directory()</function> is similar
-    to <function>sd_journal_open()</function> but takes an absolute
-    directory path as argument. All journal files in this directory
-    will be opened and interleaved automatically. This call also takes
-    a flags argument, but it must be passed as 0 as no flags are
-    currently understood for this call.</para>
-
-    <para><function>sd_journal_open_files()</function> is similar to
-    <function>sd_journal_open()</function> but takes a
-    <constant>NULL</constant>-terminated list of file paths to open.
-    All files will be opened and interleaved automatically. This call
-    also takes a flags argument, but it must be passed as 0 as no
-    flags are currently understood for this call. Please note that in
-    the case of a live journal, this function is only useful for
-    debugging, because individual journal files can be rotated at any
-    moment, and the opening of specific files is inherently
-    racy.</para>
-
-    <para><function>sd_journal_open_container()</function> is similar
-    to <function>sd_journal_open()</function> but opens the journal
-    files of a running OS container. The specified machine name refers
-    to a container that is registered with
-    <citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+    <para><function>sd_journal_open_directory()</function> is similar to <function>sd_journal_open()</function> but
+    takes an absolute directory path as argument. All journal files in this directory will be opened and interleaved
+    automatically. This call also takes a flags argument. The flags parameters accepted by this call are
+    <constant>SD_JOURNAL_OS_ROOT</constant>, <constant>SD_JOURNAL_SYSTEM</constant>, and
+    <constant>SD_JOURNAL_CURRENT_USER</constant>. If <constant>SD_JOURNAL_OS_ROOT</constant> is specified, journal
+    files are searched for below the usual <filename>/var/log/journal</filename> and
+    <filename>/run/log/journal</filename> relative to the specified path, instead of directly beneath it.
+    The other two flags limit which files are opened, the same as for <function>sd_journal_open()</function>.
+    </para>
+
+    <para><function>sd_journal_open_directory_fd()</function> is similar to
+    <function>sd_journal_open_directory()</function>, but takes a file descriptor referencing a directory in the file
+    system instead of an absolute file system path.</para>
+
+    <para><function>sd_journal_open_files()</function> is similar to <function>sd_journal_open()</function> but takes a
+    <constant>NULL</constant>-terminated list of file paths to open.  All files will be opened and interleaved
+    automatically. This call also takes a flags argument, but it must be passed as 0 as no flags are currently
+    understood for this call. Please note that in the case of a live journal, this function is only useful for
+    debugging, because individual journal files can be rotated at any moment, and the opening of specific files is
+    inherently racy.</para>
+
+    <para><function>sd_journal_open_files_fd()</function> is similar to <function>sd_journal_open_files()</function>
+    but takes an array of open file descriptors that must reference journal files, instead of an array of file system
+    paths. Pass the array of file descriptors as second argument, and the number of array entries in the third. The
+    flags parameter must be passed as 0.</para>
 
     <para><varname>sd_journal</varname> objects cannot be used in the
     child after a fork. Functions which take a journal object as an
   <refsect1>
     <title>Notes</title>
 
+    <para>All functions listed here are thread-agnostic and only a single thread may operate
+    on a given <structname>sd_journal</structname> object.</para>
+
     <para>The <function>sd_journal_open()</function>,
     <function>sd_journal_open_directory()</function> and
     <function>sd_journal_close()</function> interfaces are available
     file.</para>
   </refsect1>
 
-  <refsect1>
-    <title>History</title>
-
-    <para><function>sd_journal_open()</function>,
-    <function>sd_journal_close()</function>,
-    <constant>SD_JOURNAL_LOCAL_ONLY</constant>,
-    <constant>SD_JOURNAL_RUNTIME_ONLY</constant>,
-    <constant>SD_JOURNAL_SYSTEM_ONLY</constant> were added in
-    systemd-38.</para>
-
-    <para><function>sd_journal_open_directory()</function> was added
-    in systemd-187.</para>
-
-    <para><constant>SD_JOURNAL_SYSTEM</constant>,
-    <constant>SD_JOURNAL_CURRENT_USER</constant>, and
-    <function>sd_journal_open_files()</function> were added in
-    systemd-205. <constant>SD_JOURNAL_SYSTEM_ONLY</constant> was
-    deprecated.</para>
-  </refsect1>
-
   <refsect1>
     <title>See Also</title>