Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons fix a bunch of _IO() ioctl()s to actually wor...
details: https://anonhg.NetBSD.org/src/rev/1a3c721ae6a4
branches: trunk
changeset: 785042:1a3c721ae6a4
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Feb 19 15:21:08 2013 +0000
description:
fix a bunch of _IO() ioctl()s to actually work on LP64/BE
( the data pointer is abused to pass an integer, we get a pointer to it so
we need to deref it to something the same size as a pointer to get the
correct value )
now the PCVT compat code ( which is used for VT switching in and out of X )
works on sparc64
diffstat:
sys/dev/wscons/wsdisplay_compat_usl.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r ac29765d8200 -r 1a3c721ae6a4 sys/dev/wscons/wsdisplay_compat_usl.c
--- a/sys/dev/wscons/wsdisplay_compat_usl.c Tue Feb 19 12:35:41 2013 +0000
+++ b/sys/dev/wscons/wsdisplay_compat_usl.c Tue Feb 19 15:21:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_compat_usl.c,v 1.47 2010/07/01 02:38:29 rmind Exp $ */
+/* $NetBSD: wsdisplay_compat_usl.c,v 1.48 2013/02/19 15:21:08 macallan Exp $ */
/*
* Copyright (c) 1998
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.47 2010/07/01 02:38:29 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_compat_usl.c,v 1.48 2013/02/19 15:21:08 macallan Exp $");
#include "opt_compat_freebsd.h"
#include "opt_compat_netbsd.h"
@@ -449,7 +449,7 @@
*/
case KDSETMODE:
req = WSDISPLAYIO_SMODE;
-#define d (*(int *)data)
+#define d (*(long *)data)
switch (d) {
case KD_GRAPHICS:
intarg = WSDISPLAYIO_MODE_MAPPED;
@@ -465,7 +465,7 @@
break;
case KDMKTONE:
req = WSKBDIO_COMPLEXBELL;
-#define d (*(int *)data)
+#define d (*(long *)data)
if (d) {
#define PCVT_SYSBEEPF 1193182
if (d >> 16) {
@@ -486,7 +486,7 @@
case KDSETLED:
req = WSKBDIO_SETLEDS;
intarg = 0;
-#define d (*(int *)data)
+#define d (*(long *)data)
if (d & LED_CAP)
intarg |= WSKBD_LED_CAPS;
if (d & LED_NUM)
@@ -503,7 +503,7 @@
#ifdef WSDISPLAY_COMPAT_RAWKBD
case KDSKBMODE:
req = WSKBDIO_SETMODE;
- switch (*(int *)data) {
+ switch (*(long *)data) {
case K_RAW:
intarg = WSKBD_RAW;
break;
Home |
Main Index |
Thread Index |
Old Index