Check O_NONBLOCK not IO_NDELAY.

Don't include vnode.h
This commit is contained in:
Poul-Henning Kamp 2004-12-22 17:29:37 +00:00
parent fe8fab266b
commit 4c4a94cefe
2 changed files with 1 additions and 3 deletions

View file

@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <sys/selinfo.h>
#include <sys/uio.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <machine/bus.h>
#include <machine/cpu.h>
@ -105,7 +104,7 @@ random_read(struct cdev *dev __unused, struct uio *uio, int flag)
/* Blocking logic */
while (!random_systat.seeded && !error) {
if (flag & IO_NDELAY)
if (flag & O_NONBLOCK)
error = EWOULDBLOCK;
else {
printf("Entropy device is blocking.\n");

View file

@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/uio.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <machine/bus.h>
#include <machine/cpu.h>