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:
Mark Murray 1995-11-12 17:02:45 +00:00
parent 58cf3c925d
commit a07ffb0cda
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12239
2 changed files with 12 additions and 1 deletions

View file

@ -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"

View file

@ -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;