sd-event: don't consider no pending IO event a programming error in sd_event_source_get_io_revents()
This commit is contained in:
committed by
Yu Watanabe
parent
a7d58b7d3d
commit
b49ba39071
@@ -2725,9 +2725,11 @@ _public_ int sd_event_source_get_io_revents(sd_event_source *s, uint32_t *ret) {
|
||||
assert_return(s, -EINVAL);
|
||||
assert_return(ret, -EINVAL);
|
||||
assert_return(s->type == SOURCE_IO, -EDOM);
|
||||
assert_return(s->pending, -ENODATA);
|
||||
assert_return(!event_origin_changed(s->event), -ECHILD);
|
||||
|
||||
if (!s->pending)
|
||||
return -ENODATA;
|
||||
|
||||
*ret = s->io.revents;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user