Subject: port-mac68k/23991: implement WS{MOUSE,KBD}IO_GTYPE ioctl()'s
To: None <gnats-bugs@gnats.netbsd.org>
From: None <daver@tombstone.localnet.gomerbud.com>
List: netbsd-bugs
Date: 01/05/2004 12:17:46
>Number:         23991
>Category:       port-mac68k
>Synopsis:       implement WS{MOUSE,KBD}IO_GTYPE ioctl()'s
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-mac68k-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 05 20:19:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     David P. Reese Jr.
>Release:        NetBSD 1.6ZF
>Organization:
   David P. Reese, Jr.                                  daver at gomerbud.com
                                               http://www.gomerbud.com/daver/
>Environment:
	
	
System: NetBSD tombstone.localnet.gomerbud.com 1.6ZF NetBSD 1.6ZF (TOMBSTONE) #2: Sun Dec 14 21:29:33 PST 2003 daver@tombstone.localnet.gomerbud.com:/usr/src/sys/arch/i386/compile/TOMBSTONE i386
Architecture: i386
Machine: i386
>Description:
	The mac68k port does not implement the WSKBDIO_GTYPE and
	WSMOUSEIO_GTYPE ioctl()'s.
>How-To-Repeat:
>Fix:
Index: arch/mac68k/dev/akbd.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/akbd.c,v
retrieving revision 1.16
diff -u -u -r1.16 akbd.c
--- arch/mac68k/dev/akbd.c	2003/07/15 02:43:16	1.16
+++ arch/mac68k/dev/akbd.c	2004/01/05 20:11:24
@@ -488,7 +488,7 @@
 	switch (cmd) {
 
 	case WSKBDIO_GTYPE:
-		*(int *)data = 0;		/* XXX */
+		*(u_int *)data = WSKBD_TYPE_ADB;
 		return 0;
 	case WSKBDIO_SETLEDS:
 		return 0;
Index: arch/mac68k/dev/ams.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/ams.c,v
retrieving revision 1.14
diff -u -u -r1.14 ams.c
--- arch/mac68k/dev/ams.c	2003/07/15 02:43:16	1.14
+++ arch/mac68k/dev/ams.c	2004/01/05 20:11:24
@@ -537,6 +537,12 @@
 	int flag;
 	struct proc *p;
 {
+	switch (cmd) {
+	case WSMOUSEIO_GTYPE:
+		*(u_int *)data = WSMOUSE_TYPE_ADB;
+		return 0;
+	}
+
 	return (EPASSTHROUGH);
 }
 
Index: dev/wscons/wsconsio.h
===================================================================
RCS file: /cvsroot/src/sys/dev/wscons/wsconsio.h,v
retrieving revision 1.58
diff -u -u -r1.58 wsconsio.h
--- dev/wscons/wsconsio.h	2003/06/03 06:48:12	1.58
+++ dev/wscons/wsconsio.h	2004/01/05 20:11:42
@@ -178,6 +178,7 @@
 #define		WSMOUSE_TYPE_AMIGA	10	/* Amiga mouse */      
 #define		WSMOUSE_TYPE_MAXINE	11	/* DEC maxine mouse */
 #define		WSMOUSE_TYPE_MAPLE	12	/* Dreamcast Maple mouse */
+#define		WSMOUSE_TYPE_ADB	13	/* ADB mouse */
 
 /* Set resolution.  Not applicable to all mouse types. */
 #define	WSMOUSEIO_SRES		_IOW('W', 33, u_int)
>Release-Note:
>Audit-Trail:
>Unformatted: