CVS commit: src/bin/sleep

2010-10-09 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Oct  9 07:40:58 UTC 2010

Modified Files:
src/bin/sleep: sleep.1

Log Message:
Bump date for SIGINFO.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/bin/sleep/sleep.1

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

Modified files:

Index: src/bin/sleep/sleep.1
diff -u src/bin/sleep/sleep.1:1.20 src/bin/sleep/sleep.1:1.21
--- src/bin/sleep/sleep.1:1.20	Sat Oct  9 04:57:30 2010
+++ src/bin/sleep/sleep.1	Sat Oct  9 07:40:58 2010
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sleep.1,v 1.20 2010/10/09 04:57:30 mrg Exp $
+.\"	$NetBSD: sleep.1,v 1.21 2010/10/09 07:40:58 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993, 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\"	@(#)sleep.1	8.3 (Berkeley) 4/18/94
 .\"
-.Dd April 18, 1994
+.Dd October 9, 2010
 .Dt SLEEP 1
 .Os
 .Sh NAME



CVS commit: src/sys/dev/dm

2010-10-09 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Sat Oct  9 12:56:07 UTC 2010

Modified Files:
src/sys/dev/dm: device-mapper.c

Log Message:
In rome do as romans do. If I will get EEXIST from devsw_attach don't exit and
continue. This unbreaks usage of libdm in RUMP.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dm/device-mapper.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.23 src/sys/dev/dm/device-mapper.c:1.24
--- src/sys/dev/dm/device-mapper.c:1.23	Tue May 18 15:10:41 2010
+++ src/sys/dev/dm/device-mapper.c	Sat Oct  9 12:56:06 2010
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.23 2010/05/18 15:10:41 haad Exp $ */
+/*$NetBSD: device-mapper.c,v 1.24 2010/10/09 12:56:06 haad Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -174,6 +174,8 @@
 
 		error = devsw_attach(dm_cd.cd_name, &dm_bdevsw, &bmajor,
 		&dm_cdevsw, &cmajor);
+		if (error == EEXIST)
+			error = 0;
 		if (error) {
 			config_cfattach_detach(dm_cd.cd_name, &dm_ca);
 			config_cfdriver_detach(&dm_cd);



CVS commit: src/sys/dev/pci

2010-10-09 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Oct  9 19:46:16 UTC 2010

Modified Files:
src/sys/dev/pci: if_bwi_pci.c

Log Message:
Missing \n after printing device type.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/if_bwi_pci.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/pci/if_bwi_pci.c
diff -u src/sys/dev/pci/if_bwi_pci.c:1.9 src/sys/dev/pci/if_bwi_pci.c:1.10
--- src/sys/dev/pci/if_bwi_pci.c:1.9	Tue Jan 19 22:07:00 2010
+++ src/sys/dev/pci/if_bwi_pci.c	Sat Oct  9 19:46:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bwi_pci.c,v 1.9 2010/01/19 22:07:00 pooka Exp $	*/
+/*	$NetBSD: if_bwi_pci.c,v 1.10 2010/10/09 19:46:15 phx Exp $	*/
 /*	$OpenBSD: if_bwi_pci.c,v 1.6 2008/02/14 22:10:02 brad Exp $ */
 
 /*
@@ -24,7 +24,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bwi_pci.c,v 1.9 2010/01/19 22:07:00 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bwi_pci.c,v 1.10 2010/10/09 19:46:15 phx Exp $");
 
 #include 
 #include 
@@ -113,7 +113,7 @@
 	int error = 0;
 
 	aprint_naive("\n");
-	aprint_normal(": Broadcom Wireless");
+	aprint_normal(": Broadcom Wireless\n");
 
 	sc->sc_dev = self;
 	sc->sc_dmat = pa->pa_dmat;



CVS commit: src/sys/dev/marvell

2010-10-09 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sun Oct 10 04:49:48 UTC 2010

Modified Files:
src/sys/dev/marvell: gttwsi.c

Log Message:
Add timeout for wait.
Not send STOP, if received ACK.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/marvell/gttwsi.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/marvell/gttwsi.c
diff -u src/sys/dev/marvell/gttwsi.c:1.4 src/sys/dev/marvell/gttwsi.c:1.5
--- src/sys/dev/marvell/gttwsi.c:1.4	Sun Oct  3 07:14:33 2010
+++ src/sys/dev/marvell/gttwsi.c	Sun Oct 10 04:49:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gttwsi.c,v 1.4 2010/10/03 07:14:33 kiyohara Exp $	*/
+/*	$NetBSD: gttwsi.c,v 1.5 2010/10/10 04:49:48 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008 Eiji Kawauchi.
  * All rights reserved.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gttwsi.c,v 1.4 2010/10/03 07:14:33 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gttwsi.c,v 1.5 2010/10/10 04:49:48 kiyohara Exp $");
 #include "locators.h"
 
 #include 
@@ -335,7 +335,7 @@
 	struct gttwsi_softc *sc = v;
 	int error;
 
-	if (flags & I2C_F_STOP)
+	if (flags & I2C_F_LAST)
 		error = gttwsi_wait(sc, 0, STAT_MRRD_ANT, flags);
 	else
 		error = gttwsi_wait(sc, CONTROL_ACK, STAT_MRRD_AT, flags);
@@ -360,13 +360,14 @@
 	int flags)
 {
 	uint32_t status;
-	int error = 0;
+	int timo, error = 0;
 
 	DELAY(5);
 	if (!(flags & I2C_F_POLL))
 		control |= CONTROL_INTEN;
 	WREG(sc, TWSI_CONTROL, control | CONTROL_TWSIEN);
 
+	timo = 0;
 	for (;;) {
 		control = RREG(sc, TWSI_CONTROL);
 		if (control & CONTROL_IFLG)
@@ -379,6 +380,8 @@
 return error;
 		}
 		DELAY(TWSI_RETRY_DELAY);
+		if (timo++ > 100)	/* 1sec */
+			break;
 	}
 
 	status = RREG(sc, TWSI_STATUS);
