summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-04 22:31:05 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-05 14:19:20 -0400
commit0a3463cd5b35b7dce8b68bbc7064f6dd98a57b12 (patch)
tree37be426d465bcb120eddc0304afd19240027f672
parent98f187ea6486ea110bec62212d946325c589f996 (diff)
downloadpython-systemd-0a3463cd5b35b7dce8b68bbc7064f6dd98a57b12.tar.gz
journal: add ability to filter by current user
This is the just the library part. SD_JOURNAL_CURRENT_USER flags is added to sd_j_open(), to open files from current user. SD_JOURNAL_SYSTEM_ONLY is renamed to SD_JOURNAL_SYSTEM, and changed to mean to (also) open system files. This way various flags can be combined, which gives them nicer semantics, especially if other ones are added later. Backwards compatibility is kept, because SD_JOURNAL_SYSTEM_ONLY is equivalent to SD_JOURNAL_SYSTEM if used alone, and before there we no other flags.
-rw-r--r--systemd/_reader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/systemd/_reader.c b/systemd/_reader.c
index c4c4fdf..2c69963 100644
--- a/systemd/_reader.c
+++ b/systemd/_reader.c
@@ -1097,6 +1097,7 @@ init_reader(void)
PyModule_AddIntConstant(m, "INVALIDATE", SD_JOURNAL_INVALIDATE) ||
PyModule_AddIntConstant(m, "LOCAL_ONLY", SD_JOURNAL_LOCAL_ONLY) ||
PyModule_AddIntConstant(m, "RUNTIME_ONLY", SD_JOURNAL_RUNTIME_ONLY) ||
+ PyModule_AddIntConstant(m, "SYSTEM", SD_JOURNAL_SYSTEM) ||
PyModule_AddIntConstant(m, "SYSTEM_ONLY", SD_JOURNAL_SYSTEM_ONLY) ||
PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION)) {
#if PY_MAJOR_VERSION >= 3