Module Name:    src
Committed By:   riastradh
Date:           Tue Apr 14 13:14:20 UTC 2015

Modified Files:
        src/sys/dev: rnd_private.h
        src/sys/sys: rndpool.h

Log Message:
Move RND_EXTRACT_{ANY,GOOD} to rndpool.h whose API they are part of.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/rnd_private.h
cvs rdiff -u -r1.2 -r1.3 src/sys/sys/rndpool.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/rnd_private.h
diff -u src/sys/dev/rnd_private.h:1.10 src/sys/dev/rnd_private.h:1.11
--- src/sys/dev/rnd_private.h:1.10	Tue Apr 14 13:12:33 2015
+++ src/sys/dev/rnd_private.h	Tue Apr 14 13:14:20 2015
@@ -1,4 +1,4 @@
-/*      $NetBSD: rnd_private.h,v 1.10 2015/04/14 13:12:33 riastradh Exp $     */
+/*      $NetBSD: rnd_private.h,v 1.11 2015/04/14 13:14:20 riastradh Exp $     */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -47,14 +47,6 @@
  */
 #define RND_ENTROPY_THRESHOLD   10
 
-/*
- * Used by rnd_extract_data() and rndpool_extract_data() to describe how
- * "good" the data has to be.
- */
-#define RND_EXTRACT_ANY		0  /* extract anything, even if no entropy */
-#define RND_EXTRACT_GOOD	1  /* return as many good bytes
-				      (short read ok) */
-
 bool	rnd_extract(void *, size_t);
 bool	rnd_tryextract(void *, size_t);
 void	rnd_getmore(size_t);

Index: src/sys/sys/rndpool.h
diff -u src/sys/sys/rndpool.h:1.2 src/sys/sys/rndpool.h:1.3
--- src/sys/sys/rndpool.h:1.2	Mon Apr 13 23:21:03 2015
+++ src/sys/sys/rndpool.h	Tue Apr 14 13:14:20 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rndpool.h,v 1.2 2015/04/13 23:21:03 riastradh Exp $	*/
+/*	$NetBSD: rndpool.h,v 1.3 2015/04/14 13:14:20 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -56,6 +56,11 @@ typedef struct {
         uint32_t        pool[RND_POOLWORDS]; /* random pool data */
 } rndpool_t;
 
+/* Mode for rnd_extract_data.  */
+#define RND_EXTRACT_ANY		0  /* extract as many bits as requested */
+#define RND_EXTRACT_GOOD	1  /* extract as many bits as we have counted
+				    * entropy */
+
 void		rndpool_init(rndpool_t *);
 uint32_t	rndpool_get_entropy_count(rndpool_t *);
 void		rndpool_set_entropy_count(rndpool_t *, uint32_t);

Reply via email to