@@ -388,7 +391,8 @@
 		return EIO;
 	}
 
-	if ((flags & I2C_F_STOP) && expect != STAT_MRRD_AT)
+	if ((flags & I2C_F_STOP) && expect != STAT_RSCT &&
+	expect != STAT_MRRD_AT && expect != STAT_ARBT_AR)
 		error = gttwsi_send_stop(sc, flags);
 
 	return error;



CVS commit: src/sys/dev/i2c

2010-10-09 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sun Oct 10 05:17:44 UTC 2010

Modified Files:
src/sys/dev/i2c: files.i2c m41st84.c

Log Message:
Add options STRTC_NO_USERRAM and STRTC_NO_WATCHDOG for m41t80.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/i2c/m41st84.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/i2c/files.i2c
diff -u src/sys/dev/i2c/files.i2c:1.28 src/sys/dev/i2c/files.i2c:1.29
--- src/sys/dev/i2c/files.i2c:1.28	Sat Oct  2 06:07:37 2010
+++ src/sys/dev/i2c/files.i2c	Sun Oct 10 05:17:44 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i2c,v 1.28 2010/10/02 06:07:37 kiyohara Exp $
+#	$NetBSD: files.i2c,v 1.29 2010/10/10 05:17:44 kiyohara Exp $
 
 defflag	opt_i2cbus.hI2C_SCAN
 define	i2cbus { }
@@ -26,6 +26,8 @@
 device	strtc
 attach	strtc at iic
 file	dev/i2c/m41st84.c			strtc
+defflag	opt_strtc.hSTRTC_NO_USERRAM
+		STRTC_NO_WATCHDOG
 
 # MAX6900 Real Time Clock
 device	maxrtc

Index: src/sys/dev/i2c/m41st84.c
diff -u src/sys/dev/i2c/m41st84.c:1.15 src/sys/dev/i2c/m41st84.c:1.16
--- src/sys/dev/i2c/m41st84.c:1.15	Sat Dec 12 14:44:10 2009
+++ src/sys/dev/i2c/m41st84.c	Sun Oct 10 05:17:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: m41st84.c,v 1.15 2009/12/12 14:44:10 tsutsui Exp $	*/
+/*	$NetBSD: m41st84.c,v 1.16 2010/10/10 05:17:44 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,9 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.15 2009/12/12 14:44:10 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m41st84.c,v 1.16 2010/10/10 05:17:44 kiyohara Exp $");
+
+#include "opt_strtc.h"
 
 #include 
 #include 
@@ -66,6 +68,8 @@
 
 CFATTACH_DECL_NEW(strtc, sizeof(struct strtc_softc),
 strtc_match, strtc_attach, NULL, NULL);
+
+#ifndef STRTC_NO_USERRAM
 extern struct cfdriver strtc_cd;
 
 dev_type_open(strtc_open);
@@ -77,6 +81,7 @@
 	strtc_open, strtc_close, strtc_read, strtc_write, noioctl,
 	nostop, notty, nopoll, nommap, nokqfilter, D_OTHER
 };
+#endif
 
 static int strtc_clock_read(struct strtc_softc *, struct clock_ymdhms *);
 static int strtc_clock_write(struct strtc_softc *, struct clock_ymdhms *);
@@ -115,6 +120,7 @@
 	todr_attach(&sc->sc_todr);
 }
 
+#ifndef STRTC_NO_USERRAM
 /*ARGSUSED*/
 int
 strtc_open(dev_t dev, int flag, int fmt, struct lwp *l)
