NetBSD-Bugs archive

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

kern/38900: Build of `sys/dev/wscons/wskbd.c' brocken if NWSDISPLAY == 0



>Number:         38900
>Category:       kern
>Synopsis:       Build of `sys/dev/wscons/wskbd.c' brocken if NWSDISPLAY == 0
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 08 20:55:00 +0000 2008
>Originator:     Arnaud Lacombe
>Release:        4.99.64
>Organization:
n/a
>Environment:
netbsd -current
>Description:
The `me_dispdv' field of struct wsevsrc is only present if NWSDISPLAY > 0,  
however `sys/dev/wscons/wskbd.c' references it without any protection.
>How-To-Repeat:
build a kernel with NWSDISPLAY == 0.
>Fix:
Applying the following patch seems to be enough (might not be right):

Index: /data/netbsd/src/sys/dev/wscons/wskbd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/wscons/wskbd.c,v
retrieving revision 1.119
diff -u -r1.119 wskbd.c
--- /src/sys/dev/wscons/wskbd.c     4 May 2008 13:19:17 -0000      1.119
+++ /src/sys/dev/wscons/wskbd.c     8 Jun 2008 20:44:57 -0000
@@ -1519,7 +1519,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) {



Home | Main Index | Thread Index | Old Index