man: document the new by-fd journal calls

Also, remove documentation for sd_journal_open_container() as we consider it
deprecated now.
This commit is contained in:
Lennart Poettering 2016-04-25 11:39:38 +02:00
parent 4706fbaa17
commit 2aab2fabbd
2 changed files with 48 additions and 29 deletions

View file

@ -242,6 +242,7 @@ MANPAGES_ALIAS += \
man/SD_JOURNAL_INVALIDATE.3 \ man/SD_JOURNAL_INVALIDATE.3 \
man/SD_JOURNAL_LOCAL_ONLY.3 \ man/SD_JOURNAL_LOCAL_ONLY.3 \
man/SD_JOURNAL_NOP.3 \ man/SD_JOURNAL_NOP.3 \
man/SD_JOURNAL_OS_ROOT.3 \
man/SD_JOURNAL_RUNTIME_ONLY.3 \ man/SD_JOURNAL_RUNTIME_ONLY.3 \
man/SD_JOURNAL_SUPPRESS_LOCATION.3 \ man/SD_JOURNAL_SUPPRESS_LOCATION.3 \
man/SD_JOURNAL_SYSTEM.3 \ man/SD_JOURNAL_SYSTEM.3 \
@ -388,9 +389,10 @@ MANPAGES_ALIAS += \
man/sd_journal_get_timeout.3 \ man/sd_journal_get_timeout.3 \
man/sd_journal_has_persistent_files.3 \ man/sd_journal_has_persistent_files.3 \
man/sd_journal_next_skip.3 \ man/sd_journal_next_skip.3 \
man/sd_journal_open_container.3 \
man/sd_journal_open_directory.3 \ man/sd_journal_open_directory.3 \
man/sd_journal_open_directory_fd.3 \
man/sd_journal_open_files.3 \ man/sd_journal_open_files.3 \
man/sd_journal_open_files_fd.3 \
man/sd_journal_perror.3 \ man/sd_journal_perror.3 \
man/sd_journal_previous.3 \ man/sd_journal_previous.3 \
man/sd_journal_previous_skip.3 \ man/sd_journal_previous_skip.3 \
@ -571,6 +573,7 @@ man/SD_JOURNAL_FOREACH_UNIQUE.3: man/sd_journal_query_unique.3
man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3 man/SD_JOURNAL_INVALIDATE.3: man/sd_journal_get_fd.3
man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3 man/SD_JOURNAL_LOCAL_ONLY.3: man/sd_journal_open.3
man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3 man/SD_JOURNAL_NOP.3: man/sd_journal_get_fd.3
man/SD_JOURNAL_OS_ROOT.3: man/sd_journal_open.3
man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3 man/SD_JOURNAL_RUNTIME_ONLY.3: man/sd_journal_open.3
man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3 man/SD_JOURNAL_SUPPRESS_LOCATION.3: man/sd_journal_print.3
man/SD_JOURNAL_SYSTEM.3: man/sd_journal_open.3 man/SD_JOURNAL_SYSTEM.3: man/sd_journal_open.3
@ -717,9 +720,10 @@ man/sd_journal_get_monotonic_usec.3: man/sd_journal_get_realtime_usec.3
man/sd_journal_get_timeout.3: man/sd_journal_get_fd.3 man/sd_journal_get_timeout.3: man/sd_journal_get_fd.3
man/sd_journal_has_persistent_files.3: man/sd_journal_has_runtime_files.3 man/sd_journal_has_persistent_files.3: man/sd_journal_has_runtime_files.3
man/sd_journal_next_skip.3: man/sd_journal_next.3 man/sd_journal_next_skip.3: man/sd_journal_next.3
man/sd_journal_open_container.3: man/sd_journal_open.3
man/sd_journal_open_directory.3: man/sd_journal_open.3 man/sd_journal_open_directory.3: man/sd_journal_open.3
man/sd_journal_open_directory_fd.3: man/sd_journal_open.3
man/sd_journal_open_files.3: man/sd_journal_open.3 man/sd_journal_open_files.3: man/sd_journal_open.3
man/sd_journal_open_files_fd.3: man/sd_journal_open.3
man/sd_journal_perror.3: man/sd_journal_print.3 man/sd_journal_perror.3: man/sd_journal_print.3
man/sd_journal_previous.3: man/sd_journal_next.3 man/sd_journal_previous.3: man/sd_journal_next.3
man/sd_journal_previous_skip.3: man/sd_journal_next.3 man/sd_journal_previous_skip.3: man/sd_journal_next.3
@ -1034,6 +1038,9 @@ man/SD_JOURNAL_LOCAL_ONLY.html: man/sd_journal_open.html
man/SD_JOURNAL_NOP.html: man/sd_journal_get_fd.html man/SD_JOURNAL_NOP.html: man/sd_journal_get_fd.html
$(html-alias) $(html-alias)
man/SD_JOURNAL_OS_ROOT.html: man/sd_journal_open.html
$(html-alias)
man/SD_JOURNAL_RUNTIME_ONLY.html: man/sd_journal_open.html man/SD_JOURNAL_RUNTIME_ONLY.html: man/sd_journal_open.html
$(html-alias) $(html-alias)
@ -1472,15 +1479,18 @@ man/sd_journal_has_persistent_files.html: man/sd_journal_has_runtime_files.html
man/sd_journal_next_skip.html: man/sd_journal_next.html man/sd_journal_next_skip.html: man/sd_journal_next.html
$(html-alias) $(html-alias)
man/sd_journal_open_container.html: man/sd_journal_open.html
$(html-alias)
man/sd_journal_open_directory.html: man/sd_journal_open.html man/sd_journal_open_directory.html: man/sd_journal_open.html
$(html-alias) $(html-alias)
man/sd_journal_open_directory_fd.html: man/sd_journal_open.html
$(html-alias)
man/sd_journal_open_files.html: man/sd_journal_open.html man/sd_journal_open_files.html: man/sd_journal_open.html
$(html-alias) $(html-alias)
man/sd_journal_open_files_fd.html: man/sd_journal_open.html
$(html-alias)
man/sd_journal_perror.html: man/sd_journal_print.html man/sd_journal_perror.html: man/sd_journal_print.html
$(html-alias) $(html-alias)