@@ -221,6 +227,7 @@
 
 	return (error);
 }
+#endif	/* STRTC_NO_USERRAM */
 
 static int
 strtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
@@ -416,6 +423,7 @@
 	return (1);
 }
 
+#ifndef STRTC_NO_WATCHDOG
 void
 strtc_wdog_config(void *arg, uint8_t wd)
 {
@@ -440,3 +448,4 @@
 
 	iic_release_bus(sc->sc_tag, I2C_F_POLL);
 }
+#endif	/* STRTC_NO_WATCHDOG */



CVS commit: src/sys/arch/evbarm/conf

2010-10-09 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sun Oct 10 05:19:35 UTC 2010

Modified Files:
src/sys/arch/evbarm/conf: DNS323

Log Message:
Add strtc(ST M41T80 Real-Time Clock).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/DNS323

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

Modified files:

Index: src/sys/arch/evbarm/conf/DNS323
diff -u src/sys/arch/evbarm/conf/DNS323:1.1 src/sys/arch/evbarm/conf/DNS323:1.2
--- src/sys/arch/evbarm/conf/DNS323:1.1	Sat Oct  2 06:18:39 2010
+++ src/sys/arch/evbarm/conf/DNS323	Sun Oct 10 05:19:35 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: DNS323,v 1.1 2010/10/02 06:18:39 kiyohara Exp $
+#	$NetBSD: DNS323,v 1.2 2010/10/10 05:19:35 kiyohara Exp $
 #
 #  DNS323 -- D-Link. DNS-323 platform kernel
 #
@@ -30,4 +30,6 @@
 
 g760a*	at iic? addr 0x3e		# G760a fan speed controller
 lmtemp*	at iic? addr 0x48		# LM75 temperature sensor
-#m41t80rtc* at iic? addr 0x68		# ST M41T80 Real-Time Clock
+strtc* at iic? addr 0x68		# ST M41T80 Real-Time Clock
+options 	STRTC_NO_USERRAM
+options 	STRTC_NO_WATCHDOG



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast

2010-10-09 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Sun Oct 10 05:21:44 UTC 2010

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast: dreamcastKbd.c

Log Message:
Fix indent.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKbd.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKbd.c:1.4 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKbd.c:1.5
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKbd.c:1.4	Fri Oct  8 18:53:11 2010
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKbd.c	Sun Oct 10 05:21:43 2010
@@ -159,13 +159,13 @@
 	pPriv = (dreamcastKbdPrivPtr)pKeyboard->devicePrivate;
 	dreamcastCleanupFd(pPriv->fd);
 #ifdef WSKBDIO_SETVERSION
-	   {
-		int version = WSKBDIO_EVENT_VERSION;
-		if (ioctl(pPriv->fd, WSKBDIO_SETVERSION, &version) == -1) {
-		Error ("dreamcastKbdProc ioctl WSKBDIO_SETVERSION");
-		return !Success;
-		}
-   }
+	{
+	int version = WSKBDIO_EVENT_VERSION;
+	if (ioctl(pPriv->fd, WSKBDIO_SETVERSION, &version) == -1) {
+		Error ("dreamcastKbdProc ioctl WSKBDIO_SETVERSION");
+		return !Success;
+	}
+	}
 #endif
 	AddEnabledDevice(pPriv->fd);
 	pKeyboard->on = TRUE;



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd

2010-10-09 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Sun Oct 10 05:28:51 UTC 2010

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha: alphaMouse.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decMouse.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast: dreamcastMouse.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips:
ews4800mipsMouse.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc: hpcMouse.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc: macppcMouse.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips: newsmipsMouse.c

