diff options
author | markm <markm@FreeBSD.org> | 2013-08-30 17:47:53 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2013-08-30 17:47:53 +0000 |
commit | 93487aecdd4f5d6019a45b33bb962359eb211a73 (patch) | |
tree | c8d40704b01d7542228da0a1d639c1cb2860e30f /share | |
parent | b2aa4a3d16b3b9e307ab041807a95868be8b455a (diff) | |
download | FreeBSD-src-93487aecdd4f5d6019a45b33bb962359eb211a73.zip FreeBSD-src-93487aecdd4f5d6019a45b33bb962359eb211a73.tar.gz |
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 <arthurmesh@gmail.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/examples/kld/random_adaptor/random_adaptor_example.c | 20 |
1 files changed, 1 insertions, 19 deletions
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 <dev/random/random_adaptors.h> #include <dev/random/randomdev.h> -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); |