From 93487aecdd4f5d6019a45b33bb962359eb211a73 Mon Sep 17 00:00:00 2001 From: markm Date: Fri, 30 Aug 2013 17:47:53 +0000 Subject: Remove short-lived idea; thread to harvest (eg) RDRAND enropy into the usual harvest queues. It was a nifty idea, but too heavyweight. Submitted by: Arthur Mesh --- .../kld/random_adaptor/random_adaptor_example.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'share/examples') diff --git a/share/examples/kld/random_adaptor/random_adaptor_example.c b/share/examples/kld/random_adaptor/random_adaptor_example.c index f94a7c2..c0ab10a 100644 --- a/share/examples/kld/random_adaptor/random_adaptor_example.c +++ b/share/examples/kld/random_adaptor/random_adaptor_example.c @@ -37,16 +37,13 @@ __FBSDID("$FreeBSD$"); #include #include -static int random_example_entropy_control; - #define RNG_NAME "example" static int random_example_read(void *, int); -static void random_example_init(void); struct random_adaptor random_example = { .ident = "Example RNG", - .init = random_example_init, + .init = (random_init_func_t *)random_null_func, .deinit = (random_deinit_func_t *)random_null_func, .read = random_example_read, .write = (random_write_func_t *)random_null_func, @@ -54,18 +51,6 @@ struct random_adaptor random_example = { .seeded = 1, }; -static void -random_example_init(void) -{ - - /* - * Init() is called only if this RNG was chosen to plugin in to - * random(4). In which case, we should no longer use this adaptor as - * an entropy source. - */ - random_example_entropy_control = 1; -} - /* * Used under the license provided @ http://xkcd.com/221/ * http://creativecommons.org/licenses/by-nc/2.5/ @@ -98,9 +83,6 @@ random_example_modevent(module_t mod, int type, void *unused) switch (type) { case MOD_LOAD: - /* start off by using this as an entropy source */ - random_adaptor_use_as_entropy(RNG_NAME, &random_example, - &random_example_entropy_control); random_adaptor_register(RNG_NAME, &random_example); EVENTHANDLER_INVOKE(random_adaptor_attach, &random_example); return (0); -- cgit v1.1