Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wscons If the wskbd driver returns type 0, return "n...



details:   https://anonhg.NetBSD.org/src/rev/24200df9cd62
branches:  trunk
changeset: 828537:24200df9cd62
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Dec 18 18:57:21 2017 +0000

description:
If the wskbd driver returns type 0, return "no data" from wskbd_cngetc

diffstat:

 sys/dev/wscons/wskbd.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r e66c590c8b21 -r 24200df9cd62 sys/dev/wscons/wskbd.c
--- a/sys/dev/wscons/wskbd.c    Mon Dec 18 15:53:38 2017 +0000
+++ b/sys/dev/wscons/wskbd.c    Mon Dec 18 18:57:21 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbd.c,v 1.140 2017/06/13 00:42:27 nat Exp $ */
+/* $NetBSD: wskbd.c,v 1.141 2017/12/18 18:57:21 jmcneill Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -105,7 +105,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.140 2017/06/13 00:42:27 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.141 2017/12/18 18:57:21 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1400,6 +1400,10 @@
                        (*wskbd_console_data.t_consops->getc)
                                (wskbd_console_data.t_consaccesscookie,
                                 &type, &data);
+                       if (type == 0) {
+                               /* No data returned */
+                               return 0;
+                       }
                        if (type == WSCONS_EVENT_ASCII) {
                                /*
                                 * We assume that when the driver falls back



Home | Main Index | Thread Index | Old Index