diff options
author | Mark Murray <markm@FreeBSD.org> | 2000-09-10 14:27:17 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 2000-09-10 14:27:17 +0000 |
commit | 22566d9dd5273d6f6029d7e1e5e39ec932b2c515 (patch) | |
tree | 82e096861e8cbf7d876150fe48279fbcc7302370 /sys/dev/syscons/scmouse.c | |
parent | 0f3ad95051acce64944e12387ba70f980555e285 (diff) | |
download | src-22566d9dd5273d6f6029d7e1e5e39ec932b2c515.tar.gz src-22566d9dd5273d6f6029d7e1e5e39ec932b2c515.zip |
Harvest mouse events for the entropy device in a better place. In the
new location, all mouse events are harvested, not just the ones being
written out to moused(8). This means that mouse entropy is harvested
at the consoles as well as in X.
Notes
Notes:
svn path=/head/; revision=65690
Diffstat (limited to 'sys/dev/syscons/scmouse.c')
-rw-r--r-- | sys/dev/syscons/scmouse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index b94980e2d024..f08659327594 100644 --- a/sys/dev/syscons/scmouse.c +++ b/sys/dev/syscons/scmouse.c @@ -34,6 +34,7 @@ #include <sys/conf.h> #include <sys/signalvar.h> #include <sys/proc.h> +#include <sys/random.h> #include <sys/tty.h> #include <sys/malloc.h> @@ -616,6 +617,9 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, case OLD_CONS_MOUSECTL: mouse = (mouse_info_t*)data; + + random_harvest(mouse, sizeof(mouse_info_t), 2, 0, RANDOM_MOUSE); + if (cmd == OLD_CONS_MOUSECTL) { static u_char swapb[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; old_mouse_info_t *old_mouse = (old_mouse_info_t *)data; |