Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Little rnd.h cleanup.
details: https://anonhg.NetBSD.org/src/rev/52f22118c735
branches: trunk
changeset: 337363:52f22118c735
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Apr 13 15:23:00 2015 +0000
description:
Little rnd.h cleanup.
- Make rnd_printing static in kern_rndq.c.
- Merge some #ifdef _KERNEL blocks.
- Fix comments about RND_DEV_(U)RANDOM.
- Move rnd_ready to rnd_private.h.
diffstat:
sys/kern/kern_rndq.c | 7 ++++---
sys/sys/rnd.h | 14 ++++----------
2 files changed, 8 insertions(+), 13 deletions(-)
diffs (66 lines):
diff -r 40d7220921d2 -r 52f22118c735 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c Mon Apr 13 15:13:50 2015 +0000
+++ b/sys/kern/kern_rndq.c Mon Apr 13 15:23:00 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rndq.c,v 1.45 2015/04/13 15:13:50 riastradh Exp $ */
+/* $NetBSD: kern_rndq.c,v 1.46 2015/04/13 15:23:01 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.45 2015/04/13 15:13:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.46 2015/04/13 15:23:01 riastradh Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -176,7 +176,8 @@
int rnd_ready = 0;
int rnd_initial_entropy = 0;
-int rnd_printing = 0;
+
+static int rnd_printing = 0;
#ifdef DIAGNOSTIC
static int rnd_tested = 0;
diff -r 40d7220921d2 -r 52f22118c735 sys/sys/rnd.h
--- a/sys/sys/rnd.h Mon Apr 13 15:13:50 2015 +0000
+++ b/sys/sys/rnd.h Mon Apr 13 15:23:00 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd.h,v 1.45 2015/04/13 15:13:50 riastradh Exp $ */
+/* $NetBSD: rnd.h,v 1.46 2015/04/13 15:23:00 riastradh Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -42,15 +42,12 @@
#ifdef _KERNEL
#include <sys/queue.h>
+#include <sys/rngtest.h>
#include <sys/systm.h>
#endif
-#ifdef _KERNEL
-#include <sys/rngtest.h>
-#endif
-
-#define RND_DEV_RANDOM 0 /* minor devices for random and kinda random */
-#define RND_DEV_URANDOM 1
+#define RND_DEV_RANDOM 0 /* minor for blocking until unpredictable */
+#define RND_DEV_URANDOM 1 /* minor for randomly generating data */
/*
* Exposed "size" of entropy pool, for convenience in load/save
@@ -228,9 +225,6 @@
extern int rnd_initial_entropy;
-extern int rnd_ready;
-extern int rnd_printing; /* XXX recursion through printf */
-
#endif /* _KERNEL */
#define RND_MAXSTATCOUNT 10 /* 10 sources at once max */
Home |
Main Index |
Thread Index |
Old Index