summaryrefslogtreecommitdiffstats
path: root/sys/dev/random
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-02-12 20:46:49 +0000
committerphk <phk@FreeBSD.org>2004-02-12 20:46:49 +0000
commit0b3393f389c0d81c7b6c04bfd18ab101fde311b2 (patch)
tree081bc255facfdeb0a58f45ca44bfcbd9cb5fc596 /sys/dev/random
parentc5f8ca542a4f8715a55d1a209c957f552b14a53f (diff)
downloadFreeBSD-src-0b3393f389c0d81c7b6c04bfd18ab101fde311b2.zip
FreeBSD-src-0b3393f389c0d81c7b6c04bfd18ab101fde311b2.tar.gz
Correct the cleanup of the alias dev_t for /dev/urandom: being an
alias it depends on the aliased dev_t and disappears automatically when that is removed. Submitted by: "Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net>
Diffstat (limited to 'sys/dev/random')
-rw-r--r--sys/dev/random/randomdev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index 8086841..d0e272e 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -104,7 +104,6 @@ static struct proc *random_kthread_proc;
/* For use with make_dev(9)/destroy_dev(9). */
static dev_t random_dev;
-static dev_t urandom_dev;
/* ARGSUSED */
static int
@@ -266,7 +265,7 @@ random_modevent(module_t mod __unused, int type, void *data __unused)
printf("random: <entropy source>\n");
random_dev = make_dev(&random_cdevsw, RANDOM_MINOR, UID_ROOT,
GID_WHEEL, 0666, "random");
- urandom_dev = make_dev_alias(random_dev, "urandom");
+ make_dev_alias(random_dev, "urandom");
/* Start the hash/reseed thread */
error = kthread_create(random_kthread, NULL,
@@ -309,7 +308,6 @@ random_modevent(module_t mod __unused, int type, void *data __unused)
random_deinit();
destroy_dev(random_dev);
- destroy_dev(urandom_dev);
return 0;
case MOD_SHUTDOWN:
OpenPOWER on IntegriCloud