]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/systemd/sd-journal.h
sd-journal: add logic to open journal files of a specific OS tree
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Apr 2016 09:16:08 +0000 (11:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Apr 2016 13:24:46 +0000 (15:24 +0200)
commitd077390cdf13fc74c0f42dae959e1b5751c3b6a3
tree3bc29844c4de38348bd1c04b84cb7008e42d3f8a
parentae20320785da548130929ad2af758be4803931a7
sd-journal: add logic to open journal files of a specific OS tree

With this change a new flag SD_JOURNAL_OS_ROOT is introduced. If specified
while opening the journal with the per-directory calls (specifically:
sd_journal_open_directory() and sd_journal_open_directory_fd()) the passed
directory is assumed to be the root directory of an OS tree, and the journal
files are searched for in /var/log/journal, /run/log/journal relative to it.

This is useful to allow usage of sd-journal on file descriptors returned by the
OpenRootDirectory() call of machined.
src/journal/sd-journal.c
src/systemd/sd-journal.h