diff options
author | markm <markm@FreeBSD.org> | 2000-09-10 14:27:17 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-09-10 14:27:17 +0000 |
commit | 92be8785e1b24977e9f19bcbad1044ff83b6dc73 (patch) | |
tree | 66219e875bd0ef8d2e0a1476768a3b20c02a29e6 /sys/dev/syscons | |
parent | e7b7374b5df72da5bf30fa536b167a7135e9f82c (diff) | |
download | FreeBSD-src-92be8785e1b24977e9f19bcbad1044ff83b6dc73.zip FreeBSD-src-92be8785e1b24977e9f19bcbad1044ff83b6dc73.tar.gz |
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.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r-- | sys/dev/syscons/scmouse.c | 4 | ||||
-rw-r--r-- | sys/dev/syscons/sysmouse.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c index b94980e..f0865932 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; diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index d793cd1..e97be1a 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -32,7 +32,6 @@ #include <sys/systm.h> #include <sys/conf.h> #include <sys/proc.h> -#include <sys/random.h> #include <sys/tty.h> #include <sys/kernel.h> @@ -337,8 +336,6 @@ sysmouse_event(mouse_info_t *info) sysmouse_tty); } - random_harvest(buf, sizeof(buf), 2, 0, RANDOM_MOUSE); - return mouse_status.flags; } |