summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-10-19 13:26:17 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-10-19 13:26:17 +0000
commit8e6eee9ee84e77057177afaa31ecaf6a93f79f67 (patch)
tree68dd7672992cc88f5f8a0c730cfa3e737f199acb
parentb4e543edbd7e39e612fb304dfe026020ec8c5d55 (diff)
random device is permanent now.
-rw-r--r--sys/arch/alpha/alpha/conf.c7
-rw-r--r--sys/arch/amiga/amiga/conf.c5
-rw-r--r--sys/arch/arc/arc/conf.c9
-rw-r--r--sys/arch/arm32/arm32/conf.c3
-rw-r--r--sys/arch/atari/atari/conf.c5
-rw-r--r--sys/arch/hp300/hp300/conf.c3
-rw-r--r--sys/arch/i386/i386/conf.c5
-rw-r--r--sys/arch/mac68k/mac68k/conf.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/conf.c5
-rw-r--r--sys/arch/mvme88k/mvme88k/conf.c3
-rw-r--r--sys/arch/pc532/pc532/conf.c5
-rw-r--r--sys/arch/pmax/pmax/conf.c2
-rw-r--r--sys/arch/sparc/sparc/conf.c3
-rw-r--r--sys/arch/vax/vax/conf.c3
-rw-r--r--sys/conf/files5
-rw-r--r--sys/conf/files.oldconf4
-rw-r--r--sys/dev/rnd.c14
-rw-r--r--sys/kern/init_main.c3
-rw-r--r--sys/kern/tty.c8
-rw-r--r--sys/kern/vfs_bio.c10
-rw-r--r--sys/net/netisr.h5
-rw-r--r--sys/sys/conf.h3
22 files changed, 40 insertions, 75 deletions
diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c
index 148603e30d6..84ce29f2af1 100644
--- a/sys/arch/alpha/alpha/conf.c
+++ b/sys/arch/alpha/alpha/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.6 1996/08/29 09:25:48 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.7 1996/10/19 13:26:03 mickey Exp $ */
/* $NetBSD: conf.c,v 1.11 1996/04/12 02:07:23 cgd Exp $ */
/*-
@@ -103,6 +103,7 @@ cdev_decl(ctty);
#define mmwrite mmrw
cdev_decl(mm);
cdev_decl(sw);
+cdev_decl(random);
#include "pty.h"
#define ptstty ptytty
#define ptsioctl ptyioctl
@@ -141,8 +142,6 @@ cdev_decl(kbd);
cdev_decl(ms);
#include "lpt.h"
cdev_decl(lpt);
-#include "random.h"
-cdev_decl(random);
#include "uk.h"
cdev_decl(uk);
@@ -184,7 +183,7 @@ struct cdevsw cdevsw[] =
cdev_mouse_init(NWSCONS,ms), /* 30: /dev/mouse XXX */
cdev_lpt_init(NLPT,lpt), /* 31: parallel printer */
cdev_uk_init(NUK,uk), /* 32: unknown SCSI */
- cdev_random_init(NRANDOM,random), /* 33: random data source */
+ cdev_random_init(1,random), /* 33: random data source */
};
int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
diff --git a/sys/arch/amiga/amiga/conf.c b/sys/arch/amiga/amiga/conf.c
index 0d8f9b6e82d..24fcee2a673 100644
--- a/sys/arch/amiga/amiga/conf.c
+++ b/sys/arch/amiga/amiga/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.13 1996/10/05 15:47:50 niklas Exp $ */
+/* $OpenBSD: conf.c,v 1.14 1996/10/19 13:26:03 mickey Exp $ */
/* $NetBSD: conf.c,v 1.36 1996/05/19 21:04:18 veego Exp $ */
/*-
@@ -110,7 +110,6 @@ dev_decl(filedesc,open);
#endif
#include "com.h"
#include "lpt.h"
-#include "random.h"
#include "uk.h"
struct cdevsw cdevsw[] =
@@ -150,7 +149,7 @@ struct cdevsw cdevsw[] =
cdev_tty_init(NCOM,com), /* 32: ISA serial port */
cdev_lpt_init(NLPT,lpt), /* 33: ISA parallel printer */
cdev_gen_ipf(NIPF,ipl), /* 34: IP filter log */
- cdev_random_init(NRANDOM,random), /* 35: random data source */
+ cdev_random_init(1,random), /* 35: random data source */
cdev_uk_init(NUK,uk), /* 36: unknown SCSI */
cdev_disk_init(NWD,wd), /* 37: ST506/ESDI/IDE disk */
cdev_disk_init(NACD,acd), /* 38: ATAPI CD-ROM */
diff --git a/sys/arch/arc/arc/conf.c b/sys/arch/arc/arc/conf.c
index 495348e802a..ee86389526f 100644
--- a/sys/arch/arc/arc/conf.c
+++ b/sys/arch/arc/arc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.6 1996/09/20 23:12:19 niklas Exp $ */
+/* $OpenBSD: conf.c,v 1.7 1996/10/19 13:26:04 mickey Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* from: @(#)conf.c 8.2 (Berkeley) 11/14/93
- * $Id: conf.c,v 1.6 1996/09/20 23:12:19 niklas Exp $
+ * $Id: conf.c,v 1.7 1996/10/19 13:26:04 mickey Exp $
*/
#include <sys/param.h>
@@ -115,6 +115,7 @@ int nblkdev = sizeof (bdevsw) / sizeof (bdevsw[0]);
cdev_decl(cn);
cdev_decl(sw);
cdev_decl(ctty);
+cdev_decl(random);
#define mmread mmrw
#define mmwrite mmrw
dev_type_read(mmrw);
@@ -144,8 +145,6 @@ cdev_decl(sd);
cdev_decl(pc);
cdev_decl(pms);
cdev_decl(cd);
-#include "random.h"
-cdev_decl(random);
#include "uk.h"
cdev_decl(uk);
cdev_decl(wd);
@@ -194,7 +193,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 30: */
cdev_gen_ipf(NIPF,ipl), /* 31: IP filter log */
cdev_uk_init(NUK,uk), /* 32: unknown SCSI */
- cdev_random_init(NRANDOM,random), /* 33: random data source */
+ cdev_random_init(1,random), /* 33: random data source */
};
int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]);
diff --git a/sys/arch/arm32/arm32/conf.c b/sys/arch/arm32/arm32/conf.c
index 78de3c4307f..8a6f8f6ac94 100644
--- a/sys/arch/arm32/arm32/conf.c
+++ b/sys/arch/arm32/arm32/conf.c
@@ -245,7 +245,6 @@ cdev_decl(cpu);
cdev_decl(iic);
#include "rtc.h"
cdev_decl(rtc);
-#include "random.h"
cdev_decl(random);
/* Temporary hack for ATAPI CDROM */
cdev_decl(wcd);
@@ -297,7 +296,7 @@ struct cdevsw cdevsw[] = {
cdev_lkm_dummy(), /* 41: */
cdev_iic_init(NIIC, iic), /* 42: IIC bus driver */
cdev_rtc_init(NRTC, rtc), /* 43: RTC driver */
- cdev_random_init(NRANDOM, random), /* 44: random data source */
+ cdev_random_init(1, random), /* 44: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/atari/atari/conf.c b/sys/arch/atari/atari/conf.c
index 12fedbe5d74..c8a7a09a11a 100644
--- a/sys/arch/atari/atari/conf.c
+++ b/sys/arch/atari/atari/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.7 1996/08/29 09:25:59 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.8 1996/10/19 13:26:06 mickey Exp $ */
/*
* Copyright (c) 1991 The Regents of the University of California.
@@ -152,7 +152,6 @@ cdev_decl(tun);
#define NLKM 0
#endif
cdev_decl(lkm);
-#include "random.h"
cdev_decl(random);
/* open, close, read, ioctl */
@@ -197,7 +196,7 @@ struct cdevsw cdevsw[] =
cdev_disk_init(NCCD,ccd), /* 27: concatenated disk driver */
cdev_bpftun_init(NTUN,tun), /* 28: network tunnel */
cdev_gen_ipf(NIPF,ipl), /* 29: IP filter log */
- cdev_random_init(NRANDOM,random), /* 30: random data source */
+ cdev_random_init(1,random), /* 30: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/hp300/hp300/conf.c b/sys/arch/hp300/hp300/conf.c
index bd2bba50329..20a3251d289 100644
--- a/sys/arch/hp300/hp300/conf.c
+++ b/sys/arch/hp300/hp300/conf.c
@@ -151,7 +151,6 @@ cdev_decl(tun);
#define NLKM 0
#endif
cdev_decl(lkm);
-#include "random.h"
cdev_decl(random);
struct cdevsw cdevsw[] =
@@ -181,7 +180,7 @@ struct cdevsw cdevsw[] =
cdev_bpftun_init(NBPFILTER,bpf),/* 22: Berkeley packet filter */
cdev_bpftun_init(NTUN,tun), /* 23: network tunnel */
cdev_lkm_init(NLKM,lkm), /* 24: loadable module driver */
- cdev_random_init(NRANDOM,random), /* 25: random generator */
+ cdev_random_init(1,random), /* 25: random generator */
cdev_lkm_dummy(), /* 26 */
cdev_lkm_dummy(), /* 27 */
cdev_lkm_dummy(), /* 28 */
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index d9c4a649715..5830b04812b 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.23 1996/09/01 20:55:20 downsj Exp $ */
+/* $OpenBSD: conf.c,v 1.24 1996/10/19 13:26:08 mickey Exp $ */
/* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */
/*
@@ -186,7 +186,6 @@ cdev_decl(ccd);
cdev_decl(joy);
#include "apm.h"
cdev_decl(apm);
-#include "random.h"
cdev_decl(random);
#include "pctr.h"
cdev_decl(pctr);
@@ -258,7 +257,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 43 */
#endif
cdev_gen_ipf(NIPF,ipl), /* 44 ip filtering */
- cdev_random_init(NRANDOM,random), /* 45 random data source */
+ cdev_random_init(1,random), /* 45 random data source */
cdev_uk_init(NPCTR,pctr), /* 46: pentium performance counters */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c
index 810e2e0eab0..6fb81012ddc 100644
--- a/sys/arch/mac68k/mac68k/conf.c
+++ b/sys/arch/mac68k/mac68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.10 1996/08/29 09:26:14 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.11 1996/10/19 13:26:08 mickey Exp $ */
/* $NetBSD: conf.c,v 1.34 1996/06/19 02:20:54 briggs Exp $ */
/*
@@ -134,7 +134,6 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
dev_decl(filedesc,open);
-#include "random.h"
cdev_decl(random);
#ifdef LKM
@@ -189,7 +188,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 30 */
cdev_lkm_dummy(), /* 31 */
cdev_gen_ipf(NIPF,ipl), /* 32: IP filter log */
- cdev_random_init(NRANDOM,random), /* 33: random data source */
+ cdev_random_init(1,random), /* 33: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/mvme68k/mvme68k/conf.c b/sys/arch/mvme68k/mvme68k/conf.c
index 03b726ce74b..18954a24b8d 100644
--- a/sys/arch/mvme68k/mvme68k/conf.c
+++ b/sys/arch/mvme68k/mvme68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.9 1996/08/29 09:26:16 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.10 1996/10/19 13:26:09 mickey Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -187,7 +187,6 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
-#include "random.h"
cdev_decl(random);
#ifdef LKM
@@ -248,7 +247,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 37 */
cdev_lkm_dummy(), /* 38 */
cdev_gen_ipf(NIPF,ipl), /* 39: IP filter */
- cdev_random_init(NRANDOM,random), /* 40: random data source */
+ cdev_random_init(1,random), /* 40: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/mvme88k/mvme88k/conf.c b/sys/arch/mvme88k/mvme88k/conf.c
index 65b823bfa79..d7f4b269e20 100644
--- a/sys/arch/mvme88k/mvme88k/conf.c
+++ b/sys/arch/mvme88k/mvme88k/conf.c
@@ -167,7 +167,6 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
-#include "random.h"
cdev_decl(random);
#ifdef LKM
@@ -231,7 +230,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 36 */
cdev_lkm_dummy(), /* 37 */
cdev_lkm_dummy(), /* 38 */
- cdev_random_init(NRANDOM,random), /* 39: random data source */
+ cdev_random_init(1,random), /* 39: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/pc532/pc532/conf.c b/sys/arch/pc532/pc532/conf.c
index f43215f5739..e6d64dcbf97 100644
--- a/sys/arch/pc532/pc532/conf.c
+++ b/sys/arch/pc532/pc532/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.5 1996/08/29 09:26:22 deraadt Exp $ */
+/* $OpenBSD: conf.c,v 1.6 1996/10/19 13:26:11 mickey Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -107,7 +107,6 @@ cdev_decl(bpf);
cdev_decl(tun);
#include "lpt.h"
cdev_decl(lpt);
-#include "random.h"
cdev_decl(random);
/* open, close, read, ioctl */
@@ -140,7 +139,7 @@ struct cdevsw cdevsw[] =
cdev_lpt_init(NLPT, lpt), /* 17: Centronics */
cdev_disk_init(NCCD,ccd), /* 18: concatenated disk driver */
cdev_gen_ipf(NIPF,ipl), /* 19: IP filter log */
- cdev_random_init(NRANDOM,random), /* 20: random data source */
+ cdev_random_init(1,random), /* 20: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/pmax/pmax/conf.c b/sys/arch/pmax/pmax/conf.c
index 8a0e38e3472..21c9d604ee6 100644
--- a/sys/arch/pmax/pmax/conf.c
+++ b/sys/arch/pmax/pmax/conf.c
@@ -119,6 +119,7 @@ dev_t swapdev = makedev(4, 0);
cdev_decl(cn);
cdev_decl(sw);
+cdev_decl(random);
cdev_decl(ctty);
#define mmread mmrw
#define mmwrite mmrw
@@ -281,6 +282,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 94 */
cdev_lkm_dummy(), /* 95 */
cdev_lkm_dummy(), /* 96 */
+ cdev_random_init(1,random), /* 97 */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c
index a7256211434..228fcd7d05d 100644
--- a/sys/arch/sparc/sparc/conf.c
+++ b/sys/arch/sparc/sparc/conf.c
@@ -57,7 +57,6 @@
#include "pty.h"
#include "bpfilter.h"
#include "tun.h"
-#include "random.h"
#include "audio.h"
#include "vnd.h"
#include "ccd.h"
@@ -228,7 +227,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 116 */
cdev_lkm_dummy(), /* 117 */
cdev_lkm_dummy(), /* 118 */
- cdev_random_init(NRANDOM,random),/* 119: random generator */
+ cdev_random_init(1,random), /* 119: random generator */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c
index 2501177ed51..d78fe74f5a0 100644
--- a/sys/arch/vax/vax/conf.c
+++ b/sys/arch/vax/vax/conf.c
@@ -318,7 +318,6 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
-#include "random.h"
cdev_decl(random);
dev_decl(filedesc,open);
@@ -383,7 +382,7 @@ struct cdevsw cdevsw[] =
cdev_disk_init(NVND,vnd), /* 55: vnode disk driver */
cdev_bpftun_init(NBPFILTER,bpf),/* 56: berkeley packet filter */
cdev_bpftun_init(NTUN,tun), /* 57: tunnel filter */
- cdev_random_init(NRANDOM,random), /* 58: random data source */
+ cdev_random_init(1,random), /* 58: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/conf/files b/sys/conf/files
index 2934f02090b..d42f6c1d4d7 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1,4 +1,4 @@
-# $OpenBSD: files,v 1.40 1996/09/20 06:44:46 deraadt Exp $
+# $OpenBSD: files,v 1.41 1996/10/19 13:26:14 mickey Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -103,7 +103,7 @@ file dev/ic/pdq.c pdq
file dev/ic/pdq_ifsubr.c pdq
file dev/mulaw.c mulaw
file dev/vnd.c vnd needs-flag
-file dev/rnd.c random needs-flag
+file dev/rnd.c
file isofs/cd9660/cd9660_bmap.c cd9660
file isofs/cd9660/cd9660_lookup.c cd9660
file isofs/cd9660/cd9660_node.c cd9660
@@ -187,6 +187,7 @@ file miscfs/fdesc/fdesc_vnops.c fdesc
file miscfs/fifofs/fifo_vnops.c fifo
file miscfs/kernfs/kernfs_vfsops.c kernfs
file miscfs/kernfs/kernfs_vnops.c kernfs
+file miscfs/kernfs/kernfs_subr.c kernfs
file miscfs/nullfs/null_subr.c nullfs
file miscfs/nullfs/null_vfsops.c nullfs
file miscfs/nullfs/null_vnops.c nullfs
diff --git a/sys/conf/files.oldconf b/sys/conf/files.oldconf
index 0b306908a30..12cc43e79c4 100644
--- a/sys/conf/files.oldconf
+++ b/sys/conf/files.oldconf
@@ -1,4 +1,4 @@
-# $OpenBSD: files.oldconf,v 1.14 1996/09/20 06:44:47 deraadt Exp $
+# $OpenBSD: files.oldconf,v 1.15 1996/10/19 13:26:15 mickey Exp $
# $NetBSD: files.oldconf,v 1.67.4.1 1996/05/29 23:14:10 cgd Exp $
#
adosfs/adlookup.c optional adosfs
@@ -295,4 +295,4 @@ vm/vnode_pager.c standard
dev/ccd.c optional ccd needs-count
# XXX !! This should not be necessary!
dev/audio.c optional audio device-driver
-dev/rnd.c optional random device-driver needs-count
+dev/rnd.c standard
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c
index 339386b218a..60e3f938332 100644
--- a/sys/dev/rnd.c
+++ b/sys/dev/rnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd.c,v 1.10 1996/10/18 12:28:21 mickey Exp $ */
+/* $OpenBSD: rnd.c,v 1.11 1996/10/19 13:25:58 mickey Exp $ */
/*
* random.c -- A strong random number generator
@@ -230,8 +230,6 @@
* Eastlake, Steve Crocker, and Jeff Schiller.
*/
-#include "random.h"
-#if NRANDOM > 0
#include <sys/param.h>
#include <sys/types.h>
#include <sys/systm.h>
@@ -330,9 +328,6 @@ static int rnd_sleep = 0;
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
-/* called by main() at boot time */
-void randomattach __P((int num));
-
static inline void add_entropy_word
__P((struct random_bucket *r, const u_int32_t input));
static void add_timer_randomness __P((struct random_bucket *r,
@@ -398,15 +393,11 @@ arc4random (void)
}
void
-randomattach(num)
- int num;
+randomattach(void)
{
int i;
struct timeval tv;
- if (num > 1)
- panic("no more than one random device");
-
random_state.add_ptr = 0;
random_state.entropy_count = 0;
random_state.pool = random_pool;
@@ -872,4 +863,3 @@ randomioctl(dev, cmd, data, flag, p)
}
return ret;
}
-#endif
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 1f0c73c5f91..84ce70dda56 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.18 1996/09/21 11:06:08 deraadt Exp $ */
+/* $OpenBSD: init_main.c,v 1.19 1996/10/19 13:26:00 mickey Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -306,6 +306,7 @@ main(framep)
#endif
/* Attach pseudo-devices. */
+ randomattach();
for (pdev = pdevinit; pdev->pdev_attach != NULL; pdev++)
(*pdev->pdev_attach)(pdev->pdev_count);
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index b573cd6948d..96f3c475b02 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.10 1996/08/29 07:46:35 deraadt Exp $ */
+/* $OpenBSD: tty.c,v 1.11 1996/10/19 13:26:01 mickey Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -62,11 +62,7 @@
#include <sys/namei.h>
#include <vm/vm.h>
-
-#include "random.h"
-#if NRANDOM > 0
#include <dev/rndvar.h>
-#endif
static int ttnread __P((struct tty *));
static void ttyblock __P((struct tty *));
@@ -235,9 +231,7 @@ ttyinput(c, tp)
register u_char *cc;
int i, error;
-#if NRANDOM > 0
add_tty_randomness(tp->t_dev, c);
-#endif
/*
* If input is pending take it first.
*/
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index edd97acee0f..ed178589786 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.11 1996/08/29 07:46:37 deraadt Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.12 1996/10/19 13:26:02 mickey Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*-
@@ -62,11 +62,7 @@
#include <sys/kernel.h>
#include <vm/vm.h>
-
-#include "random.h"
-#if NRANDOM > 0
#include <dev/rndvar.h>
-#endif
/* Macros to clear/set/test flags. */
#define SET(t, f) (t) |= (f)
@@ -964,9 +960,7 @@ biodone(bp)
panic("biodone already");
SET(bp->b_flags, B_DONE); /* note that it's done */
-#if NRANDOM > 0
- add_blkdev_randomness(bp->b_dev);
-#endif
+ add_blkdev_randomness(bp->b_dev); /* grow universe entropy */
if (!ISSET(bp->b_flags, B_READ)) /* wake up reader */
vwakeup(bp);
diff --git a/sys/net/netisr.h b/sys/net/netisr.h
index 0e849bb8142..844391d7805 100644
--- a/sys/net/netisr.h
+++ b/sys/net/netisr.h
@@ -68,13 +68,8 @@
#ifdef _KERNEL
int netisr; /* scheduling bits for network */
-#include "random.h"
-#if NRANDOM > 0
#include <dev/rndvar.h>
#define schednetisr(anisr) \
{ netisr |= 1<<(anisr); add_net_randomness(anisr); setsoftnet(); }
-#else
-#define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); }
-#endif
#endif
#endif
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 757fd42c296..7eb21fe2169 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.15 1996/10/18 12:30:06 mickey Exp $ */
+/* $OpenBSD: conf.h,v 1.16 1996/10/19 13:25:59 mickey Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
@@ -330,6 +330,7 @@ extern struct cdevsw cdevsw[];
dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \
dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \
0, dev_init(c,n,select), (dev_type_mmap((*))) enodev }
+void randomattach __P((void));
/* symbolic sleep message strings */
extern char devopn[], devio[], devwait[], devin[], devout[];