diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-01-27 18:18:21 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-01-27 18:18:21 +0000 |
commit | fc77c9b7fcaea53db9f012d31e1a806b99a952e8 (patch) | |
tree | cb2717d7723603f5b7b333daae073a3cbde87cad /sys/dev | |
parent | 50b67ddbbbefc58dad57fbfb58fd3bc7e5940775 (diff) |
poll can ever deny reads for srandom only; millert@ ok
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/rnd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c index afdbe8ccbd6..61d64b3a05c 100644 --- a/sys/dev/rnd.c +++ b/sys/dev/rnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rnd.c,v 1.74 2005/01/27 18:12:32 millert Exp $ */ +/* $OpenBSD: rnd.c,v 1.75 2005/01/27 18:18:20 mickey Exp $ */ /* * rnd.c -- A strong random number generator @@ -1045,10 +1045,10 @@ randompoll(dev, events, p) revents = events & (POLLOUT | POLLWRNORM); /* always writable */ if (events & (POLLIN | POLLRDNORM)) { - if (random_state.entropy_count > 0) - revents |= events & (POLLIN | POLLRDNORM); - else + if (minor(dev) == RND_SRND && random_state.entropy_count <= 0) selrecord(p, &rnd_rsel); + else + revents |= events & (POLLIN | POLLRDNORM); } return (revents); |