summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index bb99671934..3eba4cd0d1 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1981,6 +1981,19 @@ _public_ int sd_journal_get_fd(sd_journal *j) {
return j->inotify_fd;
}
+_public_ int sd_journal_get_events(sd_journal *j) {
+ int fd;
+
+ if (!j)
+ return -EINVAL;
+
+ fd = sd_journal_get_fd(j);
+ if (fd < 0)
+ return fd;
+
+ return POLLIN;
+}
+
static void process_inotify_event(sd_journal *j, struct inotify_event *e) {
Directory *d;
int r;