From 2aab2fabbd1072f5cd1871e0046f49d13d4a4293 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 25 Apr 2016 11:39:38 +0200 Subject: man: document the new by-fd journal calls Also, remove documentation for sd_journal_open_container() as we consider it deprecated now. --- man/sd_journal_open.xml | 61 ++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 26 deletions(-) (limited to 'man/sd_journal_open.xml') diff --git a/man/sd_journal_open.xml b/man/sd_journal_open.xml index 6c362c2f91..153af2387f 100644 --- a/man/sd_journal_open.xml +++ b/man/sd_journal_open.xml @@ -45,14 +45,16 @@ sd_journal_open sd_journal_open_directory + sd_journal_open_directory_fd sd_journal_open_files - sd_journal_open_container + sd_journal_open_files_fd sd_journal_close sd_journal SD_JOURNAL_LOCAL_ONLY SD_JOURNAL_RUNTIME_ONLY SD_JOURNAL_SYSTEM SD_JOURNAL_CURRENT_USER + SD_JOURNAL_OS_ROOT Open the system journal for reading @@ -73,6 +75,13 @@ int flags + + int sd_journal_open_directory_fd + sd_journal **ret + int fd + int flags + + int sd_journal_open_files sd_journal **ret @@ -81,9 +90,10 @@ - int sd_journal_open_container + int sd_journal_open_files_fd sd_journal **ret - const char *machine + int fds[] + unsigned n_fds int flags @@ -117,29 +127,28 @@ SD_JOURNAL_CURRENT_USER are specified, all journal file types will be opened. - sd_journal_open_directory() is similar - to sd_journal_open() 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. - - sd_journal_open_files() is similar to - sd_journal_open() but takes a - NULL-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. - - sd_journal_open_container() is similar - to sd_journal_open() but opens the journal - files of a running OS container. The specified machine name refers - to a container that is registered with - systemd-machined8. + sd_journal_open_directory() is similar to sd_journal_open() 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 only flags parameter accepted by this call is + SD_JOURNAL_OS_ROOT. If specified, the journal files are searched below the usual + /var/log/journal and /run/log/journal relative to the specified path, + instead of directly beneath it. + + sd_journal_open_directory_fd() is similar to + sd_journal_open_directory(), but takes a file descriptor referencing a directory in the file + system instead of an absolute file system path. + + sd_journal_open_files() is similar to sd_journal_open() but takes a + NULL-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. + + sd_journal_open_files_fd() is similar to sd_journal_open_files() + 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. sd_journal objects cannot be used in the child after a fork. Functions which take a journal object as an -- cgit v1.2.3-54-g00ecf