Log Message:
Fix indent.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/hpc/hpcMouse.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcMouse.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsMouse.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c:1.2	Fri Oct  8 17:49:25 2010
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaMouse.c	Sun Oct 10 05:28:49 2010
@@ -156,13 +156,13 @@
 #endif
 
 #ifdef WSMOUSEIO_SETVERSION
-	   {
-   int version = WSMOUSE_EVENT_VERSION;
-   if (ioctl(alphaPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
-   Error ("alphaMouseProc ioctl WSMOUSEIO_SETVERSION");
-   return !Success;
-   }
-   }
+	{
+		int version = WSMOUSE_EVENT_VERSION;
+		if (ioctl(alphaPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+		Error ("alphaMouseProc ioctl WSMOUSEIO_SETVERSION");
+		return !Success;
+		}
+	}
 #endif
 
 #if 0

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c:1.2	Fri Oct  8 17:49:25 2010
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decMouse.c	Sun Oct 10 05:28:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: decMouse.c,v 1.2 2010/10/08 17:49:25 tsutsui Exp $	*/
+/*	$NetBSD: decMouse.c,v 1.3 2010/10/10 05:28:49 tsutsui Exp $	*/
 
 /* XConsortium: sunMouse.c,v 5.21 94/04/17 20:29:47 kaleb Exp */
 /*-
@@ -134,13 +134,13 @@
 #endif
 
 #ifdef WSMOUSEIO_SETVERSION
-	   {
-   int version = WSMOUSE_EVENT_VERSION;
-   if (ioctl(decPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
-   Error ("decMouseProc ioctl WSMOUSEIO_SETVERSION");
-   return !Success;
-   }
-   }
+	{
+		int version = WSMOUSE_EVENT_VERSION;
+		if (ioctl(decPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+		Error ("decMouseProc ioctl WSMOUSEIO_SETVERSION");
+		return !Success;
+		}
+	}
 #endif
 
 #if 0

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c:1.2	Fri Oct  8 17:49:25 2010
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c	Sun Oct 10 05:28:49 2010
@@ -132,13 +132,13 @@
 
 	case DEVICE_ON:
 #ifdef WSMOUSEIO_SETVERSION
-	   {
-   int version = WSMOUSE_EVENT_VERSION;
-   if (ioctl(dreamcastPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
-   Error ("dreamcastMouseProc ioctl WSMOUSEIO_SETVERSION");
-   return !Success;
-   }
-   }
+	{
+		int version = WSMOUSE_EVENT_VERSION;
+		if (ioctl(dreamcastPtrPriv.fd, WSMOUSEIO_SETVERSION, &version) == -1) {
+		Error ("dreamcastMouseProc ioctl WSMOUSEIO_SETVERSION");
+		return !Success;
+		}
+	}
 #endif
 
 	dreamcastPtrPriv.bmask = 0;

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.3
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsMouse.c:1.2	Fri Oct  8 17:49:25 20

CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast

2010-10-09 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Sun Oct 10 05:33:32 UTC 2010

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast: dreamcast.h
dreamcastColormap.c dreamcastFB.c dreamcastInit.c dreamcastIo.c
dreamcastKbd.c dreamcastKeymap.c dreamcastMouse.c dreamcastScreen.c

Log Message:
WARNSfy and misc cleanup. (done for bug tracking but no fatal one)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcast.h \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastColormap.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastFB.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastIo.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKeymap.c
cvs rdiff -u -r1.2 -r1.3 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastInit.c \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastScreen.c
cvs rdiff -u -r1.5 -r1.6 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastKbd.c
cvs rdiff -u -r1.3 -r1.4 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcastMouse.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcast.h
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcast.h:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcast.h:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcast.h:1.1	Sat Feb  7 02:39:07 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dreamcast/dreamcast.h	Sun Oct 10 05:33:32 2010
@@ -31,12 +31,11 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 
-extern int gettimeofday();
-
 /*
  * Server specific headers
  */
@@ -58,13 +57,6 @@
 #include "servermd.h"
 #include "windowstr.h"
 
-#undef __P
-#if NeedFunctionPrototypes
-#   define __P(p) p
-#else
-#   define __P(p) ()
-#endif
-
 /*
  * ddx specific headers
  */
@@ -129,14 +121,14 @@
 unsigned char*  fb;		/* Frame buffer itself */
 int		fd;		/* frame buffer for ioctl()s, */
 struct wsdisplay_fbinfo info; /* */
-void	(*EnterLeave)();/* screen switch */
+void	(*EnterLeave)(ScreenPtr, int);/* screen switch */
 char*   devname;	/* device name (e.g. "/dev/ttyE0") */
 } dreamcastFbRec, *dreamcastFbPtr;
 
 typedef struct {
 ColormapPtr		installedMap;
 CloseScreenProcPtr	CloseScreen;
-void		(*UpdateColormap)();
+void		(*UpdateColormap)(ScreenPtr, int, int, u_char *, u_char *, u_char *);
 Bool		hasHardwareCursor;
 } dreamcastScreenRec, *dreamcastScreenPtr;
 
@@ -144,62 +136,68 @@
 extern Bool		noXkbExtension;
 #endif
 
-#define dreamcastError(str)	{ \
-	int mode; \
-	dreamcastSetDisplayMode(fileno(stderr), WSDISPLAYIO_MODE_EMUL, &mode); \
+#define dreamcastError(str)	do { \
+	int __m; \
+	dreamcastSetDisplayMode(fileno(stderr), WSDISPLAYIO_MODE_EMUL, &__m); \
 	Error(str); \
-	dreamcastSetDisplayMode(fileno(stderr), mode, NULL); \
-}
+	dreamcastSetDisplayMode(fileno(stderr), __m, NULL); \
+} while (/*CONSTCOND*/0)
 
