aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/random
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2015-07-14 18:45:15 +0000
committerEd Schouten <ed@FreeBSD.org>2015-07-14 18:45:15 +0000
commit707d98fe2fd59bb3b6e975a0dce2ef297341d0bd (patch)
treee31443362ff95281e596323578398cada5e3d232 /sys/dev/random
parent02d131ad112a092fc106dc55b949683003022fff (diff)
Notes
Diffstat (limited to 'sys/dev/random')
-rw-r--r--sys/dev/random/randomdev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index e27b90957d09..f3339aa40827 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -152,6 +152,13 @@ static struct selinfo rsel;
static int
randomdev_read(struct cdev *dev __unused, struct uio *uio, int flags)
{
+
+ return (read_random_uio(uio, (flags & O_NONBLOCK) != 0));
+}
+
+int
+read_random_uio(struct uio *uio, bool nonblock)
+{
uint8_t *random_buf;
int error;
ssize_t read_len, total_read, c;