diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-29 06:45:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-29 06:45:59 +0100 |
commit | f94ea366d38fed424200b748cb042ca44f8c8d50 (patch) | |
tree | 6fdd0032d6a667c967e6c82530e5dd83bdd2e18d /logger.c | |
parent | ef734fd6c2ec4e5602bbfe2a0d26dcf39c14d2bf (diff) |
monitor udev for device changes
Diffstat (limited to 'logger.c')
-rw-r--r-- | logger.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -319,7 +319,7 @@ static int stream_new(Server *s, int server_fd) { zero(ev); ev.data.ptr = stream; - ev.events = POLLIN; + ev.events = EPOLLIN; if (epoll_ctl(s->epoll_fd, EPOLL_CTL_ADD, fd, &ev) < 0) { r = -errno; goto fail; @@ -429,7 +429,7 @@ static int server_init(Server *s, unsigned n_sockets) { struct epoll_event ev; zero(ev); - ev.events = POLLIN; + ev.events = EPOLLIN; ev.data.ptr = UINT_TO_PTR(SERVER_FD_START+i); if (epoll_ctl(s->epoll_fd, EPOLL_CTL_ADD, SERVER_FD_START+i, &ev) < 0) { r = -errno; @@ -479,7 +479,7 @@ static int process_event(Server *s, struct epoll_event *ev) { if (PTR_TO_UINT(ev->data.ptr) >= SERVER_FD_START && PTR_TO_UINT(ev->data.ptr) < SERVER_FD_START+s->n_server_fd) { - if (ev->events != POLLIN) { + if (ev->events != EPOLLIN) { log_info("Got invalid event from epoll. (1)"); return -EIO; } @@ -495,7 +495,7 @@ static int process_event(Server *s, struct epoll_event *ev) { timestamp = now(CLOCK_REALTIME); - if (!(ev->events & POLLIN)) { + if (!(ev->events & EPOLLIN)) { log_info("Got invalid event from epoll. (3)"); stream_free(stream); return 0; |