Commit 50c0367d authored by Jan Kiszka's avatar Jan Kiszka
Browse files

cobalt/posix/io: Remove unneeded special case of select_bind_one

Already at the time of introduction (8ac3db81

), -ENOENT was not
returned by any sane function behind rtdm_fd_select(). Today
rtdm_fd_select() officially only returns -EBADF or -EINVAL. By now it
also returns -EADV, via rtdm_fd_get() or a default select handler. The
only remaining possibility for -ENOENT is a select handler. In-tree,
a4l_rt_select actually has such a case, but for no sane reason this or
any out-of-tree driver case should receive special handling here.

Remove this case, these is also no need for the select_bind_one wrapper
anymore.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 05a6afbb
......@@ -180,17 +180,6 @@ int __cobalt_first_fd_valid_p(fd_set *fds[XNSELECT_MAX_TYPES], int nfds)
return 1;
}
static int select_bind_one(struct xnselector *selector, unsigned type, int fd)
{
int rc;
rc = rtdm_fd_select(fd, selector, type);
if (rc != -ENOENT)
return rc;
return -EBADF;
}
int __cobalt_select_bind_all(struct xnselector *selector,
fd_set *fds[XNSELECT_MAX_TYPES], int nfds)
{
......@@ -203,7 +192,7 @@ int __cobalt_select_bind_all(struct xnselector *selector,
for (fd = find_first_bit(set->fds_bits, nfds);
fd < nfds;
fd = find_next_bit(set->fds_bits, nfds, fd + 1)) {
err = select_bind_one(selector, type, fd);
err = rtdm_fd_select(fd, selector, type);
if (err)
return err;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment