eloop: allow reporting error conditions

Add KMSCON_ERR, the equivalent of EPOLLERR.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
Ran Benita 2012-01-09 00:47:25 +02:00 committed by David Herrmann
parent 0d0cac0ad1
commit e823d283c5
2 changed files with 3 additions and 0 deletions

View File

@ -566,6 +566,8 @@ int kmscon_eloop_dispatch(struct kmscon_eloop *loop, int timeout)
mask |= KMSCON_WRITEABLE;
if (ep[i].events & EPOLLHUP)
mask |= KMSCON_HUP;
if (ep[i].events & EPOLLERR)
mask |= KMSCON_ERR;
fd->cb(fd, mask, fd->data);
}

View File

@ -50,6 +50,7 @@ enum kmscon_eloop_flags {
KMSCON_READABLE = 0x01,
KMSCON_WRITEABLE = 0x02,
KMSCON_HUP = 0x04,
KMSCON_ERR = 0x08,
};
int kmscon_eloop_new(struct kmscon_eloop **out);