View file

@ -45,14 +45,16 @@
<refnamediv> <refnamediv>
<refname>sd_journal_open</refname> <refname>sd_journal_open</refname>
<refname>sd_journal_open_directory</refname> <refname>sd_journal_open_directory</refname>
<refname>sd_journal_open_directory_fd</refname>
<refname>sd_journal_open_files</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_close</refname>
<refname>sd_journal</refname> <refname>sd_journal</refname>
<refname>SD_JOURNAL_LOCAL_ONLY</refname> <refname>SD_JOURNAL_LOCAL_ONLY</refname>
<refname>SD_JOURNAL_RUNTIME_ONLY</refname> <refname>SD_JOURNAL_RUNTIME_ONLY</refname>
<refname>SD_JOURNAL_SYSTEM</refname> <refname>SD_JOURNAL_SYSTEM</refname>
<refname>SD_JOURNAL_CURRENT_USER</refname> <refname>SD_JOURNAL_CURRENT_USER</refname>
<refname>SD_JOURNAL_OS_ROOT</refname>
<refpurpose>Open the system journal for reading</refpurpose> <refpurpose>Open the system journal for reading</refpurpose>
</refnamediv> </refnamediv>
@ -73,6 +75,13 @@
<paramdef>int <parameter>flags</parameter></paramdef> <paramdef>int <parameter>flags</parameter></paramdef>
</funcprototype> </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> <funcprototype>
<funcdef>int <function>sd_journal_open_files</function></funcdef> <funcdef>int <function>sd_journal_open_files</function></funcdef>
<paramdef>sd_journal **<parameter>ret</parameter></paramdef> <paramdef>sd_journal **<parameter>ret</parameter></paramdef>
@ -81,9 +90,10 @@
</funcprototype> </funcprototype>
<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>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> <paramdef>int <parameter>flags</parameter></paramdef>
</funcprototype> </funcprototype>
@ -117,29 +127,28 @@
<constant>SD_JOURNAL_CURRENT_USER</constant> are specified, all <constant>SD_JOURNAL_CURRENT_USER</constant> are specified, all
journal file types will be opened.</para> journal file types will be opened.</para>
<para><function>sd_journal_open_directory()</function> is similar <para><function>sd_journal_open_directory()</function> is similar to <function>sd_journal_open()</function> but
to <function>sd_journal_open()</function> but takes an absolute takes an absolute directory path as argument. All journal files in this directory will be opened and interleaved
directory path as argument. All journal files in this directory automatically. This call also takes a flags argument. The only flags parameter accepted by this call is
will be opened and interleaved automatically. This call also takes <constant>SD_JOURNAL_OS_ROOT</constant>. If specified, the journal files are searched below the usual
a flags argument, but it must be passed as 0 as no flags are <filename>/var/log/journal</filename> and <filename>/run/log/journal</filename> relative to the specified path,
currently understood for this call.</para> instead of directly beneath it.</para>
<para><function>sd_journal_open_files()</function> is similar to <para><function>sd_journal_open_directory_fd()</function> is similar to
<function>sd_journal_open()</function> but takes a <function>sd_journal_open_directory()</function>, but takes a file descriptor referencing a directory in the file
<constant>NULL</constant>-terminated list of file paths to open. system instead of an absolute file system path.</para>
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 <para><function>sd_journal_open_files()</function> is similar to <function>sd_journal_open()</function> but takes a
to <function>sd_journal_open()</function> but opens the journal <constant>NULL</constant>-terminated list of file paths to open. All files will be opened and interleaved
files of a running OS container. The specified machine name refers automatically. This call also takes a flags argument, but it must be passed as 0 as no flags are currently
to a container that is registered with understood for this call. Please note that in the case of a live journal, this function is only useful for
<citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> 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 <para><varname>sd_journal</varname> objects cannot be used in the
child after a fork. Functions which take a journal object as an child after a fork. Functions which take a journal object as an