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 #include #include +#include #include #include @@ -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 d793cd1aaf5e..e97be1ac6602 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include @@ -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; }