Module Name:    src
Committed By:   dholland
Date:           Mon May 31 04:27:19 UTC 2010

Modified Files:
        src/sys/dev/wscons: wskbd.c

Log Message:
PR kern/38900 Arnaud Lacombe: don't try to do WSDISPLAY_SCROLLSUPPORT
things if NWSDISPLAY is 0.

Arguably the right fix is to not allow "options WSDISPLAY_SCROLLSUPPORT"
to be enabled in this case, but AIUI config doesn't know how to encode
rules like that.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/dev/wscons/wskbd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wscons/wskbd.c
diff -u src/sys/dev/wscons/wskbd.c:1.127 src/sys/dev/wscons/wskbd.c:1.128
--- src/sys/dev/wscons/wskbd.c:1.127	Wed Feb 24 22:38:09 2010
+++ src/sys/dev/wscons/wskbd.c	Mon May 31 04:27:18 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbd.c,v 1.127 2010/02/24 22:38:09 dyoung Exp $ */
+/* $NetBSD: wskbd.c,v 1.128 2010/05/31 04:27:18 dholland 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.127 2010/02/24 22:38:09 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbd.c,v 1.128 2010/05/31 04:27:18 dholland Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1507,7 +1507,7 @@
 internal_command(struct wskbd_softc *sc, u_int *type, keysym_t ksym,
 	keysym_t ksym2)
 {
-#ifdef WSDISPLAY_SCROLLSUPPORT
+#if NWSDISPLAY > 0 && defined(WSDISPLAY_SCROLLSUPPORT)
 	u_int state = 0;
 #endif
 	switch (ksym) {
@@ -1523,7 +1523,7 @@
 		if (*type == WSCONS_EVENT_KEY_DOWN)
 			pmf_event_inject(NULL, PMFE_AUDIO_VOLUME_DOWN);
 		break;
-#ifdef WSDISPLAY_SCROLLSUPPORT
+#if NWSDISPLAY > 0 && defined(WSDISPLAY_SCROLLSUPPORT)
 	case KS_Cmd_ScrollFastUp:
 	case KS_Cmd_ScrollFastDown:
 		if (*type == WSCONS_EVENT_KEY_DOWN) {

Reply via email to