diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 4621100dbb0a..4d238a05f692 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.146 1995/10/31 19:07:53 peter Exp $ + * $Id: machdep.c,v 1.147 1995/11/02 09:52:40 peter Exp $ */ #include "npx.h" @@ -1377,9 +1377,7 @@ init386(first) #if NISA >0 isa_defaultirq(); #endif -#ifdef DEVRANDOM rand_initialize(); -#endif r_gdt.rd_limit = sizeof(gdt) - 1; r_gdt.rd_base = (int) gdt; diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 788d83e773a1..54db6cdd60f5 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.17 1995/10/30 22:39:34 markm Exp $ + * $Id: mem.c,v 1.18 1995/11/04 13:52:30 bde Exp $ */ /* @@ -79,10 +79,8 @@ memdev_init(dummy) x=dev_add("/misc", "mem", mmopen, 0, DV_CHR, 0, 2, 0640); x=dev_add("/misc", "kmem", mmopen, 1, DV_CHR, 0, 2, 0640); x=dev_add("/misc", "null", mmopen, 2, DV_CHR, 0, 0, 0666); -#ifdef DEVRANDOM x=dev_add("/misc", "random", mmopen, 3, DV_CHR, 0, 0, 0666); x=dev_add("/misc", "urandom", mmopen, 4, DV_CHR, 0, 0, 0666); -#endif x=dev_add("/misc", "zero", mmopen, 12, DV_CHR, 0, 0, 0666); x=dev_add("/misc", "io", mmopen, 14, DV_CHR, 0, 2, 0640); } @@ -138,9 +136,7 @@ mmrw(dev, uio, flags) { register int o; register u_int c, v; -#ifdef DEVRANDOM u_int poolsize; -#endif register struct iovec *iov; int error = 0; caddr_t buf = NULL; @@ -200,7 +196,6 @@ mmrw(dev, uio, flags) c = iov->iov_len; break; -#ifdef DEVRANDOM /* minor device 3 (/dev/random) is source of filth on read, rathole on write */ case 3: if (uio->uio_rw == UIO_WRITE) { @@ -235,7 +230,6 @@ mmrw(dev, uio, flags) c = min(c, poolsize); error = uiomove(buf, (int)c, uio); continue; -#endif /* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */ case 12: @@ -351,7 +345,6 @@ mmioctl(dev, cmd, cmdarg, flags, p) int flags; struct proc *p; { -#ifdef DEVRANDOM int error; if (minor(dev) != 3 && minor(dev) != 4) @@ -384,7 +377,4 @@ mmioctl(dev, cmd, cmdarg, flags, p) return (ENOTTY); } return (0); -#else - return (ENODEV); -#endif /* DEVRANDOM */ } diff --git a/sys/amd64/isa/vector.S b/sys/amd64/isa/vector.S index c630bee4cf3a..388c0e2fa9ad 100644 --- a/sys/amd64/isa/vector.S +++ b/sys/amd64/isa/vector.S @@ -1,6 +1,6 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $Id: vector.s,v 1.12 1995/04/15 21:32:18 bde Exp $ + * $Id: vector.s,v 1.13 1995/10/28 16:58:05 markm Exp $ */ #include @@ -53,15 +53,11 @@ #define MAYBE_PUSHL_ES #endif -#ifdef DEVRANDOM #define ADDENTROPY(irq_num) \ /* Add this interrupt to the pool of entropy */ \ pushl $irq_num ; \ call _add_interrupt_randomness ; \ addl $4,%esp -#else -#define ADDENTROPY(irq_num) -#endif /* * Macros for interrupt interrupt entry, call to handler, and exit. diff --git a/sys/amd64/isa/vector.s b/sys/amd64/isa/vector.s index c630bee4cf3a..388c0e2fa9ad 100644 --- a/sys/amd64/isa/vector.s +++ b/sys/amd64/isa/vector.s @@ -1,6 +1,6 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $Id: vector.s,v 1.12 1995/04/15 21:32:18 bde Exp $ + * $Id: vector.s,v 1.13 1995/10/28 16:58:05 markm Exp $ */ #include @@ -53,15 +53,11 @@ #define MAYBE_PUSHL_ES #endif -#ifdef DEVRANDOM #define ADDENTROPY(irq_num) \ /* Add this interrupt to the pool of entropy */ \ pushl $irq_num ; \ call _add_interrupt_randomness ; \ addl $4,%esp -#else -#define ADDENTROPY(irq_num) -#endif /* * Macros for interrupt interrupt entry, call to handler, and exit. diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 6080597d5900..ef0251df1d9e 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.126 1995/10/14 07:08:09 bde Exp $ + * $Id: syscons.c,v 1.127 1995/10/28 16:58:04 markm Exp $ */ #include "sc.h" @@ -2203,9 +2203,7 @@ scgetc(int noblock) else goto next_code; -#ifdef DEVRANDOM add_keyboard_randomness(scancode); -#endif if (cur_console->status & KBD_RAW_MODE) return scancode; diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 4621100dbb0a..4d238a05f692 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.146 1995/10/31 19:07:53 peter Exp $ + * $Id: machdep.c,v 1.147 1995/11/02 09:52:40 peter Exp $ */ #include "npx.h" @@ -1377,9 +1377,7 @@ init386(first) #if NISA >0 isa_defaultirq(); #endif -#ifdef DEVRANDOM rand_initialize(); -#endif r_gdt.rd_limit = sizeof(gdt) - 1; r_gdt.rd_base = (int) gdt; diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 788d83e773a1..54db6cdd60f5 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $Id: mem.c,v 1.17 1995/10/30 22:39:34 markm Exp $ + * $Id: mem.c,v 1.18 1995/11/04 13:52:30 bde Exp $ */ /* @@ -79,10 +79,8 @@ memdev_init(dummy) x=dev_add("/misc", "mem", mmopen, 0, DV_CHR, 0, 2, 0640); x=dev_add("/misc", "kmem", mmopen, 1, DV_CHR, 0, 2, 0640); x=dev_add("/misc", "null", mmopen, 2, DV_CHR, 0, 0, 0666); -#ifdef DEVRANDOM x=dev_add("/misc", "random", mmopen, 3, DV_CHR, 0, 0, 0666); x=dev_add("/misc", "urandom", mmopen, 4, DV_CHR, 0, 0, 0666); -#endif x=dev_add("/misc", "zero", mmopen, 12, DV_CHR, 0, 0, 0666); x=dev_add("/misc", "io", mmopen, 14, DV_CHR, 0, 2, 0640); } @@ -138,9 +136,7 @@ mmrw(dev, uio, flags) { register int o; register u_int c, v; -#ifdef DEVRANDOM u_int poolsize; -#endif register struct iovec *iov; int error = 0; caddr_t buf = NULL; @@ -200,7 +196,6 @@ mmrw(dev, uio, flags) c = iov->iov_len; break; -#ifdef DEVRANDOM /* minor device 3 (/dev/random) is source of filth on read, rathole on write */ case 3: if (uio->uio_rw == UIO_WRITE) { @@ -235,7 +230,6 @@ mmrw(dev, uio, flags) c = min(c, poolsize); error = uiomove(buf, (int)c, uio); continue; -#endif /* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */ case 12: @@ -351,7 +345,6 @@ mmioctl(dev, cmd, cmdarg, flags, p) int flags; struct proc *p; { -#ifdef DEVRANDOM int error; if (minor(dev) != 3 && minor(dev) != 4) @@ -384,7 +377,4 @@ mmioctl(dev, cmd, cmdarg, flags, p) return (ENOTTY); } return (0); -#else - return (ENODEV); -#endif /* DEVRANDOM */ } diff --git a/sys/i386/isa/random.c b/sys/i386/isa/random.c index af67c56bc803..3105e7b65ae1 100644 --- a/sys/i386/isa/random.c +++ b/sys/i386/isa/random.c @@ -1,7 +1,7 @@ /* * random.c -- A strong random number generator * - * $Id$ + * $Id: random.c,v 1.1 1995/10/28 16:58:02 markm Exp $ * * Version 0.92, last modified 21-Sep-95 * @@ -40,8 +40,6 @@ * */ -#ifdef DEVRANDOM - #include #include #include @@ -430,23 +428,3 @@ read_random_unlimited(char * buf, u_int nbytes) { return extract_entropy(&random_state, buf, nbytes); } - -#ifdef linux -int -read_random(struct inode * inode,struct file * file,char * buf,int nbytes) -{ - if ((nbytes * 8) > random_state.entropy_count) - nbytes = random_state.entropy_count / 8; - - return extract_entropy(&random_state, buf, nbytes, 1); -} - -int -read_random_unlimited(struct inode * inode,struct file * file, - char * buf,int nbytes) -{ - return extract_entropy(&random_state, buf, nbytes, 1); -} -#endif - -#endif /* DEVRANDOM */ diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index 6080597d5900..ef0251df1d9e 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.126 1995/10/14 07:08:09 bde Exp $ + * $Id: syscons.c,v 1.127 1995/10/28 16:58:04 markm Exp $ */ #include "sc.h" @@ -2203,9 +2203,7 @@ scgetc(int noblock) else goto next_code; -#ifdef DEVRANDOM add_keyboard_randomness(scancode); -#endif if (cur_console->status & KBD_RAW_MODE) return scancode; diff --git a/sys/i386/isa/vector.s b/sys/i386/isa/vector.s index c630bee4cf3a..388c0e2fa9ad 100644 --- a/sys/i386/isa/vector.s +++ b/sys/i386/isa/vector.s @@ -1,6 +1,6 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $Id: vector.s,v 1.12 1995/04/15 21:32:18 bde Exp $ + * $Id: vector.s,v 1.13 1995/10/28 16:58:05 markm Exp $ */ #include @@ -53,15 +53,11 @@ #define MAYBE_PUSHL_ES #endif -#ifdef DEVRANDOM #define ADDENTROPY(irq_num) \ /* Add this interrupt to the pool of entropy */ \ pushl $irq_num ; \ call _add_interrupt_randomness ; \ addl $4,%esp -#else -#define ADDENTROPY(irq_num) -#endif /* * Macros for interrupt interrupt entry, call to handler, and exit. diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 6080597d5900..ef0251df1d9e 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.126 1995/10/14 07:08:09 bde Exp $ + * $Id: syscons.c,v 1.127 1995/10/28 16:58:04 markm Exp $ */ #include "sc.h" @@ -2203,9 +2203,7 @@ scgetc(int noblock) else goto next_code; -#ifdef DEVRANDOM add_keyboard_randomness(scancode); -#endif if (cur_console->status & KBD_RAW_MODE) return scancode;