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:
parent
0d0cac0ad1
commit
e823d283c5
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user