NetBSD Problem Report #38900
From www@NetBSD.org Sun Jun 8 20:53:40 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 8A44763B91E
for <gnats-bugs@gnats.netbsd.org>; Sun, 8 Jun 2008 20:53:40 +0000 (UTC)
Message-Id: <20080608205340.3691363B8BC@narn.NetBSD.org>
Date: Sun, 8 Jun 2008 20:53:40 +0000 (UTC)
From: lacombar@gmail.com
Reply-To: lacombar@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Build of `sys/dev/wscons/wskbd.c' brocken if NWSDISPLAY == 0
X-Send-Pr-Version: www-1.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: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 08 20:55:00 +0000 2008
>Closed-Date: Mon May 31 19:19:32 +0000 2010
>Last-Modified: Mon May 31 19:19:32 +0000 2010
>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) {
>Release-Note:
>Audit-Trail:
From: "Arnaud Lacombe" <lacombar@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/38900: Build of `sys/dev/wscons/wskbd.c' brocken if NWSDISPLAY == 0
Date: Sun, 8 Jun 2008 22:56:58 +0200
On Sun, Jun 8, 2008 at 10:55 PM, <gnats-admin@netbsd.org> wrote:
> Thank you very much for your problem report.
> It has the internal identification `kern/38900'.
> The individual assigned to look at your
> report is: kern-bug-people.
>
>>Category: kern
>>Responsible: kern-bug-people
>>Synopsis: Build of `sys/dev/wscons/wskbd.c' brocken if NWSDISPLAY == 0
>>Arrival-Date: Sun Jun 08 20:55:00 +0000 2008
>
here is the correct patch (fix an "unused variable" gcc's error):
Index: /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:53:43 -0000
@@ -1503,7 +1503,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) {
@@ -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) {
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/38900 CVS commit: src/sys/dev/wscons
Date: Mon, 31 May 2010 04:27:19 +0000
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.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 31 May 2010 19:19:32 +0000
State-Changed-Why:
fixed, thanks
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.