diff options
author | newton <newton@FreeBSD.org> | 1999-07-30 13:12:26 +0000 |
---|---|---|
committer | newton <newton@FreeBSD.org> | 1999-07-30 13:12:26 +0000 |
commit | 4f2b522ebca04b20e8b43c14661371356803fff4 (patch) | |
tree | 244ce7d0ae8a468896246fe5ed5b007942820064 /sys/svr4/svr4_filio.c | |
parent | eb38eb9c6315c4ef0c2f81df59092c26b1ef3bc4 (diff) | |
download | FreeBSD-src-4f2b522ebca04b20e8b43c14661371356803fff4.zip FreeBSD-src-4f2b522ebca04b20e8b43c14661371356803fff4.tar.gz |
Fix svr4_sys_poll(); SysV STREAMS produce return values from poll() which
BSD sockets don't. Guess at a correct emulation for those values (it seems
to work for telnet, ftp and friends)
Diffstat (limited to 'sys/svr4/svr4_filio.c')
-rw-r--r-- | sys/svr4/svr4_filio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/svr4/svr4_filio.c b/sys/svr4/svr4_filio.c index bc7f970..9dfeced 100644 --- a/sys/svr4/svr4_filio.c +++ b/sys/svr4/svr4_filio.c @@ -82,21 +82,17 @@ svr4_sys_poll(p, uap) error = cerr; goto done; } + DPRINTF(("poll(%x, %x, %d) = %d\n", SCARG(uap, fds), SCARG(uap, nfds), + SCARG(uap, timeout), p->p_retval[0])); for (idx = 0; idx < SCARG(uap, nfds); idx++) { /* POLLWRNORM already equals POLLOUT, so we don't worry about that */ - if (pfd[idx].revents & (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI)) - pfd[idx].revents |= (POLLIN | POLLRDBAND | POLLRDNORM | POLLPRI); if (pfd[idx].revents & (POLLOUT | POLLWRNORM | POLLWRBAND)) pfd[idx].revents |= (POLLOUT | POLLWRNORM | POLLWRBAND); - pfd[idx].revents &= POLLSTANDARD; /* don't want to surprise SysV */ - DPRINTF(("pollfd[%d]->fd = %d\n", idx, pfd[idx].fd)); DPRINTF(("pollfd[%d]->events = %x\n", idx, pfd[idx].events)); DPRINTF(("pollfd[%d]->revents = %x\n", idx, pfd[idx].revents)); } - DPRINTF(("poll(%x, %x, %d) = %d\n", SCARG(uap, fds), SCARG(uap, nfds), - SCARG(uap, timeout), p->p_retval[0])); if ((cerr = copyout(pfd, SCARG(uap, fds), siz)) != 0) { error = cerr; goto done; /* yeah, I know it's the next line, but this way I won't |