summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-08 19:45:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-01-08 19:45:10 +0000
commit8ab086c231d218370b1fd6cdace765671f71d625 (patch)
treeb4b6a20f12061d0745138f765677348fe06bf27c /sys/kern
parent02ebbcaee9974aebb49ff948f872850df578ea48 (diff)
split randomattach into random_init() and random_start(), so that we
can make attempts to load 'entropy' into the RC4. ok miod ariane
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index cb964b3a96f..fc78df2c2a3 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.173 2011/01/01 06:54:51 deraadt Exp $ */
+/* $OpenBSD: init_main.c,v 1.174 2011/01/08 19:45:09 deraadt Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -220,6 +220,8 @@ main(void *framep)
KERNEL_LOCK_INIT();
SCHED_LOCK_INIT();
+ random_init();
+
uvm_init();
disk_init(); /* must come before autoconfiguration */
tty_init(); /* initialise tty's */
@@ -345,6 +347,8 @@ main(void *framep)
/* Initialize work queues */
workq_init();
+ random_start();
+
/* Initialize the interface/address trees */
ifinit();
@@ -382,7 +386,6 @@ main(void *framep)
#endif
/* Attach pseudo-devices. */
- randomattach();
for (pdev = pdevinit; pdev->pdev_attach != NULL; pdev++)
if (pdev->pdev_count > 0)
(*pdev->pdev_attach)(pdev->pdev_count);