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

2012-10-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Oct 13 06:06:50 UTC 2012

Modified Files:
src/sys/arch/algor/conf: P5064

Log Message:
Bump SYMTAB_SPACE 475000-485000.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/algor/conf/P5064

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/algor/conf/P5064
diff -u src/sys/arch/algor/conf/P5064:1.73 src/sys/arch/algor/conf/P5064:1.74
--- src/sys/arch/algor/conf/P5064:1.73	Fri Aug 17 20:11:37 2012
+++ src/sys/arch/algor/conf/P5064	Sat Oct 13 06:06:49 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: P5064,v 1.73 2012/08/17 20:11:37 abs Exp $
+#	$NetBSD: P5064,v 1.74 2012/10/13 06:06:49 riz Exp $
 #
 # Algorithmics P-5064 kernel.
 #
@@ -7,7 +7,7 @@ include	arch/algor/conf/std.algor
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		P5064-$Revision: 1.73 $
+#ident 		P5064-$Revision: 1.74 $
 
 maxusers 32
 
@@ -25,7 +25,7 @@ options 	DIAGNOSTIC		# Cheap kernel cons
 options 	DDB			# kernel debugger
 makeoptions	DEBUG=-g
 #makeoptions	DEBUGLIST=pattern1 pattern2 ...
-options 	SYMTAB_SPACE=475000
+options 	SYMTAB_SPACE=485000
 
 # File systems
 file-system	FFS		# Fast file system



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

2012-10-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Oct 13 06:08:11 UTC 2012

Modified Files:
src/sys/arch/evbmips/conf: MALTA64

Log Message:
Bump SYMTAB_SPACE 48-49


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/conf/MALTA64

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/evbmips/conf/MALTA64
diff -u src/sys/arch/evbmips/conf/MALTA64:1.5 src/sys/arch/evbmips/conf/MALTA64:1.6
--- src/sys/arch/evbmips/conf/MALTA64:1.5	Thu Feb  9 18:58:44 2012
+++ src/sys/arch/evbmips/conf/MALTA64	Sat Oct 13 06:08:11 2012
@@ -1,4 +1,4 @@
-# $NetBSD: MALTA64,v 1.5 2012/02/09 18:58:44 matt Exp $
+# $NetBSD: MALTA64,v 1.6 2012/10/13 06:08:11 riz Exp $
 #
 include arch/evbmips/conf/MALTA
 
@@ -9,7 +9,7 @@ options 	NOFPU			# No FPU
 options 	EXEC_ELF64
 options 	COMPAT_NETBSD32
 no options 	SYMTAB_SPACE
-options 	SYMTAB_SPACE=48	# size for embedded symbol table
+options 	SYMTAB_SPACE=49	# size for embedded symbol table
 
 #options 	UVMHIST, UVMHIST_PRINT
 



CVS commit: src/sys/arch/ews4800mips

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:08:30 UTC 2012

Modified Files:
src/sys/arch/ews4800mips/dev: ewskbd.c ewsms.c
src/sys/arch/ews4800mips/sbd: if_le_sbdio.c kbms_sbdio.c

Log Message:
struct device * - device_t, struct cfdata * - cfdata_t  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ews4800mips/dev/ewskbd.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/ews4800mips/dev/ewsms.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/ews4800mips/sbd/if_le_sbdio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ews4800mips/sbd/kbms_sbdio.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/arch/ews4800mips/dev/ewskbd.c
diff -u src/sys/arch/ews4800mips/dev/ewskbd.c:1.9 src/sys/arch/ews4800mips/dev/ewskbd.c:1.10
--- src/sys/arch/ews4800mips/dev/ewskbd.c:1.9	Wed May 14 13:29:28 2008
+++ src/sys/arch/ews4800mips/dev/ewskbd.c	Sat Oct 13 06:08:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ewskbd.c,v 1.9 2008/05/14 13:29:28 tsutsui Exp $	*/
+/*	$NetBSD: ewskbd.c,v 1.10 2012/10/13 06:08:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2005 Izumi Tsutsui.  All rights reserved.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ewskbd.c,v 1.9 2008/05/14 13:29:28 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ewskbd.c,v 1.10 2012/10/13 06:08:30 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -124,7 +124,7 @@ struct ewskbd_devconfig {
 #define EWSKBD_KANA	0x04
 
 	/* wscons glue */
-	struct device *wskbddev;
+	device_t wskbddev;
 	int enabled;
 };
 
@@ -195,7 +195,7 @@ ewskbd_zsc_match(device_t parent, cfdata
 }
 
 static void
-ewskbd_zsc_attach(struct device *parent, struct device *self, void *aux)
+ewskbd_zsc_attach(device_t parent, device_t self, void *aux)
 {
 	struct ewskbd_softc *sc;
 	struct zsc_softc *zsc;

Index: src/sys/arch/ews4800mips/dev/ewsms.c
diff -u src/sys/arch/ews4800mips/dev/ewsms.c:1.7 src/sys/arch/ews4800mips/dev/ewsms.c:1.8
--- src/sys/arch/ews4800mips/dev/ewsms.c:1.7	Sun May 25 23:37:05 2008
+++ src/sys/arch/ews4800mips/dev/ewsms.c	Sat Oct 13 06:08:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ewsms.c,v 1.7 2008/05/25 23:37:05 tsutsui Exp $	*/
+/*	$NetBSD: ewsms.c,v 1.8 2012/10/13 06:08:30 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2004 Steve Rumble
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ewsms.c,v 1.7 2008/05/25 23:37:05 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ewsms.c,v 1.8 2012/10/13 06:08:30 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -100,7 +100,7 @@ struct ewsms_softc {
 
 	/* wsmouse bits */
 	int sc_enabled;
-	struct device *sc_wsmousedev;
+	device_t sc_wsmousedev;
 };
 
 static int  ewsms_zsc_match(device_t, cfdata_t, void *);

Index: src/sys/arch/ews4800mips/sbd/if_le_sbdio.c
diff -u src/sys/arch/ews4800mips/sbd/if_le_sbdio.c:1.6 src/sys/arch/ews4800mips/sbd/if_le_sbdio.c:1.7
--- src/sys/arch/ews4800mips/sbd/if_le_sbdio.c:1.6	Tue Jan 19 22:06:20 2010
+++ src/sys/arch/ews4800mips/sbd/if_le_sbdio.c	Sat Oct 13 06:08:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_sbdio.c,v 1.6 2010/01/19 22:06:20 pooka Exp $	*/
+/*	$NetBSD: if_le_sbdio.c,v 1.7 2012/10/13 06:08:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_le_sbdio.c,v 1.6 2010/01/19 22:06:20 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_le_sbdio.c,v 1.7 2012/10/13 06:08:30 tsutsui Exp $);
 
 #include opt_inet.h
 
@@ -73,8 +73,8 @@ struct le_sbdio_softc {
 	bus_dmamap_t sc_dmamap;
 };
 
-int le_sbdio_match(device_t, struct cfdata *, void *);
-void le_sbdio_attach(device_t, struct device *, void *);
+int le_sbdio_match(device_t, cfdata_t, void *);
+void le_sbdio_attach(device_t, device_t, void *);
 static void le_sbdio_wrcsr(struct lance_softc *, uint16_t, uint16_t);
 static uint16_t le_sbdio_rdcsr(struct lance_softc *, uint16_t);
 

Index: src/sys/arch/ews4800mips/sbd/kbms_sbdio.c
diff -u src/sys/arch/ews4800mips/sbd/kbms_sbdio.c:1.9 src/sys/arch/ews4800mips/sbd/kbms_sbdio.c:1.10
--- src/sys/arch/ews4800mips/sbd/kbms_sbdio.c:1.9	Mon Apr 28 20:23:18 2008
+++ src/sys/arch/ews4800mips/sbd/kbms_sbdio.c	Sat Oct 13 06:08:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbms_sbdio.c,v 1.9 2008/04/28 20:23:18 martin Exp $	*/
+/*	$NetBSD: kbms_sbdio.c,v 1.10 2012/10/13 06:08:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kbms_sbdio.c,v 1.9 2008/04/28 20:23:18 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: kbms_sbdio.c,v 1.10 2012/10/13 06:08:30 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -61,8 +61,8 @@ struct kbms_reg {
 enum { MOUSE_PACKET_LEN = 5 };
 struct kbms_softc {
 	device_t sc_dev;
-	struct device *sc_wskbd;
-	struct device *sc_wsmouse;
+	device_t sc_wskbd;
+	device_t sc_wsmouse;
 	struct 

CVS commit: src/sys/arch/hp300

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:12:23 UTC 2012

Modified Files:
src/sys/arch/hp300/dev: hpib.c hpibvar.h rd.c
src/sys/arch/hp300/hp300: autoconf.c

Log Message:
struct device * - device_t, struct cfdata * - cfdata_t
use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/hp300/dev/hpib.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp300/dev/hpibvar.h
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/hp300/dev/rd.c
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/hp300/hp300/autoconf.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/arch/hp300/dev/hpib.c
diff -u src/sys/arch/hp300/dev/hpib.c:1.38 src/sys/arch/hp300/dev/hpib.c:1.39
--- src/sys/arch/hp300/dev/hpib.c:1.38	Fri Jun 13 09:41:15 2008
+++ src/sys/arch/hp300/dev/hpib.c	Sat Oct 13 06:12:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpib.c,v 1.38 2008/06/13 09:41:15 cegger Exp $	*/
+/*	$NetBSD: hpib.c,v 1.39 2012/10/13 06:12:23 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hpib.c,v 1.38 2008/06/13 09:41:15 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: hpib.c,v 1.39 2012/10/13 06:12:23 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -267,7 +267,7 @@ hpibreset(int unit)
 }
 
 int
-hpibreq(struct device *pdev, struct hpibqueue *hq)
+hpibreq(device_t pdev, struct hpibqueue *hq)
 {
 	struct hpibbus_softc *sc = device_private(pdev);
 	int s;
@@ -283,7 +283,7 @@ hpibreq(struct device *pdev, struct hpib
 }
 
 void
-hpibfree(struct device *pdev, struct hpibqueue *hq)
+hpibfree(device_t pdev, struct hpibqueue *hq)
 {
 	struct hpibbus_softc *sc = device_private(pdev);
 	int s;

Index: src/sys/arch/hp300/dev/hpibvar.h
diff -u src/sys/arch/hp300/dev/hpibvar.h:1.20 src/sys/arch/hp300/dev/hpibvar.h:1.21
--- src/sys/arch/hp300/dev/hpibvar.h:1.20	Mon Apr 28 20:23:19 2008
+++ src/sys/arch/hp300/dev/hpibvar.h	Sat Oct 13 06:12:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: hpibvar.h,v 1.20 2008/04/28 20:23:19 martin Exp $	*/
+/*	$NetBSD: hpibvar.h,v 1.21 2012/10/13 06:12:23 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -206,8 +206,8 @@ void	hpibawait(int);
 int	hpibswait(int, int);
 int	hpibid(int, int);
 
-int	hpibreq(struct device *, struct hpibqueue *);
-void	hpibfree(struct device *, struct hpibqueue *);
+int	hpibreq(device_t, struct hpibqueue *);
+void	hpibfree(device_t, struct hpibqueue *);
 
 int	hpibintr(void *);
 int	hpibdevprint(void *, const char *);

Index: src/sys/arch/hp300/dev/rd.c
diff -u src/sys/arch/hp300/dev/rd.c:1.92 src/sys/arch/hp300/dev/rd.c:1.93
--- src/sys/arch/hp300/dev/rd.c:1.92	Thu Feb  2 19:42:59 2012
+++ src/sys/arch/hp300/dev/rd.c	Sat Oct 13 06:12:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.92 2012/02/02 19:42:59 tls Exp $	*/
+/*	$NetBSD: rd.c,v 1.93 2012/10/13 06:12:23 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rd.c,v 1.92 2012/02/02 19:42:59 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: rd.c,v 1.93 2012/10/13 06:12:23 tsutsui Exp $);
 
 #include opt_useleds.h
 
@@ -245,7 +245,7 @@ static const struct rdidentinfo rdidenti
 };
 static const int numrdidentinfo = __arraycount(rdidentinfo);
 
-static int	rdident(struct device *, struct rd_softc *,
+static int	rdident(device_t, struct rd_softc *,
 		struct hpibbus_attach_args *);
 static void	rdreset(struct rd_softc *);
 static void	rdustart(struct rd_softc *);

Index: src/sys/arch/hp300/hp300/autoconf.c
diff -u src/sys/arch/hp300/hp300/autoconf.c:1.100 src/sys/arch/hp300/hp300/autoconf.c:1.101
--- src/sys/arch/hp300/hp300/autoconf.c:1.100	Sun Jul 29 18:05:43 2012
+++ src/sys/arch/hp300/hp300/autoconf.c	Sat Oct 13 06:12:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.100 2012/07/29 18:05:43 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.101 2012/10/13 06:12:23 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.100 2012/07/29 18:05:43 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.101 2012/10/13 06:12:23 tsutsui Exp $);
 
 #include dvbox.h
 #include gbox.h
@@ -209,7 +209,7 @@ int extio_ex_malloc_safe;
 struct dev_data {
 	LIST_ENTRY(dev_data)	dd_list;  /* dev_data_list */
 	LIST_ENTRY(dev_data)	dd_clist; /* ctlr list */
-	struct device		*dd_dev;  /* device described by this entry */
+	device_t		dd_dev;  /* device described by this entry */
 	int			dd_scode; /* select code of device */
 	int			dd_slave; /* ...or slave */
 	int			dd_punit; /* and punit... */
@@ -223,7 +223,7 @@ static void	findbootdev(void);
 static void	findbootdev_slave(ddlist_t *, int, int, int);
 static void	setbootdev(void);
 
-static struct dev_data 

CVS commit: [netbsd-6] src/sys/arch

2012-10-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Oct 13 06:15:23 UTC 2012

Modified Files:
src/sys/arch/algor/conf [netbsd-6]: P5064
src/sys/arch/evbmips/conf [netbsd-6]: MALTA64

