Add /dev/random hooks to the key input routines for pcvt. This allows
the scancodes on a PCVT machine to be used as stochastic input as well as SysCons.. Reviewed by: Joerg Wunsch
This commit is contained in:
parent
58cf3c925d
commit
a07ffb0cda
@ -81,7 +81,9 @@
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#if PCVT_FREEBSD > 210
|
||||
#include <machine/random.h>
|
||||
#endif /* PCVT_FREEBSD > 210 */
|
||||
#else /* ! PCVT_FREEBSD >= 200 */
|
||||
|
||||
#include "param.h"
|
||||
|
@ -981,6 +981,11 @@ loop:
|
||||
if (pcvt_kbd_raw)
|
||||
{
|
||||
keybuf[0] = dt;
|
||||
|
||||
#if PCVT_FREEBSD > 210
|
||||
add_keyboard_randomness(dt);
|
||||
#endif /* PCVT_FREEBSD > 210 */
|
||||
|
||||
#if !PCVT_USL_VT_COMPAT
|
||||
if ((dt & 0x80) == 0)
|
||||
/* key make */
|
||||
@ -1323,6 +1328,10 @@ no_mouse_event:
|
||||
/* got a normal scan key */
|
||||
regular:
|
||||
|
||||
#if PCVT_FREEBSD > 210
|
||||
add_keyboard_randomness(dt);
|
||||
#endif /* PCVT_FREEBSD > 210 */
|
||||
|
||||
#if PCVT_SCANSET == 1
|
||||
kbd_status.breakseen = dt & 0x80 ? 1 : 0;
|
||||
dt &= 0x7f;
|
||||
|
Loading…
x
Reference in New Issue
Block a user