-#define dreamcastErrorF(a)	{ \
-	int mode; \
-	dreamcastSetDisplayMode(fileno(stderr), WSDISPLAYIO_MODE_EMUL, &mode); \
+#define dreamcastErrorF(a)	do { \
+	int __m; \
+	dreamcastSetDisplayMode(fileno(stderr), WSDISPLAYIO_MODE_EMUL, &__m); \
 	ErrorF a; \
-	dreamcastSetDisplayMode(fileno(stderr), mode, NULL); \
-}
+	dreamcastSetDisplayMode(fileno(stderr), __m, NULL); \
+} while (/*CONSTCOND*/0)
 
-#define dreamcastFatalError(a)	{ \
-	int mode; \
-	dreamcastSetDisplayMode(fileno(stderr), WSDISPLAYIO_MODE_EMUL, &mode); \
+#define dreamcastFatalError(a)	do { \
+	int __m; \
+	dreamcastSetDisplayMode(fileno(stderr), WSDISPLAYIO_MODE_EMUL, &__m); \
 	FatalError a; \
-}
+} while (/*CONSTCOND*/0)
+
+/*
+ * dreamcastColormap.c
+ */
+void dreamcastColormapInit(ScreenPtr pScreen);
 
 /*
  * dreamcastInit.c
  */
-dreamcastFbPtr dreamcastGetScreenFb __P((ScreenPtr	pScreen));
+dreamcastFbPtr dreamcastGetScreenFb(ScreenPtr pScreen);
 
 /*
  * dreamcastIo.c
  */
-void dreamcastCleanupFd __P((int));
-void dreamcastEnqueueEvents __P((void));
+void dreamcastCleanupFd(int);
+void dreamcastEnqueueEvents(void);
 
 /*
  * dreamcastKbd.c
  */
-int dreamcastKbdProc __P((DeviceIntPtr pKeyboard, int what));
-dreamcastEvent* dreamcastKbdGetEvents __P((dreamcastKbdPrivPtr, int*, Bool*));
-void dreamcastKbdEnqueueEvent __P((DeviceIntPtr dev, dreamcastEvent* fe));
+int dreamcastKbdProc(DeviceIntPtr pKeyboard, int what);
+dreamcastEvent* dreamcastKbdGetEvents(dreamcastKbdPrivPtr, int*, Bool*);
+void dreamcastKbdEnqueueEvent(DeviceIntPtr dev, dreamcastEvent* fe);
 
 /*
  * dreamcastMouse.c
  */
-int dreamcastMouseProc __P((DeviceIntPtr pMouse, int what));
-dreamcastEvent* dreamcastMouseGetEvents __P((dreamcastPtrPrivPtr, int*, Bool*));
-void dreamcastMouseEnqueueEvent __P

CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd

