mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-29 21:26:51 +00:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12239
|
@ -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 @@ sgetc(int noblock)
|
|||
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 @@ sgetc(int noblock)
|
|||
/* 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…
Reference in a new issue