Propagate error back from iomux_select_update_events
This commit is contained in:
+2
-2
@@ -44,7 +44,7 @@ static int iomux_select_update_events(struct IOMux *mux_, struct IOMuxFD *fd)
|
|||||||
struct IOMuxSelect *mux = mux_->instance;
|
struct IOMuxSelect *mux = mux_->instance;
|
||||||
|
|
||||||
if (fd->fd < 0 || fd->fd >= FD_SETSIZE) {
|
if (fd->fd < 0 || fd->fd >= FD_SETSIZE) {
|
||||||
return EINVAL;
|
return ENFILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd->what & MUX_EV_READ)
|
if (fd->what & MUX_EV_READ)
|
||||||
@@ -70,7 +70,7 @@ static int iomux_select_register_fd(struct IOMux *mux_, struct IOMuxFD *fd)
|
|||||||
|
|
||||||
rc = iomux_select_update_events(mux_, fd);
|
rc = iomux_select_update_events(mux_, fd);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
return ENFILE;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
mux->descriptors[fd->fd] = fd;
|
mux->descriptors[fd->fd] = fd;
|
||||||
|
|||||||
Reference in New Issue
Block a user