Log Message:
Pull up following revision(s) (requested by riz in ticket #607):
sys/arch/evbmips/conf/MALTA64: revision 1.6
sys/arch/algor/conf/P5064: revision 1.74
Bump SYMTAB_SPACE 475000-485000.
Bump SYMTAB_SPACE 48-49


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.72.2.1 src/sys/arch/algor/conf/P5064
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/arch/evbmips/conf/MALTA64

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/algor/conf/P5064
diff -u src/sys/arch/algor/conf/P5064:1.72 src/sys/arch/algor/conf/P5064:1.72.2.1
--- src/sys/arch/algor/conf/P5064:1.72	Sat Feb  4 19:02:25 2012
+++ src/sys/arch/algor/conf/P5064	Sat Oct 13 06:15:23 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: P5064,v 1.72 2012/02/04 19:02:25 christos Exp $
+#	$NetBSD: P5064,v 1.72.2.1 2012/10/13 06:15:23 riz Exp $
 #
 # Algorithmics P-5064 kernel.
 #
@@ -7,7 +7,7 @@ include	arch/algor/conf/std.algor
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		P5064-$Revision: 1.72 $
+#ident 		P5064-$Revision: 1.72.2.1 $
 
 maxusers 32
 
@@ -25,7 +25,7 @@ options 	DIAGNOSTIC		# Cheap kernel cons
 options 	DDB			# kernel debugger
 makeoptions	DEBUG=-g
 #makeoptions	DEBUGLIST=pattern1 pattern2 ...
-options 	SYMTAB_SPACE=475000
+options 	SYMTAB_SPACE=485000
 
 # File systems
 file-system	FFS		# Fast file system

Index: src/sys/arch/evbmips/conf/MALTA64
diff -u src/sys/arch/evbmips/conf/MALTA64:1.5 src/sys/arch/evbmips/conf/MALTA64:1.5.2.1
--- src/sys/arch/evbmips/conf/MALTA64:1.5	Thu Feb  9 18:58:44 2012
+++ src/sys/arch/evbmips/conf/MALTA64	Sat Oct 13 06:15:23 2012
@@ -1,4 +1,4 @@
-# $NetBSD: MALTA64,v 1.5 2012/02/09 18:58:44 matt Exp $
+# $NetBSD: MALTA64,v 1.5.2.1 2012/10/13 06:15:23 riz Exp $
 #
 include arch/evbmips/conf/MALTA
 
@@ -9,7 +9,7 @@ options 	NOFPU			# No FPU
 options 	EXEC_ELF64
 options 	COMPAT_NETBSD32
 no options 	SYMTAB_SPACE
-options 	SYMTAB_SPACE=48	# size for embedded symbol table
+options 	SYMTAB_SPACE=49	# size for embedded symbol table
 
 #options 	UVMHIST, UVMHIST_PRINT
 



CVS commit: src/sys/arch/luna68k

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:16:19 UTC 2012

Modified Files:
src/sys/arch/luna68k/dev: lunaws.c siotty.c
src/sys/arch/luna68k/luna68k: autoconf.c

Log Message:
struct device * - device_t, use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/luna68k/dev/lunaws.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/luna68k/dev/siotty.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/luna68k/luna68k/autoconf.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/arch/luna68k/dev/lunaws.c
diff -u src/sys/arch/luna68k/dev/lunaws.c:1.24 src/sys/arch/luna68k/dev/lunaws.c:1.25
--- src/sys/arch/luna68k/dev/lunaws.c:1.24	Mon Jul 16 11:31:13 2012
+++ src/sys/arch/luna68k/dev/lunaws.c	Sat Oct 13 06:16:18 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: lunaws.c,v 1.24 2012/07/16 11:31:13 tsutsui Exp $ */
+/* $NetBSD: lunaws.c,v 1.25 2012/10/13 06:16:18 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: lunaws.c,v 1.24 2012/07/16 11:31:13 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: lunaws.c,v 1.25 2012/10/13 06:16:18 tsutsui Exp $);
 
 #include wsmouse.h
 
@@ -64,9 +64,9 @@ struct ws_softc {
 	device_t	sc_dev;
 	struct sioreg	*sc_ctl;
 	uint8_t		sc_wr[6];
-	struct device	*sc_wskbddev;
+	device_t	sc_wskbddev;
 #if NWSMOUSE  0
-	struct device	*sc_wsmousedev;
+	device_t	sc_wsmousedev;
 	int		sc_msreport;
 	int		buttons, dx, dy;
 #endif

Index: src/sys/arch/luna68k/dev/siotty.c
diff -u src/sys/arch/luna68k/dev/siotty.c:1.33 src/sys/arch/luna68k/dev/siotty.c:1.34
--- src/sys/arch/luna68k/dev/siotty.c:1.33	Sat Nov 26 04:40:50 2011
+++ src/sys/arch/luna68k/dev/siotty.c	Sat Oct 13 06:16:18 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: siotty.c,v 1.33 2011/11/26 04:40:50 tsutsui Exp $ */
+/* $NetBSD: siotty.c,v 1.34 2012/10/13 06:16:18 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: siotty.c,v 1.33 2011/11/26 04:40:50 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: siotty.c,v 1.34 2012/10/13 06:16:18 tsutsui Exp $);
 
 #include opt_ddb.h
 
@@ -118,7 +118,7 @@ siotty_match(device_t parent, cfdata_t c
 }
 
 static void 
-siotty_attach(struct device *parent, struct device *self, void *aux)
+siotty_attach(device_t parent, device_t self, void *aux)
 {
 	struct sio_softc *scp = device_private(parent);
 	struct siotty_softc *sc = device_private(self);

Index: src/sys/arch/luna68k/luna68k/autoconf.c
diff -u src/sys/arch/luna68k/luna68k/autoconf.c:1.13 src/sys/arch/luna68k/luna68k/autoconf.c:1.14
--- src/sys/arch/luna68k/luna68k/autoconf.c:1.13	Sun Jul 29 18:05:44 2012
+++ src/sys/arch/luna68k/luna68k/autoconf.c	Sat Oct 13 06:16:19 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:44 mlelstv Exp $ */
+/* $NetBSD: autoconf.c,v 1.14 2012/10/13 06:16:19 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.13 2012/07/29 18:05:44 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.14 2012/10/13 06:16:19 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -85,7 +85,7 @@ cpu_rootconf(void)
 
 #endif
 	printf(boot device: %s\n,
-		(booted_device) ? booted_device-dv_xname : unknown);
+		(booted_device) ? device_xname(booted_device) : unknown);
 
 	rootconf();
 }



CVS commit: [netbsd-6] src/doc

2012-10-13 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Oct 13 06:18:33 UTC 2012

Modified Files:
src/doc [netbsd-6]: CHANGES-6.0

Log Message:
Ticket 607, tag to be moved.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.217 -r1.1.2.218 src/doc/CHANGES-6.0

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.217 src/doc/CHANGES-6.0:1.1.2.218
--- src/doc/CHANGES-6.0:1.1.2.217	Fri Oct 12 22:11:10 2012
+++ src/doc/CHANGES-6.0	Sat Oct 13 06:18:33 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.217 2012/10/12 22:11:10 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.218 2012/10/13 06:18:33 riz Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -8841,6 +8841,12 @@ distrib/notes/common/main			patched by h
 
 	Update the release notes.
 
+sys/arch/algor/conf/P5064			1.74
+sys/arch/evbmips/conf/MALTA64			1.6
+
+	Bump SYMTAB_SPACE so these kernels build again.
+	[riz, ticket #607]
+
 sys/sys/param.h	patched by hand
 
 	Welcome to 6.0!



CVS commit: src/sys/arch/news68k/news68k

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:18:44 UTC 2012

Modified Files:
src/sys/arch/news68k/news68k: autoconf.c

Log Message:
use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/news68k/news68k/autoconf.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/arch/news68k/news68k/autoconf.c
diff -u src/sys/arch/news68k/news68k/autoconf.c:1.21 src/sys/arch/news68k/news68k/autoconf.c:1.22
--- src/sys/arch/news68k/news68k/autoconf.c:1.21	Sun Jul 29 18:05:45 2012
+++ src/sys/arch/news68k/news68k/autoconf.c	Sat Oct 13 06:18:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:45 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:45 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $);
 
 #include scsibus.h
 
@@ -110,7 +110,7 @@ cpu_rootconf(void)
 	findroot();
 
 	printf(boot device: %s\n,
-	   booted_device ? booted_device-dv_xname : unknown);
+	   booted_device ? device_xname(booted_device) : unknown);
 
 	rootconf();
 }



CVS commit: src/sys/arch/newsmips/apbus

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:24:15 UTC 2012

Modified Files:
src/sys/arch/newsmips/apbus: if_sn.c

Log Message:
Fix botch on device_t/softc split inside #ifdef SNDEBUG part. from chs@


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/newsmips/apbus/if_sn.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/arch/newsmips/apbus/if_sn.c
diff -u src/sys/arch/newsmips/apbus/if_sn.c:1.33 src/sys/arch/newsmips/apbus/if_sn.c:1.34
--- src/sys/arch/newsmips/apbus/if_sn.c:1.33	Mon Apr  5 07:19:31 2010
+++ src/sys/arch/newsmips/apbus/if_sn.c	Sat Oct 13 06:24:15 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_sn.c,v 1.33 2010/04/05 07:19:31 joerg Exp $	*/
+/*	$NetBSD: if_sn.c,v 1.34 2012/10/13 06:24:15 tsutsui Exp $	*/
 
 /*
  * National Semiconductor  DP8393X SONIC Driver
@@ -16,7 +16,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_sn.c,v 1.33 2010/04/05 07:19:31 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_sn.c,v 1.34 2012/10/13 06:24:15 tsutsui Exp $);
 
 #include opt_inet.h
 
@@ -204,7 +204,7 @@ snsetup(struct sn_softc	*sc, uint8_t *ll
 
 #ifdef SNDEBUG
 	aprint_debug_dev(sc-sc_dev, buffers: rra=%p cda=%p rda=%p tda=%p\n,
-	sc-sc_dev.dv_xname, sc-p_rra[0], sc-p_cda,
+	device_xname(sc-sc_dev), sc-p_rra[0], sc-p_cda,
 	sc-p_rda, sc-mtda[0].mtd_txp);
 #endif
 



CVS commit: src/sys/arch/newsmips

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:25:20 UTC 2012

Modified Files:
src/sys/arch/newsmips/apbus: kb_ap.c ms_ap.c
src/sys/arch/newsmips/dev: kb_hb.c ms_hb.c
src/sys/arch/newsmips/newsmips: autoconf.c

Log Message:
struct device * - device_t, use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/newsmips/apbus/kb_ap.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/newsmips/apbus/ms_ap.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/newsmips/dev/kb_hb.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/newsmips/dev/ms_hb.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/newsmips/newsmips/autoconf.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/arch/newsmips/apbus/kb_ap.c
diff -u src/sys/arch/newsmips/apbus/kb_ap.c:1.9 src/sys/arch/newsmips/apbus/kb_ap.c:1.10
--- src/sys/arch/newsmips/apbus/kb_ap.c:1.9	Wed Apr  9 15:40:30 2008
+++ src/sys/arch/newsmips/apbus/kb_ap.c	Sat Oct 13 06:25:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kb_ap.c,v 1.9 2008/04/09 15:40:30 tsutsui Exp $	*/
+/*	$NetBSD: kb_ap.c,v 1.10 2012/10/13 06:25:20 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kb_ap.c,v 1.9 2008/04/09 15:40:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: kb_ap.c,v 1.10 2012/10/13 06:25:20 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -66,7 +66,7 @@ struct kbreg {
 struct kb_ap_softc {
 	device_t sc_dev;
 	struct kbreg *sc_reg;
-	struct device *sc_wskbddev;
+	device_t sc_wskbddev;
 };
 
 int kb_ap_match(device_t, cfdata_t, void *);

Index: src/sys/arch/newsmips/apbus/ms_ap.c
diff -u src/sys/arch/newsmips/apbus/ms_ap.c:1.10 src/sys/arch/newsmips/apbus/ms_ap.c:1.11
--- src/sys/arch/newsmips/apbus/ms_ap.c:1.10	Wed Apr  9 15:40:30 2008
+++ src/sys/arch/newsmips/apbus/ms_ap.c	Sat Oct 13 06:25:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ms_ap.c,v 1.10 2008/04/09 15:40:30 tsutsui Exp $	*/
+/*	$NetBSD: ms_ap.c,v 1.11 2012/10/13 06:25:20 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ms_ap.c,v 1.10 2008/04/09 15:40:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ms_ap.c,v 1.11 2012/10/13 06:25:20 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -50,7 +50,7 @@ struct msreg {
 struct ms_ap_softc {
 	device_t sc_dev;
 	struct msreg *sc_reg;
-	struct device *sc_wsmousedev;
+	device_t sc_wsmousedev;
 	int sc_ndata;
 	uint8_t sc_buf[3];
 };

Index: src/sys/arch/newsmips/dev/kb_hb.c
diff -u src/sys/arch/newsmips/dev/kb_hb.c:1.12 src/sys/arch/newsmips/dev/kb_hb.c:1.13
--- src/sys/arch/newsmips/dev/kb_hb.c:1.12	Wed Apr  9 15:40:30 2008
+++ src/sys/arch/newsmips/dev/kb_hb.c	Sat Oct 13 06:25:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kb_hb.c,v 1.12 2008/04/09 15:40:30 tsutsui Exp $	*/
+/*	$NetBSD: kb_hb.c,v 1.13 2012/10/13 06:25:20 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kb_hb.c,v 1.12 2008/04/09 15:40:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: kb_hb.c,v 1.13 2012/10/13 06:25:20 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -52,7 +52,7 @@ struct kbreg {
 struct kb_hb_softc {
 	device_t sc_dev;
 	struct kbreg *sc_reg;
-	struct device *sc_wskbddev;
+	device_t sc_wskbddev;
 };
 
 int kb_hb_match(device_t, cfdata_t, void *);

Index: src/sys/arch/newsmips/dev/ms_hb.c
diff -u src/sys/arch/newsmips/dev/ms_hb.c:1.13 src/sys/arch/newsmips/dev/ms_hb.c:1.14
--- src/sys/arch/newsmips/dev/ms_hb.c:1.13	Wed Apr  9 15:40:30 2008
+++ src/sys/arch/newsmips/dev/ms_hb.c	Sat Oct 13 06:25:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ms_hb.c,v 1.13 2008/04/09 15:40:30 tsutsui Exp $	*/
+/*	$NetBSD: ms_hb.c,v 1.14 2012/10/13 06:25:20 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ms_hb.c,v 1.13 2008/04/09 15:40:30 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ms_hb.c,v 1.14 2012/10/13 06:25:20 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -50,7 +50,7 @@ struct msreg {
 struct ms_hb_softc {
 	device_t sc_dev;
 	struct msreg *sc_reg;
-	struct device *sc_wsmousedev;
+	device_t sc_wsmousedev;
 	int sc_ndata;
 	uint8_t sc_buf[3];
 };

Index: src/sys/arch/newsmips/newsmips/autoconf.c
diff -u src/sys/arch/newsmips/newsmips/autoconf.c:1.36 src/sys/arch/newsmips/newsmips/autoconf.c:1.37
--- src/sys/arch/newsmips/newsmips/autoconf.c:1.36	Sun Jul 29 18:05:45 2012
+++ src/sys/arch/newsmips/newsmips/autoconf.c	Sat Oct 13 06:25:20 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.36 2012/07/29 18:05:45 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.37 2012/10/13 06:25:20 tsutsui Exp $	*/
 
 /*
  * 

CVS commit: src/sys/arch/sun2

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:28:54 UTC 2012

Modified Files:
src/sys/arch/sun2/dev: zs.c
src/sys/arch/sun2/sun2: obmem.c

Log Message:
struct device * - device_t, struct cfdata * - cfdata_t  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sun2/dev/zs.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sun2/sun2/obmem.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/arch/sun2/dev/zs.c
diff -u src/sys/arch/sun2/dev/zs.c:1.20 src/sys/arch/sun2/dev/zs.c:1.21
--- src/sys/arch/sun2/dev/zs.c:1.20	Wed Oct 26 00:56:59 2011
+++ src/sys/arch/sun2/dev/zs.c	Sat Oct 13 06:28:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.20 2011/10/26 00:56:59 mrg Exp $	*/
+/*	$NetBSD: zs.c,v 1.21 2012/10/13 06:28:54 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.20 2011/10/26 00:56:59 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: zs.c,v 1.21 2012/10/13 06:28:54 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -170,7 +170,7 @@ zs_attach(struct zsc_softc *zsc, struct 
 	 */
 	for (channel = 0; channel  2; channel++) {
 		struct zschan *zc;
-		struct device *child;
+		device_t child;
 
 		zsc_args.channel = channel;
 		zsc_args.hwflags = 0;

Index: src/sys/arch/sun2/sun2/obmem.c
diff -u src/sys/arch/sun2/sun2/obmem.c:1.17 src/sys/arch/sun2/sun2/obmem.c:1.18
--- src/sys/arch/sun2/sun2/obmem.c:1.17	Sun Jul  6 13:29:50 2008
+++ src/sys/arch/sun2/sun2/obmem.c	Sat Oct 13 06:28:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: obmem.c,v 1.17 2008/07/06 13:29:50 tsutsui Exp $	*/
+/*	$NetBSD: obmem.c,v 1.18 2012/10/13 06:28:54 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: obmem.c,v 1.17 2008/07/06 13:29:50 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: obmem.c,v 1.18 2012/10/13 06:28:54 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -77,7 +77,7 @@ static struct sun68k_bus_space_tag obmem
 }; 
 
 static int 
-obmem_match(struct device *parent, struct cfdata *cf, void *aux)
+obmem_match(device_t parent, cfdata_t cf, void *aux)
 {
 	struct mainbus_attach_args *ma = aux;
 



CVS commit: src/sys/arch/sun3/dev

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:32:11 UTC 2012

Modified Files:
src/sys/arch/sun3/dev: dma.c

Log Message:
Fix botch on device_t/softc split in #if 0'ed debug printf. from chs@


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sun3/dev/dma.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/arch/sun3/dev/dma.c
diff -u src/sys/arch/sun3/dev/dma.c:1.21 src/sys/arch/sun3/dev/dma.c:1.22
--- src/sys/arch/sun3/dev/dma.c:1.21	Tue Dec 16 22:35:27 2008
+++ src/sys/arch/sun3/dev/dma.c	Sat Oct 13 06:32:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: dma.c,v 1.21 2008/12/16 22:35:27 christos Exp $ */
+/*	$NetBSD: dma.c,v 1.22 2012/10/13 06:32:11 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1994 Paul Kranenburg.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dma.c,v 1.21 2008/12/16 22:35:27 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: dma.c,v 1.22 2012/10/13 06:32:11 tsutsui Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -389,7 +389,7 @@ espdmaintr(struct dma_softc *sc)
 		 * another target.  As such, don't print the warning.
 		 */
 		printf(%s: xfer (%d)  req (%d)\n,
-		sc-sc_dev.dv_xname, trans, sc-sc_dmasize);
+		device_xname(sc-sc_dev), trans, sc-sc_dmasize);
 #endif
 		trans = sc-sc_dmasize;
 	}



CVS commit: src/sys/arch/sun3/dev

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:35:54 UTC 2012

Modified Files:
src/sys/arch/sun3/dev: zs_kgdb.c

Log Message:
Add a cast to print dev_t. (broken since 64bit dev_t change?) from chs@
XXX: probably no one will use this...


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/sun3/dev/zs_kgdb.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/arch/sun3/dev/zs_kgdb.c
diff -u src/sys/arch/sun3/dev/zs_kgdb.c:1.25 src/sys/arch/sun3/dev/zs_kgdb.c:1.26
--- src/sys/arch/sun3/dev/zs_kgdb.c:1.25	Mon Apr 28 20:23:38 2008
+++ src/sys/arch/sun3/dev/zs_kgdb.c	Sat Oct 13 06:35:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs_kgdb.c,v 1.25 2008/04/28 20:23:38 martin Exp $	*/
+/*	$NetBSD: zs_kgdb.c,v 1.26 2012/10/13 06:35:54 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zs_kgdb.c,v 1.25 2008/04/28 20:23:38 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: zs_kgdb.c,v 1.26 2012/10/13 06:35:54 tsutsui Exp $);
 
 #include opt_kgdb.h
 
@@ -143,7 +143,7 @@ zs_kgdb_init(void)
 	zsc_unit = (kgdb_dev  2) ? 0 : 1;
 	channel  =  kgdb_dev  1;
 	printf(zs_kgdb_init: attaching tty%c at %d baud\n,
-		   'a' + (kgdb_dev  3), kgdb_rate);
+		   'a' + ((int)kgdb_dev  3), kgdb_rate);
 
 	/* Setup temporary chanstate. */
 	memset((void *)cs, 0, sizeof(cs));



CVS commit: src/sys/arch/sun3

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:37:17 UTC 2012

Modified Files:
src/sys/arch/sun3/dev: fd.c
src/sys/arch/sun3/include: autoconf.h
src/sys/arch/sun3/sun3: autoconf.c
src/sys/arch/sun3/sun3x: obio.c vme.c

Log Message:
struct device * - device_t, struct cfdata * - cfdata_t
use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sun3/dev/fd.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sun3/include/autoconf.h
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/sun3/sun3/autoconf.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sun3/sun3x/obio.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sun3/sun3x/vme.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/arch/sun3/dev/fd.c
diff -u src/sys/arch/sun3/dev/fd.c:1.72 src/sys/arch/sun3/dev/fd.c:1.73
--- src/sys/arch/sun3/dev/fd.c:1.72	Sat Jul 16 20:25:28 2011
+++ src/sys/arch/sun3/dev/fd.c	Sat Oct 13 06:37:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $	*/
+/*	$NetBSD: fd.c,v 1.73 2012/10/13 06:37:16 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -72,7 +72,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.73 2012/10/13 06:37:16 tsutsui Exp $);
 
 #include opt_ddb.h
 
@@ -396,7 +396,7 @@ fdconf(struct fdc_softc *fdc)
 }
 
 void 
-fdcattach(struct device *parent, struct device *self, void *aux)
+fdcattach(device_t parent, device_t self, void *aux)
 {
 	struct confargs *ca = aux;
 	struct fdc_softc *fdc = device_private(self);

Index: src/sys/arch/sun3/include/autoconf.h
diff -u src/sys/arch/sun3/include/autoconf.h:1.26 src/sys/arch/sun3/include/autoconf.h:1.27
--- src/sys/arch/sun3/include/autoconf.h:1.26	Mon Apr 28 20:23:38 2008
+++ src/sys/arch/sun3/include/autoconf.h	Sat Oct 13 06:37:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.26 2008/04/28 20:23:38 martin Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.27 2012/10/13 06:37:16 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ extern struct sun68k_bus_space_tag mainb
 #define cf_intpri	cf_loc[1]
 #define cf_intvec	cf_loc[2]
 
-int bus_scan(struct device *, struct cfdata *, const int *, void *);
+int bus_scan(device_t, cfdata_t, const int *, void *);
 int bus_print(void *, const char *);
 int bus_peek(int, int, int);
 void *bus_mapin(int, int, int);

Index: src/sys/arch/sun3/sun3/autoconf.c
diff -u src/sys/arch/sun3/sun3/autoconf.c:1.77 src/sys/arch/sun3/sun3/autoconf.c:1.78
--- src/sys/arch/sun3/sun3/autoconf.c:1.77	Mon Jul 30 17:21:31 2012
+++ src/sys/arch/sun3/sun3/autoconf.c	Sat Oct 13 06:37:16 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.77 2012/07/30 17:21:31 christos Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.78 2012/10/13 06:37:16 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.77 2012/07/30 17:21:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.78 2012/10/13 06:37:16 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -98,7 +98,7 @@ cpu_configure(void)
  * setup the confargs for each child match and attach call.
  */
 int 
