#include fcntl.h not vnode.h. Check O_NONBLOCK not IO_NDELAY.

This commit is contained in:
Poul-Henning Kamp 2004-12-22 17:29:02 +00:00
parent c04c3e007f
commit fe8fab266b

View File

@ -35,11 +35,11 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
#include <sys/tty.h>
#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/sysctl.h>
#include <sys/vnode.h>
#include <sys/uio.h>
#include <sys/kbio.h>
@ -571,7 +571,7 @@ genkbdread(struct cdev *dev, struct uio *uio, int flag)
return (ENXIO);
}
while (sc->gkb_q.c_cc == 0) {
if (flag & IO_NDELAY) {
if (flag & O_NONBLOCK) {
splx(s);
return (EWOULDBLOCK);
}