From 02b9432e736f3951078f3ad232baa445ca5d30b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 20 Sep 2016 09:03:07 -0400 Subject: reader: add SD_JOURNAL_OS_ROOT and rework flag passing Let's pass any flags through to the journal functions without checking validity. Those functions do their own checking, so there's no need to second-guess. The semantics for _Reader(flags=0) are a bit changed: before, this would be transformed into sd_journal_open(SD_J_LOCAL_ONLY). Now, this results in sd_journal_open(0). Previous behaviour should be achieved by not specifying the flags at all. This change is necessary, because previously it was not possible to pass flags=0 to sd_journal_open(0), i.e. it was not possible to "merge" journals through the Python interface. Similarly, Reader(flags=0) now means to open all journals, and Reader(flags=None) is the same as Reader(flags=LOCAL_ONLY). --- docs/journal.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/journal.rst b/docs/journal.rst index 8e4b5b6..49c07b1 100644 --- a/docs/journal.rst +++ b/docs/journal.rst @@ -89,6 +89,7 @@ Journal access types .. autoattribute:: systemd.journal.RUNTIME_ONLY .. autoattribute:: systemd.journal.SYSTEM .. autoattribute:: systemd.journal.CURRENT_USER +.. autoattribute:: systemd.journal.OS_ROOT Journal event types ~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.1