Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sun Check whether a console is attached before sendi...



details:   https://anonhg.NetBSD.org/src/rev/ca6f0939270d
branches:  trunk
changeset: 526895:ca6f0939270d
user:      pk <pk%NetBSD.org@localhost>
date:      Mon May 13 09:42:12 2002 +0000

description:
Check whether a console is attached before sending data upstream.

diffstat:

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

diffs (29 lines):

diff -r 621dcd95e6b9 -r ca6f0939270d sys/dev/sun/kbd.c
--- a/sys/dev/sun/kbd.c Mon May 13 09:19:57 2002 +0000
+++ b/sys/dev/sun/kbd.c Mon May 13 09:42:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kbd.c,v 1.29 2001/11/13 06:54:32 lukem Exp $   */
+/*     $NetBSD: kbd.c,v 1.30 2002/05/13 09:42:12 pk Exp $      */
 
 /*
  * Copyright (c) 1992, 1993
@@ -51,7 +51,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.29 2001/11/13 06:54:32 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.30 2002/05/13 09:42:12 pk Exp $");
 
 #include "opt_ddb.h"
 
@@ -602,6 +602,10 @@
        struct kbd_state *ks = &k->k_state;
        int data;
 
+       /* Check if a recipient has been configured */
+       if (k->k_cc == NULL)
+               return (0);
+
        switch (KEYSYM_CLASS(keysym)) {
 
        case KEYSYM_ASCII:



Home | Main Index | Thread Index | Old Index