diff options
author | markm <markm@FreeBSD.org> | 2000-07-25 21:18:47 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-07-25 21:18:47 +0000 |
commit | 12a237a692a81328f3f14927af016b53de12eabd (patch) | |
tree | d58170d695bea67ad11d489d9a5a743980675bfc /sys/dev/syscons/syscons.c | |
parent | 218edb7befe15334d4053ab8e1621558da5eccb0 (diff) | |
download | FreeBSD-src-12a237a692a81328f3f14927af016b53de12eabd.zip FreeBSD-src-12a237a692a81328f3f14927af016b53de12eabd.tar.gz |
o Fix a horrible bug where small reads (< 8 bytes) would return the
wrong bytes.
o Improve the public interface; use void* instead of char* or u_int64_t
to pass arbitrary data around.
Submitted by: kris ("horrible bug")
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r-- | sys/dev/syscons/syscons.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index cbcace8..2a447f7 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -2956,9 +2956,8 @@ next_code: if (!(c & RELKEY)) sc_touch_scrn_saver(); - /* do the /dev/random device a favour */ if (!(flags & SCGETC_CN)) - random_harvest((u_int64_t)c, 1, 0, RANDOM_KEYBOARD); + random_harvest(&c, sizeof(c), 1, 0, RANDOM_KEYBOARD); if (scp->kbd_mode != K_XLATE) return KEYCHAR(c); |