Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pckbport pckbd_cngetc: Set type=0 and return if no d...
details: https://anonhg.NetBSD.org/src/rev/eea95b3f5d5f
branches: trunk
changeset: 452733:eea95b3f5d5f
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Jul 23 12:28:52 2019 +0000
description:
pckbd_cngetc: Set type=0 and return if no data is available
diffstat:
sys/dev/pckbport/pckbd.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 1cf45d8a12f6 -r eea95b3f5d5f sys/dev/pckbport/pckbd.c
--- a/sys/dev/pckbport/pckbd.c Tue Jul 23 12:13:47 2019 +0000
+++ b/sys/dev/pckbport/pckbd.c Tue Jul 23 12:28:52 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbd.c,v 1.33 2017/06/11 03:55:56 nat Exp $ */
+/* $NetBSD: pckbd.c,v 1.34 2019/07/23 12:28:52 jmcneill Exp $ */
/*-
* Copyright (c) 1998, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.33 2017/06/11 03:55:56 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbd.c,v 1.34 2019/07/23 12:28:52 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1094,8 +1094,11 @@
for (;;) {
val = pckbport_poll_data(t->t_kbctag, t->t_kbcslot);
- if (val == -1)
- continue;
+ if (val == -1) {
+ *type = 0;
+ *data = 0;
+ return;
+ }
val = pckbd_scancode_translate(t, val);
if (val == 0)
Home |
Main Index |
Thread Index |
Old Index