summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-29 09:26:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-29 09:26:43 +0000
commit8b2a775e3a1b6e926d58b2f6932c3c2ef6bacd90 (patch)
treefbc359c73838af3b52423ad2090aaf54b0336841
parent9df26654368d0ad3ae9ec7f619c92a4506875f07 (diff)
rnd -> random
-rw-r--r--sys/arch/alpha/alpha/conf.c8
-rw-r--r--sys/arch/amiga/amiga/conf.c6
-rw-r--r--sys/arch/arc/arc/conf.c10
-rw-r--r--sys/arch/arm32/arm32/conf.c6
-rw-r--r--sys/arch/atari/atari/conf.c8
-rw-r--r--sys/arch/hp300/hp300/conf.c5
-rw-r--r--sys/arch/i386/i386/conf.c8
-rw-r--r--sys/arch/i386/isa/pccons.c6
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_kbd.c8
-rw-r--r--sys/arch/mac68k/mac68k/conf.c8
-rw-r--r--sys/arch/mvme68k/mvme68k/conf.c8
-rw-r--r--sys/arch/mvme88k/mvme88k/conf.c6
-rw-r--r--sys/arch/pc532/pc532/conf.c8
-rw-r--r--sys/arch/pica/pica/conf.c10
-rw-r--r--sys/arch/pmax/pmax/conf.c8
-rw-r--r--sys/arch/sparc/sparc/conf.c2
-rw-r--r--sys/arch/sun3/sun3/conf.c6
-rw-r--r--sys/arch/vax/vax/conf.c6
-rw-r--r--sys/ddb/db_hangman.c8
-rw-r--r--sys/dev/rnd.c24
-rw-r--r--sys/net/netisr.h6
-rw-r--r--sys/sys/conf.h4
22 files changed, 87 insertions, 82 deletions
diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c
index 8d0ba7798fc..148603e30d6 100644
--- a/sys/arch/alpha/alpha/conf.c
+++ b/sys/arch/alpha/alpha/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.5 1996/07/29 22:57:17 niklas Exp $ */
+/* $OpenBSD: conf.c,v 1.6 1996/08/29 09:25:48 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.11 1996/04/12 02:07:23 cgd Exp $ */
/*-
@@ -141,8 +141,8 @@ cdev_decl(kbd);
cdev_decl(ms);
#include "lpt.h"
cdev_decl(lpt);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
#include "uk.h"
cdev_decl(uk);
@@ -184,7 +184,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_rnd_init(NRND,rnd), /* 33: random data source */
+ cdev_random_init(NRANDOM,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 120cc356a38..e48cdae8f03 100644
--- a/sys/arch/amiga/amiga/conf.c
+++ b/sys/arch/amiga/amiga/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.11 1996/08/19 00:02:29 niklas Exp $ */
+/* $OpenBSD: conf.c,v 1.12 1996/08/29 09:25:51 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.36 1996/05/19 21:04:18 veego Exp $ */
/*-
@@ -110,7 +110,7 @@ dev_decl(filedesc,open);
#endif
#include "com.h"
#include "lpt.h"
-#include "rnd.h"
+#include "random.h"
#include "uk.h"
struct cdevsw cdevsw[] =
@@ -150,7 +150,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_rnd_init(NRND,rnd), /* 35: random data source */
+ cdev_random_init(NRANDOM,random), /* 35: random data source */
cdev_uk_init(NUK,uk), /* 36: unknown SCSI */
cdev_disk_init(NWDC,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 e6e302a2320..8975ce8265f 100644
--- a/sys/arch/arc/arc/conf.c
+++ b/sys/arch/arc/arc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.4 1996/07/16 07:46:12 pefo Exp $ */
+/* $OpenBSD: conf.c,v 1.5 1996/08/29 09:25:54 deraadt 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.4 1996/07/16 07:46:12 pefo Exp $
+ * $Id: conf.c,v 1.5 1996/08/29 09:25:54 deraadt Exp $
*/
#include <sys/param.h>
@@ -140,8 +140,8 @@ cdev_decl(sd);
cdev_decl(pc);
cdev_decl(pms);
cdev_decl(cd);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
#include "uk.h"
cdev_decl(uk);
@@ -188,7 +188,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_rnd_init(NRND,rnd), /* 33: random data source */
+ cdev_random_init(NRANDOM,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 216cea8ecbb..78de3c4307f 100644
--- a/sys/arch/arm32/arm32/conf.c
+++ b/sys/arch/arm32/arm32/conf.c
@@ -245,8 +245,8 @@ cdev_decl(cpu);
cdev_decl(iic);
#include "rtc.h"
cdev_decl(rtc);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
/* Temporary hack for ATAPI CDROM */
cdev_decl(wcd);
@@ -297,7 +297,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_rnd_init(NRND, rnd), /* 44: random data source */
+ cdev_random_init(NRANDOM, 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 617afd69fc1..12fedbe5d74 100644
--- a/sys/arch/atari/atari/conf.c
+++ b/sys/arch/atari/atari/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.6 1996/07/15 14:57:02 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.7 1996/08/29 09:25:59 deraadt Exp $ */
/*
* Copyright (c) 1991 The Regents of the University of California.
@@ -152,8 +152,8 @@ cdev_decl(tun);
#define NLKM 0
#endif
cdev_decl(lkm);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
/* open, close, read, ioctl */
cdev_decl(ipl);
@@ -197,7 +197,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_rnd_init(NRND,rnd), /* 30: random data source */
+ cdev_random_init(NRANDOM,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 0485a2de7a4..bd2bba50329 100644
--- a/sys/arch/hp300/hp300/conf.c
+++ b/sys/arch/hp300/hp300/conf.c
@@ -151,6 +151,8 @@ cdev_decl(tun);
#define NLKM 0
#endif
cdev_decl(lkm);
+#include "random.h"
+cdev_decl(random);
struct cdevsw cdevsw[] =
{
@@ -179,12 +181,13 @@ 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_lkm_dummy(), /* 25 */
+ cdev_random_init(NRANDOM,random), /* 25: random generator */
cdev_lkm_dummy(), /* 26 */
cdev_lkm_dummy(), /* 27 */
cdev_lkm_dummy(), /* 28 */
cdev_lkm_dummy(), /* 29 */
cdev_lkm_dummy(), /* 30 */
+ cdev_lkm_dummy(), /* 31 */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c
index 53d4b57cc9d..5ef2a3dbe7e 100644
--- a/sys/arch/i386/i386/conf.c
+++ b/sys/arch/i386/i386/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.21 1996/08/08 18:47:10 dm Exp $ */
+/* $OpenBSD: conf.c,v 1.22 1996/08/29 09:26:04 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */
/*
@@ -185,8 +185,8 @@ cdev_decl(ccd);
cdev_decl(joy);
#include "apm.h"
cdev_decl(apm);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
#include "pctr.h"
cdev_decl(pctr);
@@ -257,7 +257,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 43 */
#endif
cdev_gen_ipf(NIPF,ipl), /* 44 ip filtering */
- cdev_rnd_init(NRND,rnd), /* 45 random data source */
+ cdev_random_init(NRANDOM,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/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c
index 2e1a377e748..b01bc94d848 100644
--- a/sys/arch/i386/isa/pccons.c
+++ b/sys/arch/i386/isa/pccons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccons.c,v 1.24 1996/08/28 11:21:06 deraadt Exp $ */
+/* $OpenBSD: pccons.c,v 1.25 1996/08/29 09:26:08 deraadt Exp $ */
/* $NetBSD: pccons.c,v 1.99.4.1 1996/06/04 20:03:53 cgd Exp $ */
/*-
@@ -71,8 +71,8 @@
#include <i386/isa/isa_machdep.h>
#include <i386/isa/kbdreg.h>
-#include "rnd.h"
-#if NRND > 0
+#include "random.h"
+#if NRANDOM > 0
#include <dev/rndvar.h>
#endif
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
index 9e2b907293e..9a45e2a421d 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_kbd.c,v 1.7 1996/06/16 13:54:02 deraadt Exp $ */
+/* $OpenBSD: pcvt_kbd.c,v 1.8 1996/08/29 09:26:10 deraadt Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -77,8 +77,8 @@
#if NVT > 0
#include "pcvt_hdr.h" /* global include */
-#include "rnd.h"
-#if NRND
+#include "random.h"
+#if NRANDOM > 0
#include <dev/rndvar.h>
#endif
@@ -1023,7 +1023,7 @@ loop:
PCVT_KBD_DELAY(); /* 7 us delay */
dt = inb(CONTROLLER_DATA); /* yes, get data */
-#if NRND
+#if NRANDOM > 0
add_keyboard_randomness(dt)
#endif
#endif /* !PCVT_KBD_FIFO */
diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c
index 7d561081d59..810e2e0eab0 100644
--- a/sys/arch/mac68k/mac68k/conf.c
+++ b/sys/arch/mac68k/mac68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.9 1996/07/15 14:57:03 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.10 1996/08/29 09:26:14 deraadt Exp $ */
/* $NetBSD: conf.c,v 1.34 1996/06/19 02:20:54 briggs Exp $ */
/*
@@ -134,8 +134,8 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
dev_decl(filedesc,open);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
#ifdef LKM
#define NLKM 1
@@ -189,7 +189,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 30 */
cdev_lkm_dummy(), /* 31 */
cdev_gen_ipf(NIPF,ipl), /* 32: IP filter log */
- cdev_rnd_init(NRND,rnd), /* 33: random data source */
+ cdev_random_init(NRANDOM,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 d4790c56474..03b726ce74b 100644
--- a/sys/arch/mvme68k/mvme68k/conf.c
+++ b/sys/arch/mvme68k/mvme68k/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.8 1996/07/15 14:57:04 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.9 1996/08/29 09:26:16 deraadt Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -187,8 +187,8 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
#ifdef LKM
#define NLKM 1
@@ -248,7 +248,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 37 */
cdev_lkm_dummy(), /* 38 */
cdev_gen_ipf(NIPF,ipl), /* 39: IP filter */
- cdev_rnd_init(NRND,rnd), /* 40: random data source */
+ cdev_random_init(NRANDOM,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 8e747f68072..65b823bfa79 100644
--- a/sys/arch/mvme88k/mvme88k/conf.c
+++ b/sys/arch/mvme88k/mvme88k/conf.c
@@ -167,8 +167,8 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
#ifdef LKM
#define NLKM 1
@@ -231,7 +231,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 36 */
cdev_lkm_dummy(), /* 37 */
cdev_lkm_dummy(), /* 38 */
- cdev_rnd_init(NRND,rnd), /* 39: random data source */
+ cdev_random_init(NRANDOM,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 acc072cb4a4..f43215f5739 100644
--- a/sys/arch/pc532/pc532/conf.c
+++ b/sys/arch/pc532/pc532/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.4 1996/07/15 14:57:05 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.5 1996/08/29 09:26:22 deraadt Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@@ -107,8 +107,8 @@ cdev_decl(bpf);
cdev_decl(tun);
#include "lpt.h"
cdev_decl(lpt);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
/* open, close, read, ioctl */
cdev_decl(ipl);
@@ -140,7 +140,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_rnd_init(NRND,rnd), /* 20: random data source */
+ cdev_random_init(NRANDOM,random), /* 20: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/pica/pica/conf.c b/sys/arch/pica/pica/conf.c
index 654320af5af..caf7c62dcb0 100644
--- a/sys/arch/pica/pica/conf.c
+++ b/sys/arch/pica/pica/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.7 1996/07/15 14:57:06 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.8 1996/08/29 09:26:23 deraadt 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.7 1996/07/15 14:57:06 mickey Exp $
+ * $Id: conf.c,v 1.8 1996/08/29 09:26:23 deraadt Exp $
*/
#include <sys/param.h>
@@ -140,8 +140,8 @@ cdev_decl(sd);
cdev_decl(pc);
cdev_decl(pms);
cdev_decl(cd);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
/* open, close, read, ioctl */
cdev_decl(ipl);
@@ -185,7 +185,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 29: */
cdev_notdef(), /* 30: */
cdev_gen_ipf(NIPF,ipl), /* 31: IP filter log */
- cdev_rnd_init(NRND,rnd), /* 32: random data source */
+ cdev_random_init(NRANDOM,random), /* 32: 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 3ea5da68b71..cbdff3e3a82 100644
--- a/sys/arch/pmax/pmax/conf.c
+++ b/sys/arch/pmax/pmax/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.4 1996/07/15 14:57:06 mickey Exp $ */
+/* $OpenBSD: conf.c,v 1.5 1996/08/29 09:26:25 deraadt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -145,8 +145,8 @@ cdev_decl(cfb);
cdev_decl(xcfb);
#include "mfb.h"
cdev_decl(mfb);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
/* a framebuffer with an attached mouse: */
@@ -260,7 +260,7 @@ struct cdevsw cdevsw[] =
cdev_fbm_init(NFB,fb), /* 86: frame buffer pseudo-device */
cdev_disk_init(NCCD,ccd), /* 87: concatenated disk driver */
cdev_gen_ipf(NIPF,ipl), /* 88: IP filter log */
- cdev_rnd_init(NRND,rnd); /* 89: random data source */
+ cdev_random_init(NRANDOM,random); /* 89: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c
index 17f23d77fda..a7256211434 100644
--- a/sys/arch/sparc/sparc/conf.c
+++ b/sys/arch/sparc/sparc/conf.c
@@ -57,6 +57,7 @@
#include "pty.h"
#include "bpfilter.h"
#include "tun.h"
+#include "random.h"
#include "audio.h"
#include "vnd.h"
#include "ccd.h"
@@ -227,6 +228,7 @@ struct cdevsw cdevsw[] =
cdev_lkm_dummy(), /* 116 */
cdev_lkm_dummy(), /* 117 */
cdev_lkm_dummy(), /* 118 */
+ cdev_random_init(NRANDOM,random),/* 119: random generator */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/sun3/sun3/conf.c b/sys/arch/sun3/sun3/conf.c
index 7d82a3c1e29..7197e571f31 100644
--- a/sys/arch/sun3/sun3/conf.c
+++ b/sys/arch/sun3/sun3/conf.c
@@ -164,8 +164,8 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
dev_decl(filedesc,open);
@@ -244,7 +244,7 @@ struct cdevsw cdevsw[] =
cdev_notdef(), /* 69: /dev/audio */
cdev_notdef(), /* 70: open prom */
cdev_notdef(), /* 71: (sg?) */
- cdev_rnd_init(NRND,rnd), /* 72: random data source */
+ cdev_random_init(NRANDOM,random), /* 72: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c
index 2054aad80d2..2501177ed51 100644
--- a/sys/arch/vax/vax/conf.c
+++ b/sys/arch/vax/vax/conf.c
@@ -318,8 +318,8 @@ cdev_decl(bpf);
#include "tun.h"
cdev_decl(tun);
-#include "rnd.h"
-cdev_decl(rnd);
+#include "random.h"
+cdev_decl(random);
dev_decl(filedesc,open);
@@ -383,7 +383,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_rnd_init(NRND,rnd), /* 58: random data source */
+ cdev_random_init(NRANDOM,random), /* 58: random data source */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
diff --git a/sys/ddb/db_hangman.c b/sys/ddb/db_hangman.c
index 351fff53d43..9736ac192bd 100644
--- a/sys/ddb/db_hangman.c
+++ b/sys/ddb/db_hangman.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_hangman.c,v 1.6 1996/06/17 12:07:00 mickey Exp $ */
+/* $OpenBSD: db_hangman.c,v 1.7 1996/08/29 09:26:34 deraadt Exp $ */
/*
* Copyright (c) 1996 Theo de Raadt, Michael Shalayeff
@@ -37,8 +37,8 @@
#include <ddb/db_sym.h>
#include <ddb/db_extern.h>
#include <dev/cons.h>
-#include "rnd.h"
-#if NRND
+#include "random.h"
+#if NRANDOM > 0
#include <dev/rndvar.h>
#endif
@@ -54,7 +54,7 @@ static __inline size_t
db_random( mod )
register size_t mod;
{
-#if NRND
+#if NRANDOM > 0
size_t ret;
get_random_bytes(&ret, sizeof(ret) );
return ret % mod;
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c
index aab64ab4c60..2d94279e9be 100644
--- a/sys/dev/rnd.c
+++ b/sys/dev/rnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd.c,v 1.6 1996/08/11 07:31:31 dm Exp $ */
+/* $OpenBSD: rnd.c,v 1.7 1996/08/29 09:26:36 deraadt Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff.
@@ -199,8 +199,8 @@
*
*/
-#include "rnd.h"
-#if NRND > 0
+#include "random.h"
+#if NRANDOM > 0
#include <sys/param.h>
#include <sys/types.h>
#include <sys/systm.h>
@@ -275,7 +275,7 @@ struct arc4_stream {
#define ENT_TTY 0x300
/* device functions prototypes: XXX move em to dev_conf.h */
-cdev_decl(rnd);
+cdev_decl(random);
static struct random_bucket random_state;
struct arc4_stream arc4random_state;
@@ -332,14 +332,14 @@ arc4random (void)
}
void
-rndattach(num)
+randomattach(num)
int num;
{
int i;
struct timeval tv;
if (num > 1)
- panic("no more than one rnd device");
+ panic("no more than one random device");
random_state.add_ptr = 0;
random_state.entropy_count = 0;
@@ -359,7 +359,7 @@ rndattach(num)
}
int
-rndopen(dev, flag, mode, p)
+randomopen(dev, flag, mode, p)
dev_t dev;
int flag;
int mode;
@@ -369,7 +369,7 @@ rndopen(dev, flag, mode, p)
}
int
-rndclose(dev, flag, mode, p)
+randomclose(dev, flag, mode, p)
dev_t dev;
int flag;
int mode;
@@ -620,7 +620,7 @@ get_random_bytes(buf, nbytes)
}
int
-rndread(dev, uio, ioflag)
+randomread(dev, uio, ioflag)
dev_t dev;
struct uio *uio;
int ioflag;
@@ -694,7 +694,7 @@ rndread(dev, uio, ioflag)
}
int
-rndselect(dev, rw, p)
+randomselect(dev, rw, p)
dev_t dev;
int rw;
struct proc *p;
@@ -722,7 +722,7 @@ arc4_stir (struct arc4_stream *as)
}
int
-rndwrite(dev, uio, flags)
+randomwrite(dev, uio, flags)
dev_t dev;
struct uio *uio;
int flags;
@@ -757,7 +757,7 @@ rndwrite(dev, uio, flags)
}
int
-rndioctl(dev, cmd, data, flag, p)
+randomioctl(dev, cmd, data, flag, p)
dev_t dev;
u_long cmd;
caddr_t data;
diff --git a/sys/net/netisr.h b/sys/net/netisr.h
index 86c726907a5..0e849bb8142 100644
--- a/sys/net/netisr.h
+++ b/sys/net/netisr.h
@@ -68,12 +68,12 @@
#ifdef _KERNEL
int netisr; /* scheduling bits for network */
-#include "rnd.h"
-#if NRND > 0
+#include "random.h"
+#if NRANDOM > 0
#include <dev/rndvar.h>
#define schednetisr(anisr) \
{ netisr |= 1<<(anisr); add_net_randomness(anisr); setsoftnet(); }
-#else /* no rnd */
+#else
#define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); }
#endif
#endif
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 26bc30c9d77..4c0aaf3aae8 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.h,v 1.12 1996/07/15 10:11:12 mickey Exp $ */
+/* $OpenBSD: conf.h,v 1.13 1996/08/29 09:26:42 deraadt Exp $ */
/* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */
/*-
@@ -326,7 +326,7 @@ extern struct cdevsw cdevsw[];
(dev_type_mmap((*))) enodev }
/* open, close, read, write, ioctl, select */
-#define cdev_rnd_init(c,n) { \
+#define cdev_random_init(c,n) { \
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 }