diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-04 17:38:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-04 17:38:08 +0200 |
commit | dace83cbd0c2212fc0e25d36d50711b19f14b1b6 (patch) | |
tree | c505fcc4425837fb098b1562753d469955a220be /src/login/sd-login.c | |
parent | ee531d949c2f62374fc109252f8cbe61c2b8ee39 (diff) |
login: add new public API call sd_login_monitor_get_events() to get poll() flags to wait for
We should keep our options open, so that we can watch for POLLOUT later
on if we wish to. CUrrently this call will always return POLLIN however.
Diffstat (limited to 'src/login/sd-login.c')
-rw-r--r-- | src/login/sd-login.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/login/sd-login.c b/src/login/sd-login.c index 8867e8c8eb..861a57166d 100644 --- a/src/login/sd-login.c +++ b/src/login/sd-login.c @@ -23,6 +23,7 @@ #include <string.h> #include <errno.h> #include <sys/inotify.h> +#include <sys/poll.h> #include "util.h" #include "cgroup-util.h" @@ -797,3 +798,11 @@ _public_ int sd_login_monitor_get_fd(sd_login_monitor *m) { return MONITOR_TO_FD(m); } + +_public_ int sd_login_monitor_get_events(sd_login_monitor *m) { + + if (!m) + return -EINVAL; + + return POLLIN; +} |