summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-03-29 12:05:57 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-03-29 12:05:57 +0000
commit72b333c9f34a2f5219597c851ce3a073d815a7c1 (patch)
tree7b6068286f976d6b4d1adb9711f343f2880b32f4 /sys/kern
parent4c1fa6049e9c868752f93f032b22d56ff9abbbf3 (diff)
Initial commit of random source driver.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_bio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 0667f8ed409..1db9d352799 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -60,6 +60,11 @@
#include <sys/conf.h>
#include <sys/cpu.h>
+#include "rnd.h"
+#if NRND > 0
+#include <dev/rndvar.h>
+#endif
+
/* Macros to clear/set/test flags. */
#define SET(t, f) (t) |= (f)
#define CLR(t, f) (t) &= ~(f)
@@ -790,6 +795,10 @@ biodone(bp)
panic("biodone already");
SET(bp->b_flags, B_DONE); /* note that it's done */
+#if NRND > 0
+ add_blkdev_randomness(bp->b_dev);
+#endif
+
if (!ISSET(bp->b_flags, B_READ)) /* wake up reader */
vwakeup(bp);