2010-10-09 Thread Izumi Tsutsui
Module Name:xsrc
Committed By:   tsutsui
Date:   Sun Oct 10 05:35:34 UTC 2010

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha: alphaKbd.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec: decKbd.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips: ews4800mipsKbd.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc: macppcKbd.c
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips: newsmipsKbd.c

Log Message:
Handle WSKBDIO_SETVERSION. Untested, but better than silently obsolete...


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcKbd.c
cvs rdiff -u -r1.1 -r1.2 \
xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c:1.1	Sun Jan 18 04:13:22 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/alphaKbd.c	Sun Oct 10 05:35:32 2010
@@ -521,6 +521,15 @@
 	if (alphaChangeKbdTranslation(pPriv->fd,TRUE) == -1)
 	FatalError("Can't set keyboard translation\n");
 #endif /* 0 XXX */
+#ifdef WSKBDIO_SETVERSION
+	{
+	int version = WSKBDIO_EVENT_VERSION;
+	if (ioctl(pPriv->fd, WSKBDIO_SETVERSION, &version) == -1) {
+		Error ("alphaKbdProc ioctl WSKBDIO_SETVERSION");
+		return !Success;
+	}
+	}
+#endif
 	(void) AddEnabledDevice(pPriv->fd);
 	pKeyboard->on = TRUE;
 	break;

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c:1.1	Sun Jan 18 05:21:41 2004
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/decKbd.c	Sun Oct 10 05:35:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: decKbd.c,v 1.1 2004/01/18 05:21:41 rtr Exp $	*/
+/*	$NetBSD: decKbd.c,v 1.2 2010/10/10 05:35:33 tsutsui Exp $	*/
 
 /* XConsortium: sunKbd.c,v 5.47 94/08/16 13:45:30 dpw Exp */
 /*-
@@ -519,6 +519,15 @@
 	 * Save the original keyclick volume.
 	 */
 	ioctl(pPriv->fd, WSKBDIO_GETKEYCLICK, &pPriv->prevClick);
+#ifdef WSKBDIO_SETVERSION
+	{
+	int version = WSKBDIO_EVENT_VERSION;
+	if (ioctl(pPriv->fd, WSKBDIO_SETVERSION, &version) == -1) {
+		Error ("decKbdProc ioctl WSKBDIO_SETVERSION");
+		return !Success;
+	}
+	}
+#endif
 
 	(void) AddEnabledDevice(pPriv->fd);
 	pKeyboard->on = TRUE;

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c:1.1	Thu Dec 29 15:43:40 2005
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/ews4800mips/ews4800mipsKbd.c	Sun Oct 10 05:35:33 2010
@@ -154,6 +154,15 @@
 	case DEVICE_ON:
 		pPriv = (ews4800mipsKbdPrivPtr)pKeyboard->devicePrivate;
 		ews4800mipsCleanupFd(pPriv->fd);
+#ifdef WSKBDIO_SETVERSION
+		{
+			int version = WSKBDIO_EVENT_VERSION;
+			if (ioctl(pPriv->fd, WSKBDIO_SETVERSION, &version) == -1) {
+Error ("ews4800mipsKbdProc ioctl WSKBDIO_SETVERSION");
+return !Success;
+			}
+		}
+#endif
 		AddEnabledDevice(pPriv->fd);
 		pKeyboard->on = TRUE;
 		break;

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcKbd.c:1.1.1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcKbd.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcKbd.c:1.1.1.1	Sat Dec 27 05:41:21 2003
+++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/macppc/macppcKbd.c	Sun Oct 10 05:35:33 2010
@@ -482,6 +482,15 @@
 	if (macppcChangeKbdTranslation(pPriv->fd,TRUE) == -1)
 	FatalError("Can't set keyboard translation\n");
 #endif /* 0 XXX */
+#ifdef WSKBDIO_SETVERSION
+	{
+	int version = WSKBDIO_EVENT_VERSION;
+	if (ioctl(pPriv->fd, WSKBDIO_SETVERSION, &version) == -1) {
+		Error ("macppcKbdProc ioctl WSKBDIO_SETVERSION");
+		return !Success;
+	}
+	}
+#endif
 	(void) AddEnabledDevice(pPriv->fd);
 	pKeyboard->on = TRUE;
 	break;

Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c
diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c:1.1 xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKbd.c:1.2
--- xsrc/xfree/xc/programs/Xserver/hw/netbsd/newsmips/newsmipsKb