-bus_scan(struct device *parent, struct cfdata *cf, const int *ldesc, void *aux)
+bus_scan(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
 	struct confargs *ca = aux;
 
@@ -154,13 +154,13 @@ bus_print(void *args, const char *name)
 //
 
 /* This takes the args: name, ctlr, unit */
-typedef struct device * (*findfunc_t)(char *, int, int);
+typedef device_t (*findfunc_t)(char *, int, int);
 
-static struct device * net_find (char *, int, int);
+static device_t net_find(char *, int, int);
 #if NSCSIBUS  0
-static struct device * scsi_find(char *, int, int);
+static device_t scsi_find(char *, int, int);
 #endif
-static struct device * xx_find  (char *, int, int);
+static device_t xx_find(char *, int, int);
 
 struct prom_n2f {
 	const char name[4];
@@ -218,7 +218,7 @@ cpu_rootconf(void)
 	if (find)
 		booted_device = (*find)(promname, bp-ctlrNum, bp-unitNum);
 	if (booted_device) {
-		devname = booted_device-dv_xname;
+		devname = device_xname(booted_device);
 		if (device_class(booted_device) == DV_DISK) {
 			booted_partition = bp-partNum  7;
 			partname[0] = 'a' + booted_partition;
@@ -237,7 +237,7 @@ cpu_rootconf(void)
 /*
  * Network device:  Just use controller number.
  */
-static struct device *
+static device_t
 net_find(char *name, int ctlr, int unit)
 {
 	return device_find_by_driver_unit(name, ctlr);
@@ -248,10 +248,10 @@ net_find(char *name, int ctlr, int unit)
  * SCSI device:  The controller number corresponds to the
  * scsibus number, and the unit number is 

CVS commit: src/sys/arch/sun68k/sun68k

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:38:08 UTC 2012

Modified Files:
src/sys/arch/sun68k/sun68k: autoconf.c

Log Message:
use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sun68k/sun68k/autoconf.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/arch/sun68k/sun68k/autoconf.c
diff -u src/sys/arch/sun68k/sun68k/autoconf.c:1.29 src/sys/arch/sun68k/sun68k/autoconf.c:1.30
--- src/sys/arch/sun68k/sun68k/autoconf.c:1.29	Sun Jul 29 18:05:46 2012
+++ src/sys/arch/sun68k/sun68k/autoconf.c	Sat Oct 13 06:38:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.29 2012/07/29 18:05:46 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.30 2012/10/13 06:38:08 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.29 2012/07/29 18:05:46 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.30 2012/10/13 06:38:08 tsutsui Exp $);
 
 #include opt_kgdb.h
 
@@ -349,7 +349,7 @@ cpu_rootconf(void)
 	if (find)
 		booted_device = (*find)(promname, prom_ctlr, prom_unit);
 	if (booted_device) {
-		devname = booted_device-dv_xname;
+		devname = device_xname(booted_device);
 		if (device_class(booted_device) == DV_DISK) {
 			booted_partition = prom_part  7;
 			partname[0] = 'a' + booted_partition;



CVS commit: src/sys/arch/x68k/dev

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:43:00 UTC 2012

Modified Files:
src/sys/arch/x68k/dev: grf_machdep.c par.c

Log Message:
Normalize autoconf(9) function arg names (parent, self, and aux)
for clarification.  from chs@.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/x68k/dev/grf_machdep.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/dev/par.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/arch/x68k/dev/grf_machdep.c
diff -u src/sys/arch/x68k/dev/grf_machdep.c:1.30 src/sys/arch/x68k/dev/grf_machdep.c:1.31
--- src/sys/arch/x68k/dev/grf_machdep.c:1.30	Tue Feb  8 20:20:25 2011
+++ src/sys/arch/x68k/dev/grf_machdep.c	Sat Oct 13 06:43:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf_machdep.c,v 1.30 2011/02/08 20:20:25 rmind Exp $	*/
+/*	$NetBSD: grf_machdep.c,v 1.31 2012/10/13 06:43:00 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1991 University of Utah.
@@ -44,7 +44,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: grf_machdep.c,v 1.30 2011/02/08 20:20:25 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: grf_machdep.c,v 1.31 2012/10/13 06:43:00 tsutsui Exp $);
 
 #include locators.h
 
@@ -79,32 +79,32 @@ CFATTACH_DECL_NEW(grf, sizeof(struct grf
 extern struct cfdriver grfbus_cd;
 
 int
-grfbusmatch(device_t pdp, cfdata_t cfp, void *auxp)
+grfbusmatch(device_t parent, cfdata_t cf, void *aux)
 {
-	if (strcmp(auxp, grfbus_cd.cd_name))
+	if (strcmp(aux, grfbus_cd.cd_name))
 		return (0);
 
 	return (1);
 }
 
 void
-grfbusattach(device_t pdp, device_t dp, void *auxp)
+grfbusattach(device_t parent, device_t self, void *aux)
 {
 
 	aprint_normal(\n);
-	config_search_ia(grfbussearch, dp, grfb, NULL);
+	config_search_ia(grfbussearch, self, grfb, NULL);
 }
 
 int
-grfbussearch(device_t dp, cfdata_t match, const int *ldesc, void *aux)
+grfbussearch(device_t self, cfdata_t match, const int *ldesc, void *aux)
 {
 
-	config_found(dp, match-cf_loc[GRFBCF_ADDR], grfbusprint);
+	config_found(self, match-cf_loc[GRFBCF_ADDR], grfbusprint);
 	return (0);
 }
 
 int
-grfbusprint(void *auxp, const char *name)
+grfbusprint(void *aux, const char *name)
 {
 
 	if (name == NULL)
@@ -130,17 +130,17 @@ grfmatch(device_t parent, cfdata_t cfp, 
 struct grf_softc congrf;
 
 void
-grfattach(device_t parent, device_t dp, void *aux)
+grfattach(device_t parent, device_t self, void *aux)
 {
 	struct grf_softc *gp;
 	struct cfdata *cf;
 	int addr;
 
-	cf = device_cfdata(dp);
+	cf = device_cfdata(self);
 	addr = cf-cf_loc[GRFBCF_ADDR];
 
-	gp = device_private(dp);
-	gp-g_device = dp;
+	gp = device_private(self);
+	gp-g_device = self;
 	gp-g_cfaddr = addr;
 	grfinit(gp, addr);
 
@@ -155,11 +155,11 @@ grfattach(device_t parent, device_t dp, 
 	/*
 	 * try and attach an ite
 	 */
-	config_found(dp, gp, grfprint);
+	config_found(self, gp, grfprint);
 }
 
 int
-grfprint(void *auxp, const char *pnp)
+grfprint(void *aux, const char *pnp)
 {
 
 	if (pnp)

Index: src/sys/arch/x68k/dev/par.c
diff -u src/sys/arch/x68k/dev/par.c:1.38 src/sys/arch/x68k/dev/par.c:1.39
--- src/sys/arch/x68k/dev/par.c:1.38	Sat Jan  9 09:16:32 2010
+++ src/sys/arch/x68k/dev/par.c	Sat Oct 13 06:43:00 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: par.c,v 1.38 2010/01/09 09:16:32 isaki Exp $	*/
+/*	$NetBSD: par.c,v 1.39 2012/10/13 06:43:00 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: par.c,v 1.38 2010/01/09 09:16:32 isaki Exp $);
+__KERNEL_RCSID(0, $NetBSD: par.c,v 1.39 2012/10/13 06:43:00 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/errno.h
@@ -130,7 +130,7 @@ const struct cdevsw par_cdevsw = {
 };
 
 int
-parmatch(device_t pdp, cfdata_t cfp, void *aux)
+parmatch(device_t parent, cfdata_t cf, void *aux)
 {
 	struct intio_attach_args *ia = aux;
 
@@ -141,7 +141,7 @@ parmatch(device_t pdp, cfdata_t cfp, voi
 	if (ia-ia_addr == INTIOCF_ADDR_DEFAULT)
 		ia-ia_addr = 0xe8c000;
 	ia-ia_size = 0x2000;
-	if (intio_map_allocate_region(pdp, ia, INTIO_MAP_TESTONLY))
+	if (intio_map_allocate_region(parent, ia, INTIO_MAP_TESTONLY))
 		return 0;
 	if (ia-ia_intr == INTIOCF_INTR_DEFAULT)
 		ia-ia_intr = 99;
@@ -154,19 +154,19 @@ parmatch(device_t pdp, cfdata_t cfp, voi
 }
 
 void
-parattach(device_t pdp, device_t dp, void *aux)
+parattach(device_t parent, device_t self, void *aux)
 {
-	struct par_softc *sc = device_private(dp);
+	struct par_softc *sc = device_private(self);
 	struct intio_attach_args *ia = aux;
 	int r;
 	
 	par_attached = 1;
 
-	sc-sc_dev = dp;
+	sc-sc_dev = self;
 	sc-sc_flags = PARF_ALIVE;
 	aprint_normal(: parallel port (write only, interrupt)\n);
 	ia-ia_size = 0x2000;
-	r = intio_map_allocate_region(pdp, ia, INTIO_MAP_ALLOCATE);
+	r = intio_map_allocate_region(parent, ia, INTIO_MAP_ALLOCATE);
 #ifdef DIAGNOSTIC
 	if (r)
 		panic(IO map for PAR corruption??);



CVS commit: src/sys/arch/x68k/include

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:44:24 UTC 2012

Modified Files:
src/sys/arch/x68k/include: bus.h

Log Message:
struct device * - device_t  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/x68k/include/bus.h

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/x68k/include/bus.h
diff -u src/sys/arch/x68k/include/bus.h:1.24 src/sys/arch/x68k/include/bus.h:1.25
--- src/sys/arch/x68k/include/bus.h:1.24	Thu Mar 24 15:05:55 2011
+++ src/sys/arch/x68k/include/bus.h	Sat Oct 13 06:44:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.24 2011/03/24 15:05:55 tsutsui Exp $	*/
+/*	$NetBSD: bus.h,v 1.25 2012/10/13 06:44:24 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@ struct x68k_bus_space {
 int);			/* flags */
 #endif
 
-	struct device *x68k_bus_device;
+	device_t x68k_bus_device;
 };
 
 int x68k_bus_space_alloc(bus_space_tag_t, bus_addr_t, bus_addr_t, bus_size_t,



CVS commit: src/sys/arch/pmax/tc

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:49:27 UTC 2012

Modified Files:
src/sys/arch/pmax/tc: asc_ioasic.c

Log Message:
Fix botch on device_t/softc split in debug printf macro. from chs@


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/pmax/tc/asc_ioasic.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/arch/pmax/tc/asc_ioasic.c
diff -u src/sys/arch/pmax/tc/asc_ioasic.c:1.24 src/sys/arch/pmax/tc/asc_ioasic.c:1.25
--- src/sys/arch/pmax/tc/asc_ioasic.c:1.24	Sat Jul  9 17:32:31 2011
+++ src/sys/arch/pmax/tc/asc_ioasic.c	Sat Oct 13 06:49:26 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: asc_ioasic.c,v 1.24 2011/07/09 17:32:31 matt Exp $ */
+/* $NetBSD: asc_ioasic.c,v 1.25 2012/10/13 06:49:26 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
-__KERNEL_RCSID(0, $NetBSD: asc_ioasic.c,v 1.24 2011/07/09 17:32:31 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: asc_ioasic.c,v 1.25 2012/10/13 06:49:26 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -218,7 +218,7 @@ asc_ioasic_setup(struct ncr53c9x_softc *
 	size_t size;
 	vaddr_t cp;
 
-	NCR_DMA((%s: start %d@%p,%s\n, sc-sc_dev.dv_xname,
+	NCR_DMA((%s: start %d@%p,%s\n, device_xname(sc-sc_dev),
 	*asc-sc_dmalen, *asc-sc_dmaaddr, ispullup ? IN : OUT));
 
 	/* upto two 4KB pages */



CVS commit: src/sys/arch/pmax

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:51:23 UTC 2012

Modified Files:
src/sys/arch/pmax/pmax: autoconf.c dec_3100.c dec_3max.c dec_3maxplus.c
dec_3min.c dec_5100.c dec_maxine.c
src/sys/arch/pmax/tc: tcbus.c

Log Message:
struct device * - device_t, use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/pmax/pmax/autoconf.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/pmax/pmax/dec_3100.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/pmax/pmax/dec_3max.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/pmax/pmax/dec_3maxplus.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/pmax/pmax/dec_3min.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/pmax/pmax/dec_5100.c
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/pmax/pmax/dec_maxine.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/pmax/tc/tcbus.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/arch/pmax/pmax/autoconf.c
diff -u src/sys/arch/pmax/pmax/autoconf.c:1.79 src/sys/arch/pmax/pmax/autoconf.c:1.80
--- src/sys/arch/pmax/pmax/autoconf.c:1.79	Sun Jul 29 18:05:45 2012
+++ src/sys/arch/pmax/pmax/autoconf.c	Sat Oct 13 06:51:22 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.79 2012/07/29 18:05:45 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.80 2012/10/13 06:51:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.79 2012/07/29 18:05:45 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.80 2012/10/13 06:51:22 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -62,9 +62,9 @@ __KERNEL_RCSID(0, $NetBSD: autoconf.c,v
 #include opt_dec_3100.h
 #include opt_dec_5100.h
 
-struct intrhand		 intrtab[MAX_DEV_NCOOKIES];
-static struct device	*booted_controller;
-static int		 booted_slot, booted_unit;
+struct intrhand		intrtab[MAX_DEV_NCOOKIES];
+static device_t		booted_controller;
+static int		booted_slot, booted_unit;
 static const char	*booted_protocol;
 
 /*
@@ -149,7 +149,7 @@ cpu_rootconf(void)
 {
 
 	printf(boot device: %s\n,
-	booted_device ? booted_device-dv_xname : unknown);
+	booted_device ? device_xname(booted_device) : unknown);
 
 	rootconf();
 }
@@ -158,11 +158,11 @@ cpu_rootconf(void)
  * Try to determine the boot device.
  */
 void
-device_register(struct device *dev, void *aux)
+device_register(device_t dev, void *aux)
 {
 	static int found, initted, scsiboot, netboot;
-	static struct device *ioasicdev;
-	struct device *parent = device_parent(dev);
+	static device_t ioasicdev;
+	device_t parent = device_parent(dev);
 
 	if (found)
 		return;

Index: src/sys/arch/pmax/pmax/dec_3100.c
diff -u src/sys/arch/pmax/pmax/dec_3100.c:1.52 src/sys/arch/pmax/pmax/dec_3100.c:1.53
--- src/sys/arch/pmax/pmax/dec_3100.c:1.52	Sat Jul  9 17:32:30 2011
+++ src/sys/arch/pmax/pmax/dec_3100.c	Sat Oct 13 06:51:22 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3100.c,v 1.52 2011/07/09 17:32:30 matt Exp $ */
+/* $NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -69,7 +69,7 @@
 
 #define __INTR_PRIVATE
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dec_3100.c,v 1.52 2011/07/09 17:32:30 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -102,7 +102,7 @@ static void	dec_3100_bus_reset(void);
 static void	dec_3100_cons_init(void);
 static void	dec_3100_errintr(void);
 static void	dec_3100_intr(uint32_t, vaddr_t, uint32_t);
-static void	dec_3100_intr_establish(struct device *, void *,
+static void	dec_3100_intr_establish(device_t, void *,
 		int, int (*)(void *), void *);
 
 #define	kn01_wbflush()	wbflush() /* XXX to be corrected XXX */
@@ -221,7 +221,7 @@ dec_3100_intr(uint32_t status, vaddr_t p
 }
 
 static void
-dec_3100_intr_establish(struct device *dev, void *cookie, int level,
+dec_3100_intr_establish(device_t dev, void *cookie, int level,
 int (*handler)(void *), void *arg)
 {
 

Index: src/sys/arch/pmax/pmax/dec_3max.c
diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.54 src/sys/arch/pmax/pmax/dec_3max.c:1.55
--- src/sys/arch/pmax/pmax/dec_3max.c:1.54	Sat Jul  9 17:32:30 2011
+++ src/sys/arch/pmax/pmax/dec_3max.c	Sat Oct 13 06:51:22 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3max.c,v 1.54 2011/07/09 17:32:30 matt Exp $ */
+/* $NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
@@ -70,7 +70,7 @@
 #define	__INTR_PRIVATE
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dec_3max.c,v 1.54 2011/07/09 17:32:30 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $);
 
 #include dzkbd.h
 
@@ -220,7 +220,7 @@ static const struct {
 };
 
 static void
-dec_3max_intr_establish(struct device *dev, void *cookie, int 

CVS commit: src/sys/dev/sdmmc

2012-10-13 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Sat Oct 13 07:31:25 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdmmc_mem.c

Log Message:
Fix variable name for message of printf.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/sdmmc/sdmmc_mem.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/sdmmc/sdmmc_mem.c
diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.23 src/sys/dev/sdmmc/sdmmc_mem.c:1.24
--- src/sys/dev/sdmmc/sdmmc_mem.c:1.23	Thu Jul 26 18:36:55 2012
+++ src/sys/dev/sdmmc/sdmmc_mem.c	Sat Oct 13 07:31:25 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdmmc_mem.c,v 1.23 2012/07/26 18:36:55 matt Exp $	*/
+/*	$NetBSD: sdmmc_mem.c,v 1.24 2012/10/13 07:31:25 kiyohara Exp $	*/
 /*	$OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $	*/
 
 /*
@@ -45,7 +45,7 @@
 /* Routines for SD/MMC memory cards. */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdmmc_mem.c,v 1.23 2012/07/26 18:36:55 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdmmc_mem.c,v 1.24 2012/10/13 07:31:25 kiyohara Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -429,7 +429,7 @@ sdmmc_print_csd(sdmmc_response resp, str
 	printf(mmcver = %d\n, csd-mmcver);
 	printf(capacity = 0x%08x\n, csd-capacity);
 	printf(read_bl_len = %d\n, csd-read_bl_len);
-	printf(write_cl_len = %d\n, csd-write_bl_len);
+	printf(write_bl_len = %d\n, csd-write_bl_len);
 	printf(r2w_factor = %d\n, csd-r2w_factor);
 	printf(tran_speed = %d\n, csd-tran_speed);
 	printf(ccc = 0x%x\n, csd-ccc);



CVS commit: src/sys/arch/arm/broadcom

2012-10-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 13 07:57:50 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_mbox_subr.c

Log Message:
Unwrap short line. Other whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm2835_mbox_subr.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/arch/arm/broadcom/bcm2835_mbox_subr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c:1.1 src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c:1.2
--- src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c:1.1	Wed Aug 22 13:19:47 2012
+++ src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c	Sat Oct 13 07:57:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_mbox_subr.c,v 1.1 2012/08/22 13:19:47 jakllsch Exp $	*/
+/*	$NetBSD: bcm2835_mbox_subr.c,v 1.2 2012/10/13 07:57:50 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm2835_mbox_subr.c,v 1.1 2012/08/22 13:19:47 jakllsch Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm2835_mbox_subr.c,v 1.2 2012/10/13 07:57:50 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -54,15 +54,14 @@ bcm2835_mbox_read(bus_space_tag_t iot, b
 		uint8_t rchan;
 		uint32_t rdata;
 
-		bus_space_barrier(iot, ioh, 0,
-		BCM2835_MBOX_SIZE, BUS_SPACE_BARRIER_READ);
+		bus_space_barrier(iot, ioh, 0, BCM2835_MBOX_SIZE,
+		BUS_SPACE_BARRIER_READ);
 
 		if ((bus_space_read_4(iot, ioh,
 		BCM2835_MBOX0_STATUS)  BCM2835_MBOX_STATUS_EMPTY) != 0)
 			continue;
 
-		mbox = bus_space_read_4(iot, ioh,
-		BCM2835_MBOX0_READ);
+		mbox = bus_space_read_4(iot, ioh, BCM2835_MBOX0_READ);
 
 		rchan = BCM2835_MBOX_CHAN(mbox);
 		rdata = BCM2835_MBOX_DATA(mbox);
@@ -82,17 +81,17 @@ bcm2835_mbox_write(bus_space_tag_t iot, 
 
 	for (;;) {
 
-		bus_space_barrier(iot, ioh, 0,
-		BCM2835_MBOX_SIZE, BUS_SPACE_BARRIER_READ);
+		bus_space_barrier(iot, ioh, 0, BCM2835_MBOX_SIZE,
+		BUS_SPACE_BARRIER_READ);
 
 		if ((rdata = bus_space_read_4(iot, ioh,
 		BCM2835_MBOX0_STATUS)  BCM2835_MBOX_STATUS_FULL) == 0)
 			break;
 	}
 
-	bus_space_write_4(iot, ioh,
-	BCM2835_MBOX1_WRITE, BCM2835_MBOX_MSG(chan, data));
+	bus_space_write_4(iot, ioh, BCM2835_MBOX1_WRITE,
+	BCM2835_MBOX_MSG(chan, data));
 
-	bus_space_barrier(iot, ioh, 0,
-	BCM2835_MBOX_SIZE, BUS_SPACE_BARRIER_WRITE);
+	bus_space_barrier(iot, ioh, 0, BCM2835_MBOX_SIZE,
+	BUS_SPACE_BARRIER_WRITE);
 }



CVS commit: src/sys/arch/arm/broadcom

2012-10-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 13 08:42:51 UTC 2012

Modified Files:
src/sys/arch/arm/broadcom: bcm2835_mbox.h bcm2835_mbox_subr.c

Log Message:
Change the mailbox handling so that the data value top 28 bits are used.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/broadcom/bcm2835_mbox.h \
src/sys/arch/arm/broadcom/bcm2835_mbox_subr.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/arch/arm/broadcom/bcm2835_mbox.h
diff -u src/sys/arch/arm/broadcom/bcm2835_mbox.h:1.2 src/sys/arch/arm/broadcom/bcm2835_mbox.h:1.3
--- src/sys/arch/arm/broadcom/bcm2835_mbox.h:1.2	Wed Aug 22 13:19:47 2012
+++ src/sys/arch/arm/broadcom/bcm2835_mbox.h	Sat Oct 13 08:42:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_mbox.h,v 1.2 2012/08/22 13:19:47 jakllsch Exp $	*/
+/*	$NetBSD: bcm2835_mbox.h,v 1.3 2012/10/13 08:42:50 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -34,11 +34,6 @@
 
 #include sys/bus.h
 
-#define	BCM2835_MBOX_CHAN(mbox) ((mbox)  0xf)
-#define	BCM2835_MBOX_DATA(mbox) (((mbox)  ~0xf)  4)
-
-#define	BCM2835_MBOX_MSG(chan, data) (((chan)  0xf) | ((data)  4))
-
 void bcm2835_mbox_read(bus_space_tag_t, bus_space_handle_t, uint8_t,
 uint32_t *);
 void bcm2835_mbox_write(bus_space_tag_t, bus_space_handle_t, uint8_t,
Index: src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c
diff -u src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c:1.2 src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c:1.3
--- src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c:1.2	Sat Oct 13 07:57:50 2012
+++ src/sys/arch/arm/broadcom/bcm2835_mbox_subr.c	Sat Oct 13 08:42:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm2835_mbox_subr.c,v 1.2 2012/10/13 07:57:50 skrll Exp $	*/
+/*	$NetBSD: bcm2835_mbox_subr.c,v 1.3 2012/10/13 08:42:50 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bcm2835_mbox_subr.c,v 1.2 2012/10/13 07:57:50 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: bcm2835_mbox_subr.c,v 1.3 2012/10/13 08:42:50 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -44,12 +44,20 @@ __KERNEL_RCSID(0, $NetBSD: bcm2835_mbox
 #include arm/broadcom/bcm2835_mboxreg.h
 #include arm/broadcom/bcm2835reg.h
 
+
+#define	BCM2835_MBOX_CHAN(chan) ((chan)  0xf)
+#define	BCM2835_MBOX_DATA(data) ((data)  ~0xf)
+
+#define	BCM2835_MBOX_MSG(chan, data) (((chan)  0xf) | ((data)  ~0xf))
+
 void
 bcm2835_mbox_read(bus_space_tag_t iot, bus_space_handle_t ioh, uint8_t chan,
 uint32_t *data)
 {
 	uint32_t mbox;
 
+	KASSERT((chan  0xf) == chan);
+
 	for (;;) {
 		uint8_t rchan;
 		uint32_t rdata;
@@ -79,6 +87,8 @@ bcm2835_mbox_write(bus_space_tag_t iot, 
 {
 	uint32_t rdata;
 
+	KASSERT((chan  0xf) == chan);
+	KASSERT((data  0xf) == 0);
 	for (;;) {
 
 		bus_space_barrier(iot, ioh, 0, BCM2835_MBOX_SIZE,



CVS commit: src

2012-10-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 13 14:18:17 UTC 2012

Modified Files:
src/bin/rm: rm.1
src/usr.bin/find: find.1
src/usr.bin/indent: indent.1
src/usr.bin/xargs: xargs.1

Log Message:
Remove a few unneeded Pp macros.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/bin/rm/rm.1
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/find/find.1
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/indent/indent.1
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/xargs/xargs.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/rm/rm.1
diff -u src/bin/rm/rm.1:1.24 src/bin/rm/rm.1:1.25
--- src/bin/rm/rm.1:1.24	Sat Sep  2 23:28:32 2006
+++ src/bin/rm/rm.1	Sat Oct 13 14:18:16 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: rm.1,v 1.24 2006/09/02 23:28:32 wiz Exp $
+.\	$NetBSD: rm.1,v 1.25 2012/10/13 14:18:16 njoly Exp $
 .\
 .\ Copyright (c) 1990, 1993, 1994, 2003
 .\	The Regents of the University of California.  All rights reserved.
@@ -99,7 +99,6 @@ each directory's contents are processed 
 is made to remove the directory).
 If the user does not respond affirmatively, the file hierarchy rooted in
 that directory is skipped.
-.Pp
 .It Fl r
 Equivalent to
 .Fl R .

Index: src/usr.bin/find/find.1
diff -u src/usr.bin/find/find.1:1.78 src/usr.bin/find/find.1:1.79
--- src/usr.bin/find/find.1:1.78	Sun Aug 26 14:26:07 2012
+++ src/usr.bin/find/find.1	Sat Oct 13 14:18:17 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: find.1,v 1.78 2012/08/26 14:26:07 wiz Exp $
+.\	$NetBSD: find.1,v 1.79 2012/10/13 14:18:17 njoly Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -698,13 +698,11 @@ The operators are listed in order of dec
 .It Cm \( Ar expression Cm \)
 This evaluates to true if the parenthesized expression evaluates to
 true.
-.Pp
 .It Cm \! Ar expression
 This is the unary
 .Tn NOT
 operator.
 It evaluates to true if the expression is false.
-.Pp
 .It Ar expression Cm -and Ar expression
 .It Ar expression expression
 The
@@ -716,7 +714,6 @@ As it is implied by the juxtaposition of
 have to be specified.
 The expression evaluates to true if both expressions are true.
 The second expression is not evaluated if the first expression is false.
-.Pp
 .It Ar expression Cm -or Ar expression
 The
 .Cm -or

Index: src/usr.bin/indent/indent.1
diff -u src/usr.bin/indent/indent.1:1.21 src/usr.bin/indent/indent.1:1.22
--- src/usr.bin/indent/indent.1:1.21	Sun Apr  8 22:00:38 2012
+++ src/usr.bin/indent/indent.1	Sat Oct 13 14:18:17 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: indent.1,v 1.21 2012/04/08 22:00:38 wiz Exp $
+.\	$NetBSD: indent.1,v 1.22 2012/10/13 14:18:17 njoly Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -193,7 +193,6 @@ if (...) {
   code
 }
 .Ed
-.Pp
 .It Fl bs , Fl nbs
 If
 .Fl bs

Index: src/usr.bin/xargs/xargs.1
diff -u src/usr.bin/xargs/xargs.1:1.22 src/usr.bin/xargs/xargs.1:1.23
--- src/usr.bin/xargs/xargs.1:1.22	Wed Dec 22 09:05:07 2010
+++ src/usr.bin/xargs/xargs.1	Sat Oct 13 14:18:17 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: xargs.1,v 1.22 2010/12/22 09:05:07 wiz Exp $
+.\ $NetBSD: xargs.1,v 1.23 2012/10/13 14:18:17 njoly Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -166,7 +166,6 @@ directory to
 .Pa destdir :
 .Pp
 .Dl /bin/ls -1d [A-Z]* | xargs -J % cp -rp % destdir
-.Pp
 .It Fl L Ar number
 Call
 .Ar utility



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

2012-10-13 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Oct 13 14:22:13 UTC 2012

Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c

Log Message:
Remove some unused includes


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/rpi/rpi_machdep.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/arch/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.11 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.12
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.11	Wed Oct  3 13:13:38 2012
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c	Sat Oct 13 14:22:12 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rpi_machdep.c,v 1.11 2012/10/03 13:13:38 skrll Exp $	*/
+/*	$NetBSD: rpi_machdep.c,v 1.12 2012/10/13 14:22:12 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,14 +30,12 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.11 2012/10/03 13:13:38 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.12 2012/10/13 14:22:12 skrll Exp $);
 
 #include opt_evbarm_boardtype.h
 
 #include sys/param.h
 #include sys/device.h
-#include sys/kernel.h
-#include sys/reboot.h
 #include sys/termios.h
 #include sys/bus.h
 
@@ -64,7 +62,6 @@ __KERNEL_RCSID(0, $NetBSD: rpi_machdep.
 
 #include ksyms.h
 
-
 BootConfig bootconfig;		/* Boot config storage */
 static char bootargs[MAX_BOOT_STRING];
 char *boot_args = NULL;



CVS commit: src

2012-10-13 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Oct 13 15:28:34 UTC 2012

Modified Files:
src/lib/libc/db/man: btree.3
src/share/man/man1/man1.x68k: bellctrl.1
src/share/man/man4: adv.4 clnp.4 isdntel.4 lmc.4 mca.4 pci.4

Log Message:
Remove some more unneeded Pp macros.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/db/man/btree.3
cvs rdiff -u -r1.12 -r1.13 src/share/man/man1/man1.x68k/bellctrl.1
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/adv.4 src/share/man/man4/clnp.4
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/isdntel.4
cvs rdiff -u -r1.19 -r1.20 src/share/man/man4/lmc.4 src/share/man/man4/mca.4
cvs rdiff -u -r1.92 -r1.93 src/share/man/man4/pci.4

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

Modified files:

Index: src/lib/libc/db/man/btree.3
diff -u src/lib/libc/db/man/btree.3:1.12 src/lib/libc/db/man/btree.3:1.13
--- src/lib/libc/db/man/btree.3:1.12	Mon Mar 22 19:30:53 2010
+++ src/lib/libc/db/man/btree.3	Sat Oct 13 15:28:33 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: btree.3,v 1.12 2010/03/22 19:30:53 joerg Exp $
+.\	$NetBSD: btree.3,v 1.13 2012/10/13 15:28:33 njoly Exp $
 .\
 .\ Copyright (c) 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -225,7 +225,6 @@ for any of the errors specified for the 
 .Xr hash 3 ,
 .Xr mpool 3 ,
 .Xr recno 3
-.Pp
 .Rs
 .%T The Ubiquitous B-tree
 .%A Douglas Comer

Index: src/share/man/man1/man1.x68k/bellctrl.1
diff -u src/share/man/man1/man1.x68k/bellctrl.1:1.12 src/share/man/man1/man1.x68k/bellctrl.1:1.13
--- src/share/man/man1/man1.x68k/bellctrl.1:1.12	Fri May 14 21:50:05 2010
+++ src/share/man/man1/man1.x68k/bellctrl.1	Sat Oct 13 15:28:34 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: bellctrl.1,v 1.12 2010/05/14 21:50:05 joerg Exp $
+.\	$NetBSD: bellctrl.1,v 1.13 2012/10/13 15:28:34 njoly Exp $
 .\
 .\ Copyright (c) 1995 Takuya Harakawa.
 .\ All rights reserved.
@@ -63,12 +63,10 @@ set to that value, as a percentage of it
 Like wise, the second numerical parameter specifies the bell pitch,
 in hertz, and the third numerical parameter specifies the duration
 in milliseconds.
-.Pp
 .It Sy v Ar default
 The
 .Ar default
 argument cause the voice parameter to be reset to the system default.
-.Pp
 .It Fl v Ar voicefile
 The
 .Fl v

Index: src/share/man/man4/adv.4
diff -u src/share/man/man4/adv.4:1.9 src/share/man/man4/adv.4:1.10
--- src/share/man/man4/adv.4:1.9	Tue Mar 13 19:25:39 2012
+++ src/share/man/man4/adv.4	Sat Oct 13 15:28:34 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: adv.4,v 1.9 2012/03/13 19:25:39 njoly Exp $
+.\ $NetBSD: adv.4,v 1.10 2012/10/13 15:28:34 njoly Exp $
 .\
 .\ Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -42,7 +42,6 @@ driver supports the following
 .Tn AdvanSys
 .Tn SCSI
 host adapters
-.Pp
 .\ .It Tn AdvanSys 1200[A,B]
 .Ss PCI bus
 Connectivity Products:
Index: src/share/man/man4/clnp.4
diff -u src/share/man/man4/clnp.4:1.9 src/share/man/man4/clnp.4:1.10
--- src/share/man/man4/clnp.4:1.9	Thu Aug  7 10:31:01 2003
+++ src/share/man/man4/clnp.4	Sat Oct 13 15:28:34 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: clnp.4,v 1.9 2003/08/07 10:31:01 agc Exp $
+.\	$NetBSD: clnp.4,v 1.10 2012/10/13 15:28:34 njoly Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -96,7 +96,6 @@ Do not generate the
 .Tn CLNP
 checksum
 .El
-.Pp
 .It Dv CLNPOPT_OPTS
 Sets
 .Tn CLNP

Index: src/share/man/man4/isdntel.4
diff -u src/share/man/man4/isdntel.4:1.4 src/share/man/man4/isdntel.4:1.5
--- src/share/man/man4/isdntel.4:1.4	Mon Oct  4 19:12:52 2004
+++ src/share/man/man4/isdntel.4	Sat Oct 13 15:28:34 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: isdntel.4,v 1.4 2004/10/04 19:12:52 rumble Exp $
+.\ $NetBSD: isdntel.4,v 1.5 2012/10/13 15:28:34 njoly Exp $
 .\
 .\ Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
 .\
@@ -23,7 +23,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.\	$Id: isdntel.4,v 1.4 2004/10/04 19:12:52 rumble Exp $
+.\	$Id: isdntel.4,v 1.5 2012/10/13 15:28:34 njoly Exp $
 .\
 .\ $FreeBSD$
 .\
@@ -120,7 +120,6 @@ and the
 conversion path looks like this:
 .Pp
 USER --\*[Gt] A-law/mu-law --\*[Gt] bitreversing --\*[Gt] ISDN-line
-.Pp
 .El
 .Sh SEE ALSO
 .Xr isdnd.rc 5 ,

Index: src/share/man/man4/lmc.4
diff -u src/share/man/man4/lmc.4:1.19 src/share/man/man4/lmc.4:1.20
--- src/share/man/man4/lmc.4:1.19	Tue Mar 13 19:25:40 2012
+++ src/share/man/man4/lmc.4	Sat Oct 13 15:28:34 2012
@@ -53,7 +53,7 @@
 .\   *  PLEASE DO NOT UN-IFDEF THIS FILE!  *
 .\   * * * * * * * * * * * * * * * * * * * * *
 .\
-.\ $NetBSD: lmc.4,v 1.19 2012/03/13 19:25:40 njoly Exp $
+.\ $NetBSD: lmc.4,v 1.20 2012/10/13 15:28:34 njoly Exp $
 .\
 .Dd April 11, 2006
 .Dt LMC 4
@@ -229,7 +229,6 @@ as well as
 .Ic ifconfig -m lmc0
 .Ed
 lists the available media options.
-.Pp
 .Bd -unfilled -offset 

CVS commit: src/sys

2012-10-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 13 15:35:56 UTC 2012

Modified Files:
src/sys/kern: kern_exec.c
src/sys/sys: sysctl.h

Log Message:
add KERN_USRSTACK (this is not dynamically defined for FreeBSD compatibility)


To generate a diff of this commit:
cvs rdiff -u -r1.355 -r1.356 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.201 -r1.202 src/sys/sys/sysctl.h

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

Modified files:

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.355 src/sys/kern/kern_exec.c:1.356
--- src/sys/kern/kern_exec.c:1.355	Wed Aug 29 14:56:39 2012
+++ src/sys/kern/kern_exec.c	Sat Oct 13 11:35:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.355 2012/08/29 18:56:39 dholland Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.356 2012/10/13 15:35:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.355 2012/08/29 18:56:39 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_exec.c,v 1.356 2012/10/13 15:35:55 christos Exp $);
 
 #include opt_exec.h
 #include opt_ktrace.h
@@ -104,6 +104,7 @@ __KERNEL_RCSID(0, $NetBSD: kern_exec.c,
 #include sys/spawn.h
 #include sys/prot.h
 #include sys/cprng.h
+#include sys/sysctl.h
 
 #include uvm/uvm_extern.h
 
@@ -1617,6 +1618,30 @@ exec_remove(struct execsw *esp, int coun
 	return 0;
 }
 
+static int
+sysctl_kern_usrstack(SYSCTLFN_ARGS)
+{  
+	u_long ptr;
+	struct sysctlnode node = *rnode;
+	node.sysctl_data = ptr;
+	ptr = l-l_proc-p_stackbase;
+	return sysctl_lookup(SYSCTLFN_CALL(node));
+}
+
+static void
+sysctl_kern_usrstack_setup(void)
+{
+	struct sysctllog *kern_usrstack_sysctllog;
+
+	kern_usrstack_sysctllog = NULL;
+	sysctl_createv(kern_usrstack_sysctllog, 0, NULL, NULL,
+	CTLFLAG_PERMANENT|CTLFLAG_READONLY,
+	CTLTYPE_LONG, usrstack, 
+	SYSCTL_DESCR(User process stack base),
+	sysctl_kern_usrstack, 0, NULL, 0,
+	CTL_KERN, KERN_USRSTACK, CTL_EOL);
+}
+
 /*
  * Initialize exec structures. If init_boot is true, also does necessary
  * one-time initialization (it's called from main() that way).
@@ -1640,6 +1665,7 @@ exec_init(int init_boot)
 		pool_init(exec_pool, NCARGS, 0, 0, PR_NOALIGN|PR_NOTOUCH,
 		execargs, exec_palloc, IPL_NONE);
 		pool_sethardlimit(exec_pool, maxexec, should not happen, 0);
+		sysctl_kern_usrstack_setup();
 	} else {
 		KASSERT(rw_write_held(exec_lock));
 	}

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.201 src/sys/sys/sysctl.h:1.202
--- src/sys/sys/sysctl.h:1.201	Fri Jun  8 22:31:15 2012
+++ src/sys/sys/sysctl.h	Sat Oct 13 11:35:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.201 2012/06/09 02:31:15 christos Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.202 2012/10/13 15:35:56 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -273,7 +273,8 @@ struct ctlname {
 #define	KERN_SYSVIPC		82	/* node: SysV IPC parameters */
 #define	KERN_BOOTTIME		83	/* struct: time kernel was booted */
 #define	KERN_EVCNT		84	/* struct: evcnts */
-#define	KERN_MAXID		85	/* number of valid kern ids */
+#define	KERN_USRSTACK		85	/* long: user stack base */
+#define	KERN_MAXID		86	/* number of valid kern ids */
 
 
 #define	CTL_KERN_NAMES { \
@@ -362,6 +363,7 @@ struct ctlname {
 	{ sysvipc, CTLTYPE_STRUCT }, \
 	{ boottime, CTLTYPE_STRUCT }, \
 	{ evcnt, CTLTYPE_STRUCT }, \
+	{ usrstack, CTLTYPE_LONG }, \
 }
 
 /*



CVS commit: src/sys

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 17:46:50 UTC 2012

Modified Files:
src/sys/kern: vfs_lookup.c
src/sys/nfs: nfs_srvsubs.c
src/sys/sys: namei.src

Log Message:
Replace hack implementation of NDAT() for nameiat with a proper one.
(This change requires a kernel bump.)


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/sys/kern/vfs_lookup.c
cvs rdiff -u -r1.12 -r1.13 src/sys/nfs/nfs_srvsubs.c
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/namei.src

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

Modified files:

Index: src/sys/kern/vfs_lookup.c
diff -u src/sys/kern/vfs_lookup.c:1.195 src/sys/kern/vfs_lookup.c:1.196
--- src/sys/kern/vfs_lookup.c:1.195	Wed Oct 10 06:55:25 2012
+++ src/sys/kern/vfs_lookup.c	Sat Oct 13 17:46:50 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_lookup.c,v 1.195 2012/10/10 06:55:25 dholland Exp $	*/
+/*	$NetBSD: vfs_lookup.c,v 1.196 2012/10/13 17:46:50 dholland Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_lookup.c,v 1.195 2012/10/10 06:55:25 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_lookup.c,v 1.196 2012/10/13 17:46:50 dholland Exp $);
 
 #include opt_magiclinks.h
 
@@ -511,7 +511,7 @@ namei_cleanup(struct namei_state *state)
  * to the starting dir.
  */
 static struct vnode *
-namei_getstartdir(struct namei_state *state, struct vnode *forcecwd)
+namei_getstartdir(struct namei_state *state)
 {
 	struct nameidata *ndp = state-ndp;
 	struct componentname *cnp = state-cnp;
@@ -545,14 +545,14 @@ namei_getstartdir(struct namei_state *st
 	}
 
 	/* current dir */
-	if (forcecwd != NULL) {
-		curdir = forcecwd;
-	} else {
-		curdir = cwdi-cwdi_cdir;
-	}
+	curdir = cwdi-cwdi_cdir;
 
 	if (ndp-ni_pnbuf[0] != '/') {
-		startdir = curdir;
+		if (ndp-ni_startdir != NULL) {
+			startdir = ndp-ni_startdir;
+		} else {
+			startdir = curdir;
+		}
 		erootdir = NULL;
 	} else if (cnp-cn_flags  TRYEMULROOT  erootdir != NULL) {
 		startdir = erootdir;
@@ -583,16 +583,16 @@ namei_getstartdir(struct namei_state *st
  * returns a reference to the passed-in starting dir.
  */
 static struct vnode *
-namei_getstartdir_for_nfsd(struct namei_state *state, struct vnode *startdir)
+namei_getstartdir_for_nfsd(struct namei_state *state)
 {
-	KASSERT(startdir != NULL);
+	KASSERT(state-ndp-ni_startdir != NULL);
 
 	/* always use the real root, and never set an emulation root */
 	state-ndp-ni_rootdir = rootvnode;
 	state-ndp-ni_erootdir = NULL;
 
-	vref(startdir);
-	return startdir;
+	vref(state-ndp-ni_startdir);
+	return state-ndp-ni_startdir;
 }
 
 
@@ -634,7 +634,7 @@ namei_ktrace(struct namei_state *state)
  * appropriate.
  */
 static int
-namei_start(struct namei_state *state, struct vnode *forcecwd, int isnfsd,
+namei_start(struct namei_state *state, int isnfsd,
 	struct vnode **startdir_ret)
 {
 	struct nameidata *ndp = state-ndp;
@@ -654,10 +654,10 @@ namei_start(struct namei_state *state, s
 
 	/* Get starting directory, set up root, and ktrace. */
 	if (isnfsd) {
-		startdir = namei_getstartdir_for_nfsd(state, forcecwd);
+		startdir = namei_getstartdir_for_nfsd(state);
 		/* no ktrace */
 	} else {
-		startdir = namei_getstartdir(state, forcecwd);
+		startdir = namei_getstartdir(state);
 		namei_ktrace(state);
 	}
 
@@ -1103,7 +1103,7 @@ done:
  * (This is called up to twice if TRYEMULROOT is in effect.)
  */
 static int
-namei_oneroot(struct namei_state *state, struct vnode *forcecwd,
+namei_oneroot(struct namei_state *state,
 	 int neverfollow, int inhibitmagic, int isnfsd)
 {
 	struct nameidata *ndp = state-ndp;
@@ -,7 +,7 @@ namei_oneroot(struct namei_state *state,
 	struct vnode *searchdir, *foundobj;
 	int error;
 
-	error = namei_start(state, forcecwd, isnfsd, searchdir);
+	error = namei_start(state, isnfsd, searchdir);
 	if (error) {
 		ndp-ni_dvp = NULL;
 		ndp-ni_vp = NULL;
@@ -1417,7 +1417,7 @@ namei_oneroot(struct namei_state *state,
  * Do namei; wrapper layer that handles TRYEMULROOT.
  */
 static int
-namei_tryemulroot(struct namei_state *state, struct vnode *forcecwd,
+namei_tryemulroot(struct namei_state *state,
 	 int neverfollow, int inhibitmagic, int isnfsd)
 {
 	int error;
@@ -1435,7 +1435,7 @@ namei_tryemulroot(struct namei_state *st
 emul_retry:
 	state-attempt_retry = 0;
 
-	error = namei_oneroot(state, forcecwd, neverfollow, inhibitmagic, isnfsd);
+	error = namei_oneroot(state, neverfollow, inhibitmagic, isnfsd);
 	if (error) {
 		/*
 		 * Once namei has started up, the existence of ni_erootdir
@@ -1468,20 +1468,10 @@ int
 namei(struct nameidata *ndp)
 {
 	struct namei_state state;
-	struct vnode *forcecwd;
 	int error;
 
-	if (ndp-ni_cnd.cn_flags  DIDNDAT) {
-		/* Gross. This is done this way so it can go into 6.1. */
-		forcecwd = ndp-ni_dvp;
-		ndp-ni_dvp = NULL;
-		KASSERT(forcecwd != NULL);
-	} else {
-		forcecwd = NULL;
-	}
-
 	

CVS commit: src/sys

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 17:47:11 UTC 2012

Modified Files:
src/sys/rump/include/rump: rump_namei.h
src/sys/sys: namei.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/rump/include/rump/rump_namei.h
cvs rdiff -u -r1.81 -r1.82 src/sys/sys/namei.h

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

Modified files:

Index: src/sys/rump/include/rump/rump_namei.h
diff -u src/sys/rump/include/rump/rump_namei.h:1.17 src/sys/rump/include/rump/rump_namei.h:1.18
--- src/sys/rump/include/rump/rump_namei.h:1.17	Mon Oct  8 23:44:09 2012
+++ src/sys/rump/include/rump/rump_namei.h	Sat Oct 13 17:47:11 2012
@@ -1,11 +1,11 @@
-/*	$NetBSD: rump_namei.h,v 1.17 2012/10/08 23:44:09 dholland Exp $	*/
+/*	$NetBSD: rump_namei.h,v 1.18 2012/10/13 17:47:11 dholland Exp $	*/
 
 
 /*
  * WARNING: GENERATED FILE.  DO NOT EDIT
  * (edit namei.src and run make namei in src/sys/sys)
  *   by:   NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp 
- *   from: NetBSD: namei.src,v 1.26 2012/10/08 23:43:33 dholland Exp 
+ *   from: NetBSD: namei.src,v 1.27 2012/10/13 17:46:50 dholland Exp 
  */
 
 #ifndef _RUMP_RUMP_NAMEI_H_
@@ -23,9 +23,8 @@
 #define RUMP_NAMEI_FOLLOW	0x0040
 #define RUMP_NAMEI_NOFOLLOW	0x
 #define RUMP_NAMEI_EMULROOTSET	0x0080
-#define RUMP_NAMEI_DIDNDAT	0x0400
 #define RUMP_NAMEI_NOCHROOT	0x0100
-#define RUMP_NAMEI_MODMASK	0x010004fc
+#define RUMP_NAMEI_MODMASK	0x01fc
 #define RUMP_NAMEI_NOCROSSMOUNT	0x100
 #define RUMP_NAMEI_RDONLY	0x200
 #define RUMP_NAMEI_ISDOTDOT	0x0002000

Index: src/sys/sys/namei.h
diff -u src/sys/sys/namei.h:1.81 src/sys/sys/namei.h:1.82
--- src/sys/sys/namei.h:1.81	Mon Oct  8 23:44:09 2012
+++ src/sys/sys/namei.h	Sat Oct 13 17:47:11 2012
@@ -1,11 +1,11 @@
-/*	$NetBSD: namei.h,v 1.81 2012/10/08 23:44:09 dholland Exp $	*/
+/*	$NetBSD: namei.h,v 1.82 2012/10/13 17:47:11 dholland Exp $	*/
 
 
 /*
  * WARNING: GENERATED FILE.  DO NOT EDIT
  * (edit namei.src and run make namei in src/sys/sys)
  *   by:   NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp 
- *   from: NetBSD: namei.src,v 1.26 2012/10/08 23:43:33 dholland Exp 
+ *   from: NetBSD: namei.src,v 1.27 2012/10/13 17:46:50 dholland Exp 
  */
 
 /*
@@ -91,6 +91,7 @@ struct nameidata {
 	/*
 	 * Arguments to namei/lookup.
 	 */
+	struct vnode *ni_startdir;	/* starting dir, cwd if null */
 	struct pathbuf *ni_pathbuf;	/* pathname container */
 	char *ni_pnbuf;			/* extra pathname buffer ref (XXX) */
 	/*
@@ -152,9 +153,8 @@ struct nameidata {
 	   (pseudo) */
 #define	EMULROOTSET	0x0080	/* emulation root already
 	   in ni_erootdir */
-#define DIDNDAT		0x0400	/* did NDAT() (temporary) */
 #define	NOCHROOT	0x0100	/* no chroot on abs path lookups */
-#define	MODMASK		0x010004fc	/* mask of operational modifiers */
+#define	MODMASK		0x01fc	/* mask of operational modifiers */
 /*
  * Namei parameter descriptors.
  */
@@ -177,6 +177,7 @@ struct nameidata {
 #define NDINIT(ndp, op, flags, pathbuf) { \
 	(ndp)-ni_cnd.cn_nameiop = op; \
 	(ndp)-ni_cnd.cn_flags = flags; \
+	(ndp)-ni_startdir = NULL; \
 	(ndp)-ni_pathbuf = pathbuf; \
 	(ndp)-ni_cnd.cn_cred = kauth_cred_get(); \
 }
@@ -185,8 +186,7 @@ struct nameidata {
  * Use this to set the start directory for openat()-type operations.
  */
 #define NDAT(ndp, dir) {			\
-	(ndp)-ni_cnd.cn_flags |= DIDNDAT;	\
-	(ndp)-ni_dvp = (dir);			\
+	(ndp)-ni_startdir = (dir);		\
 }
 
 #endif
@@ -321,9 +321,8 @@ extern struct nchstats nchstats;
 #define NAMEI_FOLLOW	0x0040
 #define NAMEI_NOFOLLOW	0x
 #define NAMEI_EMULROOTSET	0x0080
-#define NAMEI_DIDNDAT	0x0400
 #define NAMEI_NOCHROOT	0x0100
-#define NAMEI_MODMASK	0x010004fc
+#define NAMEI_MODMASK	0x01fc
 #define NAMEI_NOCROSSMOUNT	0x100
 #define NAMEI_RDONLY	0x200
 #define NAMEI_ISDOTDOT	0x0002000



CVS commit: src/sys/dev

2012-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 13 17:51:28 UTC 2012

Modified Files:
src/sys/dev/ic: pckbc.c
src/sys/dev/pckbport: pckbd.c

Log Message:
Add two flags to keyboard/mouse attachment:
  PCKBC_CANT_TRANSLATE for keyboards that cannot translate to XT scancodes
  PCKBC_NEED_AUXWRITE for mice that don't probe first time
These flags can be set by the port-specific attachments.

Add the translation table and function to handle set 2 to set 1 keyboard
translation in software.

Based on OpenBSD sys/dev/ic/pckbc.c revisions 1.10, 1.16, 1.17, and
sys/dev/pckbc/pckbd.c revision 1.15, and 8042 scan code information at:

  http://www.computer-engineering.org/ps2keyboard/

Note, that this changes the signature of pckbc_cnattach(), so ride the
kernel version bump for namei.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ic/pckbc.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pckbport/pckbd.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/ic/pckbc.c
diff -u src/sys/dev/ic/pckbc.c:1.53 src/sys/dev/ic/pckbc.c:1.54
--- src/sys/dev/ic/pckbc.c:1.53	Thu Feb  2 19:43:03 2012
+++ src/sys/dev/ic/pckbc.c	Sat Oct 13 17:51:28 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc.c,v 1.53 2012/02/02 19:43:03 tls Exp $ */
+/* $NetBSD: pckbc.c,v 1.54 2012/10/13 17:51:28 jdc Exp $ */
 
 /*
  * Copyright (c) 2004 Ben Harris.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pckbc.c,v 1.53 2012/02/02 19:43:03 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: pckbc.c,v 1.54 2012/10/13 17:51:28 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -354,6 +354,20 @@ pckbc_attach(struct pckbc_softc *sc)
 	t-t_haveaux = 1;
 	bus_space_write_1(iot, ioh_d, 0, 0x5a); /* a random value */
 	res = pckbc_poll_data1(t, PCKBC_AUX_SLOT);
+
+	/*
+	 * The following is needed to find the aux port on the Tadpole
+	 * SPARCle.
+	 */
+	if (res == -1  ISSET(t-t_flags, PCKBC_NEED_AUXWRITE)) {
+		/* Read of aux echo timed out, try again */
+		if (!pckbc_send_cmd(iot, ioh_c, KBC_AUXWRITE))
+			goto nomouse;
+		if (!pckbc_wait_output(iot, ioh_c))
+			goto nomouse;
+		bus_space_write_1(iot, ioh_d, 0, 0x5a);
+		res = pckbc_poll_data1(t, PCKBC_AUX_SLOT);
+	}
 	if (res != -1) {
 		/*
 		 * In most cases, the 0x5a gets echoed.
@@ -365,6 +379,7 @@ pckbc_attach(struct pckbc_softc *sc)
 		if (pckbc_attach_slot(sc, PCKBC_AUX_SLOT))
 			cmdbits |= KC8_MENABLE;
 	} else {
+
 #ifdef PCKBCDEBUG
 		printf(pckbc: aux echo test failed\n);
 #endif
@@ -395,6 +410,9 @@ pckbc_xt_translation(void *self, pckbc_s
 	struct pckbc_internal *t = self;
 	int ison;
 
+	if (ISSET(t-t_flags, PCKBC_CANT_TRANSLATE))
+		return (-1);
+
 	if (slot != PCKBC_KBD_SLOT) {
 		/* translation only for kbd slot */
 		if (on)
@@ -602,7 +620,7 @@ pckbcintr(void *vsc)
 
 int
 pckbc_cnattach(bus_space_tag_t iot, bus_addr_t addr,
-	bus_size_t cmd_offset, pckbc_slot_t slot)
+	bus_size_t cmd_offset, pckbc_slot_t slot, int flags)
 {
 	bus_space_handle_t ioh_d, ioh_c;
 #ifdef PCKBC_CNATTACH_SELFTEST
@@ -622,6 +640,7 @@ pckbc_cnattach(bus_space_tag_t iot, bus_
 	pckbc_consdata.t_ioh_d = ioh_d;
 	pckbc_consdata.t_ioh_c = ioh_c;
 	pckbc_consdata.t_addr = addr;
+	pckbc_consdata.t_flags = flags;
 	callout_init(pckbc_consdata.t_cleanup, 0);
 
 	/* flush */

Index: src/sys/dev/pckbport/pckbd.c
diff -u src/sys/dev/pckbport/pckbd.c:1.29 src/sys/dev/pckbport/pckbd.c:1.30
--- src/sys/dev/pckbport/pckbd.c:1.29	Wed Feb 24 22:38:08 2010
+++ src/sys/dev/pckbport/pckbd.c	Sat Oct 13 17:51:28 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbd.c,v 1.29 2010/02/24 22:38:08 dyoung Exp $ */
+/* $NetBSD: pckbd.c,v 1.30 2012/10/13 17:51:28 jdc Exp $ */
 
 /*-
  * Copyright (c) 1998, 2009 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pckbd.c,v 1.29 2010/02/24 22:38:08 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: pckbd.c,v 1.30 2012/10/13 17:51:28 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -100,9 +100,12 @@ struct pckbd_internal {
 	pckbport_tag_t t_kbctag;
 	pckbport_slot_t t_kbcslot;
 
+	int t_translating;
+
 	int t_lastchar;
 	int t_extended0;
 	int t_extended1;
+	int t_releasing;
 
 	struct pckbd_softc *t_sc; /* back pointer */
 };
@@ -167,7 +170,9 @@ void	*pckbd_bell_fn_arg;
 
 void	pckbd_bell(u_int, u_int, u_int, int);
 
-int	pckbd_set_xtscancode(pckbport_tag_t, pckbport_slot_t);
+int	pckbd_scancode_translate(struct pckbd_internal *, int);
+int	pckbd_set_xtscancode(pckbport_tag_t, pckbport_slot_t,
+	struct pckbd_internal *);
 int	pckbd_init(struct pckbd_internal *, pckbport_tag_t, pckbport_slot_t,
 			int);
 void	pckbd_input(void *, int);
@@ -179,9 +184,10 @@ static int	pckbd_led_decode(int);
 struct pckbd_internal pckbd_consdata;
 
 int
-pckbd_set_xtscancode(pckbport_tag_t kbctag, pckbport_slot_t kbcslot)
+pckbd_set_xtscancode(pckbport_tag_t kbctag, pckbport_slot_t kbcslot,
+struct 

CVS commit: src/sys/dev/pckbport

2012-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 13 17:51:51 UTC 2012

Modified Files:
src/sys/dev/pckbport: wskbdmap_mfii.c

Log Message:
Add the extra keys found on the Tadpole SPARCle to the keysym list.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pckbport/wskbdmap_mfii.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/pckbport/wskbdmap_mfii.c
diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.22 src/sys/dev/pckbport/wskbdmap_mfii.c:1.23
--- src/sys/dev/pckbport/wskbdmap_mfii.c:1.22	Fri Jul 22 23:22:38 2011
+++ src/sys/dev/pckbport/wskbdmap_mfii.c	Sat Oct 13 17:51:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: wskbdmap_mfii.c,v 1.22 2011/07/22 23:22:38 christos Exp $	*/
+/*	$NetBSD: wskbdmap_mfii.c,v 1.23 2012/10/13 17:51:51 jdc Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: wskbdmap_mfii.c,v 1.22 2011/07/22 23:22:38 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: wskbdmap_mfii.c,v 1.23 2012/10/13 17:51:51 jdc Exp $);
 
 #include opt_wskbdmap.h
 #include sys/types.h
@@ -128,6 +128,17 @@ static const keysym_t pckbd_keydesc_us[]
 KC(87), 			KS_f11,
 KC(88), 			KS_f12,
 KC(127),			KS_Pause, /* Break */
+KC(136),			KS_Help,
+KC(137),			KS_Stop,
+KC(138),			KS_Again,
+KC(139),			KS_Props,
+KC(140),			KS_Undo,
+KC(141),			KS_Front,
+KC(142),			KS_Copy,
+KC(143),			KS_Open,
+KC(144),			KS_Paste,
+KC(145),			KS_Find,
+KC(146),			KS_Cut,
 KC(156),			KS_KP_Enter,
 KC(157),			KS_Control_R,
 KC(160),			KS_Cmd_VolumeToggle,



CVS commit: src/sys/sys

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 17:54:40 UTC 2012

Modified Files:
src/sys/sys: param.h

Log Message:
6.99.13 - namei NDAT() change and pckbc_cnattach()


To generate a diff of this commit:
cvs rdiff -u -r1.420 -r1.421 src/sys/sys/param.h

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.420 src/sys/sys/param.h:1.421
--- src/sys/sys/param.h:1.420	Tue Oct  2 01:44:29 2012
+++ src/sys/sys/param.h	Sat Oct 13 17:54:40 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.420 2012/10/02 01:44:29 christos Exp $	*/
+/*	$NetBSD: param.h,v 1.421 2012/10/13 17:54:40 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	699001200	/* NetBSD 6.99.12 */
+#define	__NetBSD_Version__	699001300	/* NetBSD 6.99.13 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) = __NetBSD_Version__)



CVS commit: src/sys/arch

2012-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 13 17:58:55 UTC 2012

Modified Files:
src/sys/arch/alpha/alpha: api_up1000.c dec_1000a.c dec_2000_300.c
dec_2100_a50.c dec_2100_a500.c dec_550.c dec_6600.c
dec_alphabook1.c dec_axppci_33.c dec_eb164.c dec_eb64plus.c
dec_eb66.c dec_kn20aa.c dec_kn300.c
src/sys/arch/arc/arc: c_isa.c c_jazz_eisa.c c_nec_pci.c
src/sys/arch/atari/isa: isa_machdep.c
src/sys/arch/bebox/bebox: machdep.c
src/sys/arch/cats/cats: cats_machdep.c
src/sys/arch/evbmips/loongson: machdep.c
src/sys/arch/evbppc/explora: consinit.c
src/sys/arch/ibmnws/ibmnws: consinit.c
src/sys/arch/mvmeppc/mvmeppc: machdep.c
src/sys/arch/netwinder/netwinder: netwinder_machdep.c
src/sys/arch/powerpc/oea: ofw_consinit.c
src/sys/arch/prep/prep: consinit.c
src/sys/arch/sgimips/sgimips: console.c
src/sys/arch/shark/shark: consinit.c
src/sys/arch/sparc/dev: pckbc_js.c
src/sys/arch/x86/x86: consinit.c
src/sys/arch/xen/x86: consinit.c

Log Message:
Adapt to the changed signature of pckbc_cnattach().


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/alpha/alpha/api_up1000.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/alpha/dec_1000a.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/alpha/alpha/dec_2000_300.c
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/alpha/alpha/dec_2100_a50.c \
src/sys/arch/alpha/alpha/dec_axppci_33.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/alpha/alpha/dec_2100_a500.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/alpha/alpha/dec_550.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/alpha/alpha/dec_6600.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/alpha/alpha/dec_alphabook1.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/alpha/alpha/dec_eb164.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/alpha/alpha/dec_eb64plus.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/alpha/alpha/dec_eb66.c
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/alpha/alpha/dec_kn20aa.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/alpha/alpha/dec_kn300.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arc/arc/c_isa.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/arc/c_jazz_eisa.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arc/arc/c_nec_pci.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/atari/isa/isa_machdep.c
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/bebox/bebox/machdep.c
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/cats/cats/cats_machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/loongson/machdep.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/explora/consinit.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ibmnws/ibmnws/consinit.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/mvmeppc/mvmeppc/machdep.c
cvs rdiff -u -r1.79 -r1.80 \
src/sys/arch/netwinder/netwinder/netwinder_machdep.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/oea/ofw_consinit.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/prep/prep/consinit.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/sgimips/sgimips/console.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/shark/shark/consinit.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sparc/dev/pckbc_js.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/x86/x86/consinit.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/xen/x86/consinit.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/arch/alpha/alpha/api_up1000.c
diff -u src/sys/arch/alpha/alpha/api_up1000.c:1.29 src/sys/arch/alpha/alpha/api_up1000.c:1.30
--- src/sys/arch/alpha/alpha/api_up1000.c:1.29	Mon Feb  6 02:14:10 2012
+++ src/sys/arch/alpha/alpha/api_up1000.c	Sat Oct 13 17:58:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: api_up1000.c,v 1.29 2012/02/06 02:14:10 matt Exp $ */
+/* $NetBSD: api_up1000.c,v 1.30 2012/10/13 17:58:54 jdc Exp $ */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: api_up1000.c,v 1.29 2012/02/06 02:14:10 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: api_up1000.c,v 1.30 2012/10/13 17:58:54 jdc Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -142,7 +142,7 @@ api_up1000_cons_init(void)
 		/* display console ... */
 		/* XXX */
 		(void) pckbc_cnattach(icp-ic_iot, IO_KBD, KBCMDP,
-		PCKBC_KBD_SLOT);
+		PCKBC_KBD_SLOT, 0);
 
 		if (CTB_TURBOSLOT_TYPE(ctb-ctb_turboslot) ==
 		CTB_TURBOSLOT_TYPE_ISA)

Index: src/sys/arch/alpha/alpha/dec_1000a.c
diff -u src/sys/arch/alpha/alpha/dec_1000a.c:1.32 src/sys/arch/alpha/alpha/dec_1000a.c:1.33
--- src/sys/arch/alpha/alpha/dec_1000a.c:1.32	Mon Feb  6 02:14:10 2012
+++ src/sys/arch/alpha/alpha/dec_1000a.c	Sat Oct 13 17:58:54 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_1000a.c,v 1.32 2012/02/06 02:14:10 matt Exp $ */
+/* $NetBSD: dec_1000a.c,v 1.33 2012/10/13 17:58:54 jdc Exp $ */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
 
 #include sys/cdefs.h			/* RCS ID  

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

2012-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 13 18:00:03 UTC 2012

Modified Files:
src/sys/arch/sparc64/conf: GENERIC files.sparc64

Log Message:
Add pckbc at ebus.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.138 -r1.139 src/sys/arch/sparc64/conf/files.sparc64

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/sparc64/conf/GENERIC
diff -u src/sys/arch/sparc64/conf/GENERIC:1.152 src/sys/arch/sparc64/conf/GENERIC:1.153
--- src/sys/arch/sparc64/conf/GENERIC:1.152	Sat Sep  1 18:17:51 2012
+++ src/sys/arch/sparc64/conf/GENERIC	Sat Oct 13 18:00:03 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.152 2012/09/01 18:17:51 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.153 2012/10/13 18:00:03 jdc Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	arch/sparc64/conf/std.sparc64
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.152 $
+#ident 		GENERIC-$Revision: 1.153 $
 
 maxusers	64
 
@@ -297,6 +297,14 @@ com*	at ebus?# `com' driver for `su'
 kbd0	at com?	# keyboard
 ms0	at com?	# mouse
 
+## Tadpole SPARCle PS/2 keyboard and mouse
+pckbc* 		at ebus?# PC keyboard controller
+pckbd* 		at pckbc?   # PC keyboard
+pms* 		at pckbc?   # PS/2 mouse for wsmouse
+options 	PMS_SYNAPTICS_TOUCHPAD	# Enable support for Synaptics Touchpads
+wskbd* 		at pckbd? console ?
+wsmouse* 	at pms? mux 0
+
 ## Magma Serial/Parallel driver (not tested)
 #magma*	at sbus? slot ? offset ?
 #mtty*	at magma?

Index: src/sys/arch/sparc64/conf/files.sparc64
diff -u src/sys/arch/sparc64/conf/files.sparc64:1.138 src/sys/arch/sparc64/conf/files.sparc64:1.139
--- src/sys/arch/sparc64/conf/files.sparc64:1.138	Sat Mar  3 03:21:16 2012
+++ src/sys/arch/sparc64/conf/files.sparc64	Sat Oct 13 18:00:03 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sparc64,v 1.138 2012/03/03 03:21:16 nakayama Exp $
+#	$NetBSD: files.sparc64,v 1.139 2012/10/13 18:00:03 jdc Exp $
 
 # @(#)files.sparc64	8.1 (Berkeley) 7/19/93
 # sparc64-specific configuration info
@@ -153,6 +153,11 @@ file	arch/sparc64/dev/sab.c			sab | sabt
 attach com at ebus with com_ebus
 file	arch/sparc64/dev/com_ebus.c		com_ebus
 
+# ebus PS/2 keyboard attachment for Tadpole SPARCle, etc.
+include dev/pckbport/files.pckbport
+attach pckbc at ebus with pckbc_ebus
+file	arch/sparc64/dev/pckbc_ebus.c		pckbc_ebus
+
 device zstty {}: tty
 attach zstty at zs
 file dev/ic/z8530tty.c			zstty needs-flag



CVS commit: src/sys/dev/ic

2012-10-13 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Sat Oct 13 18:14:09 UTC 2012

Modified Files:
src/sys/dev/ic: pckbcvar.h

Log Message:
Add two flags to keyboard/mouse attachment:
  PCKBC_CANT_TRANSLATE for keyboards that cannot translate to XT scancodes
  PCKBC_NEED_AUXWRITE for mice that don't probe first time
These flags can be set by the port-specific attachments.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/ic/pckbcvar.h

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/ic/pckbcvar.h
diff -u src/sys/dev/ic/pckbcvar.h:1.19 src/sys/dev/ic/pckbcvar.h:1.20
--- src/sys/dev/ic/pckbcvar.h:1.19	Thu Feb  2 19:43:03 2012
+++ src/sys/dev/ic/pckbcvar.h	Sat Oct 13 18:14:09 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbcvar.h,v 1.19 2012/02/02 19:43:03 tls Exp $ */
+/* $NetBSD: pckbcvar.h,v 1.20 2012/10/13 18:14:09 jdc Exp $ */
 
 /*
  * Copyright (c) 1998
@@ -62,6 +62,9 @@ struct pckbc_internal {
 	bus_space_handle_t t_ioh_d, t_ioh_c; /* data port, cmd port */
 	bus_addr_t t_addr;
 	u_char t_cmdbyte; /* shadow */
+	int t_flags;
+#define	PCKBC_CANT_TRANSLATE	0x0001	/* can't translate to XT scancodes */
+#define	PCKBC_NEED_AUXWRITE	0x0002	/* need auxwrite command to find aux */
 
 	int t_haveaux; /* controller has an aux port */
 	struct pckbc_slotdata *t_slotdata[PCKBC_NSLOTS];
@@ -102,7 +105,7 @@ int pckbc_poll_data1(void *, pckbc_slot_
 
 /* More normal calls from attach routines */
 void pckbc_attach(struct pckbc_softc *);
-int pckbc_cnattach(bus_space_tag_t, bus_addr_t, bus_size_t, pckbc_slot_t);
+int pckbc_cnattach(bus_space_tag_t, bus_addr_t, bus_size_t, pckbc_slot_t, int);
 int pckbc_is_console(bus_space_tag_t, bus_addr_t);
 int pckbcintr(void *);
 int pckbcintr_hard(void *);



CVS commit: src/usr.bin/unifdef

2012-10-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 13 18:26:03 UTC 2012

Modified Files:
src/usr.bin/unifdef: unifdef.c

Log Message:
PR/47068: unifdef(1) with cpp directive on last line without newline
Remove bogus test; if there is no newline, the state does not change.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/unifdef/unifdef.c

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

Modified files:

Index: src/usr.bin/unifdef/unifdef.c
diff -u src/usr.bin/unifdef/unifdef.c:1.21 src/usr.bin/unifdef/unifdef.c:1.22
--- src/usr.bin/unifdef/unifdef.c:1.21	Wed Feb 29 18:35:10 2012
+++ src/usr.bin/unifdef/unifdef.c	Sat Oct 13 14:26:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: unifdef.c,v 1.21 2012/02/29 23:35:10 joerg Exp $	*/
+/*	$NetBSD: unifdef.c,v 1.22 2012/10/13 18:26:03 christos Exp $	*/
 
 /*
  * Copyright (c) 1985, 1993
@@ -77,7 +77,7 @@ static const char copyright[] =
 #endif
 #ifdef __IDSTRING
 __IDSTRING(Berkeley, @(#)unifdef.c	8.1 (Berkeley) 6/6/93);
-__IDSTRING(NetBSD, $NetBSD: unifdef.c,v 1.21 2012/02/29 23:35:10 joerg Exp $);
+__IDSTRING(NetBSD, $NetBSD: unifdef.c,v 1.22 2012/10/13 18:26:03 christos Exp $);
 __IDSTRING(dotat, $dotat: things/unifdef.c,v 1.161 2003/07/01 15:32:48 fanf2 Exp $);
 #endif
 #endif /* not lint */
@@ -655,9 +655,6 @@ get_line(void)
 			if (incomment)
 linestate = LS_DIRTY;
 		}
-		/* skipcomment should have changed the state */
-		if (linestate == LS_HASH)
-			abort(); /* bug */
 	}
 	if (linestate == LS_DIRTY) {
 		while (*cp != '\0')



CVS commit: src/games/backgammon

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 18:44:15 UTC 2012

Modified Files:
src/games/backgammon/backgammon: main.c move.c
src/games/backgammon/common_source: allow.c back.h check.c init.c one.c
save.c subs.c table.c
src/games/backgammon/teachgammon: tutor.c

Log Message:
Crack down on global variables with single-letter names.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/games/backgammon/backgammon/main.c
cvs rdiff -u -r1.10 -r1.11 src/games/backgammon/backgammon/move.c
cvs rdiff -u -r1.6 -r1.7 src/games/backgammon/common_source/allow.c \
src/games/backgammon/common_source/check.c
cvs rdiff -u -r1.18 -r1.19 src/games/backgammon/common_source/back.h
cvs rdiff -u -r1.8 -r1.9 src/games/backgammon/common_source/init.c
cvs rdiff -u -r1.7 -r1.8 src/games/backgammon/common_source/one.c
cvs rdiff -u -r1.14 -r1.15 src/games/backgammon/common_source/save.c
cvs rdiff -u -r1.17 -r1.18 src/games/backgammon/common_source/subs.c
cvs rdiff -u -r1.11 -r1.12 src/games/backgammon/common_source/table.c
cvs rdiff -u -r1.9 -r1.10 src/games/backgammon/teachgammon/tutor.c

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

Modified files:

Index: src/games/backgammon/backgammon/main.c
diff -u src/games/backgammon/backgammon/main.c:1.28 src/games/backgammon/backgammon/main.c:1.29
--- src/games/backgammon/backgammon/main.c:1.28	Mon Mar 22 05:10:19 2010
+++ src/games/backgammon/backgammon/main.c	Sat Oct 13 18:44:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.28 2010/03/22 05:10:19 mrg Exp $	*/
+/*	$NetBSD: main.c,v 1.29 2012/10/13 18:44:14 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: main.c,v 1.28 2010/03/22 05:10:19 mrg Exp $);
+__RCSID($NetBSD: main.c,v 1.29 2012/10/13 18:44:14 dholland Exp $);
 #endif
 #endif/* not lint */
 
@@ -94,6 +94,7 @@ main(int argc __unused, char **argv)
 	int l;		/* non-descript index */
 	charc;		/* non-descript character storage */
 	time_t  t;		/* time for random num generator */
+	struct move *mm = gm;
 
 	/* revoke setgid privileges */
 	setgid(getgid());
@@ -245,17 +246,17 @@ main(int argc __unused, char **argv)
 		if (!rflag) {
 			if (tflag)
 curmove(17, 0);
-			while (D0 == D1)	/* no doubles */
+			while (mm-D0 == mm-D1)	/* no doubles */
 roll();
 
 			/* print rolls */
 			writel(rollr);
-			writec(D0 + '0');
+			writec(mm-D0 + '0');
 			writel(rollw);
-			writec(D1 + '0');
+			writec(mm-D1 + '0');
 
 			/* winner goes first */
-			if (D0  D1) {
+			if (mm-D0  mm-D1) {
 writel(rstart);
 cturn = 1;
 			} else {
@@ -292,7 +293,7 @@ main(int argc __unused, char **argv)
 			if (cturn == pnum)	/* computer's move */
 move(0);
 			else {	/* player's move */
-mvlim = movallow();
+mm-mvlim = movallow();
 /* reprint roll */
 if (tflag)
 	curmove(cturn == -1 ? 18 : 19, 0);
@@ -380,13 +381,13 @@ main(int argc __unused, char **argv)
 case '\n':
 	roll();
 	writel( rolls );
-	writec(D0 + '0');
+	writec(mm-D0 + '0');
 	writec(' ');
-	writec(D1 + '0');
+	writec(mm-D1 + '0');
 	writel(.  );
 
 	/* see if he can move */
-	if ((mvlim = movallow()) == 0) {
+	if ((mm-mvlim = movallow()) == 0) {
 
 		/* can't move */
 		writel(toobad1);
@@ -435,7 +436,7 @@ main(int argc __unused, char **argv)
 proll();
 
 /* can he move? */
-if ((mvlim = movallow()) == 0) {
+if ((mm-mvlim = movallow()) == 0) {
 
 	/* he can't */
 	writel(toobad2);

Index: src/games/backgammon/backgammon/move.c
diff -u src/games/backgammon/backgammon/move.c:1.10 src/games/backgammon/backgammon/move.c:1.11
--- src/games/backgammon/backgammon/move.c:1.10	Wed Aug 12 05:17:57 2009
+++ src/games/backgammon/backgammon/move.c	Sat Oct 13 18:44:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: move.c,v 1.10 2009/08/12 05:17:57 dholland Exp $	*/
+/*	$NetBSD: move.c,v 1.11 2012/10/13 18:44:14 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,10 +34,12 @@
 #if 0
 static char sccsid[] = @(#)move.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: move.c,v 1.10 2009/08/12 05:17:57 dholland Exp $);
+__RCSID($NetBSD: move.c,v 1.11 2012/10/13 18:44:14 dholland Exp $);
 #endif
 #endif /* not lint */
 
+#include assert.h
+
 #include back.h
 #include backlocal.h
 
@@ -84,15 +86,15 @@ static int race;		/* game reduced to a r
 
 
 static int bcomp(struct BOARD *, struct BOARD *);
-static struct BOARD *bsave(void);
-static void binsert(struct BOARD *);
-static void boardcopy(struct BOARD *);
+static struct BOARD *bsave(struct move *);
+static void binsert(struct move *, struct BOARD *);
+static void boardcopy(struct move *, struct BOARD *);
 static void makefree(struct BOARD *);
-static void mvcheck(struct BOARD *, struct BOARD *);

CVS commit: src/games/backgammon

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 19:19:39 UTC 2012

Modified Files:
src/games/backgammon/backgammon: backlocal.h main.c move.c
src/games/backgammon/common_source: allow.c back.h check.c init.c one.c
save.c subs.c table.c
src/games/backgammon/teachgammon: teach.c tutor.c tutor.h

Log Message:
Pass the move info around instead of using it as a global.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/games/backgammon/backgammon/backlocal.h
cvs rdiff -u -r1.29 -r1.30 src/games/backgammon/backgammon/main.c
cvs rdiff -u -r1.11 -r1.12 src/games/backgammon/backgammon/move.c
cvs rdiff -u -r1.7 -r1.8 src/games/backgammon/common_source/allow.c \
src/games/backgammon/common_source/check.c
cvs rdiff -u -r1.19 -r1.20 src/games/backgammon/common_source/back.h
cvs rdiff -u -r1.9 -r1.10 src/games/backgammon/common_source/init.c
cvs rdiff -u -r1.8 -r1.9 src/games/backgammon/common_source/one.c
cvs rdiff -u -r1.15 -r1.16 src/games/backgammon/common_source/save.c
cvs rdiff -u -r1.18 -r1.19 src/games/backgammon/common_source/subs.c
cvs rdiff -u -r1.12 -r1.13 src/games/backgammon/common_source/table.c
cvs rdiff -u -r1.21 -r1.22 src/games/backgammon/teachgammon/teach.c
cvs rdiff -u -r1.10 -r1.11 src/games/backgammon/teachgammon/tutor.c \
src/games/backgammon/teachgammon/tutor.h

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

Modified files:

Index: src/games/backgammon/backgammon/backlocal.h
diff -u src/games/backgammon/backgammon/backlocal.h:1.4 src/games/backgammon/backgammon/backlocal.h:1.5
--- src/games/backgammon/backgammon/backlocal.h:1.4	Wed Aug 12 05:17:57 2009
+++ src/games/backgammon/backgammon/backlocal.h	Sat Oct 13 19:19:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: backlocal.h,v 1.4 2009/08/12 05:17:57 dholland Exp $	*/
+/*	$NetBSD: backlocal.h,v 1.5 2012/10/13 19:19:38 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -32,5 +32,5 @@
 void		dble(void);
 int		dblgood(void);
 int		freemen(int);
-void		move(int);
+void		move(struct move *, int);
 int		trapped(int, int);

Index: src/games/backgammon/backgammon/main.c
diff -u src/games/backgammon/backgammon/main.c:1.29 src/games/backgammon/backgammon/main.c:1.30
--- src/games/backgammon/backgammon/main.c:1.29	Sat Oct 13 18:44:14 2012
+++ src/games/backgammon/backgammon/main.c	Sat Oct 13 19:19:38 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.29 2012/10/13 18:44:14 dholland Exp $	*/
+/*	$NetBSD: main.c,v 1.30 2012/10/13 19:19:38 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)main.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: main.c,v 1.29 2012/10/13 18:44:14 dholland Exp $);
+__RCSID($NetBSD: main.c,v 1.30 2012/10/13 19:19:38 dholland Exp $);
 #endif
 #endif/* not lint */
 
@@ -94,7 +94,7 @@ main(int argc __unused, char **argv)
 	int l;		/* non-descript index */
 	charc;		/* non-descript character storage */
 	time_t  t;		/* time for random num generator */
-	struct move *mm = gm;
+	struct move mmstore, *mm;
 
 	/* revoke setgid privileges */
 	setgid(getgid());
@@ -118,12 +118,15 @@ main(int argc __unused, char **argv)
 	t = time(NULL);
 	srandom(t);		/* 'random' seed */
 
+	/* need this now beceause getarg() may try to load a game */
+	mm = mmstore;
+	move_init(mm);
 #ifdef V7
 	while (*++argv != 0)	/* process arguments */
 #else
 	while (*++argv != -1)	/* process arguments */
 #endif
-		getarg(argv);
+		getarg(mm, argv);
 	args[acnt] = '\0';
 	if (tflag) {		/* clear screen */
 		noech.c_oflag = ~(ONLCR | OXTABS);
@@ -240,14 +243,14 @@ main(int argc __unused, char **argv)
 	for (;;) {		/* begin game! */
 		/* initial roll if needed */
 		if ((!rflag) || raflag)
-			roll();
+			roll(mm);
 
 		/* perform ritual of first roll */
 		if (!rflag) {
 			if (tflag)
 curmove(17, 0);
 			while (mm-D0 == mm-D1)	/* no doubles */
-roll();
+roll(mm);
 
 			/* print rolls */
 			writel(rollr);
@@ -291,14 +294,14 @@ main(int argc __unused, char **argv)
 		/* do first move (special case) */
 		if (!(rflag  raflag)) {
 			if (cturn == pnum)	/* computer's move */
-move(0);
+move(mm, 0);
 			else {	/* player's move */
-mm-mvlim = movallow();
+mm-mvlim = movallow(mm);
 /* reprint roll */
 if (tflag)
 	curmove(cturn == -1 ? 18 : 19, 0);
-proll();
-getmove();	/* get player's move */
+proll(mm);
+getmove(mm);	/* get player's move */
 			}
 		}
 		if (tflag) {
@@ -323,7 +326,7 @@ main(int argc __unused, char **argv)
 
 			/* do computer's move */
 			if (cturn == pnum) {
-move(1);
+move(mm, 1);
 
 /* see if double refused */
 if (cturn == -2 || cturn == 2)
@@ -363,12 +366,12 @@ main(int argc __unused, char **argv)
 	/* save game */
 case 'S':
 	raflag = 1;
-	save(1);
+	save(mm, 1);
 	break;
 
 	/* quit 

CVS commit: src/sys/external/bsd/sljit

2012-10-13 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Oct 13 19:38:24 UTC 2012

Modified Files:
src/sys/external/bsd/sljit/dist/sljit_src: sljitConfig.h
sljitNativeX86_common.c
Added Files:
src/sys/external/bsd/sljit/conf: files.sljit

Log Message:
Fix compilation.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/sljit/conf/files.sljit
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.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/external/bsd/sljit/dist/sljit_src/sljitConfig.h
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.3 src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.4
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h:1.3	Mon Oct  8 22:39:15 2012
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h	Sat Oct 13 19:38:24 2012
@@ -87,6 +87,7 @@
 #ifdef _KERNEL
 #include sys/cdefs.h
 #include sys/malloc.h
+#include sys/param.h
 #endif
 
 /* - */

Index: src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c
diff -u src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c:1.1.1.1 src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c:1.2
--- src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c:1.1.1.1	Sat Oct  6 18:24:24 2012
+++ src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c	Sat Oct 13 19:38:24 2012
@@ -24,7 +24,7 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
+SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name(void)
 {
 	return x86 SLJIT_CPUINFO;
 }
@@ -2021,7 +2021,7 @@ SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
 static sljit_i sse2_data[3 + 4 + 4];
 static sljit_i *sse2_buffer;
 
-static void init_compiler()
+static void init_compiler(void)
 {
 	sse2_buffer = (sljit_i*)(((sljit_uw)sse2_data + 15)  ~0xf);
 	sse2_buffer[0] = 0;

Added files:

Index: src/sys/external/bsd/sljit/conf/files.sljit
diff -u /dev/null src/sys/external/bsd/sljit/conf/files.sljit:1.1
--- /dev/null	Sat Oct 13 19:38:24 2012
+++ src/sys/external/bsd/sljit/conf/files.sljit	Sat Oct 13 19:38:24 2012
@@ -0,0 +1,7 @@
+# $NetBSD: files.sljit,v 1.1 2012/10/13 19:38:24 alnsn Exp $
+
+defflag		SLJIT
+
+makeoptions	sljit	CPPFLAGS+=-I$S/external/bsd/sljit/dist/sljit_src
+
+file	external/bsd/sljit/dist/sljit_src/sljitLir.c	sljit



CVS commit: src/games/backgammon/backgammon

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 19:39:57 UTC 2012

Modified Files:
src/games/backgammon/backgammon: move.c

Log Message:
Add strategic assertion, now passes -Wstrict-overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/games/backgammon/backgammon/move.c

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

Modified files:

Index: src/games/backgammon/backgammon/move.c
diff -u src/games/backgammon/backgammon/move.c:1.12 src/games/backgammon/backgammon/move.c:1.13
--- src/games/backgammon/backgammon/move.c:1.12	Sat Oct 13 19:19:38 2012
+++ src/games/backgammon/backgammon/move.c	Sat Oct 13 19:39:57 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: move.c,v 1.12 2012/10/13 19:19:38 dholland Exp $	*/
+/*	$NetBSD: move.c,v 1.13 2012/10/13 19:39:57 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)move.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: move.c,v 1.12 2012/10/13 19:19:38 dholland Exp $);
+__RCSID($NetBSD: move.c,v 1.13 2012/10/13 19:39:57 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -167,6 +167,14 @@ move(struct move *mm, int okay)
 		writec('-');
 		wrint(mm-g[i] = cg[i]);
 		makmove(mm, i);
+
+		/*
+		 * This assertion persuades gcc 4.5 that the loop
+		 * doesn't result in signed overflow of i. mvlim
+		 * isn't, or at least shouldn't be, changed by makmove
+		 * at all.
+		 */
+		assert(mm-mvlim = 0  mm-mvlim = 5);
 	}
 	writec('.');
 



CVS commit: src

2012-10-13 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sat Oct 13 19:42:03 UTC 2012

Modified Files:
src/distrib/sets/lists/modules: md.amd64
src/sys/arch/amd64/conf: files.amd64
src/sys/modules: Makefile
Added Files:
src/sys/arch/amd64/include: sljitarch.h
src/sys/modules/sljit: Makefile sljit_mod.c

Log Message:
Enable sljit in amd64 kernel and modules.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/amd64/conf/files.amd64
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/include/sljitarch.h
cvs rdiff -u -r1.111 -r1.112 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/sljit/Makefile \
src/sys/modules/sljit/sljit_mod.c

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

Modified files:

Index: src/distrib/sets/lists/modules/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.34 src/distrib/sets/lists/modules/md.amd64:1.35
--- src/distrib/sets/lists/modules/md.amd64:1.34	Mon Aug  6 10:44:08 2012
+++ src/distrib/sets/lists/modules/md.amd64	Sat Oct 13 19:42:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.34 2012/08/06 10:44:08 martin Exp $
+# $NetBSD: md.amd64,v 1.35 2012/10/13 19:42:02 alnsn Exp $
 ./@MODULEDIR@/acpiacadbase-kernel-modules	kmod
 ./@MODULEDIR@/acpiacad/acpiacad.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/acpibatbase-kernel-modules	kmod
@@ -105,6 +105,8 @@
 ./@MODULEDIR@/powernow/powernow.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/pwdogbase-kernel-modules	kmod
 ./@MODULEDIR@/pwdog/pwdog.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/sljitbase-kernel-modules	kmod
+./@MODULEDIR@/sljit/sljit.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/syscallemu			base-kernel-modules	kmod
 ./@MODULEDIR@/syscallemu/syscallemu.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/thinkpadbase-kernel-modules	kmod

Index: src/sys/arch/amd64/conf/files.amd64
diff -u src/sys/arch/amd64/conf/files.amd64:1.78 src/sys/arch/amd64/conf/files.amd64:1.79
--- src/sys/arch/amd64/conf/files.amd64:1.78	Thu Oct  4 21:23:45 2012
+++ src/sys/arch/amd64/conf/files.amd64	Sat Oct 13 19:42:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amd64,v 1.78 2012/10/04 21:23:45 dsl Exp $
+#	$NetBSD: files.amd64,v 1.79 2012/10/13 19:42:02 alnsn Exp $
 #
 # new style config file for amd64 architecture
 #
@@ -49,6 +49,12 @@ file	dev/cons.c
 file	arch/amd64/amd64/mptramp.Smultiprocessor
 
 #
+# Stack-less Just-In-Time compiler
+#
+
+include	external/bsd/sljit/conf/files.sljit
+
+#
 # Machine-independent SCSI drivers
 #
 

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.111 src/sys/modules/Makefile:1.112
--- src/sys/modules/Makefile:1.111	Sun Sep 16 13:47:41 2012
+++ src/sys/modules/Makefile	Sat Oct 13 19:42:03 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.111 2012/09/16 13:47:41 rmind Exp $
+#	$NetBSD: Makefile,v 1.112 2012/10/13 19:42:03 alnsn Exp $
 
 .include bsd.own.mk
 
@@ -121,6 +121,10 @@ SUBDIR+=	tprof_amdpmi
 SUBDIR+=	vmt
 .endif
 
+.if ${MACHINE_ARCH} == x86_64
+SUBDIR+=	sljit
+.endif
+
 #
 # ACPI modules
 #

Added files:

Index: src/sys/arch/amd64/include/sljitarch.h
diff -u /dev/null src/sys/arch/amd64/include/sljitarch.h:1.1
--- /dev/null	Sat Oct 13 19:42:03 2012
+++ src/sys/arch/amd64/include/sljitarch.h	Sat Oct 13 19:42:03 2012
@@ -0,0 +1,34 @@
+/*	$NetBSD: sljitarch.h,v 1.1 2012/10/13 19:42:03 alnsn Exp $	*/
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AMD64_SLJITARCH_H
+#define AMD64_SLJITARCH_H
+
+#define 

CVS commit: src/games/banner

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 19:44:36 UTC 2012

Modified Files:
src/games/banner: banner.c

Log Message:
Move scratch variables of main to main, instead of having them be
file-static.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/games/banner/banner.c

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

Modified files:

Index: src/games/banner/banner.c
diff -u src/games/banner/banner.c:1.20 src/games/banner/banner.c:1.21
--- src/games/banner/banner.c:1.20	Sun Feb 26 21:06:59 2012
+++ src/games/banner/banner.c	Sat Oct 13 19:44:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: banner.c,v 1.20 2012/02/26 21:06:59 wiz Exp $	*/
+/*	$NetBSD: banner.c,v 1.21 2012/10/13 19:44:36 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)banner.c	8.4 (Berkeley) 4/29/95;
 #else
-__RCSID($NetBSD: banner.c,v 1.20 2012/02/26 21:06:59 wiz Exp $);
+__RCSID($NetBSD: banner.c,v 1.21 2012/10/13 19:44:36 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -1022,7 +1022,7 @@ static const unsigned char data_table[NB
 static char line[DWIDTH];
 static char message[MAXMSG];
 static char print[DWIDTH];
-static int debug, i, j, linen, max, nchars, pc, term, trace, x, y;
+static int debug, linen, max, nchars, pc, term, trace;
 static int width = DWIDTH;	/* -w option: scrunch letters to 80 columns */
 
 __dead static void
@@ -1035,6 +1035,9 @@ int
 main(int argc, char *argv[])
 { 
 	int ch;
+	int i, j, x, y;
+
+	x = y = 0;
 
 	while ((ch = getopt(argc, argv, w:td)) != -1)
 		switch (ch) {



CVS commit: src/games/battlestar

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 19:58:54 UTC 2012

Modified Files:
src/games/battlestar: fly.c

Log Message:
Pass -Wstrict-overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/games/battlestar/fly.c

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

Modified files:

Index: src/games/battlestar/fly.c
diff -u src/games/battlestar/fly.c:1.14 src/games/battlestar/fly.c:1.15
--- src/games/battlestar/fly.c:1.14	Sat Dec 15 19:44:39 2007
+++ src/games/battlestar/fly.c	Sat Oct 13 19:58:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fly.c,v 1.14 2007/12/15 19:44:39 perry Exp $	*/
+/*	$NetBSD: fly.c,v 1.15 2012/10/13 19:58:53 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,13 +34,14 @@
 #if 0
 static char sccsid[] = @(#)fly.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: fly.c,v 1.14 2007/12/15 19:44:39 perry Exp $);
+__RCSID($NetBSD: fly.c,v 1.15 2012/10/13 19:58:53 dholland Exp $);
 #endif
 #endif/* not lint */
 
 #include extern.h
 #undef UP
 #include curses.h
+#include assert.h
 
 #define MIDR  (LINES/2 - 1)
 #define MIDC  (COLS/2 - 1)
@@ -150,8 +151,8 @@ visual(void)
 			if (torps) {
 torps -= 2;
 blast();
-if (row == MIDR  column - MIDC  2  
-MIDC - column  2) {
+if (row == MIDR  column  MIDC + 2  
+column  MIDC - 2) {
 	destroyed = 1;
 	alarm(0);
 }



CVS commit: src/games/boggle/boggle

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 20:12:18 UTC 2012

Modified Files:
src/games/boggle/boggle: bog.c

Log Message:
Factor out some common code; pass -Wstrict-overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/games/boggle/boggle/bog.c

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

Modified files:

Index: src/games/boggle/boggle/bog.c
diff -u src/games/boggle/boggle/bog.c:1.27 src/games/boggle/boggle/bog.c:1.28
--- src/games/boggle/boggle/bog.c:1.27	Fri Aug 26 06:18:17 2011
+++ src/games/boggle/boggle/bog.c	Sat Oct 13 20:12:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bog.c,v 1.27 2011/08/26 06:18:17 dholland Exp $	*/
+/*	$NetBSD: bog.c,v 1.28 2012/10/13 20:12:18 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1993\
 #if 0
 static char sccsid[] = @(#)bog.c	8.2 (Berkeley) 5/4/95;
 #else
-__RCSID($NetBSD: bog.c,v 1.27 2011/08/26 06:18:17 dholland Exp $);
+__RCSID($NetBSD: bog.c,v 1.28 2012/10/13 20:12:18 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -64,6 +64,7 @@ static int validword(const char *);
 static void checkdict(void);
 static void newgame(const char *);
 static int compar(const void *, const void *);
+static void clearwordpath(int full);
 static void usage(void) __dead;
 
 struct dictindex dictindex[26];
@@ -286,19 +287,13 @@ main(int argc, char *argv[])
 static char *
 batchword(FILE *fp)
 {
-	int *p, *q;
 	char *w;
 
-	q = wordpath[MAXWORDLEN + 1];
-	p = wordpath;
-	while (p  q)
-		*p++ = -1;
+	clearwordpath(1);
 	while ((w = nextword(fp)) != NULL) {
 		if (wordlen  minlength)
 			continue;
-		p = wordpath;
-		while (p  q  *p != -1)
-			*p++ = -1;
+		clearwordpath(0);
 		usedbits = 0;
 		if (checkword(w, -1, wordpath) != -1)
 			return (w);
@@ -314,7 +309,7 @@ batchword(FILE *fp)
 static void
 playgame(void)
 {
-	int i, *p, *q;
+	int i;
 	time_t t;
 	char buf[MAXWORDLEN + 1];
 
@@ -326,10 +321,7 @@ playgame(void)
 
 	time(start_t);
 
-	q = wordpath[MAXWORDLEN + 1];
-	p = wordpath;
-	while (p  q)
-		*p++ = -1;
+	clearwordpath(1);
 	showboard(board);
 	startwords();
 	if (setjmp(env)) {
@@ -362,9 +354,7 @@ playgame(void)
 			continue;
 		}
 
-		p = wordpath;
-		while (p  q  *p != -1)
-			*p++ = -1;
+		clearwordpath(0);
 		usedbits = 0;
 
 		if (checkword(buf, -1, wordpath)  0)
@@ -554,13 +544,12 @@ checkdict(void)
 	char *p, *w;
 	const char **pw;
 	int i;
-	int prevch, previndex, *pi, *qi, st;
+	int prevch, previndex, st;
 
 	mwordsp = mwords;
 	nmwords = 0;
 	pw = pword;
 	prevch ='a';
-	qi = wordpath[MAXWORDLEN + 1];
 
 	(void) dictseek(dictfp, 0L, SEEK_SET);
 	while ((w = nextword(dictfp)) != NULL) {
@@ -598,9 +587,7 @@ checkdict(void)
 			}
 		}
 
-		pi = wordpath;
-		while (pi  qi  *pi != -1)
-			*pi++ = -1;
+		clearwordpath(0);
 		usedbits = 0;
 		if (checkword(w, -1, wordpath) == -1)
 			continue;
@@ -697,6 +684,20 @@ newgame(const char *b)
 
 }
 
+/*
+ * Clear wordpath[].
+ */
+static void
+clearwordpath(int full)
+{
+	size_t pos;
+	const size_t max = MAXWORDLEN + 1;
+
+	for (pos = 0; pos  max  (full || wordpath[pos] != -1); pos++) {
+		wordpath[pos] = -1;
+	}
+}
+
 static int
 compar(const void *p, const void *q)
 {



CVS commit: src/games/cribbage

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 20:36:07 UTC 2012

Modified Files:
src/games/cribbage: crib.c cribbage.h io.c score.c

Log Message:
Pass -Wstrict-overflow, and while here, don't read from index -1 of
an array.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/games/cribbage/crib.c
cvs rdiff -u -r1.16 -r1.17 src/games/cribbage/cribbage.h
cvs rdiff -u -r1.26 -r1.27 src/games/cribbage/io.c
cvs rdiff -u -r1.15 -r1.16 src/games/cribbage/score.c

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

Modified files:

Index: src/games/cribbage/crib.c
diff -u src/games/cribbage/crib.c:1.24 src/games/cribbage/crib.c:1.25
--- src/games/cribbage/crib.c:1.24	Wed Aug 12 05:48:04 2009
+++ src/games/cribbage/crib.c	Sat Oct 13 20:36:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: crib.c,v 1.24 2009/08/12 05:48:04 dholland Exp $	*/
+/*	$NetBSD: crib.c,v 1.25 2012/10/13 20:36:06 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = @(#)crib.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: crib.c,v 1.24 2009/08/12 05:48:04 dholland Exp $);
+__RCSID($NetBSD: crib.c,v 1.25 2012/10/13 20:36:06 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -460,7 +460,7 @@ prcrib(BOOLEAN mycrib, BOOLEAN blank)
  *	Handle all the pegging...
  */
 static CARD Table[14];
-static int Tcnt;
+static unsigned Tcnt;
 
 static int
 peg(BOOLEAN mycrib)

Index: src/games/cribbage/cribbage.h
diff -u src/games/cribbage/cribbage.h:1.16 src/games/cribbage/cribbage.h:1.17
--- src/games/cribbage/cribbage.h:1.16	Fri Aug 26 06:18:17 2011
+++ src/games/cribbage/cribbage.h	Sat Oct 13 20:36:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: cribbage.h,v 1.16 2011/08/26 06:18:17 dholland Exp $	*/
+/*	$NetBSD: cribbage.h,v 1.17 2012/10/13 20:36:06 dholland Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -77,10 +77,10 @@ void	 makeknown(const CARD [], int);
 void	 msg(const char *, ...) __printflike(1, 2);
 int	 msgcard(CARD, BOOLEAN);
 int	 number(int, int, const char *);
-int	 pegscore(CARD, const CARD [], int, int);
+int	 pegscore(CARD, const CARD [], unsigned, int);
 int	 plyrhand(const CARD [], const char *);
 void	 prcard(WINDOW *, int, int, CARD, BOOLEAN);
-void	 prhand(const CARD [], int, WINDOW *, BOOLEAN);
+void	 prhand(const CARD [], unsigned, WINDOW *, BOOLEAN);
 void	 receive_intr(int) __dead;
 int	 scorehand(const CARD [], CARD, int, BOOLEAN, BOOLEAN);
 void	 shuffle(CARD []);

Index: src/games/cribbage/io.c
diff -u src/games/cribbage/io.c:1.26 src/games/cribbage/io.c:1.27
--- src/games/cribbage/io.c:1.26	Mon May 23 22:48:52 2011
+++ src/games/cribbage/io.c	Sat Oct 13 20:36:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: io.c,v 1.26 2011/05/23 22:48:52 joerg Exp $	*/
+/*	$NetBSD: io.c,v 1.27 2012/10/13 20:36:06 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)io.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: io.c,v 1.26 2011/05/23 22:48:52 joerg Exp $);
+__RCSID($NetBSD: io.c,v 1.27 2012/10/13 20:36:06 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -59,7 +59,7 @@ __RCSID($NetBSD: io.c,v 1.26 2011/05/23
 #define	CTRL(X)			(X - 'A' + 1)
 
 static int msgcrd(CARD, BOOLEAN, const char *, BOOLEAN);
-static void printcard(WINDOW *, int, CARD, BOOLEAN);
+static void printcard(WINDOW *, unsigned, CARD, BOOLEAN);
 static int incard(CARD *);
 static void wait_for(int);
 static int readchar(void);
@@ -121,7 +121,7 @@ msgcrd(CARD c, BOOLEAN brfrank, const ch
  *	Print out a card.
  */
 static void
-printcard(WINDOW *win, int cardno, CARD c, BOOLEAN blank)
+printcard(WINDOW *win, unsigned cardno, CARD c, BOOLEAN blank)
 {
 	prcard(win, cardno * 2, cardno, c, blank);
 }
@@ -154,9 +154,9 @@ prcard(WINDOW *win, int y, int x, CARD c
  *	Print a hand of n cards
  */
 void
-prhand(const CARD h[], int n, WINDOW *win, BOOLEAN blank)
+prhand(const CARD h[], unsigned n, WINDOW *win, BOOLEAN blank)
 {
-	int i;
+	unsigned i;
 
 	werase(win);
 	for (i = 0; i  n; i++)
@@ -519,7 +519,7 @@ over:
 char *
 get_line(void)
 {
-	char *sp;
+	size_t pos;
 	int c, oy, ox;
 	WINDOW *oscr;
 
@@ -528,36 +528,36 @@ get_line(void)
 	getyx(stdscr, oy, ox);
 	refresh();
 	/* loop reading in the string, and put it in a temporary buffer */
-	for (sp = linebuf; (c = readchar()) != '\n'; clrtoeol(), refresh()) {
+	for (pos = 0; (c = readchar()) != '\n'; clrtoeol(), refresh()) {
 			if (c == erasechar()) {	/* process erase character */
-if (sp  linebuf) {
+if (pos  0) {
 	int i;
 
-	sp--;
-	for (i = strlen(unctrl(*sp)); i; i--)
+	pos--;
+	for (i = strlen(unctrl(linebuf[pos])); i; i--)
 		addch('\b');
 }
 continue;
 			} else
 if (c == killchar()) {	/* process kill
 			 * character */
-	sp = linebuf;
+	pos = 0;
 	move(oy, ox);
 	continue;
 } else
-	if (sp == linebuf  c == ' ')
+	if 

CVS commit: src/games/fortune/strfile

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 20:42:56 UTC 2012

Modified Files:
src/games/fortune/strfile: strfile.c

Log Message:
Pass -Wstrict-overflow.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/games/fortune/strfile/strfile.c

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

Modified files:

Index: src/games/fortune/strfile/strfile.c
diff -u src/games/fortune/strfile/strfile.c:1.34 src/games/fortune/strfile/strfile.c:1.35
--- src/games/fortune/strfile/strfile.c:1.34	Wed Aug 31 16:24:55 2011
+++ src/games/fortune/strfile/strfile.c	Sat Oct 13 20:42:56 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: strfile.c,v 1.34 2011/08/31 16:24:55 plunky Exp $	*/
+/*	$NetBSD: strfile.c,v 1.35 2012/10/13 20:42:56 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -43,7 +43,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)strfile.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: strfile.c,v 1.34 2011/08/31 16:24:55 plunky Exp $);
+__RCSID($NetBSD: strfile.c,v 1.35 2012/10/13 20:42:56 dholland Exp $);
 #endif
 #endif /* not lint */
 #endif /* __NetBSD__ */
@@ -162,11 +162,12 @@ main(int ac, char **av)
 {
 	char		*sp, dc;
 	FILE		*inf, *outf;
-	off_t		last_off, length, pos, *p;
-	int		first, cnt;
+	off_t		last_off, length, pos;
+	int		first;
 	char		*nsp;
 	STR		*fp;
 	static char	string[257];
+	long		i;
 
 	/* sanity test */
 	if (sizeof(uint32_t) != 4)
@@ -256,8 +257,8 @@ main(int ac, char **av)
 	Tbl.str_flags = h2nl(Tbl.str_flags);
 	(void) fwrite((char *) Tbl, sizeof Tbl, 1, outf);
 	if (STORING_PTRS) {
-		for (p = Seekpts, cnt = Num_pts; cnt--; ++p)
-			fwrite_be_offt(*p, outf);
+		for (i = 0; i  Num_pts; i++)
+			fwrite_be_offt(Seekpts[i], outf);
 	}
 	fflush(outf);
 	if (ferror(outf))



CVS commit: src/games/gomoku

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 20:57:35 UTC 2012

Modified Files:
src/games/gomoku: bdinit.c pickmove.c

Log Message:
Pass -Wstrict-overflow... mostly.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/games/gomoku/bdinit.c
cvs rdiff -u -r1.20 -r1.21 src/games/gomoku/pickmove.c

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

Modified files:

Index: src/games/gomoku/bdinit.c
diff -u src/games/gomoku/bdinit.c:1.8 src/games/gomoku/bdinit.c:1.9
--- src/games/gomoku/bdinit.c:1.8	Wed Aug 12 06:19:17 2009
+++ src/games/gomoku/bdinit.c	Sat Oct 13 20:57:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bdinit.c,v 1.8 2009/08/12 06:19:17 dholland Exp $	*/
+/*	$NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = from: @(#)bdinit.c	8.2 (Berkeley) 5/3/95;
 #else
-__RCSID($NetBSD: bdinit.c,v 1.8 2009/08/12 06:19:17 dholland Exp $);
+__RCSID($NetBSD: bdinit.c,v 1.9 2012/10/13 20:57:35 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -177,6 +177,7 @@ init_overlap(void)
 {
 	struct spotstr *sp1, *sp2;
 	struct combostr *cbp;
+	unsigned frameix;
 	int i, f, r, n, d1, d2;
 	int mask, bmask, vertex, s;
 	u_char *str;
@@ -186,7 +187,8 @@ init_overlap(void)
 	memset(intersect, 0, sizeof(intersect));
 	str = overlap[FAREA * FAREA];
 	ip = intersect[FAREA * FAREA];
-	for (cbp = frames + FAREA; --cbp = frames; ) {		/* each frame */
+	for (frameix = FAREA; frameix--  0; ) {	/* each frame */
+	cbp = frames[frameix];
 	str -= FAREA;
 	ip -= FAREA;
 	sp1 = board[vertex = cbp-c_vertex];

Index: src/games/gomoku/pickmove.c
diff -u src/games/gomoku/pickmove.c:1.20 src/games/gomoku/pickmove.c:1.21
--- src/games/gomoku/pickmove.c:1.20	Mon Mar 29 05:16:08 2010
+++ src/games/gomoku/pickmove.c	Sat Oct 13 20:57:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: pickmove.c,v 1.20 2010/03/29 05:16:08 dholland Exp $	*/
+/*	$NetBSD: pickmove.c,v 1.21 2012/10/13 20:57:35 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)pickmove.c	8.2 (Berkeley) 5/3/95;
 #else
-__RCSID($NetBSD: pickmove.c,v 1.20 2010/03/29 05:16:08 dholland Exp $);
+__RCSID($NetBSD: pickmove.c,v 1.21 2012/10/13 20:57:35 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -83,6 +83,7 @@ pickmove(int us)
 {
 	struct spotstr *sp, *sp1, *sp2;
 	union comboval *Ocp, *Tcp;
+	unsigned pos;
 	int m;
 
 	/* first move is easy */
@@ -90,7 +91,8 @@ pickmove(int us)
 		return (PT(K,10));
 
 	/* initialize all the board values */
-	for (sp = board[PT(T,20)]; --sp = board[PT(A,1)]; ) {
+	for (pos = PT(T,20); pos--  PT(A,1); ) {
+		sp = board[pos];
 		sp-s_combo[BLACK].s = MAXCOMBO + 1;
 		sp-s_combo[WHITE].s = MAXCOMBO + 1;
 		sp-s_level[BLACK] = 255;
@@ -108,7 +110,10 @@ pickmove(int us)
 	scanframes(WHITE);
 
 	/* find the spot with the highest value */
-	for (sp = sp1 = sp2 = board[PT(T,19)]; --sp = board[PT(A,1)]; ) {
+	pos = PT(T,19);
+	sp1 = sp2 = board[pos];
+	for ( ; pos--  PT(A,1); ) {
+		sp = board[pos];
 		if (sp-s_occ != EMPTY)
 			continue;
 		if (debug  (sp-s_combo[BLACK].c.a == 1 ||
@@ -237,6 +242,7 @@ scanframes(int color)
 	struct elist *ep, *nep;
 	int i, r, d, n;
 	union comboval cb;
+	unsigned pos;
 
 	curcolor = color;
 
@@ -345,7 +351,8 @@ scanframes(int color)
 	}
 
 	/* scan for combos at empty spots */
-	for (sp = board[PT(T,20)]; --sp = board[PT(A,1)]; ) {
+	for (pos = PT(T,20); pos--  PT(A,1); ) {
+		sp = board[pos];
 		for (ep = sp-s_empty; ep; ep = nep) {
 			cbp = ep-e_combo;
 			if (cbp-c_combo.s = sp-s_combo[color].s) {
@@ -548,12 +555,14 @@ addframes(int level)
 	int i, r, d;
 	struct combostr **cbpp, *pcbp;
 	union comboval fcb, cb;
+	unsigned pos;
 
 	curlevel = level;
 
 	/* scan for combos at empty spots */
 	i = curcolor;
-	for (sp = board[PT(T,20)]; --sp = board[PT(A,1)]; ) {
+	for (pos = PT(T,20); pos--  PT(A,1); ) {
+		sp = board[pos];
 		for (ep = sp-s_empty; ep; ep = nep) {
 			cbp = ep-e_combo;
 			if (cbp-c_combo.s = sp-s_combo[i].s) {



CVS commit: src/games/hangman

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 21:01:13 UTC 2012

Modified Files:
src/games/hangman: getguess.c playgame.c

Log Message:
Pass -Wstrict-overflow; while here, use curses TRUE and FALSE only with
curses.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/games/hangman/getguess.c
cvs rdiff -u -r1.6 -r1.7 src/games/hangman/playgame.c

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

Modified files:

Index: src/games/hangman/getguess.c
diff -u src/games/hangman/getguess.c:1.9 src/games/hangman/getguess.c:1.10
--- src/games/hangman/getguess.c:1.9	Tue Jun 19 05:45:00 2012
+++ src/games/hangman/getguess.c	Sat Oct 13 21:01:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: getguess.c,v 1.9 2012/06/19 05:45:00 dholland Exp $	*/
+/*	$NetBSD: getguess.c,v 1.10 2012/10/13 21:01:13 dholland Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)getguess.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: getguess.c,v 1.9 2012/06/19 05:45:00 dholland Exp $);
+__RCSID($NetBSD: getguess.c,v 1.10 2012/10/13 21:01:13 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -76,12 +76,12 @@ getguess(void)
 	move(MESGY, MESGX);
 	clrtoeol();
 
-	Guessed[ch - 'a'] = TRUE;
-	correct = FALSE;
+	Guessed[ch - 'a'] = true;
+	correct = false;
 	for (i = 0; Word[i] != '\0'; i++)
 		if (Word[i] == ch) {
 			Known[i] = ch;
-			correct = TRUE;
+			correct = true;
 		}
 	if (!correct)
 		Errors++;

Index: src/games/hangman/playgame.c
diff -u src/games/hangman/playgame.c:1.6 src/games/hangman/playgame.c:1.7
--- src/games/hangman/playgame.c:1.6	Tue Jun 19 05:45:00 2012
+++ src/games/hangman/playgame.c	Sat Oct 13 21:01:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: playgame.c,v 1.6 2012/06/19 05:45:00 dholland Exp $	*/
+/*	$NetBSD: playgame.c,v 1.7 2012/10/13 21:01:13 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)playgame.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: playgame.c,v 1.6 2012/06/19 05:45:00 dholland Exp $);
+__RCSID($NetBSD: playgame.c,v 1.7 2012/10/13 21:01:13 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -47,13 +47,13 @@ __RCSID($NetBSD: playgame.c,v 1.6 2012/
 void
 playgame(void)
 {
-	bool *bp;
+	int i;
 
 	getword();
 	Errors = 0;
-	bp = Guessed;
-	while (bp  Guessed[26])
-		*bp++ = FALSE;
+	for (i=0; i26; i++) {
+		Guessed[i] = false;
+	}
 	while (Errors  MAXERRS  strchr(Known, '-') != NULL) {
 		prword();
 		prdata();



CVS commit: src/games/hangman

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 21:03:10 UTC 2012

Modified Files:
src/games/hangman: prdata.c

Log Message:
Pass -Wstrict-overflow


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/games/hangman/prdata.c

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

Modified files:

Index: src/games/hangman/prdata.c
diff -u src/games/hangman/prdata.c:1.6 src/games/hangman/prdata.c:1.7
--- src/games/hangman/prdata.c:1.6	Tue Jun 19 05:45:00 2012
+++ src/games/hangman/prdata.c	Sat Oct 13 21:03:09 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: prdata.c,v 1.6 2012/06/19 05:45:00 dholland Exp $	*/
+/*	$NetBSD: prdata.c,v 1.7 2012/10/13 21:03:09 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = @(#)prdata.c	8.1 (Berkeley) 5/31/93;
 #else
-__RCSID($NetBSD: prdata.c,v 1.6 2012/06/19 05:45:00 dholland Exp $);
+__RCSID($NetBSD: prdata.c,v 1.7 2012/10/13 21:03:09 dholland Exp $);
 #endif
 #endif /* not lint */
 
@@ -47,13 +47,12 @@ __RCSID($NetBSD: prdata.c,v 1.6 2012/06
 void
 prdata(void)
 {
-	bool *bp;
+	int i;
 
 	move(GUESSY, GUESSX + sizeof Guessed: );
-	bp = Guessed;
-	while (bp  Guessed[26])
-		if (*bp++)
-			addch((bp - Guessed) + 'a' - 1);
+	for (i = 0; i  26; i++)
+		if (Guessed[i])
+			addch(i + 'a');
 	clrtoeol();
 	mvprintw(NUMBERY, NUMBERX + sizeof Word #:  , %d, Wordnum);
 	mvprintw(AVGY, AVGX + sizeof Current Average: , %.3f,



CVS commit: src/libexec/ld.elf_so

2012-10-13 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Oct 13 21:13:07 UTC 2012

Modified Files:
src/libexec/ld.elf_so: map_object.c

Log Message:
Improve the diagnostic messages for invalid/non-ELF files. Proposed a
while back; I forget the context. Has been sitting in one of my trees
awaiting a test run since, apparently, August 2011.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/libexec/ld.elf_so/map_object.c

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

Modified files:

Index: src/libexec/ld.elf_so/map_object.c
diff -u src/libexec/ld.elf_so/map_object.c:1.44 src/libexec/ld.elf_so/map_object.c:1.45
--- src/libexec/ld.elf_so/map_object.c:1.44	Wed Jul 25 22:51:04 2012
+++ src/libexec/ld.elf_so/map_object.c	Sat Oct 13 21:13:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: map_object.c,v 1.44 2012/07/25 22:51:04 martin Exp $	 */
+/*	$NetBSD: map_object.c,v 1.45 2012/10/13 21:13:07 dholland Exp $	 */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -34,7 +34,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: map_object.c,v 1.44 2012/07/25 22:51:04 martin Exp $);
+__RCSID($NetBSD: map_object.c,v 1.45 2012/10/13 21:13:07 dholland Exp $);
 #endif /* not lint */
 
 #include errno.h
@@ -105,7 +105,7 @@ _rtld_map_object(const char *path, int f
 #endif
 
 	if (sb != NULL  sb-st_size  (off_t)sizeof (Elf_Ehdr)) {
-		_rtld_error(%s: unrecognized file format1, path);
+		_rtld_error(%s: not ELF file (too short), path);
 		return NULL;
 	}
 
@@ -125,9 +125,12 @@ _rtld_map_object(const char *path, int f
 		goto bad;
 	}
 	/* Make sure the file is valid */
-	if (memcmp(ELFMAG, ehdr-e_ident, SELFMAG) != 0 ||
-	ehdr-e_ident[EI_CLASS] != ELFCLASS) {
-		_rtld_error(%s: unrecognized file format2 [%x != %x], path,
+	if (memcmp(ELFMAG, ehdr-e_ident, SELFMAG) != 0) {
+		_rtld_error(%s: not ELF file (magic number bad), path);
+		goto bad;
+	}
+	if (ehdr-e_ident[EI_CLASS] != ELFCLASS) {
+		_rtld_error(%s: invalid ELF class %x; expected %x, path,
 		ehdr-e_ident[EI_CLASS], ELFCLASS);
 		goto bad;
 	}



CVS commit: src/distrib/sets/lists/xserver

2012-10-13 Thread Julio Merino
Module Name:src
Committed By:   jmmv
Date:   Sat Oct 13 21:21:53 UTC 2012

Modified Files:
src/distrib/sets/lists/xserver: md.macppc

Log Message:
Add missing ./usr/X11R7/lib/modules/libexa_g.a to fix MKDEBUGLIB=yes build.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/distrib/sets/lists/xserver/md.macppc

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

Modified files:

Index: src/distrib/sets/lists/xserver/md.macppc
diff -u src/distrib/sets/lists/xserver/md.macppc:1.60 src/distrib/sets/lists/xserver/md.macppc:1.61
--- src/distrib/sets/lists/xserver/md.macppc:1.60	Wed Aug  3 00:39:45 2011
+++ src/distrib/sets/lists/xserver/md.macppc	Sat Oct 13 21:21:52 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.macppc,v 1.60 2011/08/03 00:39:45 macallan Exp $
+# $NetBSD: md.macppc,v 1.61 2012/10/13 21:21:52 jmmv Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/Xmacppc	-unknown-	x11
@@ -429,6 +429,7 @@
 ./usr/X11R7/lib/modules/libexa.a			-unknown-	xorg
 ./usr/X11R7/lib/modules/libexa.so			-unknown-	xorg
 ./usr/X11R7/lib/modules/libexa.so.0			-unknown-	xorg
+./usr/X11R7/lib/modules/libexa_g.a			-unknown-	debuglib,xorg
 ./usr/X11R7/lib/modules/libexa_pic.a			-unknown-	xorg
 ./usr/X11R7/lib/modules/libfb.a-unknown-	xorg
 ./usr/X11R7/lib/modules/libfb.so			-unknown-	xorg