Skip to content

Commit

Permalink
Merge pull request #53 from stfairy/fix-errno
Browse files Browse the repository at this point in the history
lkl tools: hijack lib: fix set errno EOPNOTSUPP
  • Loading branch information
Octavian Purdila committed Feb 1, 2016
2 parents 53d59d6 + 90743ed commit 9c99f5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/lkl/lib/hijack/hijack.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)

/* FIXME: need to handle mixed case of hostfd and lklfd. */
if (lklfds && hostfds)
return lkl_set_errno(LKL_EOPNOTSUPP);
return lkl_set_errno(-LKL_EOPNOTSUPP);


if (hostfds)
Expand Down Expand Up @@ -260,7 +260,7 @@ int select(int nfds, fd_set *r, fd_set *w, fd_set *e, struct timeval *t)

/* FIXME: handle mixed case of hostfd and lklfd */
if (lklfds && hostfds)
return lkl_set_errno(LKL_EOPNOTSUPP);
return lkl_set_errno(-LKL_EOPNOTSUPP);

if (hostfds)
return host_select(nfds, r, w, e, t);
Expand All @@ -276,7 +276,7 @@ int epoll_ctl(int epollfd, int op, int fd, struct epoll_event *event)
CHECK_HOST_CALL(epoll_ctl);

if (is_lklfd(epollfd) != is_lklfd(fd))
return lkl_set_errno(LKL_EOPNOTSUPP);
return lkl_set_errno(-LKL_EOPNOTSUPP);

if (!is_lklfd(epollfd))
return host_epoll_ctl(epollfd, op, fd, event);
Expand Down

0 comments on commit 9c99f5a

Please sign in to comment.