CVS commit: src/tests/lib/libc/sys

2011-11-02 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Wed Nov  2 06:04:48 UTC 2011

Modified Files:
src/tests/lib/libc/sys: t_mkfifo.c

Log Message:
Fix a test case to test what the comment says.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/sys/t_mkfifo.c

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

Modified files:

Index: src/tests/lib/libc/sys/t_mkfifo.c
diff -u src/tests/lib/libc/sys/t_mkfifo.c:1.1 src/tests/lib/libc/sys/t_mkfifo.c:1.2
--- src/tests/lib/libc/sys/t_mkfifo.c:1.1	Thu Jul  7 06:57:54 2011
+++ src/tests/lib/libc/sys/t_mkfifo.c	Wed Nov  2 06:04:48 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mkfifo.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $ */
+/* $NetBSD: t_mkfifo.c,v 1.2 2011/11/02 06:04:48 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_mkfifo.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $);
+__RCSID($NetBSD: t_mkfifo.c,v 1.2 2011/11/02 06:04:48 jruoho Exp $);
 
 #include sys/stat.h
 #include sys/wait.h
@@ -72,12 +72,11 @@ ATF_TC_HEAD(mkfifo_block, tc)
 
 ATF_TC_BODY(mkfifo_block, tc)
 {
-	int fd[2], sta;
+	int sta, fd = -1;
 	pid_t pid;
 
 	support();
 
-	fd[0] = fd[1] = -1;
 	ATF_REQUIRE(mkfifo(path, 0600) == 0);
 
 	pid = fork();
@@ -90,16 +89,13 @@ ATF_TC_BODY(mkfifo_block, tc)
 		 * the call should block until another process
 		 * opens the FIFO for writing (reading).
 		 */
-		fd[0] = open(path, O_RDONLY);
+		fd = open(path, O_RDONLY);
 
-		(void)pause();
-
-		_exit(EXIT_SUCCESS); /* NOTREACHED */
+		_exit(EXIT_FAILURE); /* NOTREACHED */
 	}
 
 	(void)sleep(1);
 
-	fd[1] = open(path, O_WRONLY);
 	ATF_REQUIRE(kill(pid, SIGKILL) == 0);
 
 	(void)wait(sta);
@@ -107,7 +103,7 @@ ATF_TC_BODY(mkfifo_block, tc)
 	if (WIFSIGNALED(sta) == 0 || WTERMSIG(sta) != SIGKILL)
 		atf_tc_fail(FIFO did not block);
 
-	(void)close(fd[0]);
+	(void)close(fd);
 	(void)unlink(path);
 }
 



CVS commit: src/sys/dev/usb

2011-11-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov  2 08:20:02 UTC 2011

Modified Files:
src/sys/dev/usb: ukbd.c

Log Message:
support Gdium's Fn key
translation table from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/dev/usb/ukbd.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/usb/ukbd.c
diff -u src/sys/dev/usb/ukbd.c:1.110 src/sys/dev/usb/ukbd.c:1.111
--- src/sys/dev/usb/ukbd.c:1.110	Sun Jan  2 12:36:41 2011
+++ src/sys/dev/usb/ukbd.c	Wed Nov  2 08:20:02 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: ukbd.c,v 1.110 2011/01/02 12:36:41 mbalmer Exp $*/
+/*  $NetBSD: ukbd.c,v 1.111 2011/11/02 08:20:02 macallan Exp $*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ukbd.c,v 1.110 2011/01/02 12:36:41 mbalmer Exp $);
+__KERNEL_RCSID(0, $NetBSD: ukbd.c,v 1.111 2011/11/02 08:20:02 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -143,6 +143,29 @@ Static const struct ukbd_keycodetrans tr
 	{ 0x00, 0x00 }
 };
 
+Static const struct ukbd_keycodetrans trtab_gdium_fn[] = {	
+#ifdef notyet
+		{ 58, 0 },	/* F1 - toggle camera */
+		{ 59, 0 },	/* F2 - toggle wireless */
+#endif
+		{ 60, 127 },	/* F3 - audio mute */
+		{ 61, 128 },	/* F4 - audio raise */
+		{ 62, 129 },	/* F5 - audio lower */
+#ifdef notyet
+		{ 63, 0 },	/* F6 - toggle ext. video */
+		{ 64, 0 },	/* F7 - toggle mouse */
+		{ 65, 0 },	/* F8 - brightness up */
+		{ 66, 0 },	/* F9 - brightness down */
+		{ 67, 0 },	/* F10 - suspend */
+		{ 68, 0 },	/* F11 - user1 */
+		{ 69, 0 },	/* F12 - user2 */
+		{ 70, 0 },	/* print screen - sysrq */
+#endif
+		{ 76, 71 },	/* delete - scroll lock */
+		{ 81, 78 },	/* down - page down */
+		{ 82, 75 }	/* up - page up */
+};
+
 #if defined(__NetBSD__)  defined(WSDISPLAY_COMPAT_RAWKBD)
 #define NN 0			/* no translation */
 /*
@@ -217,6 +240,7 @@ struct ukbd_softc {
 #define FLAG_DEBOUNCE		0x0004	/* for quirk handling */
 #define FLAG_APPLE_FIX_ISO	0x0008
 #define FLAG_APPLE_FN		0x0010
+#define FLAG_GDIUM_FN		0x0020
 #define FLAG_FN_PRESSED		0x0100	/* FN key is held down */
 #define FLAG_FN_ALT		0x0200	/* Last Alt key was FN-Alt = AltGr */
 
@@ -395,6 +419,10 @@ ukbd_attach(device_t parent, device_t se
 	if (qflags  UQ_APPLE_ISO)
 		sc-sc_flags |= FLAG_APPLE_FIX_ISO;
 
+	if (uha-uaa-vendor == USB_VENDOR_CYPRESS 
+	uha-uaa-product == USB_PRODUCT_CYPRESS_LPRDK)
+		sc-sc_flags = FLAG_GDIUM_FN;
+
 #ifdef DIAGNOSTIC
 	aprint_normal(: %d modifier keys, %d key codes, sc-sc_nmod,
 	   sc-sc_nkeycode);
@@ -402,6 +430,8 @@ ukbd_attach(device_t parent, device_t se
 		aprint_normal(, apple fn key);
 	if (sc-sc_flags  FLAG_APPLE_FIX_ISO)
 		aprint_normal(, fix apple iso);
+	if (sc-sc_flags  FLAG_GDIUM_FN)
+		aprint_normal(, Gdium fn key);
 #endif
 	aprint_normal(\n);
 
@@ -614,6 +644,12 @@ ukbd_intr(struct uhidev *addr, void *ibu
 		else
 			sc-sc_flags = ~FLAG_FN_PRESSED;
 	}
+	
+	if (sc-sc_flags  FLAG_GDIUM_FN) {
+		if (sc-sc_flags  FLAG_FN_PRESSED) {
+			ukbd_translate_keycodes(sc, ud, trtab_gdium_fn);
+		}
+	}
 
 	if ((sc-sc_flags  FLAG_DEBOUNCE)  !(sc-sc_flags  FLAG_POLLING)) {
 		/*
@@ -712,6 +748,12 @@ ukbd_decode(struct ukbd_softc *sc, struc
 if (key == ud-keycode[j])
 	goto rfound;
 			DPRINTFN(3,(ukbd_intr: relse key=0x%02x\n, key));
+			if (sc-sc_flags  FLAG_GDIUM_FN) {
+if (key == 0x82) {
+	sc-sc_flags = ~FLAG_FN_PRESSED;
+	goto rfound;
+}
+			}
 			ADDKEY(key | RELEASE);
 		rfound:
 			;
@@ -726,6 +768,12 @@ ukbd_decode(struct ukbd_softc *sc, struc
 if (key == sc-sc_odata.keycode[j])
 	goto pfound;
 			DPRINTFN(2,(ukbd_intr: press key=0x%02x\n, key));
+			if (sc-sc_flags  FLAG_GDIUM_FN) {
+if (key == 0x82) {
+	sc-sc_flags |= FLAG_FN_PRESSED;
+	goto pfound;
+}
+			}
 			ADDKEY(key | PRESS);
 		pfound:
 			;



CVS commit: src/sys/dev/usb

2011-11-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Wed Nov  2 08:49:08 UTC 2011

Modified Files:
src/sys/dev/usb: ukbd.c

Log Message:
support PMF events as target type in scancode translation tables


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/usb/ukbd.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/usb/ukbd.c
diff -u src/sys/dev/usb/ukbd.c:1.111 src/sys/dev/usb/ukbd.c:1.112
--- src/sys/dev/usb/ukbd.c:1.111	Wed Nov  2 08:20:02 2011
+++ src/sys/dev/usb/ukbd.c	Wed Nov  2 08:49:08 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: ukbd.c,v 1.111 2011/11/02 08:20:02 macallan Exp $*/
+/*  $NetBSD: ukbd.c,v 1.112 2011/11/02 08:49:08 macallan Exp $*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ukbd.c,v 1.111 2011/11/02 08:20:02 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: ukbd.c,v 1.112 2011/11/02 08:49:08 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -93,10 +93,12 @@ struct ukbd_data {
 #define CODEMASK 0x0ff
 
 struct ukbd_keycodetrans {
-	u_int8_t	from;
-	u_int8_t	to;
+	u_int16_t	from;
+	u_int16_t	to;
 };
 
+#define IS_PMF	0x8000
+
 Static const struct ukbd_keycodetrans trtab_apple_fn[] = {
 	{ 0x0c, 0x5d },	/* i - KP 5 */
 	{ 0x0d, 0x59 },	/* j - KP 1 */
@@ -148,14 +150,16 @@ Static const struct ukbd_keycodetrans tr
 		{ 58, 0 },	/* F1 - toggle camera */
 		{ 59, 0 },	/* F2 - toggle wireless */
 #endif
-		{ 60, 127 },	/* F3 - audio mute */
-		{ 61, 128 },	/* F4 - audio raise */
-		{ 62, 129 },	/* F5 - audio lower */
+		{ 60, IS_PMF | PMFE_AUDIO_VOLUME_TOGGLE },
+		{ 61, IS_PMF | PMFE_AUDIO_VOLUME_UP },
+		{ 62, IS_PMF | PMFE_AUDIO_VOLUME_DOWN },
 #ifdef notyet
 		{ 63, 0 },	/* F6 - toggle ext. video */
 		{ 64, 0 },	/* F7 - toggle mouse */
-		{ 65, 0 },	/* F8 - brightness up */
-		{ 66, 0 },	/* F9 - brightness down */
+#endif
+		{ 65, IS_PMF | PMFE_DISPLAY_BRIGHTNESS_UP },
+		{ 66, IS_PMF | PMFE_DISPLAY_BRIGHTNESS_DOWN },
+#ifdef notyet
 		{ 67, 0 },	/* F10 - suspend */
 		{ 68, 0 },	/* F11 - user1 */
 		{ 69, 0 },	/* F12 - user2 */
@@ -586,7 +590,13 @@ ukbd_translate_keycodes(struct ukbd_soft
 		if (key)
 			for (tp = tab; tp-from; tp++)
 if (tp-from == key) {
-	ud-keycode[i] = tp-to;
+	if (tp-to  IS_PMF) {
+		pmf_event_inject(
+		sc-sc_hdev.sc_dev,
+		tp-to  0xff);
+		ud-keycode[i] = 0;
+	} else
+		ud-keycode[i] = tp-to;
 	break;
 }
 	}



CVS commit: src/sys/conf

2011-11-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Nov  2 09:47:57 UTC 2011

Modified Files:
src/sys/conf: files

Log Message:
Add missing subr_pcq.c


To generate a diff of this commit:
cvs rdiff -u -r1.1029 -r1.1030 src/sys/conf/files

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1029 src/sys/conf/files:1.1030
--- src/sys/conf/files:1.1029	Sat Oct 15 00:23:08 2011
+++ src/sys/conf/files	Wed Nov  2 09:47:57 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1029 2011/10/15 00:23:08 sjg Exp $
+#	$NetBSD: files,v 1.1030 2011/11/02 09:47:57 martin Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -1547,6 +1547,7 @@ file	kern/subr_log.c
 file	kern/subr_lwp_specificdata.c
 file	kern/subr_once.c
 file	kern/subr_optstr.c
+file	kern/subr_pcq.c
 file	kern/subr_pcu.c
 file	kern/subr_percpu.c
 file	kern/subr_pool.c



CVS commit: src/lib/libterminfo

2011-11-02 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Wed Nov  2 12:09:26 UTC 2011

Modified Files:
src/lib/libterminfo: Makefile genhash genterms genthash
Removed Files:
src/lib/libterminfo: compiled_terms.c hash.c termcap_hash.c

Log Message:
Now that nbperf can generate the same file using the -p option,
there is no longer a need to store these files in CVS.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libterminfo/Makefile
cvs rdiff -u -r1.2 -r0 src/lib/libterminfo/compiled_terms.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libterminfo/genhash
cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/genterms
cvs rdiff -u -r1.4 -r1.5 src/lib/libterminfo/genthash
cvs rdiff -u -r1.4 -r0 src/lib/libterminfo/hash.c
cvs rdiff -u -r1.3 -r0 src/lib/libterminfo/termcap_hash.c

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

Modified files:

Index: src/lib/libterminfo/Makefile
diff -u src/lib/libterminfo/Makefile:1.17 src/lib/libterminfo/Makefile:1.18
--- src/lib/libterminfo/Makefile:1.17	Tue Oct  4 11:01:14 2011
+++ src/lib/libterminfo/Makefile	Wed Nov  2 12:09:25 2011
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.17 2011/10/04 11:01:14 roy Exp $
+#	$NetBSD: Makefile,v 1.18 2011/11/02 12:09:25 roy Exp $
+
+.include bsd.own.mk
 
 USE_SHLIBDIR=	yes
 
@@ -12,6 +14,8 @@ SRCS+=		compile.c hash.c
 INCS=		term.h
 INCSDIR=	/usr/include
 
+COPTS.tparm.c = -Wno-format-nonliteral
+
 MAN=		terminfo.3 terminfo.5
 MLINKS=		terminfo.3 setupterm.3 \
 		terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \
@@ -31,12 +35,28 @@ MAN+=		termcap.3
 MLINKS+=	termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
 		termcap.3 tgetstr.3 termcap.3 tgoto.3
 
+CPPFLAGS+=	-I${.OBJDIR}
+
 # Generate our string and hash tables
-hash:
+hash.c: genhash term.h
 		@echo Generating terminfo hash
-		cd ${.CURDIR}  ${HOST_SH} ./genhash hash.c
+		cd ${.CURDIR}  ${HOST_SH} ./genhash ${.OBJDIR}/$@
+
+termcap_hash.c: genthash term.h
 		@echo Generating termcap hash
-		cd ${.CURDIR}  ${HOST_SH} ./genthash termcap_hash.c
+		cd ${.CURDIR}  ${HOST_SH} ./genthash ${.OBJDIR}/$@
+
+
+# Allow terminfo descriptions to be compiled into libterminfo
+compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo
+		@echo Generating compiled terminfo descriptions
+		cd ${.CURDIR}  ${HOST_SH} ./genterms ${.OBJDIR}/$@
+
+CLEANFILES+=	hash.c termcap_hash.c compiled_terms.c
+
+term.c: compiled_terms.c
+
+termcap.c: termcap_hash.c
 
 # Generate our man pages
 terminfo.5: terminfo.5.in term.h termcap_map.c
@@ -45,17 +65,8 @@ terminfo.5: terminfo.5.in term.h termcap
 
 CLEANFILES+=	terminfo.5
 
-# Allow terminfo descriptions to be compiled into libterminfo
-compiled_terms:
-		@echo Generating compiled terminfo descriptions
-		cd ${.CURDIR}  ${HOST_SH} ./genterms compiled_terms.c
-
-COPTS.tparm.c = -Wno-format-nonliteral
 man: terminfo.5
 
-gen: hash compiled_terms man
-
-.include bsd.own.mk
 .include bsd.shlib.mk
 
 .if ${MKLINKLIB} != no

Index: src/lib/libterminfo/genhash
diff -u src/lib/libterminfo/genhash:1.7 src/lib/libterminfo/genhash:1.8
--- src/lib/libterminfo/genhash:1.7	Tue Oct 12 12:57:51 2010
+++ src/lib/libterminfo/genhash	Wed Nov  2 12:09:25 2011
@@ -1,7 +1,7 @@
 #!/bin/sh
-# $NetBSD: genhash,v 1.7 2010/10/12 12:57:51 christos Exp $
+# $NetBSD: genhash,v 1.8 2011/11/02 12:09:25 roy Exp $
 
-# Copyright (c) 2009 The NetBSD Foundation, Inc.
+# Copyright (c) 2009, 2011 The NetBSD Foundation, Inc.
 #
 # This code is derived from software contributed to The NetBSD Foundation
 # by Roy Marples.
@@ -57,7 +57,7 @@ genent()
 	echo
 	$TOOL_SED -e 1,/enum TI${NAME}/d -e '/};/,$d' \
 	-e 's/.*TICODE_\([^,]*\).*/\1/' $TERMH | \
-	$TOOL_NBPERF -sn _ti_${name}hash;
+	$TOOL_NBPERF -p -s -n _ti_${name}hash;
 
 	cat EOF
 
@@ -85,7 +85,6 @@ EOF
 }
 
 cat EOF
-/* \$NetBSD\$ */
 /* DO NOT EDIT
  * Automatically generated from term.h */
 
@@ -93,9 +92,6 @@ cat EOF
 #include nbtool_config.h
 #endif
 
-#include sys/cdefs.h
-__RCSID(\$NetBSD: genhash,v 1.7 2010/10/12 12:57:51 christos Exp $);
-
 #include stdint.h
 #include stdlib.h
 #include string.h

Index: src/lib/libterminfo/genterms
diff -u src/lib/libterminfo/genterms:1.3 src/lib/libterminfo/genterms:1.4
--- src/lib/libterminfo/genterms:1.3	Tue Oct 12 12:57:51 2010
+++ src/lib/libterminfo/genterms	Wed Nov  2 12:09:25 2011
@@ -1,7 +1,7 @@
 #!/bin/sh
-# $NetBSD: genterms,v 1.3 2010/10/12 12:57:51 christos Exp $
+# $NetBSD: genterms,v 1.4 2011/11/02 12:09:25 roy Exp $
 
-# Copyright (c) 2010 The NetBSD Foundation, Inc.
+# Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
 #
 # This code is derived from software contributed to The NetBSD Foundation
 # by Roy Marples.
@@ -34,9 +34,7 @@ set -e
 : ${NETBSDSRCDIR:=/usr/src}
 : ${TERMINFO:=${NETBSDSRCDIR}/share/terminfo/terminfo}
 
-echo /* \$NetBSD\$ */
 echo /* DO NOT EDIT
-echo  * Regenerate by doing \`\`make compiled_terms''
-echo  */
+echo  * Automatically generated 

CVS commit: src/lib/libc/gen

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 13:05:43 UTC 2011

Modified Files:
src/lib/libc/gen: cpuset.3

Log Message:
fix a function prototype.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/gen/cpuset.3

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/gen/cpuset.3
diff -u src/lib/libc/gen/cpuset.3:1.4 src/lib/libc/gen/cpuset.3:1.5
--- src/lib/libc/gen/cpuset.3:1.4	Thu Oct  6 05:24:41 2011
+++ src/lib/libc/gen/cpuset.3	Wed Nov  2 13:05:43 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: cpuset.3,v 1.4 2011/10/06 05:24:41 jruoho Exp $
+.\	$NetBSD: cpuset.3,v 1.5 2011/11/02 13:05:43 yamt Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd October 6, 2011
+.Dd Nomember 2, 2011
 .Dt CPUSET 3
 .Os
 .Sh NAME
@@ -41,7 +41,7 @@
 .Nd dynamic CPU sets
 .Sh SYNOPSIS
 .In sched.h
-.Ft cpuset_t
+.Ft cpuset_t *
 .Fn cpuset_create void
 .Ft void
 .Fn cpuset_destroy cpuset_t *set



CVS commit: src/common/lib/libc/gen

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 13:49:43 UTC 2011

Modified Files:
src/common/lib/libc/gen: radixtree.c

Log Message:
comments


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/common/lib/libc/gen/radixtree.c

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

Modified files:

Index: src/common/lib/libc/gen/radixtree.c
diff -u src/common/lib/libc/gen/radixtree.c:1.16 src/common/lib/libc/gen/radixtree.c:1.17
--- src/common/lib/libc/gen/radixtree.c:1.16	Tue Oct 25 14:11:27 2011
+++ src/common/lib/libc/gen/radixtree.c	Wed Nov  2 13:49:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: radixtree.c,v 1.16 2011/10/25 14:11:27 yamt Exp $	*/
+/*	$NetBSD: radixtree.c,v 1.17 2011/11/02 13:49:43 yamt Exp $	*/
 
 /*-
  * Copyright (c)2011 YAMAMOTO Takashi,
@@ -27,21 +27,48 @@
  */
 
 /*
- * radix tree
+ * radixtree.c
  *
+ * this is an implementation of radix tree, whose keys are uint64_t and leafs
+ * are user provided pointers.
+ *
+ * leaf nodes are just void * and this implementation doesn't care about
+ * what they actually point to.  however, this implementation has an assumption
+ * about their alignment.  specifically, this implementation assumes that their
+ * 2 LSBs are zero and uses them internally.
+ *
+ * intermediate nodes are automatically allocated and freed internally and
+ * basically users don't need to care about them.  only radix_tree_insert_node
+ * function can allocate memory for intermediate nodes and thus can fail for
+ * ENOMEM.
+ *
+ * efficiency:
  * it's designed to work efficiently with dense index distribution.
  * the memory consumption (number of necessary intermediate nodes)
  * heavily depends on index distribution.  basically, more dense index
  * distribution consumes less nodes per item.
  * approximately,
- * the best case: about RADIX_TREE_PTR_PER_NODE items per node.
- * the worst case: RADIX_TREE_MAX_HEIGHT nodes per item.
+ * the best case: about RADIX_TREE_PTR_PER_NODE items per intermediate node.
+ * the worst case: RADIX_TREE_MAX_HEIGHT intermediate nodes per item.
+ *
+ * gang lookup:
+ * this implementation provides a way to lookup many nodes quickly via
+ * radix_tree_gang_lookup_node function and its varients.
+ *
+ * tags:
+ * this implementation provides tagging functionality to allow quick
+ * scanning of a subset of leaf nodes.  leaf nodes are untagged when
+ * inserted into the tree and can be tagged by radix_tree_set_tag function.
+ * radix_tree_gang_lookup_tagged_node function and its variants returns
+ * only leaf nodes with the given tag.  to reduce amount of nodes to visit for
+ * these functions, this implementation keeps tagging information in internal
+ * intermediate nodes and quickly skips uninterested parts of a tree.
  */
 
 #include sys/cdefs.h
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.16 2011/10/25 14:11:27 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: radixtree.c,v 1.17 2011/11/02 13:49:43 yamt Exp $);
 #include sys/param.h
 #include sys/errno.h
 #include sys/pool.h
@@ -51,7 +78,7 @@ __KERNEL_RCSID(0, $NetBSD: radixtree.c,
 #include lib/libsa/stand.h
 #endif /* defined(_STANDALONE) */
 #else /* defined(_KERNEL) || defined(_STANDALONE) */
-__RCSID($NetBSD: radixtree.c,v 1.16 2011/10/25 14:11:27 yamt Exp $);
+__RCSID($NetBSD: radixtree.c,v 1.17 2011/11/02 13:49:43 yamt Exp $);
 #include assert.h
 #include errno.h
 #include stdbool.h
@@ -473,7 +500,7 @@ radix_tree_lookup_ptr(struct radix_tree 
  * otherwise, this function returns 0.
  *
  * note that inserting a node can involves memory allocation for intermediate
- * nodes.  if _KERNEL, it's done with non-blocking IPL_NONE memory allocation.
+ * nodes.  if _KERNEL, it's done with no-sleep IPL_NONE memory allocation.
  *
  * for the newly inserted node, all tags are cleared.
  */



CVS commit: src/sys/sys

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 13:52:34 UTC 2011

Modified Files:
src/sys/sys: Makefile bufq_impl.h

Log Message:
buf_inorder:
- make the return value bool
- comments


To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 src/sys/sys/Makefile
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/bufq_impl.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/Makefile
diff -u src/sys/sys/Makefile:1.138 src/sys/sys/Makefile:1.139
--- src/sys/sys/Makefile:1.138	Wed Sep 28 14:26:27 2011
+++ src/sys/sys/Makefile	Wed Nov  2 13:52:34 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.138 2011/09/28 14:26:27 jruoho Exp $
+#	$NetBSD: Makefile,v 1.139 2011/11/02 13:52:34 yamt Exp $
 
 .include bsd.sys.mk
 
@@ -27,8 +27,8 @@ INCS=	acct.h agpio.h aio.h ansi.h aout_m
 	param.h pcu.h pipe.h pmc.h poll.h pool.h power.h proc.h \
 	protosw.h pset.h ptrace.h ptree.h \
 	queue.h quota.h \
-	ras.h rbtree.h reboot.h radioio.h resource.h resourcevar.h rmd160.h \
-	rnd.h rwlock.h sa.h satypes.h \
+	radixtree.h ras.h rbtree.h reboot.h radioio.h resource.h resourcevar.h \
+	rmd160.h rnd.h rwlock.h sa.h satypes.h \
 	scanio.h sched.h scsiio.h sdt.h select.h selinfo.h sem.h sha1.h \
 	sha2.h shm.h siginfo.h signal.h signalvar.h sigtypes.h simplelock.h \
 	sleepq.h socket.h \

Index: src/sys/sys/bufq_impl.h
diff -u src/sys/sys/bufq_impl.h:1.8 src/sys/sys/bufq_impl.h:1.9
--- src/sys/sys/bufq_impl.h:1.8	Mon Jan 19 14:54:28 2009
+++ src/sys/sys/bufq_impl.h	Wed Nov  2 13:52:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bufq_impl.h,v 1.8 2009/01/19 14:54:28 yamt Exp $	*/
+/*	$NetBSD: bufq_impl.h,v 1.9 2011/11/02 13:52:34 yamt Exp $	*/
 /*	NetBSD: bufq.h,v 1.3 2005/03/31 11:28:53 yamt Exp	*/
 /*	NetBSD: buf.h,v 1.75 2004/09/18 16:40:11 yamt Exp 	*/
 
@@ -88,7 +88,7 @@ struct bufq_state {
 };
 
 static __inline void *bufq_private(const struct bufq_state *) __unused;
-static __inline int buf_inorder(const struct buf *, const struct buf *, int)
+static __inline bool buf_inorder(const struct buf *, const struct buf *, int)
 __unused;
 
 #include sys/null.h /* for NULL */
@@ -102,11 +102,16 @@ bufq_private(const struct bufq_state *bu
 
 /*
  * Check if two buf's are in ascending order.
+ *
+ * this function consider a NULL buf is after any non-NULL buf.
+ *
+ * this function returns false if two are same.
  */
-static __inline int
+static __inline bool
 buf_inorder(const struct buf *bp, const struct buf *bq, int sortby)
 {
 
+	KASSERT(bp != NULL || bq != NULL);
 	if (bp == NULL || bq == NULL)
 		return (bq == NULL);
 



CVS commit: src/sys/dev/pci

2011-11-02 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Wed Nov  2 14:34:09 UTC 2011

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

Log Message:
Make sure we allocate enough segments for the request dma maps.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ld_virtio.c

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

Modified files:

Index: src/sys/dev/pci/ld_virtio.c
diff -u src/sys/dev/pci/ld_virtio.c:1.1 src/sys/dev/pci/ld_virtio.c:1.2
--- src/sys/dev/pci/ld_virtio.c:1.1	Sun Oct 30 12:12:21 2011
+++ src/sys/dev/pci/ld_virtio.c	Wed Nov  2 14:34:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_virtio.c,v 1.1 2011/10/30 12:12:21 hannken Exp $	*/
+/*	$NetBSD: ld_virtio.c,v 1.2 2011/11/02 14:34:09 hannken Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ld_virtio.c,v 1.1 2011/10/30 12:12:21 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: ld_virtio.c,v 1.2 2011/11/02 14:34:09 hannken Exp $);
 
 #include rnd.h
 
@@ -194,7 +194,8 @@ ld_virtio_alloc_reqs(struct ld_virtio_so
 		}
 		r = bus_dmamap_create(sc-sc_virtio-sc_dmat,
   ld-sc_maxxfer,
-  ld-sc_maxxfer / NBPG, ld-sc_maxxfer,
+  (ld-sc_maxxfer / NBPG) + 1,
+  ld-sc_maxxfer,
   0,
   BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW,
   vr-vr_payload);



CVS commit: src/distrib/sets

2011-11-02 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Wed Nov  2 14:42:43 UTC 2011

Modified Files:
src/distrib/sets: mkvars.mk

Log Message:
Make sure the value of MKCOMPATMODULES gets imported into sets.subr,
so that the compatmodules keyword is properly handled when creating
the set lists.  Fixes the build for evbppc.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/mkvars.mk

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/mkvars.mk
diff -u src/distrib/sets/mkvars.mk:1.5 src/distrib/sets/mkvars.mk:1.6
--- src/distrib/sets/mkvars.mk:1.5	Mon Oct 31 08:14:43 2011
+++ src/distrib/sets/mkvars.mk	Wed Nov  2 14:42:43 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mkvars.mk,v 1.5 2011/10/31 08:14:43 mrg Exp $
+# $NetBSD: mkvars.mk,v 1.6 2011/11/02 14:42:43 he Exp $
 
 MKEXTRAVARS= \
 	MACHINE \
@@ -13,6 +13,7 @@ MKEXTRAVARS= \
 	MKMANZ \
 	MKBFD \
 	MKCOMPAT \
+	MKCOMPATMODULES \
 	MKDYNAMICROOT \
 	MKMANPAGES \
 	MKXORG \



CVS commit: src/sys/kern

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 15:14:49 UTC 2011

Modified Files:
src/sys/kern: bufq_priocscan.c

Log Message:
- don't forget to decrement burst count after reset
- signed - unsigned where appropriate
- comments


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/kern/bufq_priocscan.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/kern/bufq_priocscan.c
diff -u src/sys/kern/bufq_priocscan.c:1.14 src/sys/kern/bufq_priocscan.c:1.15
--- src/sys/kern/bufq_priocscan.c:1.14	Mon Jan 19 14:54:28 2009
+++ src/sys/kern/bufq_priocscan.c	Wed Nov  2 15:14:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bufq_priocscan.c,v 1.14 2009/01/19 14:54:28 yamt Exp $	*/
+/*	$NetBSD: bufq_priocscan.c,v 1.15 2011/11/02 15:14:49 yamt Exp $	*/
 
 /*-
  * Copyright (c)2004,2005,2006,2008,2009 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bufq_priocscan.c,v 1.14 2009/01/19 14:54:28 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: bufq_priocscan.c,v 1.15 2011/11/02 15:14:49 yamt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -42,7 +42,7 @@ __KERNEL_RCSID(0, $NetBSD: bufq_priocsc
 TAILQ_HEAD(bqhead, buf);
 struct cscan_queue {
 	struct bqhead cq_head[2];	/* actual lists of buffers */
-	int cq_idx;			/* current list index */
+	unsigned int cq_idx;		/* current list index */
 	int cq_lastcylinder;		/* b_cylinder of the last request */
 	daddr_t cq_lastrawblkno;	/* b_rawblkno of the last request */
 };
@@ -65,7 +65,7 @@ cscan_put(struct cscan_queue *q, struct 
 	struct buf tmp;
 	struct buf *it;
 	struct bqhead *bqh;
-	int idx;
+	unsigned int idx;
 
 	tmp.b_cylinder = q-cq_lastcylinder;
 	tmp.b_rawblkno = q-cq_lastrawblkno;
@@ -90,7 +90,7 @@ cscan_put(struct cscan_queue *q, struct 
 static struct buf *
 cscan_get(struct cscan_queue *q, int remove)
 {
-	int idx = q-cq_idx;
+	unsigned int idx = q-cq_idx;
 	struct bqhead *bqh;
 	struct buf *bp;
 
@@ -138,7 +138,7 @@ cscan_init(struct cscan_queue *q)
 
 struct priocscan_queue {
 	struct cscan_queue q_queue;
-	int q_burst;
+	unsigned int q_burst;
 };
 
 struct bufq_priocscan {
@@ -204,77 +204,108 @@ bufq_priocscan_get(struct bufq_state *bu
 {
 	struct bufq_priocscan *q = bufq-bq_private;
 	struct priocscan_queue *pq, *npq;
-	struct priocscan_queue *first; /* first non-empty queue */
+	struct priocscan_queue *first; /* highest priority non-empty queue */
 	const struct priocscan_queue *epq;
-	const struct cscan_queue *cq;
 	struct buf *bp;
 	bool single; /* true if there's only one non-empty queue */
 
+	/*
+	 * find the highest priority non-empty queue.
+	 */
 	pq = q-bq_queue[0];
 	epq = pq + PRIOCSCAN_NQUEUE;
 	for (; pq  epq; pq++) {
-		cq = pq-q_queue;
-		if (!cscan_empty(cq))
+		if (!cscan_empty(pq-q_queue)) {
 			break;
+		}
 	}
 	if (pq == epq) {
-		/* there's no requests */
+		/*
+		 * all our queues are empty.  there's nothing to serve.
+		 */
 		return NULL;
 	}
-
 	first = pq;
+
+	/*
+	 * scan the rest of queues.
+	 *
+	 * if we have two or more non-empty queues, we serve the highest
+	 * priority one with non-zero burst count.
+	 */
 	single = true;
-	for (npq = first + 1; npq  epq; npq++) {
-		cq = npq-q_queue;
-		if (!cscan_empty(cq)) {
+	for (npq = pq + 1; npq  epq; npq++) {
+		if (!cscan_empty(npq-q_queue)) {
+			/*
+			 * we found another non-empty queue.
+			 * it means that a queue needs to consume its burst
+			 * count to be served.
+			 */
 			single = false;
-			if (pq-q_burst  0)
+
+			/*
+			 * check if our current candidate queue has already
+			 * exhausted its burst count.
+			 */
+			if (pq-q_burst  0) {
 break;
+			}
 			pq = npq;
 		}
 	}
 	if (single) {
 		/*
-		 * there's only a non-empty queue.  just serve it.
-		 */
-		pq = first;
-	} else if (pq-q_burst  0) {
-		/*
-		 * XXX account only by number of requests.  is it good enough?
+		 * there's only a non-empty queue.
+		 * just serve it without consuming its burst count.
 		 */
-		if (remove) {
-			pq-q_burst--;
-		}
+		KASSERT(pq == first);
 	} else {
 		/*
-		 * no queue was selected due to burst counts
+		 * there are two or more non-empty queues.
 		 */
-		int i;
+		if (pq-q_burst == 0) {
+			/*
+			 * no queues can be served because they have already
+			 * exhausted their burst count.
+			 */
+			unsigned int i;
 #ifdef DEBUG
-		for (i = 0; i  PRIOCSCAN_NQUEUE; i++) {
-			pq = q-bq_queue[i];
-			cq = pq-q_queue;
-			if (!cscan_empty(cq)  pq-q_burst)
-panic(%s: inconsist, __func__);
-		}
-#endif /* DEBUG */
-
-		/*
-		 * reset burst counts
-		 */
-		if (remove) {
 			for (i = 0; i  PRIOCSCAN_NQUEUE; i++) {
 pq = q-bq_queue[i];
-pq-q_burst = priocscan_burst[i];
+if (!cscan_empty(pq-q_queue)  pq-q_burst) {
+	panic(%s: inconsist, __func__);
+}
+			}
+#endif /* DEBUG */
+			/*
+			 * reset burst counts.
+			 */
+			if (remove) {
+for (i = 0; i  PRIOCSCAN_NQUEUE; i++) {
+	pq = 

CVS commit: src/sys/dev/pci

2011-11-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov  2 15:18:46 UTC 2011

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

Log Message:
Use symbolic PCI_PRODUCTs.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/virtio.c

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

Modified files:

Index: src/sys/dev/pci/virtio.c
diff -u src/sys/dev/pci/virtio.c:1.1 src/sys/dev/pci/virtio.c:1.2
--- src/sys/dev/pci/virtio.c:1.1	Sun Oct 30 12:12:21 2011
+++ src/sys/dev/pci/virtio.c	Wed Nov  2 15:18:46 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: virtio.c,v 1.1 2011/10/30 12:12:21 hannken Exp $	*/
+/*	$NetBSD: virtio.c,v 1.2 2011/11/02 15:18:46 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: virtio.c,v 1.1 2011/10/30 12:12:21 hannken Exp $);
+__KERNEL_RCSID(0, $NetBSD: virtio.c,v 1.2 2011/11/02 15:18:46 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -78,8 +78,10 @@ virtio_match(device_t parent, cfdata_t m
 	pa = (struct pci_attach_args *)aux;
 	switch (PCI_VENDOR(pa-pa_id)) {
 	case PCI_VENDOR_QUMRANET:
-		if ((0x1000 = PCI_PRODUCT(pa-pa_id)) 
-		(PCI_PRODUCT(pa-pa_id) = 0x103f))
+		if ((PCI_PRODUCT_QUMRANET_VIRTIO_1000 =
+		 PCI_PRODUCT(pa-pa_id)) 
+		(PCI_PRODUCT(pa-pa_id) =
+		 PCI_PRODUCT_QUMRANET_VIRTIO_103f))
 			return 1;
 		break;
 	}



CVS commit: src/sys/dev/ic

2011-11-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov  2 16:03:02 UTC 2011

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

Log Message:
Use appropriate __aligned(value) on already __packed hardware data structures.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/siisatareg.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/siisatareg.h
diff -u src/sys/dev/ic/siisatareg.h:1.6 src/sys/dev/ic/siisatareg.h:1.7
--- src/sys/dev/ic/siisatareg.h:1.6	Wed Apr  7 17:51:16 2010
+++ src/sys/dev/ic/siisatareg.h	Wed Nov  2 16:03:01 2011
@@ -1,7 +1,7 @@
-/* $NetBSD: siisatareg.h,v 1.6 2010/04/07 17:51:16 jakllsch Exp $ */
+/* $NetBSD: siisatareg.h,v 1.7 2011/11/02 16:03:01 jakllsch Exp $ */
 
 /*
- * Copyright (c) 2007, 2008, 2009, 2010 Jonathan A. Kollasch.
+ * Copyright (c) 2007, 2008, 2009, 2010, 2011 Jonathan A. Kollasch.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,13 +54,13 @@ struct siisata_sge {
 #define SGE_FLAG_LNK __BIT(30)
 #define SGE_FLAG_DRD __BIT(29)
 #define SGE_FLAG_XCF __BIT(28)
-} __packed;
+} __packed __aligned(8);
 
 /* Scatter/Gather Table */
 /* must be aligned to 64-bit boundary */
 struct siisata_sgt {
 	struct siisata_sge sgt_sge[4];
-} __packed;
+} __packed __aligned(8);
 
 /* Port Request Block */
 struct siisata_prb {
@@ -86,7 +86,7 @@ struct siisata_prb {
 /* First SGE in PRB is always reserved for ATAPI in this implementation. */
 	uint8_t prb_atapi[16]; /* zero for non-ATAPI */
 	struct siisata_sge prb_sge[1]; /* extended to NSGE */
-} __packed;
+} __packed __aligned(8);
 
 
 #define SIISATA_NSGE ((MAXPHYS/PAGE_SIZE) + 1)



CVS commit: src/sys/dev/pci

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 16:26:30 UTC 2011

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

Log Message:
allow disabling interrupt mitigation


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/dev/pci/if_bge.c

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

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.198 src/sys/dev/pci/if_bge.c:1.199
--- src/sys/dev/pci/if_bge.c:1.198	Thu Jun  9 12:04:29 2011
+++ src/sys/dev/pci/if_bge.c	Wed Nov  2 16:26:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.198 2011/06/09 12:04:29 cegger Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.199 2011/11/02 16:26:30 yamt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.198 2011/06/09 12:04:29 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_bge.c,v 1.199 2011/11/02 16:26:30 yamt Exp $);
 
 #include vlan.h
 #include rnd.h
@@ -169,6 +169,7 @@ static const struct bge_load_rx_thresh {
 	int rx_ticks;
 	int rx_max_bds; }
 bge_rx_threshes[] = {
+	{ 16,   1 },	/* rx_max_bds = 1 disables interrupt mitigation */
 	{ 32,   2 },
 	{ 50,   4 },
 	{ 100,  8 },



CVS commit: src/etc

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 16:39:23 UTC 2011

Modified Files:
src/etc: Makefile

Log Message:
update RELEASEVARS


To generate a diff of this commit:
cvs rdiff -u -r1.392 -r1.393 src/etc/Makefile

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

Modified files:

Index: src/etc/Makefile
diff -u src/etc/Makefile:1.392 src/etc/Makefile:1.393
--- src/etc/Makefile:1.392	Mon Aug 22 18:54:05 2011
+++ src/etc/Makefile	Wed Nov  2 16:39:23 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.392 2011/08/22 18:54:05 jym Exp $
+#	$NetBSD: Makefile,v 1.393 2011/11/02 16:39:23 yamt Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -189,11 +189,11 @@ RELEASEVARS=	BSDOBJDIR BSDSRCDIR BUILDID
 		MAKEOBJDIR MAKEOBJDIRPREFIX MAKEVERBOSE \
 		MKBFD MKBINUTILS MKCATPAGES \
 		MKCRYPTO MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKCVS \
-		MKDEBUG MKDEBUGLIB MKDOC MKDYNAMICROOT \
+		MKDEBUG MKDEBUGLIB MKDOC MKDTRACE MKDYNAMICROOT \
 		MKGCC MKGCCCMDS MKGDB \
-		MKHESIOD MKHOSTOBJ MKHTML MKIEEEFP MKINET6 MKINFO MKIPFILTER \
+		MKHESIOD MKHTML MKIEEEFP MKINET6 MKINFO MKIPFILTER \
 		MKKERBEROS MKLDAP MKLINKLIB MKLINT \
-		MKMAN MKMANZ MKMDNS MKNLS MKNPF MKNVI MKOBJ MKOBJDIRS \
+		MKMAN MKMANZ MKMDNS MKNLS MKNPF MKOBJ MKOBJDIRS \
 		MKPAM MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
 		MKSHARE MKSKEY MKSOFTFLOAT MKSTATICLIB \
 		MKUNPRIVED MKUPDATE MKX11 MKYP \



CVS commit: src/lib/libpuffs

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 16:43:04 UTC 2011

Modified Files:
src/lib/libpuffs: callcontext.c

Log Message:
puffs_cc_yield: fix a cc leak.  PR/44679


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libpuffs/callcontext.c

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

Modified files:

Index: src/lib/libpuffs/callcontext.c
diff -u src/lib/libpuffs/callcontext.c:1.25 src/lib/libpuffs/callcontext.c:1.26
--- src/lib/libpuffs/callcontext.c:1.25	Fri Mar  4 09:47:47 2011
+++ src/lib/libpuffs/callcontext.c	Wed Nov  2 16:43:04 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: callcontext.c,v 1.25 2011/03/04 09:47:47 yamt Exp $	*/
+/*	$NetBSD: callcontext.c,v 1.26 2011/11/02 16:43:04 yamt Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: callcontext.c,v 1.25 2011/03/04 09:47:47 yamt Exp $);
+__RCSID($NetBSD: callcontext.c,v 1.26 2011/11/02 16:43:04 yamt Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -78,6 +78,14 @@ puffs_cc_yield(struct puffs_cc *pcc)
 
 	assert(puffs_fakecc == 0);
 
+	if ((~pcc-pcc_flags  (PCC_BORROWED|PCC_DONE)) == 0) {
+		pcc-pcc_flags = ~(PCC_BORROWED|PCC_DONE);
+		/*
+		 * see the XXX comment in puffs__cc_cont
+		 */
+		puffs__cc_destroy(pcc, 1);
+		setcontext(pcc-pcc_uc_ret);
+	}
 	pcc-pcc_flags = ~PCC_BORROWED;
 
 	/* romanes eunt domus */



CVS commit: src/external/bsd/iscsi/dist/src/lib

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 16:45:00 UTC 2011

Modified Files:
src/external/bsd/iscsi/dist/src/lib: libiscsi.3

Log Message:
fix a function prototype


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/iscsi/dist/src/lib/libiscsi.3

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

Modified files:

Index: src/external/bsd/iscsi/dist/src/lib/libiscsi.3
diff -u src/external/bsd/iscsi/dist/src/lib/libiscsi.3:1.4 src/external/bsd/iscsi/dist/src/lib/libiscsi.3:1.5
--- src/external/bsd/iscsi/dist/src/lib/libiscsi.3:1.4	Sun Feb 20 03:56:36 2011
+++ src/external/bsd/iscsi/dist/src/lib/libiscsi.3	Wed Nov  2 16:45:00 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: libiscsi.3,v 1.4 2011/02/20 03:56:36 agc Exp $
+.\ $NetBSD: libiscsi.3,v 1.5 2011/11/02 16:45:00 yamt Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -64,7 +64,6 @@
 .Ft char *
 .Fo iscsi_target_getvar
 .Fa iscsi_target_t *target const char *name
-.Fa iscsi_target_t *target
 .Fc
 .Ft int
 .Fo iscsi_initiator_set_defaults



CVS commit: src/regress/sys/kern/select

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 16:49:12 UTC 2011

Modified Files:
src/regress/sys/kern/select: select.c

Log Message:
- count the number of bits correctly
- more check
- tweak numbers
- use more accurate time


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/regress/sys/kern/select/select.c

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

Modified files:

Index: src/regress/sys/kern/select/select.c
diff -u src/regress/sys/kern/select/select.c:1.2 src/regress/sys/kern/select/select.c:1.3
--- src/regress/sys/kern/select/select.c:1.2	Fri Mar 21 16:03:33 2008
+++ src/regress/sys/kern/select/select.c	Wed Nov  2 16:49:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: select.c,v 1.2 2008/03/21 16:03:33 ad Exp $	*/
+/*	$NetBSD: select.c,v 1.3 2011/11/02 16:49:12 yamt Exp $	*/
 
 /*-
  * Copyright (c)2008 YAMAMOTO Takashi,
@@ -29,10 +29,13 @@
 #define	FD_SETSIZE	65536
 #include sys/select.h
 #include sys/atomic.h
+#include sys/time.h
 
+#include assert.h
 #include errno.h
 #include fcntl.h
 #include pthread.h
+#include stdint.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -40,6 +43,7 @@
 
 #define	NPIPE	128
 #define	NTHREAD	64
+#define	NBALLS	5
 #define	VERBOSE	0
 
 #if !defined(RANDOM_MAX)
@@ -48,7 +52,7 @@
 
 int fds[NPIPE][2];
 
-unsigned count;
+volatile unsigned count;
 
 pthread_barrier_t barrier;
 
@@ -97,10 +101,11 @@ f(void *dummy)
 	abort();
 }
 if (random()  1) {
+	assert(!FD_ISSET(fd, set));
 	FD_SET(fd, set);
+	nfd++;
 	if (fd  maxfd) {
 		maxfd = fd;
-		nfd++;
 	}
 }
 			}
@@ -127,6 +132,12 @@ f(void *dummy)
 			(void *)pthread_self(), ret);
 			abort();
 		}
+		if (ret  NBALLS) {
+			fprintf(stderr, [%p] unexpected return value %d
+			  NBALLS\n,
+			(void *)pthread_self(), ret);
+			abort();
+		}
 		nfd = 0;
 		for (fd = 0; fd = maxfd; fd++) {
 			if (FD_ISSET(fd, set)) {
@@ -167,6 +178,10 @@ main(int argc, char *argv[])
 	pthread_t pt[NTHREAD];
 	int i;
 	unsigned int secs;
+	struct timeval start_tv;
+	struct timeval end_tv;
+	uint64_t usecs;
+	unsigned int result;
 
 	secs = atoi(argv[1]);
 
@@ -190,12 +205,17 @@ main(int argc, char *argv[])
 		}
 	}
 	pthread_barrier_wait(barrier);
-	dowrite();
-	dowrite();
-	dowrite();
-	dowrite();
-
+	gettimeofday(start_tv, NULL);
+	assert(count == 0);
+	for (i = 0; i  NBALLS; i++) {
+		dowrite();
+	}
 	sleep(secs);
-	printf(%u / %u = %lf\n, count, secs, (double)count / secs);
+	gettimeofday(end_tv, NULL);
+	result = count;
+	usecs = (end_tv.tv_sec - start_tv.tv_sec) * 100
+	+ end_tv.tv_usec - start_tv.tv_usec;
+	printf(%u / %f = %f\n, result, (double)usecs / 100,
+	(double)result / usecs * 100);
 	exit(EXIT_SUCCESS);
 }



CVS commit: src/sys/gdbscripts

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 16:51:21 UTC 2011

Modified Files:
src/sys/gdbscripts: Makefile.inc
Added Files:
src/sys/gdbscripts: module

Log Message:
a macro to dump kernel modules


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/gdbscripts/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/sys/gdbscripts/module

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

Modified files:

Index: src/sys/gdbscripts/Makefile.inc
diff -u src/sys/gdbscripts/Makefile.inc:1.4 src/sys/gdbscripts/Makefile.inc:1.5
--- src/sys/gdbscripts/Makefile.inc:1.4	Wed Feb 20 21:01:23 2008
+++ src/sys/gdbscripts/Makefile.inc	Wed Nov  2 16:51:21 2011
@@ -1,3 +1,3 @@
-#	$NetBSD: Makefile.inc,v 1.4 2008/02/20 21:01:23 ad Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2011/11/02 16:51:21 yamt Exp $
 
-SYS_GDBINIT=	bdump cpus kdump lwps msgbuf pgrpdump procs vchain vdump
+SYS_GDBINIT=	bdump cpus kdump lwps module msgbuf pgrpdump procs vchain vdump

Added files:

Index: src/sys/gdbscripts/module
diff -u /dev/null src/sys/gdbscripts/module:1.1
--- /dev/null	Wed Nov  2 16:51:22 2011
+++ src/sys/gdbscripts/module	Wed Nov  2 16:51:21 2011
@@ -0,0 +1,16 @@
+define modules
+	set $h = module_list
+	set $e = $h-tqh_first
+	while ($e != 0)
+		if ($e-mod_kobj != 0)
+			printf module %s\t0x%016x-0x%016x\n, \
+			$e-mod_info.mi_name, \
+			$e-mod_kobj-ko_address, \
+			$e-mod_kobj-ko_address + $e-mod_kobj-ko_size
+		else
+			printf module %s\n, \
+			$e-mod_info.mi_name
+		end
+		set $e = $e-mod_chain.tqe_next
+	end
+end



CVS commit: src/sys/dev/ic

2011-11-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov  2 16:54:51 UTC 2011

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

Log Message:
Additionally apply __aligned(8) to all __packed hardware data structures.
(The hardware actually requires much larger alignment on these structures
(128 to 1024 bytes), but 8 is big enough for the compiler to generate more
efficient code on strict alignment architectures.)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/ahcisatareg.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/ahcisatareg.h
diff -u src/sys/dev/ic/ahcisatareg.h:1.10 src/sys/dev/ic/ahcisatareg.h:1.11
--- src/sys/dev/ic/ahcisatareg.h:1.10	Sat Aug 20 16:10:02 2011
+++ src/sys/dev/ic/ahcisatareg.h	Wed Nov  2 16:54:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisatareg.h,v 1.10 2011/08/20 16:10:02 jakllsch Exp $	*/
+/*	$NetBSD: ahcisatareg.h,v 1.11 2011/11/02 16:54:50 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -39,7 +39,7 @@ struct ahci_dma_prd {
 	uint32_t prd_dbc; /* data byte count */
 #define AHCI_PRD_DBC_MASK 0x003f
 #define AHCI_PRD_DBC_IPC  0x8000 /* interrupt on completion */
-} __packed;
+} __packed __aligned(8);
 
 #define AHCI_NPRD ((MAXPHYS/PAGE_SIZE) + 1)
 
@@ -49,7 +49,7 @@ struct ahci_cmd_tbl {
 	uint8_t cmdt_acmd[16]; /* ATAPI command */
 	uint8_t cmdt_res[48]; /* reserved */
 	struct ahci_dma_prd cmdt_prd[1]; /* extended to AHCI_NPRD */
-} __packed;
+} __packed __aligned(8);
 
 #define AHCI_CMDTBL_ALIGN 0x7f
 
@@ -77,7 +77,7 @@ struct ahci_cmd_header {
 	uint32_t cmdh_prdbc;	/* physical region descriptor byte count */
 	uint64_t cmdh_cmdtba;	/* phys. addr. of cmd_tbl, 128bytes aligned */
 	uint32_t cmdh_res[4];	/* reserved */
-} __packed;
+} __packed __aligned(8);
 
 #define AHCI_CMDH_SIZE (sizeof(struct ahci_cmd_header) * AHCI_MAX_CMDS)
 
@@ -89,7 +89,7 @@ struct ahci_r_fis {
 	uint8_t rfis_sdbfis[8]; /* set device bit FIS */
 	uint8_t rfis_ukfis[64]; /* unknown FIS */
 	uint8_t rfis_res[96];   /* reserved */
-} __packed;
+} __packed __aligned(8);
 
 #define AHCI_RFIS_SIZE (sizeof(struct ahci_r_fis))
 



CVS commit: src/lib/libterminfo

2011-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  2 17:48:53 UTC 2011

Modified Files:
src/lib/libterminfo: Makefile
Added Files:
src/lib/libterminfo: Makefile.hash

Log Message:
Separate the generators out, so that they can be re-used by tools, and
don't play games with curdir/objdir.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libterminfo/Makefile
cvs rdiff -u -r0 -r1.1 src/lib/libterminfo/Makefile.hash

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

Modified files:

Index: src/lib/libterminfo/Makefile
diff -u src/lib/libterminfo/Makefile:1.18 src/lib/libterminfo/Makefile:1.19
--- src/lib/libterminfo/Makefile:1.18	Wed Nov  2 08:09:25 2011
+++ src/lib/libterminfo/Makefile	Wed Nov  2 13:48:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2011/11/02 12:09:25 roy Exp $
+#	$NetBSD: Makefile,v 1.19 2011/11/02 17:48:53 christos Exp $
 
 .include bsd.own.mk
 
@@ -37,22 +37,7 @@ MLINKS+=	termcap.3 tgetent.3 termcap.3 t
 
 CPPFLAGS+=	-I${.OBJDIR}
 
-# Generate our string and hash tables
-hash.c: genhash term.h
-		@echo Generating terminfo hash
-		cd ${.CURDIR}  ${HOST_SH} ./genhash ${.OBJDIR}/$@
-
-termcap_hash.c: genthash term.h
-		@echo Generating termcap hash
-		cd ${.CURDIR}  ${HOST_SH} ./genthash ${.OBJDIR}/$@
-
-
-# Allow terminfo descriptions to be compiled into libterminfo
-compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo
-		@echo Generating compiled terminfo descriptions
-		cd ${.CURDIR}  ${HOST_SH} ./genterms ${.OBJDIR}/$@
-
-CLEANFILES+=	hash.c termcap_hash.c compiled_terms.c
+.include Makefile.hash
 
 term.c: compiled_terms.c
 

Added files:

Index: src/lib/libterminfo/Makefile.hash
diff -u /dev/null src/lib/libterminfo/Makefile.hash:1.1
--- /dev/null	Wed Nov  2 13:48:53 2011
+++ src/lib/libterminfo/Makefile.hash	Wed Nov  2 13:48:53 2011
@@ -0,0 +1,19 @@
+#	$NetBSD: Makefile.hash,v 1.1 2011/11/02 17:48:53 christos Exp $
+
+PARSEDIR:=${.PARSEDIR}
+# Generate our string and hash tables
+hash.c: genhash term.h
+		@echo Generating terminfo hash
+		${HOST_SH} ${.ALLSRC}  ${.TARGET}
+
+termcap_hash.c: genthash termcap_map.c
+		@echo Generating termcap hash
+		${HOST_SH} ${.ALLSRC}  ${.TARGET}
+
+
+# Allow terminfo descriptions to be compiled into libterminfo
+compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo
+		@echo Generating compiled terminfo descriptions
+		${HOST_SH} ${.ALLSRC}  ${.TARGET}
+
+CLEANFILES+=	hash.c termcap_hash.c compiled_terms.c



CVS commit: src/tools/tic

2011-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  2 17:49:20 UTC 2011

Modified Files:
src/tools/tic: Makefile

Log Message:
Handle auto-generating hash.c


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tools/tic/Makefile

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

Modified files:

Index: src/tools/tic/Makefile
diff -u src/tools/tic/Makefile:1.4 src/tools/tic/Makefile:1.5
--- src/tools/tic/Makefile:1.4	Mon Feb 22 18:05:39 2010
+++ src/tools/tic/Makefile	Wed Nov  2 13:49:20 2011
@@ -1,9 +1,12 @@
-#	$NetBSD: Makefile,v 1.4 2010/02/22 23:05:39 roy Exp $
+#	$NetBSD: Makefile,v 1.5 2011/11/02 17:49:20 christos Exp $
 
 HOSTPROGNAME=	${_TOOL_PREFIX}tic
 HOST_SRCDIR=	usr.bin/tic
 HOST_SRCS=	compile.c hash.c
 
+TERMINFODIR=	${NETBSDSRCDIR}/lib/libterminfo
+
 .include ${.CURDIR}/../Makefile.host
+.include ${TERMINFODIR}/Makefile.hash
 
-.PATH:		${NETBSDSRCDIR}/lib/libterminfo
+.PATH:		${TERMINFODIR}



CVS commit: src/usr.sbin/mountd

2011-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  2 18:12:55 UTC 2011

Modified Files:
src/usr.sbin/mountd: mountd.8

Log Message:
mention macos/x needing -N


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/mountd/mountd.8

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

Modified files:

Index: src/usr.sbin/mountd/mountd.8
diff -u src/usr.sbin/mountd/mountd.8:1.33 src/usr.sbin/mountd/mountd.8:1.34
--- src/usr.sbin/mountd/mountd.8:1.33	Wed Nov  2 14:09:43 2011
+++ src/usr.sbin/mountd/mountd.8	Wed Nov  2 14:12:54 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: mountd.8,v 1.33 2011/11/02 18:09:43 christos Exp $
+.\	$NetBSD: mountd.8,v 1.34 2011/11/02 18:12:54 christos Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -73,6 +73,7 @@ on every export.
 See
 .Xr exports 5
 for more information.
+Some operating systems (notably MacOS/X) require this option.
 .It Fl P Ar policy
 IPsec
 .Ar policy



CVS commit: [netbsd-5-1] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 18:17:24 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
Ticket 1684.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-5.1.1

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-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.34 src/doc/CHANGES-5.1.1:1.1.2.35
--- src/doc/CHANGES-5.1.1:1.1.2.34	Sun Oct 16 23:48:47 2011
+++ src/doc/CHANGES-5.1.1	Wed Nov  2 18:17:23 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.34 2011/10/16 23:48:47 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.35 2011/11/02 18:17:23 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2515,3 +2515,28 @@ sbin/ifconfig/carp.c1.13
 	Stop ifconfig dumping core when attaching carp to an interface.
 	[bouyer, ticket #1670]
 
+distrib/sets/lists/base/mi		patch
+doc/3RDPARTYpatch
+share/zoneinfo/africa			patch
+share/zoneinfo/antarctica		patch
+share/zoneinfo/asia			patch
+share/zoneinfo/australasia		patch
+share/zoneinfo/backward			patch
+share/zoneinfo/etcetera			patch
+share/zoneinfo/europe			patch
+share/zoneinfo/factory			patch
+share/zoneinfo/iso3166.tab		patch
+share/zoneinfo/leapseconds		patch
+share/zoneinfo/northamerica		patch
+share/zoneinfo/pacificnew		patch
+share/zoneinfo/solar87			patch
+share/zoneinfo/solar88			patch
+share/zoneinfo/solar89			patch
+share/zoneinfo/southamerica		patch
+share/zoneinfo/systemv			patch
+share/zoneinfo/yearistype.sh		patch
+share/zoneinfo/zone.tab			patch
+
+	Update to tzdata2011n.
+	[apb, ticket #1684]
+



CVS commit: [netbsd-5-0] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 18:17:43 UTC 2011

Modified Files:
src/doc [netbsd-5-0]: CHANGES-5.0.3

Log Message:
Ticket 1684.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-5.0.3

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-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.48 src/doc/CHANGES-5.0.3:1.1.2.49
--- src/doc/CHANGES-5.0.3:1.1.2.48	Sun Oct 16 23:49:21 2011
+++ src/doc/CHANGES-5.0.3	Wed Nov  2 18:17:42 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.48 2011/10/16 23:49:21 riz Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.49 2011/11/02 18:17:42 riz Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2819,3 +2819,28 @@ sbin/ifconfig/carp.c1.13
 	Stop ifconfig dumping core when attaching carp to an interface.
 	[bouyer, ticket #1670]
 
+distrib/sets/lists/base/mi		patch
+doc/3RDPARTYpatch
+share/zoneinfo/africa			patch
+share/zoneinfo/antarctica		patch
+share/zoneinfo/asia			patch
+share/zoneinfo/australasia		patch
+share/zoneinfo/backward			patch
+share/zoneinfo/etcetera			patch
+share/zoneinfo/europe			patch
+share/zoneinfo/factory			patch
+share/zoneinfo/iso3166.tab		patch
+share/zoneinfo/leapseconds		patch
+share/zoneinfo/northamerica		patch
+share/zoneinfo/pacificnew		patch
+share/zoneinfo/solar87			patch
+share/zoneinfo/solar88			patch
+share/zoneinfo/solar89			patch
+share/zoneinfo/southamerica		patch
+share/zoneinfo/systemv			patch
+share/zoneinfo/yearistype.sh		patch
+share/zoneinfo/zone.tab			patch
+
+	Update to tzdata2011n.
+	[apb, ticket #1684]
+



CVS commit: [netbsd-5] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 18:18:03 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Ticket 1684.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.105 -r1.1.2.106 src/doc/CHANGES-5.2

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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.105 src/doc/CHANGES-5.2:1.1.2.106
--- src/doc/CHANGES-5.2:1.1.2.105	Mon Oct 17 00:03:22 2011
+++ src/doc/CHANGES-5.2	Wed Nov  2 18:18:03 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.105 2011/10/17 00:03:22 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.106 2011/11/02 18:18:03 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5655,3 +5655,28 @@ gnu/dist/xcvs/src/patch.c		patch
 	Implement and document cvs rdiff -p.
 	[spz, ticket #1673]
 
+distrib/sets/lists/base/mi		patch
+doc/3RDPARTYpatch
+share/zoneinfo/africa			patch
+share/zoneinfo/antarctica		patch
+share/zoneinfo/asia			patch
+share/zoneinfo/australasia		patch
+share/zoneinfo/backward			patch
+share/zoneinfo/etcetera			patch
+share/zoneinfo/europe			patch
+share/zoneinfo/factory			patch
+share/zoneinfo/iso3166.tab		patch
+share/zoneinfo/leapseconds		patch
+share/zoneinfo/northamerica		patch
+share/zoneinfo/pacificnew		patch
+share/zoneinfo/solar87			patch
+share/zoneinfo/solar88			patch
+share/zoneinfo/solar89			patch
+share/zoneinfo/southamerica		patch
+share/zoneinfo/systemv			patch
+share/zoneinfo/yearistype.sh		patch
+share/zoneinfo/zone.tab			patch
+
+	Update to tzdata2011n.
+	[apb, ticket #1684]
+



CVS commit: [netbsd-4] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 18:29:10 UTC 2011

Modified Files:
src/doc [netbsd-4]: CHANGES-4.1

Log Message:
Ticket 1435.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.228 -r1.1.2.229 src/doc/CHANGES-4.1

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-4.1
diff -u src/doc/CHANGES-4.1:1.1.2.228 src/doc/CHANGES-4.1:1.1.2.229
--- src/doc/CHANGES-4.1:1.1.2.228	Mon Aug 22 17:55:20 2011
+++ src/doc/CHANGES-4.1	Wed Nov  2 18:29:10 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.228 2011/08/22 17:55:20 riz Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.229 2011/11/02 18:29:10 riz Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4497,3 +4497,28 @@ xsrc/xfree/xc/lib/font/fontfile/decompre
 	Address CVE-2011-2895, buffer overflow in decompression.
 	[joerg, ticket #1433]
 
+distrib/sets/lists/base/mi		patch
+doc/3RDPARTYpatch
+share/zoneinfo/africa			patch
+share/zoneinfo/antarctica		patch
+share/zoneinfo/asia			patch
+share/zoneinfo/australasia		patch
+share/zoneinfo/backward			patch
+share/zoneinfo/etcetera			patch
+share/zoneinfo/europe			patch
+share/zoneinfo/factory			patch
+share/zoneinfo/iso3166.tab		patch
+share/zoneinfo/leapseconds		patch
+share/zoneinfo/northamerica		patch
+share/zoneinfo/pacificnew		patch
+share/zoneinfo/solar87			patch
+share/zoneinfo/solar88			patch
+share/zoneinfo/solar89			patch
+share/zoneinfo/southamerica		patch
+share/zoneinfo/systemv			patch
+share/zoneinfo/yearistype.sh		patch
+share/zoneinfo/zone.tab			patch
+
+	Update to tzdata2011n.
+	[apb, ticket #1435]
+



CVS commit: [netbsd-4-0] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 18:30:16 UTC 2011

Modified Files:
src/doc [netbsd-4-0]: CHANGES-4.0.2

Log Message:
Ticket 1435.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.89 -r1.1.2.90 src/doc/CHANGES-4.0.2

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-4.0.2
diff -u src/doc/CHANGES-4.0.2:1.1.2.89 src/doc/CHANGES-4.0.2:1.1.2.90
--- src/doc/CHANGES-4.0.2:1.1.2.89	Mon Aug 22 17:55:44 2011
+++ src/doc/CHANGES-4.0.2	Wed Nov  2 18:30:16 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.0.2,v 1.1.2.89 2011/08/22 17:55:44 riz Exp $
+#	$NetBSD: CHANGES-4.0.2,v 1.1.2.90 2011/11/02 18:30:16 riz Exp $
 
 A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2
 release:
@@ -1248,3 +1248,28 @@ xsrc/xfree/xc/lib/font/fontfile/decompre
 	Address CVE-2011-2895, buffer overflow in decompression.
 	[joerg, ticket #1433]
 
+distrib/sets/lists/base/mi		patch
+doc/3RDPARTYpatch
+share/zoneinfo/africa			patch
+share/zoneinfo/antarctica		patch
+share/zoneinfo/asia			patch
+share/zoneinfo/australasia		patch
+share/zoneinfo/backward			patch
+share/zoneinfo/etcetera			patch
+share/zoneinfo/europe			patch
+share/zoneinfo/factory			patch
+share/zoneinfo/iso3166.tab		patch
+share/zoneinfo/leapseconds		patch
+share/zoneinfo/northamerica		patch
+share/zoneinfo/pacificnew		patch
+share/zoneinfo/solar87			patch
+share/zoneinfo/solar88			patch
+share/zoneinfo/solar89			patch
+share/zoneinfo/southamerica		patch
+share/zoneinfo/systemv			patch
+share/zoneinfo/yearistype.sh		patch
+share/zoneinfo/zone.tab			patch
+
+	Update to tzdata2011n.
+	[apb, ticket #1435]
+



CVS commit: src/sys/dev/ata

2011-11-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov  2 18:41:58 UTC 2011

Modified Files:
src/sys/dev/ata: satafisreg.h

Log Message:
Drop trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ata/satafisreg.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/ata/satafisreg.h
diff -u src/sys/dev/ata/satafisreg.h:1.2 src/sys/dev/ata/satafisreg.h:1.3
--- src/sys/dev/ata/satafisreg.h:1.2	Wed Apr  7 17:51:16 2010
+++ src/sys/dev/ata/satafisreg.h	Wed Nov  2 18:41:58 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: satafisreg.h,v 1.2 2010/04/07 17:51:16 jakllsch Exp $ */
+/* $NetBSD: satafisreg.h,v 1.3 2011/11/02 18:41:58 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 Jonathan A. Kollasch.
@@ -40,7 +40,7 @@
 #define rhd_cyl_lo 5 /* wd_cyl_lo */
 #define rhd_cyl_hi 6 /* wd_cyl_hi */
 #define rhd_dh 7 /* wd_sdh */
-#define rhd_sector_exp 8 
+#define rhd_sector_exp 8
 #define rhd_cyl_lo_exp 9
 #define rhd_cyl_hi_exp 10
 #define rhd_features_exp 11



CVS commit: src/sys/sys

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 19:21:44 UTC 2011

Modified Files:
src/sys/sys: Makefile

Log Message:
revert rev.1.139, which i mistakenly committed with the unrelated change.


To generate a diff of this commit:
cvs rdiff -u -r1.139 -r1.140 src/sys/sys/Makefile

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/Makefile
diff -u src/sys/sys/Makefile:1.139 src/sys/sys/Makefile:1.140
--- src/sys/sys/Makefile:1.139	Wed Nov  2 13:52:34 2011
+++ src/sys/sys/Makefile	Wed Nov  2 19:21:43 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.139 2011/11/02 13:52:34 yamt Exp $
+#	$NetBSD: Makefile,v 1.140 2011/11/02 19:21:43 yamt Exp $
 
 .include bsd.sys.mk
 
@@ -27,8 +27,8 @@ INCS=	acct.h agpio.h aio.h ansi.h aout_m
 	param.h pcu.h pipe.h pmc.h poll.h pool.h power.h proc.h \
 	protosw.h pset.h ptrace.h ptree.h \
 	queue.h quota.h \
-	radixtree.h ras.h rbtree.h reboot.h radioio.h resource.h resourcevar.h \
-	rmd160.h rnd.h rwlock.h sa.h satypes.h \
+	ras.h rbtree.h reboot.h radioio.h resource.h resourcevar.h rmd160.h \
+	rnd.h rwlock.h sa.h satypes.h \
 	scanio.h sched.h scsiio.h sdt.h select.h selinfo.h sem.h sha1.h \
 	sha2.h shm.h siginfo.h signal.h signalvar.h sigtypes.h simplelock.h \
 	sleepq.h socket.h \



CVS commit: src/usr.bin/tic

2011-11-02 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Wed Nov  2 19:21:49 UTC 2011

Modified Files:
src/usr.bin/tic: tic.1

Log Message:
Fix a couple of mis-spellings of descriptions


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/tic/tic.1

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/tic/tic.1
diff -u src/usr.bin/tic/tic.1:1.8 src/usr.bin/tic/tic.1:1.9
--- src/usr.bin/tic/tic.1:1.8	Thu Feb 11 13:44:14 2010
+++ src/usr.bin/tic/tic.1	Wed Nov  2 19:21:49 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: tic.1,v 1.8 2010/02/11 13:44:14 wiz Exp $
+.\	$NetBSD: tic.1,v 1.9 2011/11/02 19:21:49 pgoyette Exp $
 .\
 .\ Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -62,9 +62,9 @@ instead of
 For
 .Ar term1 , term2 , ...
 output a C structure containing name, compiled description, and compiled size.
-This can be used to embed terminal descriptons into a program.
+This can be used to embed terminal descriptions into a program.
 .It Fl s
-Display the number of terminal descritions written to the database.
+Display the number of terminal descriptions written to the database.
 .It Fl x
 Include non standard capabilities defined in the
 .Ar source .



CVS commit: [netbsd-5] src/bin/sh

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 19:31:21 UTC 2011

Modified Files:
src/bin/sh [netbsd-5]: expand.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #1665):
bin/sh/expand.c: revision 1.85
PR/45269: Andreas Gustafsson: Instead of falling off the edge when eating
trailing newlines
if the block has moved, arrange so that trailing newlines are never placed in
the string
in the first place, by accumulating them and adding them only after we've
encountered a
non-newline character. This allows also for more efficient appending since we
know how much
we need beforehand. From FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.2.1 src/bin/sh/expand.c

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

Modified files:

Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.79 src/bin/sh/expand.c:1.79.2.1
--- src/bin/sh/expand.c:1.79	Thu Oct 16 17:58:29 2008
+++ src/bin/sh/expand.c	Wed Nov  2 19:31:19 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.79 2008/10/16 17:58:29 dholland Exp $	*/
+/*	$NetBSD: expand.c,v 1.79.2.1 2011/11/02 19:31:19 riz Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)expand.c	8.5 (Berkeley) 5/15/95;
 #else
-__RCSID($NetBSD: expand.c,v 1.79 2008/10/16 17:58:29 dholland Exp $);
+__RCSID($NetBSD: expand.c,v 1.79.2.1 2011/11/02 19:31:19 riz Exp $);
 #endif
 #endif /* not lint */
 
@@ -425,6 +425,7 @@ expbackq(union node *cmd, int quoted, in
 	char const *syntax = quoted? DQSYNTAX : BASESYNTAX;
 	int saveherefd;
 	int quotes = flag  (EXP_FULL | EXP_CASE);
+	int nnl;
 
 	INTOFF;
 	saveifs = ifsfirst;
@@ -442,6 +443,7 @@ expbackq(union node *cmd, int quoted, in
 
 	p = in.buf;
 	lastc = '\0';
+	nnl = 0;
 	for (;;) {
 		if (--in.nleft  0) {
 			if (in.fd  0)
@@ -455,17 +457,21 @@ expbackq(union node *cmd, int quoted, in
 		}
 		lastc = *p++;
 		if (lastc != '\0') {
-			if (quotes  syntax[(int)lastc] == CCTL)
-STPUTC(CTLESC, dest);
-			STPUTC(lastc, dest);
+			if (lastc == '\n')
+nnl++;
+			else {
+CHECKSTRSPACE(nnl + 2, dest);
+while (nnl  0) {
+	nnl--;
+	USTPUTC('\n', dest);
+}
+if (quotes  syntax[(int)lastc] == CCTL)
+	USTPUTC(CTLESC, dest);
+USTPUTC(lastc, dest);
+			}
 		}
 	}
 
-	/* Eat all trailing newlines */
-	p = stackblock() + startloc;
-	while (dest  p  dest[-1] == '\n')
-		STUNPUTC(dest);
-
 	if (in.fd = 0)
 		close(in.fd);
 	if (in.buf)



CVS commit: [netbsd-5] src/sys/dev/ic

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 19:39:43 UTC 2011

Modified Files:
src/sys/dev/ic [netbsd-5]: ciss.c

Log Message:
Pull up following revision(s) (requested by mhitch in ticket #1674):
sys/dev/ic/ciss.c: revision 1.25
I was allowing adapt_max_periph to use all available command slots, which
easily exceeds the maximum of 256 tags used by the scsipi layer because
the tag information from the scsipi layer was ignored and all the tagging
is handled implicitly internal to ciss(4).  But with the DIAGNOSTIC option,
the scsipi layer does a check for  256 tags and will panic.  So, lets just
limit the adapt_max_periph to 256 so the scsipi layer won't try to user more.


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.2 -r1.14.4.3 src/sys/dev/ic/ciss.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/ciss.c
diff -u src/sys/dev/ic/ciss.c:1.14.4.2 src/sys/dev/ic/ciss.c:1.14.4.3
--- src/sys/dev/ic/ciss.c:1.14.4.2	Sun Nov 21 21:02:49 2010
+++ src/sys/dev/ic/ciss.c	Wed Nov  2 19:39:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ciss.c,v 1.14.4.2 2010/11/21 21:02:49 riz Exp $	*/
+/*	$NetBSD: ciss.c,v 1.14.4.3 2011/11/02 19:39:43 riz Exp $	*/
 /*	$OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $	*/
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ciss.c,v 1.14.4.2 2010/11/21 21:02:49 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: ciss.c,v 1.14.4.3 2011/11/02 19:39:43 riz Exp $);
 
 #include bio.h
 
@@ -375,7 +375,7 @@ ciss_attach(struct ciss_softc *sc)
 
 	sc-sc_adapter.adapt_dev = (struct device *) sc;
 	sc-sc_adapter.adapt_openings = sc-sc_channel.chan_openings;
-	sc-sc_adapter.adapt_max_periph = sc-sc_channel.chan_openings;
+	sc-sc_adapter.adapt_max_periph = min(sc-sc_adapter.adapt_openings, 256);
 	sc-sc_adapter.adapt_request = ciss_scsi_cmd;
 	sc-sc_adapter.adapt_minphys = cissminphys;
 	sc-sc_adapter.adapt_ioctl = ciss_scsi_ioctl;



CVS commit: [netbsd-5] src/tools/compat

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 19:43:03 UTC 2011

Modified Files:
src/tools/compat [netbsd-5]: configure configure.ac nbtool_config.h.in

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1676):
tools/compat/configure.ac: revision 1.71
tools/compat/configure: revision 1.71
tools/compat/nbtool_config.h.in: revision 1.24
Test for sys/endian.h and provide HAVE_SYS_ENDIAN_H.
Fixes FreeBSD hosted builds (PR 42440 and PR 42470).
Approved by dholland.
Regenerate.


To generate a diff of this commit:
cvs rdiff -u -r1.67.2.2 -r1.67.2.3 src/tools/compat/configure \
src/tools/compat/configure.ac
cvs rdiff -u -r1.21.2.1 -r1.21.2.2 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.67.2.2 src/tools/compat/configure:1.67.2.3
--- src/tools/compat/configure:1.67.2.2	Sat Oct  3 21:28:00 2009
+++ src/tools/compat/configure	Wed Nov  2 19:43:02 2011
@@ -2600,7 +2600,7 @@ EOF
 fi
 done
 
-for ac_header in sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
+for ac_header in sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h sys/endian.h \
 	sys/featuretest.h err.h inttypes.h libgen.h paths.h stdint.h util.h \
 	resolv.h arpa/nameser.h
 do
Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.67.2.2 src/tools/compat/configure.ac:1.67.2.3
--- src/tools/compat/configure.ac:1.67.2.2	Sat Oct  3 21:28:00 2009
+++ src/tools/compat/configure.ac	Wed Nov  2 19:43:02 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.67.2.2 2009/10/03 21:28:00 snj Exp $
+#	$NetBSD: configure.ac,v 1.67.2.3 2011/11/02 19:43:02 riz Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -24,7 +24,7 @@ AC_CONFIG_HEADERS(nbtool_config.h)
 AC_CONFIG_FILES(defs.mk)
 
 # Autoheader header and footer
-AH_TOP([/*  $NetBSD: configure.ac,v 1.67.2.2 2009/10/03 21:28:00 snj Exp $*/
+AH_TOP([/*  $NetBSD: configure.ac,v 1.67.2.3 2011/11/02 19:43:02 riz Exp $*/
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__])
@@ -80,7 +80,7 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/mman.h 
 AC_HEADER_DIRENT
 AC_CHECK_HEADERS(sys/mtio.h sys/sysmacros.h sys/syslimits.h \
 	getopt.h features.h malloc.h sys/poll.h stddef.h)
-AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h \
+AC_CHECK_HEADERS(sys/bswap.h machine/bswap.h sys/cdefs.h machine/endian.h sys/endian.h \
 	sys/featuretest.h err.h inttypes.h libgen.h paths.h stdint.h util.h \
 	resolv.h arpa/nameser.h,,
 	[test -f include/$ac_header || touch include/$ac_header])

Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.21.2.1 src/tools/compat/nbtool_config.h.in:1.21.2.2
--- src/tools/compat/nbtool_config.h.in:1.21.2.1	Thu Jan 15 04:30:19 2009
+++ src/tools/compat/nbtool_config.h.in	Wed Nov  2 19:43:03 2011
@@ -1,6 +1,6 @@
 /* nbtool_config.h.in.  Generated automatically from configure.ac by autoheader.  */
 
-/*  $NetBSD: nbtool_config.h.in,v 1.21.2.1 2009/01/15 04:30:19 snj Exp $*/
+/*  $NetBSD: nbtool_config.h.in,v 1.21.2.2 2011/11/02 19:43:03 riz Exp $*/
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__
@@ -333,6 +333,9 @@
 /* Define if you have the machine/endian.h header file. */
 #undef HAVE_MACHINE_ENDIAN_H
 
+/* Define if you have the sys/endian.h header file. */
+#undef HAVE_SYS_ENDIAN_H
+
 /* Define if you have the malloc.h header file. */
 #undef HAVE_MALLOC_H
 



CVS commit: src/sys/dev/mii

2011-11-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov  2 19:55:58 UTC 2011

Modified Files:
src/sys/dev/mii: miidevs

Log Message:
Add Broadcom BCM5325 and BCM5365.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/mii/miidevs

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/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.102 src/sys/dev/mii/miidevs:1.103
--- src/sys/dev/mii/miidevs:1.102	Tue Jun  7 09:24:17 2011
+++ src/sys/dev/mii/miidevs	Wed Nov  2 19:55:57 2011
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.102 2011/06/07 09:24:17 cegger Exp $
+$NetBSD: miidevs,v 1.103 2011/11/02 19:55:57 jakllsch Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -147,6 +147,7 @@ model xxBROADCOM BCM5214	0x0028 BCM5214 
 model xxBROADCOM BCM5221	0x001e BCM5221 10/100 media interface
 model xxBROADCOM BCM5222	0x0032 BCM5222 Dual 10/100 media interface
 model xxBROADCOM BCM4401	0x0036 BCM4401 10/100 media interface
+model xxBROADCOM BCM5365	0x0037 BCM5365 10/100 5-port PHY switch
 model BROADCOM BCM5400		0x0004 BCM5400 1000BASE-T media interface
 model BROADCOM BCM5401		0x0005 BCM5401 1000BASE-T media interface
 model BROADCOM BCM5411		0x0007 BCM5411 1000BASE-T media interface
@@ -164,6 +165,7 @@ model BROADCOM BCM54K2		0x002e BCM54K2 1
 model BROADCOM BCM5714		0x0034 BCM5714 1000BASE-T media interface
 model BROADCOM BCM5780		0x0035 BCM5780 1000BASE-T media interface
 model BROADCOM BCM5708C		0x0036 BCM5708C 1000BASE-T media interface
+model BROADCOM2 BCM5325		0x0003 BCM5325 10/100 5-port PHY switch
 model BROADCOM2 BCM5906		0x0004 BCM5906 10/100baseTX media interface
 model BROADCOM2 BCM5481		0x000a BCM5481 1000BASE-T media interface
 model BROADCOM2 BCM5482		0x000b BCM5482 1000BASE-T media interface



CVS commit: src/sys/dev/mii

2011-11-02 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Wed Nov  2 19:56:40 UTC 2011

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.105 src/sys/dev/mii/miidevs.h:1.106
--- src/sys/dev/mii/miidevs.h:1.105	Tue Jun  7 09:26:27 2011
+++ src/sys/dev/mii/miidevs.h	Wed Nov  2 19:56:40 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.105 2011/06/07 09:26:27 cegger Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.106 2011/11/02 19:56:40 jakllsch Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.102 2011/06/07 09:24:17 cegger Exp
+ *	NetBSD: miidevs,v 1.103 2011/11/02 19:55:57 jakllsch Exp
  */
 
 /*-
@@ -176,6 +176,8 @@
 #define	MII_STR_xxBROADCOM_BCM5222	BCM5222 Dual 10/100 media interface
 #define	MII_MODEL_xxBROADCOM_BCM4401	0x0036
 #define	MII_STR_xxBROADCOM_BCM4401	BCM4401 10/100 media interface
+#define	MII_MODEL_xxBROADCOM_BCM5365	0x0037
+#define	MII_STR_xxBROADCOM_BCM5365	BCM5365 10/100 5-port PHY switch
 #define	MII_MODEL_BROADCOM_BCM5400	0x0004
 #define	MII_STR_BROADCOM_BCM5400	BCM5400 1000BASE-T media interface
 #define	MII_MODEL_BROADCOM_BCM5401	0x0005
@@ -210,6 +212,8 @@
 #define	MII_STR_BROADCOM_BCM5780	BCM5780 1000BASE-T media interface
 #define	MII_MODEL_BROADCOM_BCM5708C	0x0036
 #define	MII_STR_BROADCOM_BCM5708C	BCM5708C 1000BASE-T media interface
+#define	MII_MODEL_BROADCOM2_BCM5325	0x0003
+#define	MII_STR_BROADCOM2_BCM5325	BCM5325 10/100 5-port PHY switch
 #define	MII_MODEL_BROADCOM2_BCM5906	0x0004
 #define	MII_STR_BROADCOM2_BCM5906	BCM5906 10/100baseTX media interface
 #define	MII_MODEL_BROADCOM2_BCM5481	0x000a

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.93 src/sys/dev/mii/miidevs_data.h:1.94
--- src/sys/dev/mii/miidevs_data.h:1.93	Tue Jun  7 09:26:27 2011
+++ src/sys/dev/mii/miidevs_data.h	Wed Nov  2 19:56:40 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs_data.h,v 1.93 2011/06/07 09:26:27 cegger Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.94 2011/11/02 19:56:40 jakllsch Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.102 2011/06/07 09:24:17 cegger Exp
+ *	NetBSD: miidevs,v 1.103 2011/11/02 19:55:57 jakllsch Exp
  */
 
 /*-
@@ -59,6 +59,7 @@ struct mii_knowndev mii_knowndevs[] = {
  { MII_OUI_xxBROADCOM, MII_MODEL_xxBROADCOM_BCM5221, MII_STR_xxBROADCOM_BCM5221 },
  { MII_OUI_xxBROADCOM, MII_MODEL_xxBROADCOM_BCM5222, MII_STR_xxBROADCOM_BCM5222 },
  { MII_OUI_xxBROADCOM, MII_MODEL_xxBROADCOM_BCM4401, MII_STR_xxBROADCOM_BCM4401 },
+ { MII_OUI_xxBROADCOM, MII_MODEL_xxBROADCOM_BCM5365, MII_STR_xxBROADCOM_BCM5365 },
  { MII_OUI_BROADCOM, MII_MODEL_BROADCOM_BCM5400, MII_STR_BROADCOM_BCM5400 },
  { MII_OUI_BROADCOM, MII_MODEL_BROADCOM_BCM5401, MII_STR_BROADCOM_BCM5401 },
  { MII_OUI_BROADCOM, MII_MODEL_BROADCOM_BCM5411, MII_STR_BROADCOM_BCM5411 },
@@ -76,6 +77,7 @@ struct mii_knowndev mii_knowndevs[] = {
  { MII_OUI_BROADCOM, MII_MODEL_BROADCOM_BCM5714, MII_STR_BROADCOM_BCM5714 },
  { MII_OUI_BROADCOM, MII_MODEL_BROADCOM_BCM5780, MII_STR_BROADCOM_BCM5780 },
  { MII_OUI_BROADCOM, MII_MODEL_BROADCOM_BCM5708C, MII_STR_BROADCOM_BCM5708C },
+ { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5325, MII_STR_BROADCOM2_BCM5325 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5906, MII_STR_BROADCOM2_BCM5906 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5481, MII_STR_BROADCOM2_BCM5481 },
  { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5482, MII_STR_BROADCOM2_BCM5482 },



CVS commit: [netbsd-5] src/libexec/tftpd

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 19:58:23 UTC 2011

Modified Files:
src/libexec/tftpd [netbsd-5]: tftpd.8 tftpd.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1677):
libexec/tftpd/tftpd.c: revision 1.32
libexec/tftpd/tftpd.8: revision 1.22
libexec/tftpd/tftpd.c: revision 1.33
libexec/tftpd/tftpd.8: revision 1.23
libexec/tftpd/tftpd.c: revision 1.34
libexec/tftpd/tftpd.8: revision 1.24
fix shadowed variable
Patrick Welche prlw1%cam.ac.uk@localhost
- add -p pathsep option
- make wrap to zero work, but produce a warning
While here:
- fix gcc warnings, in particular variable clobbered warnings
  (compiling with fewer warnings does not really fix the problem)
Sort options in SYNOPSIS.
New sentence, new line.
Use only mdoc markup.
Make HTML-ready.
Sync usage with man page.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.38.1 src/libexec/tftpd/tftpd.8
cvs rdiff -u -r1.31 -r1.31.4.1 src/libexec/tftpd/tftpd.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/tftpd/tftpd.8
diff -u src/libexec/tftpd/tftpd.8:1.21 src/libexec/tftpd/tftpd.8:1.21.38.1
--- src/libexec/tftpd/tftpd.8:1.21	Thu Aug  7 09:46:53 2003
+++ src/libexec/tftpd/tftpd.8	Wed Nov  2 19:58:23 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: tftpd.8,v 1.21 2003/08/07 09:46:53 agc Exp $
+.\	$NetBSD: tftpd.8,v 1.21.38.1 2011/11/02 19:58:23 riz Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	from: @(#)tftpd.8	8.1 (Berkeley) 6/4/93
 .\
-.Dd June 11, 2003
+.Dd January 8, 2010
 .Dt TFTPD 8
 .Os
 .Sh NAME
@@ -39,10 +39,9 @@
 Internet Trivial File Transfer Protocol server
 .Sh SYNOPSIS
 .Nm
-.Op Fl d
+.Op Fl dln
 .Op Fl g Ar group
-.Op Fl l
-.Op Fl n
+.Op Fl p Ar pathsep
 .Op Fl s Ar directory
 .Op Fl u Ar user
 .Op Ar directory ...
@@ -66,8 +65,11 @@ does not require an account or password 
 Due to the lack of authentication information,
 .Nm
 will allow only publicly readable files to be accessed.
-Filenames beginning in ``\|\fB.\|.\fP\|/'' or
-containing ``/\|\fB.\|.\fP\|/'' are not allowed.
+Filenames beginning in
+.Dq Pa ../
+or containing
+.Dq Pa /../
+are not allowed.
 Files may be written to only if they already exist and are publicly writable.
 .Pp
 Note that this extends the concept of
@@ -89,7 +91,7 @@ The given directories are also treated a
 relative filename requests.
 .Pp
 The options are:
-.Bl -tag -width directory
+.Bl -tag -width XsXdirectoryX
 .It Fl d
 Enable verbose debugging messages to
 .Xr syslogd 8 .
@@ -107,6 +109,11 @@ Logs all requests using
 .It Fl n
 Suppresses negative acknowledgement of requests for nonexistent
 relative filenames.
+.It Fl p Ar pathsep
+All occurances of the single character
+.Ar pathsep
+(path separator) in the requested filename are replaced with
+.Sq / .
 .It Fl s Ar directory
 .Nm
 will
@@ -193,11 +200,16 @@ TFTP options were implemented by Wasabi 
 and first appeared in
 .Nx 2.0 .
 .Sh BUGS
-Files larger than 33488896 octets (65535 blocks) cannot be transferred
-without client and server supporting blocksize negotiation (RFCs
-2347 and 2348).
-.Pp
-Many tftp clients will not transfer files over 1678 octets (32767 blocks).
+Files larger than 33,553,919 octets (65535 blocks, last one less than 512
+octets) cannot be correctly transferred without client and server
+supporting blocksize negotiation (RFCs 2347 and 2348).
+As a kludge,
+.Nm
+accepts a sequence of block numbers which wrap to zero after 65535.
+.Pp
+Many tftp clients will not transfer files over 16,776,703 octets
+(32767 blocks), as they incorrectly count the block number using
+a signed rather than unsigned 16-bit integer.
 .Sh SECURITY CONSIDERATIONS
 You are
 .Em strongly

Index: src/libexec/tftpd/tftpd.c
diff -u src/libexec/tftpd/tftpd.c:1.31 src/libexec/tftpd/tftpd.c:1.31.4.1
--- src/libexec/tftpd/tftpd.c:1.31	Mon Jul 21 13:25:47 2008
+++ src/libexec/tftpd/tftpd.c	Wed Nov  2 19:58:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tftpd.c,v 1.31 2008/07/21 13:25:47 lukem Exp $	*/
+/*	$NetBSD: tftpd.c,v 1.31.4.1 2011/11/02 19:58:23 riz Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -36,7 +36,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)tftpd.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: tftpd.c,v 1.31 2008/07/21 13:25:47 lukem Exp $);
+__RCSID($NetBSD: tftpd.c,v 1.31.4.1 2011/11/02 19:58:23 riz Exp $);
 #endif
 #endif /* not lint */
 
@@ -77,20 +77,20 @@ __RCSID($NetBSD: tftpd.c,v 1.31 2008/07
 
 #define	TIMEOUT		5
 
-int	peer;
-int	rexmtval = TIMEOUT;
-int	maxtimeout = 5*TIMEOUT;
-
-char	buf[MAXPKTSIZE];
-char	ackbuf[PKTSIZE];
-char	oackbuf[PKTSIZE];
-struct	sockaddr_storage from;
-socklen_t	fromlen;
-int	debug;
-
-int	tftp_opt_tsize = 0;
-int	tftp_blksize = SEGSIZE;
-int	tftp_tsize = 0;

CVS commit: src/lib/libc/time

2011-11-02 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Wed Nov  2 19:59:40 UTC 2011

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
Use double quotes to prevent multiple adjacent spaces from
being squashed to a single space on output.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/time/ctime.3

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/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.44 src/lib/libc/time/ctime.3:1.45
--- src/lib/libc/time/ctime.3:1.44	Thu Oct 27 14:47:59 2011
+++ src/lib/libc/time/ctime.3	Wed Nov  2 19:59:40 2011
@@ -1,8 +1,8 @@
-.\ $NetBSD: ctime.3,v 1.44 2011/10/27 14:47:59 christos Exp $
+.\ $NetBSD: ctime.3,v 1.45 2011/11/02 19:59:40 apb Exp $
 .\
 .\ XXX: License missing?
 .\
-.Dd October 27, 2011
+.Dd November 2, 2011
 .Dt CTIME 3
 .Os
 .Sh NAME
@@ -101,7 +101,7 @@ and returns a pointer to a string with t
 Years requiring fewer than four characters are padded with leading zeroes.
 For years longer than four characters, the string is of the form
 .Bd -literal -offset indent
-.D1 Thu Nov 24 18:22:48 81986\en\e0
+.D1 Thu Nov 24 18:22:48 81986\en\e0
 .Ed
 .Pp
 with five spaces before the year.



CVS commit: [netbsd-5] src/share/termcap

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:03:53 UTC 2011

Modified Files:
src/share/termcap [netbsd-5]: termcap.src

Log Message:
Apply patch (requested by spz in ticket #1678):

Add minimal termcap entry for MacOS X Lion.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.101.8.1 src/share/termcap/termcap.src

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

Modified files:

Index: src/share/termcap/termcap.src
diff -u src/share/termcap/termcap.src:1.101 src/share/termcap/termcap.src:1.101.8.1
--- src/share/termcap/termcap.src:1.101	Tue Mar 11 18:47:57 2008
+++ src/share/termcap/termcap.src	Wed Nov  2 20:03:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: termcap.src,v 1.101 2008/03/11 18:47:57 agc Exp $
+#	$NetBSD: termcap.src,v 1.101.8.1 2011/11/02 20:03:53 riz Exp $
 #
  TERMINAL TYPE DESCRIPTIONS SOURCE FILE
 #
@@ -1815,7 +1815,7 @@ xterm-xf86-v40|xterm terminal emulator (
 	:tc=xterm-xf86-v333:
 # This is one of the variants from XFree86 3.3 (T.Dickey)
 xterm-16color|xterm with 16 colors like aixterm:\
-	:Co#16:NC#32:pa#256:ut:\
+	:Co#16:NC#32:pa#56:ut:\
 	:AB=\E[4%dm:AF=\E[3%dm:op=\E[m:\
 	:tc=xterm-xf86-v33:
 
@@ -2068,6 +2068,9 @@ emu|emu native mode:\
 	:sr=\EF:st=\Eh:ta=^I:ue=\ES:up=\EA:us=\ES\EV:ve=\Ea:vi=\EZ:\
 	:vs=\Ea:
 
+xterm-256color|xterm for MacOS Lion:\
+	:Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt:
+
  MGR
 #
 # MGR is a Bell Labs window system lighter-weight than X.



CVS commit: [netbsd-5] src/sys/fs/puffs

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:11:12 UTC 2011

Modified Files:
src/sys/fs/puffs [netbsd-5]: puffs_msgif.c puffs_node.c puffs_vfsops.c
puffs_vnops.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #1679):
sys/fs/puffs/puffs_vnops.c: revision 1.157
sys/fs/puffs/puffs_vnops.c: revision 1.158
sys/fs/puffs/puffs_vnops.c: revision 1.159
sys/fs/puffs/puffs_vfsops.c: revision 1.97
sys/fs/puffs/puffs_vfsops.c: revision 1.99
sys/fs/puffs/puffs_vnops.c: revision 1.160
sys/fs/puffs/puffs_vfsops.c: revision 1.100
sys/miscfs/syncfs/sync_subr.c: revision 1.47
sys/fs/puffs/puffs_node.c: revision 1.21
sys/fs/puffs/puffs_node.c: revision 1.22
sys/fs/puffs/puffs_msgif.c: revision 1.88
sys/fs/puffs/puffs_msgif.c: revision 1.89
sys/fs/puffs/puffs_vnops.c: revision 1.156
Make sure ioflush does not sleep in PUFFS code path, waiting for a mutex,
a memory allocation, or a response from the filesystem.
This avoids deadlocks in the following situations:
1) when memory is low: ioflush waits the fileystem, the fielsystem waits
   for memory
2) when the filesystem does not respond (e.g.: network outage ona
   distributed filesystem)
Fix the build that was broken by struct lwp *updateproc reference in
RUMP-visible code. Instead of checking that updateproc (aka ioflush,
aka syncer) will not sleep in PUFFS code, I check for any kernel thread:
after all none of them are designed to hang awaiting for a remote filesystem
operation to complete.
Roll back the change that forced kernel threads to not sleep in PUFFS.
The change does not make consensus, since only pagedaemon should need it.
Other threads will tolerate sleeping, and problems here are only symptoms
that something is going wrong in memory management. The cause, not the
symptoms, need to be fixed.
Make sure pagedaemon does not sleep for memory in puffs_vnop_sleep.
Add KASSERT on any sleeping memory allocation to check it cannot happen again.
Remove #ifdef DIAGNOSTIC guards around KASSERT, as the macro contains them


To generate a diff of this commit:
cvs rdiff -u -r1.72.4.4 -r1.72.4.5 src/sys/fs/puffs/puffs_msgif.c
cvs rdiff -u -r1.13.10.2 -r1.13.10.3 src/sys/fs/puffs/puffs_node.c
cvs rdiff -u -r1.81.8.2 -r1.81.8.3 src/sys/fs/puffs/puffs_vfsops.c
cvs rdiff -u -r1.129.4.10 -r1.129.4.11 src/sys/fs/puffs/puffs_vnops.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/fs/puffs/puffs_msgif.c
diff -u src/sys/fs/puffs/puffs_msgif.c:1.72.4.4 src/sys/fs/puffs/puffs_msgif.c:1.72.4.5
--- src/sys/fs/puffs/puffs_msgif.c:1.72.4.4	Fri Jul 15 23:41:13 2011
+++ src/sys/fs/puffs/puffs_msgif.c	Wed Nov  2 20:11:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_msgif.c,v 1.72.4.4 2011/07/15 23:41:13 riz Exp $	*/
+/*	$NetBSD: puffs_msgif.c,v 1.72.4.5 2011/11/02 20:11:12 riz Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.72.4.4 2011/07/15 23:41:13 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_msgif.c,v 1.72.4.5 2011/11/02 20:11:12 riz Exp $);
 
 #include sys/param.h
 #include sys/atomic.h
@@ -45,6 +45,8 @@ __KERNEL_RCSID(0, $NetBSD: puffs_msgif.
 #include sys/vnode.h
 #include sys/atomic.h
 
+#include uvm/uvm.h
+
 #include dev/putter/putter_sys.h
 
 #include fs/puffs/puffs_msgif.h
@@ -132,6 +134,7 @@ puffs_msgpark_alloc(int waitok)
 {
 	struct puffs_msgpark *park;
 
+	KASSERT(curlwp != uvm.pagedaemon_lwp || !waitok);
 	park = pool_cache_get(parkpc, waitok ? PR_WAITOK : PR_NOWAIT);
 	if (park == NULL)
 		return park;
@@ -228,6 +231,7 @@ puffs_msgmem_alloc(size_t len, struct pu
 	struct puffs_msgpark *park;
 	void *m;
 
+	KASSERT(curlwp != uvm.pagedaemon_lwp || !cansleep);
 	m = kmem_zalloc(len, cansleep ? KM_SLEEP : KM_NOSLEEP);
 	if (m == NULL) {
 		KASSERT(cansleep == 0);
@@ -935,6 +939,7 @@ puffsop_flush(struct puffs_mount *pmp, s
 	struct componentname *pf_cn;
 	char *name;
 		/* get comfortab^Wcomponentname */
+		KASSERT(curlwp != uvm.pagedaemon_lwp);
 		pf_cn = kmem_alloc(componentname);
 		memset(pf_cn, 0, sizeof(struct componentname));
 		break;
@@ -1011,6 +1016,7 @@ puffs_msgif_dispatch(void *this, struct 
 		}
 		pf = (struct puffs_flush *)preq;
 
+		KASSERT(curlwp != uvm.pagedaemon_lwp);
 		psopr = kmem_alloc(sizeof(*psopr), KM_SLEEP);
 		memcpy(psopr-psopr_pf, pf, sizeof(*pf));
 		psopr-psopr_sopreq = PUFFS_SOPREQ_FLUSH;

Index: src/sys/fs/puffs/puffs_node.c
diff -u src/sys/fs/puffs/puffs_node.c:1.13.10.2 src/sys/fs/puffs/puffs_node.c:1.13.10.3
--- src/sys/fs/puffs/puffs_node.c:1.13.10.2	Sat Sep 17 18:53:30 2011
+++ src/sys/fs/puffs/puffs_node.c	Wed Nov  2 20:11:12 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_node.c,v 1.13.10.2 2011/09/17 18:53:30 bouyer Exp $	*/
+/*	$NetBSD: puffs_node.c,v 

CVS commit: [netbsd-5] src/gnu/usr.bin/binutils/gas

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:15:42 UTC 2011

Modified Files:
src/gnu/usr.bin/binutils/gas [netbsd-5]: Makefile

Log Message:
Apply patch (requested by mrg in ticket #1680):

Fix build on arm with USE_SSP set.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.24.1 src/gnu/usr.bin/binutils/gas/Makefile

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

Modified files:

Index: src/gnu/usr.bin/binutils/gas/Makefile
diff -u src/gnu/usr.bin/binutils/gas/Makefile:1.8 src/gnu/usr.bin/binutils/gas/Makefile:1.8.24.1
--- src/gnu/usr.bin/binutils/gas/Makefile:1.8	Thu Nov  9 21:27:58 2006
+++ src/gnu/usr.bin/binutils/gas/Makefile	Wed Nov  2 20:15:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2006/11/09 21:27:58 christos Exp $
+#	$NetBSD: Makefile,v 1.8.24.1 2011/11/02 20:15:42 riz Exp $
 
 .include bsd.own.mk
 
@@ -19,6 +19,7 @@ COPTS.dwarf2dbg.c = -Wno-stack-protector
 COPTS.symbols.c = -Wno-stack-protector
 COPTS.stabs.c = -Wno-stack-protector
 COPTS.macro.c = -Wno-stack-protector
+COPTS.tc-arm.c = -Wno-stack-protector
 
 CPPFLAGS+=	-I${.CURDIR}/arch/${MACHINE_ARCH}
 CPPFLAGS+=	-I${DIST}/gas -I${DIST}/gas/config



CVS commit: [netbsd-5-0] src

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:23:34 UTC 2011

Modified Files:
src/distrib/sets [netbsd-5-0]: sets.subr
src/sys/conf [netbsd-5-0]: osrelease.sh

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1681):
distrib/sets/sets.subr: revision 1.133
sys/conf/osrelease.sh: revision 1.116
sys/conf/osrelease.sh: revision 1.117
try to match sys/kern/kern_module.c module path logic: for release branches,
use X.Y version (instead of eg. X.Y.0_PATCH or X.Y_STABLE) and for -current use
X.Y.Z.
ok zafer@
Add -n option to print major and minor version, e.g. 5.99 on -current.
Describe new -n option in a comment; improve description of -m option.


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.5 -r1.71.2.5.2.1 src/distrib/sets/sets.subr
cvs rdiff -u -r1.115 -r1.115.10.1 src/sys/conf/osrelease.sh

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.71.2.5 src/distrib/sets/sets.subr:1.71.2.5.2.1
--- src/distrib/sets/sets.subr:1.71.2.5	Wed Apr  8 00:09:27 2009
+++ src/distrib/sets/sets.subr	Wed Nov  2 20:23:34 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.71.2.5 2009/04/08 00:09:27 snj Exp $
+#	$NetBSD: sets.subr,v 1.71.2.5.2.1 2011/11/02 20:23:34 riz Exp $
 #
 
 #
@@ -215,7 +215,11 @@ if [ ${MACHINE_ARCH} = m68000 ]; the
 	shlib=no			# Turn off shlibs for some ports.
 fi
 
-OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
+OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n`
+# for release branches, use X.Y version, for -current use X.Y.Z
+if [ ! ${OSRELEASE%.99} = ${OSRELEASE} ]; then
+	OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
+fi
 MODULEDIR=stand/${MACHINE}/${OSRELEASE}/modules
 SUBST=s#@MODULEDIR@#${MODULEDIR}#g
 SUBST=${SUBST};s#@OSRELEASE@#${OSRELEASE}#g
@@ -228,7 +232,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.71.2.5 2009/04/08 00:09:27 snj Exp $
+# 	# $NetBSD: sets.subr,v 1.71.2.5.2.1 2011/11/02 20:23:34 riz Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root

Index: src/sys/conf/osrelease.sh
diff -u src/sys/conf/osrelease.sh:1.115 src/sys/conf/osrelease.sh:1.115.10.1
--- src/sys/conf/osrelease.sh:1.115	Tue Aug  5 08:26:05 2008
+++ src/sys/conf/osrelease.sh	Wed Nov  2 20:23:34 2011
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: osrelease.sh,v 1.115 2008/08/05 08:26:05 apb Exp $
+#	$NetBSD: osrelease.sh,v 1.115.10.1 2011/11/02 20:23:34 riz Exp $
 #
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -38,13 +38,18 @@ PARAMH=`dirname $0`/../sys/param.h
 release=`$AWK '/^#define[ 	]*__NetBSD_Version__/ { print $6 }' $PARAMH`
 
 # default: return nn.nn.nn
-# -m: return the major number -- -current is the number of the next release
+# -m: return nn, representing only the major number; however, for -current,
+# return the next major number (e.g. for 5.99.nn, return 6)
+# -n: return nn.nn
 # -s: return nn (no dots)
 
 case $1 in
 -m)
 	echo $release | $AWK -F. '{print int($1+$2/100+0.01)}'
 	;;
+-n)
+	echo $release | $AWK -F. '{print $1 . $2}'
+	;;
 -s)
 	echo $release | $SED -e 's,\.,,g'
 	;;



CVS commit: [netbsd-5-1] src

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:24:11 UTC 2011

Modified Files:
src/distrib/sets [netbsd-5-1]: sets.subr
src/sys/conf [netbsd-5-1]: osrelease.sh

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1681):
distrib/sets/sets.subr: revision 1.133
sys/conf/osrelease.sh: revision 1.116
sys/conf/osrelease.sh: revision 1.117
try to match sys/kern/kern_module.c module path logic: for release branches,
use X.Y version (instead of eg. X.Y.0_PATCH or X.Y_STABLE) and for -current use
X.Y.Z.
ok zafer@
Add -n option to print major and minor version, e.g. 5.99 on -current.
Describe new -n option in a comment; improve description of -m option.


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.5 -r1.71.2.5.6.1 src/distrib/sets/sets.subr
cvs rdiff -u -r1.115 -r1.115.14.1 src/sys/conf/osrelease.sh

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/sets.subr
diff -u src/distrib/sets/sets.subr:1.71.2.5 src/distrib/sets/sets.subr:1.71.2.5.6.1
--- src/distrib/sets/sets.subr:1.71.2.5	Wed Apr  8 00:09:27 2009
+++ src/distrib/sets/sets.subr	Wed Nov  2 20:24:10 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.71.2.5 2009/04/08 00:09:27 snj Exp $
+#	$NetBSD: sets.subr,v 1.71.2.5.6.1 2011/11/02 20:24:10 riz Exp $
 #
 
 #
@@ -215,7 +215,11 @@ if [ ${MACHINE_ARCH} = m68000 ]; the
 	shlib=no			# Turn off shlibs for some ports.
 fi
 
-OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
+OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n`
+# for release branches, use X.Y version, for -current use X.Y.Z
+if [ ! ${OSRELEASE%.99} = ${OSRELEASE} ]; then
+	OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
+fi
 MODULEDIR=stand/${MACHINE}/${OSRELEASE}/modules
 SUBST=s#@MODULEDIR@#${MODULEDIR}#g
 SUBST=${SUBST};s#@OSRELEASE@#${OSRELEASE}#g
@@ -228,7 +232,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.71.2.5 2009/04/08 00:09:27 snj Exp $
+# 	# $NetBSD: sets.subr,v 1.71.2.5.6.1 2011/11/02 20:24:10 riz Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root

Index: src/sys/conf/osrelease.sh
diff -u src/sys/conf/osrelease.sh:1.115 src/sys/conf/osrelease.sh:1.115.14.1
--- src/sys/conf/osrelease.sh:1.115	Tue Aug  5 08:26:05 2008
+++ src/sys/conf/osrelease.sh	Wed Nov  2 20:24:11 2011
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: osrelease.sh,v 1.115 2008/08/05 08:26:05 apb Exp $
+#	$NetBSD: osrelease.sh,v 1.115.14.1 2011/11/02 20:24:11 riz Exp $
 #
 # Copyright (c) 1997 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -38,13 +38,18 @@ PARAMH=`dirname $0`/../sys/param.h
 release=`$AWK '/^#define[ 	]*__NetBSD_Version__/ { print $6 }' $PARAMH`
 
 # default: return nn.nn.nn
-# -m: return the major number -- -current is the number of the next release
+# -m: return nn, representing only the major number; however, for -current,
+# return the next major number (e.g. for 5.99.nn, return 6)
+# -n: return nn.nn
 # -s: return nn (no dots)
 
 case $1 in
 -m)
 	echo $release | $AWK -F. '{print int($1+$2/100+0.01)}'
 	;;
+-n)
+	echo $release | $AWK -F. '{print $1 . $2}'
+	;;
 -s)
 	echo $release | $SED -e 's,\.,,g'
 	;;



CVS commit: [netbsd-5-1] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:24:31 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
Ticket 1681.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.35 -r1.1.2.36 src/doc/CHANGES-5.1.1

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-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.35 src/doc/CHANGES-5.1.1:1.1.2.36
--- src/doc/CHANGES-5.1.1:1.1.2.35	Wed Nov  2 18:17:23 2011
+++ src/doc/CHANGES-5.1.1	Wed Nov  2 20:24:31 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.35 2011/11/02 18:17:23 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.36 2011/11/02 20:24:31 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2540,3 +2540,9 @@ share/zoneinfo/zone.tab			patch
 	Update to tzdata2011n.
 	[apb, ticket #1684]
 
+distrib/sets/sets.subr1.133
+sys/conf/osrelease.sh1.116-1.117
+
+	Fix module path logic for release branches.
+	[jmcneill, ticket #1681]
+



CVS commit: src/lib/libc/gen

2011-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov  2 20:25:20 UTC 2011

Modified Files:
src/lib/libc/gen: cpuset.3

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/gen/cpuset.3

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/gen/cpuset.3
diff -u src/lib/libc/gen/cpuset.3:1.5 src/lib/libc/gen/cpuset.3:1.6
--- src/lib/libc/gen/cpuset.3:1.5	Wed Nov  2 13:05:43 2011
+++ src/lib/libc/gen/cpuset.3	Wed Nov  2 20:25:20 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: cpuset.3,v 1.5 2011/11/02 13:05:43 yamt Exp $
+.\	$NetBSD: cpuset.3,v 1.6 2011/11/02 20:25:20 wiz Exp $
 .\
 .\ Copyright (c) 2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd Nomember 2, 2011
+.Dd November 2, 2011
 .Dt CPUSET 3
 .Os
 .Sh NAME



CVS commit: src/external/bsd/iscsi/dist/src/lib

2011-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov  2 20:26:03 UTC 2011

Modified Files:
src/external/bsd/iscsi/dist/src/lib: libiscsi.3

Log Message:
Use standard section names.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/iscsi/dist/src/lib/libiscsi.3

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

Modified files:

Index: src/external/bsd/iscsi/dist/src/lib/libiscsi.3
diff -u src/external/bsd/iscsi/dist/src/lib/libiscsi.3:1.5 src/external/bsd/iscsi/dist/src/lib/libiscsi.3:1.6
--- src/external/bsd/iscsi/dist/src/lib/libiscsi.3:1.5	Wed Nov  2 16:45:00 2011
+++ src/external/bsd/iscsi/dist/src/lib/libiscsi.3	Wed Nov  2 20:26:03 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: libiscsi.3,v 1.5 2011/11/02 16:45:00 yamt Exp $
+.\ $NetBSD: libiscsi.3,v 1.6 2011/11/02 20:26:03 wiz Exp $
 .\
 .\ Copyright (c) 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -158,5 +158,5 @@ This programmatic interface to the
 iSCSI subsystem
 first appeared in
 .Nx 6.0 .
-.Sh AUTHOR
+.Sh AUTHORS
 .An Alistair Crooks Aq a...@netbsd.org .



CVS commit: src/usr.sbin/mountd

2011-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov  2 20:26:56 UTC 2011

Modified Files:
src/usr.sbin/mountd: mountd.8

Log Message:
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/usr.sbin/mountd/mountd.8

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

Modified files:

Index: src/usr.sbin/mountd/mountd.8
diff -u src/usr.sbin/mountd/mountd.8:1.34 src/usr.sbin/mountd/mountd.8:1.35
--- src/usr.sbin/mountd/mountd.8:1.34	Wed Nov  2 18:12:54 2011
+++ src/usr.sbin/mountd/mountd.8	Wed Nov  2 20:26:56 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: mountd.8,v 1.34 2011/11/02 18:12:54 christos Exp $
+.\	$NetBSD: mountd.8,v 1.35 2011/11/02 20:26:56 wiz Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -81,15 +81,17 @@ string,
 as described in
 .Xr ipsec_set_policy 3 .
 Multiple IPsec policy strings may be specified by using a semicolon as
-a separator. If conflicting policy strings are found in a single line,
-the last string will take effect. If an invalid IPsec policy string is used
+a separator.
+If conflicting policy strings are found in a single line,
+the last string will take effect.
+If an invalid IPsec policy string is used
 .Nm
 logs an error message and terminates itself.
 .It Fl p Ar port
 Force
 .Nm
-to bind to the given port. If this
-option is not given,
+to bind to the given port.
+If this option is not given,
 .Nm
 may bind to every anonymous port
 (in the range 600-1023) which causes trouble when trying to use



CVS commit: src/usr.sbin/mountd

2011-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Nov  2 20:27:33 UTC 2011

Modified Files:
src/usr.sbin/mountd: mountd.8

Log Message:
Spelling.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/mountd/mountd.8

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

Modified files:

Index: src/usr.sbin/mountd/mountd.8
diff -u src/usr.sbin/mountd/mountd.8:1.35 src/usr.sbin/mountd/mountd.8:1.36
--- src/usr.sbin/mountd/mountd.8:1.35	Wed Nov  2 20:26:56 2011
+++ src/usr.sbin/mountd/mountd.8	Wed Nov  2 20:27:33 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: mountd.8,v 1.35 2011/11/02 20:26:56 wiz Exp $
+.\	$NetBSD: mountd.8,v 1.36 2011/11/02 20:27:33 wiz Exp $
 .\
 .\ Copyright (c) 1989, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -73,7 +73,7 @@ on every export.
 See
 .Xr exports 5
 for more information.
-Some operating systems (notably MacOS/X) require this option.
+Some operating systems (notably Mac OS X) require this option.
 .It Fl P Ar policy
 IPsec
 .Ar policy



CVS commit: src/lib/libterminfo

2011-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  2 20:30:00 UTC 2011

Modified Files:
src/lib/libterminfo: Makefile.hash

Log Message:
use the tools version.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libterminfo/Makefile.hash

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

Modified files:

Index: src/lib/libterminfo/Makefile.hash
diff -u src/lib/libterminfo/Makefile.hash:1.1 src/lib/libterminfo/Makefile.hash:1.2
--- src/lib/libterminfo/Makefile.hash:1.1	Wed Nov  2 13:48:53 2011
+++ src/lib/libterminfo/Makefile.hash	Wed Nov  2 16:30:00 2011
@@ -1,10 +1,11 @@
-#	$NetBSD: Makefile.hash,v 1.1 2011/11/02 17:48:53 christos Exp $
+#	$NetBSD: Makefile.hash,v 1.2 2011/11/02 20:30:00 christos Exp $
 
 PARSEDIR:=${.PARSEDIR}
 # Generate our string and hash tables
 hash.c: genhash term.h
 		@echo Generating terminfo hash
-		${HOST_SH} ${.ALLSRC}  ${.TARGET}
+		TOOL_NBPERF=${TOOL_NBPERF} TOOL_AWK=${TOOL_AWK} \
+		TOOL_SED=${TOOL_SED} ${HOST_SH} ${.ALLSRC}  ${.TARGET}
 
 termcap_hash.c: genthash termcap_map.c
 		@echo Generating termcap hash



CVS commit: [netbsd-5] src/sys/arch/xen/xen

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:30:41 UTC 2011

Modified Files:
src/sys/arch/xen/xen [netbsd-5]: xbdback_xenbus.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1682):
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.45
Guard against spurious xbdback_backend_changed() calls which would result
in the block device being opened twice. Fixes port-xen/45158,
although the underlying cause (multiple open of the same device not
properly handled any more) is not fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.20.4.6 -r1.20.4.7 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.6 src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.7
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.6	Fri Aug 12 20:48:47 2011
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Wed Nov  2 20:30:41 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.20.4.6 2011/08/12 20:48:47 riz Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.20.4.7 2011/11/02 20:30:41 riz Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20.4.6 2011/08/12 20:48:47 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20.4.7 2011/11/02 20:30:41 riz Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -674,10 +674,16 @@ xbdback_backend_changed(struct xenbus_wa
 	 */
 	if (err)
 		return;
-	if (xbdi-xbdi_status == CONNECTED  xbdi-xbdi_dev != dev) {
-		printf(xbdback %s: changing physical device from 0x%x to 
-		0x%lx not supported\n, xbusd-xbusd_path, xbdi-xbdi_dev,
-		dev);
+	/*
+	 * we can also fire up after having opened the device, don't try
+	 * to do it twice.
+	 */
+	if (xbdi-xbdi_vp != NULL) {
+		if (xbdi-xbdi_status == CONNECTED  xbdi-xbdi_dev != dev) {
+			printf(xbdback %s: changing physical device from 
+			0x%x to 0x%lx not supported\n,
+			xbusd-xbusd_path, xbdi-xbdi_dev, dev);
+		}
 		return;
 	}
 	xbdi-xbdi_dev = dev;



CVS commit: [netbsd-5-0] src/sys/arch/xen/xen

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:31:18 UTC 2011

Modified Files:
src/sys/arch/xen/xen [netbsd-5-0]: xbdback_xenbus.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1682):
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.45
Guard against spurious xbdback_backend_changed() calls which would result
in the block device being opened twice. Fixes port-xen/45158,
although the underlying cause (multiple open of the same device not
properly handled any more) is not fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.6.1 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.20 src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.6.1
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.20	Fri Oct 24 18:02:58 2008
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Wed Nov  2 20:31:18 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.20 2008/10/24 18:02:58 jym Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.20.6.1 2011/11/02 20:31:18 riz Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20 2008/10/24 18:02:58 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20.6.1 2011/11/02 20:31:18 riz Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -624,10 +624,16 @@ xbdback_backend_changed(struct xenbus_wa
 	 */
 	if (err)
 		return;
-	if (xbdi-xbdi_status == CONNECTED  xbdi-xbdi_dev != dev) {
-		printf(xbdback %s: changing physical device from 0x%x to 
-		0x%lx not supported\n, xbusd-xbusd_path, xbdi-xbdi_dev,
-		dev);
+	/*
+	 * we can also fire up after having opened the device, don't try
+	 * to do it twice.
+	 */
+	if (xbdi-xbdi_vp != NULL) {
+		if (xbdi-xbdi_status == CONNECTED  xbdi-xbdi_dev != dev) {
+			printf(xbdback %s: changing physical device from 
+			0x%x to 0x%lx not supported\n,
+			xbusd-xbusd_path, xbdi-xbdi_dev, dev);
+		}
 		return;
 	}
 	xbdi-xbdi_dev = dev;



CVS commit: [netbsd-5-1] src/sys/arch/xen/xen

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:31:40 UTC 2011

Modified Files:
src/sys/arch/xen/xen [netbsd-5-1]: xbdback_xenbus.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1682):
sys/arch/xen/xen/xbdback_xenbus.c: revision 1.45
Guard against spurious xbdback_backend_changed() calls which would result
in the block device being opened twice. Fixes port-xen/45158,
although the underlying cause (multiple open of the same device not
properly handled any more) is not fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.20.4.3.2.2 -r1.20.4.3.2.3 \
src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.3.2.2 src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.3.2.3
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.20.4.3.2.2	Sat Jun 18 16:39:10 2011
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Wed Nov  2 20:31:40 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.2 2011/06/18 16:39:10 bouyer Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.3 2011/11/02 20:31:40 riz Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.2 2011/06/18 16:39:10 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.20.4.3.2.3 2011/11/02 20:31:40 riz Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -673,10 +673,16 @@ xbdback_backend_changed(struct xenbus_wa
 	 */
 	if (err)
 		return;
-	if (xbdi-xbdi_status == CONNECTED  xbdi-xbdi_dev != dev) {
-		printf(xbdback %s: changing physical device from 0x%x to 
-		0x%lx not supported\n, xbusd-xbusd_path, xbdi-xbdi_dev,
-		dev);
+	/*
+	 * we can also fire up after having opened the device, don't try
+	 * to do it twice.
+	 */
+	if (xbdi-xbdi_vp != NULL) {
+		if (xbdi-xbdi_status == CONNECTED  xbdi-xbdi_dev != dev) {
+			printf(xbdback %s: changing physical device from 
+			0x%x to 0x%lx not supported\n,
+			xbusd-xbusd_path, xbdi-xbdi_dev, dev);
+		}
 		return;
 	}
 	xbdi-xbdi_dev = dev;



CVS commit: [netbsd-5-1] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:31:52 UTC 2011

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.1

Log Message:
Ticket 1682.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/doc/CHANGES-5.1.1

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-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.36 src/doc/CHANGES-5.1.1:1.1.2.37
--- src/doc/CHANGES-5.1.1:1.1.2.36	Wed Nov  2 20:24:31 2011
+++ src/doc/CHANGES-5.1.1	Wed Nov  2 20:31:52 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.36 2011/11/02 20:24:31 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.37 2011/11/02 20:31:52 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2546,3 +2546,10 @@ sys/conf/osrelease.sh1.116-1.117
 	Fix module path logic for release branches.
 	[jmcneill, ticket #1681]
 
+sys/arch/xen/xen/xbdback_xenbus.c		1.45 via patch
+
+	Guard against spurious xbdback_backend_changed() calls which
+	would result in the block device being opened twice, and a
+	panic. PR#45158.
+	[bouyer, ticket #1682]
+



CVS commit: src/tools

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 20:33:18 UTC 2011

Modified Files:
src/tools: Makefile

Log Message:
tweak dependencies for tic, which needs nbperf, awk, and sed.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.151 src/tools/Makefile:1.152
--- src/tools/Makefile:1.151	Tue Nov  1 23:11:55 2011
+++ src/tools/Makefile	Wed Nov  2 20:33:18 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.151 2011/11/01 23:11:55 joerg Exp $
+#	$NetBSD: Makefile,v 1.152 2011/11/02 20:33:18 yamt Exp $
 
 .include bsd.own.mk
 
@@ -48,7 +48,7 @@ SUBDIR=	host-mkdep .WAIT compat .WAIT \
 	binstall .WAIT mktemp .WAIT sed .WAIT \
 		cap_mkdb crunchgen ctags genassym gencat hexdump join \
 		${LINT_BITS} \
-		lorder makewhatis mkdep mtree nbperf rpcgen tic tsort \
+		lorder makewhatis mkdep mtree nbperf .WAIT rpcgen tsort \
 		uudecode m4 \
 	.WAIT texinfo \
 	.WAIT yacc \
@@ -64,7 +64,7 @@ SUBDIR=	host-mkdep .WAIT compat .WAIT \
 		.WAIT paxctl \
 		.WAIT fdisk \
 		.WAIT installboot \
-		pwd_mkdb stat strfile sunlabel zic
+		pwd_mkdb stat strfile sunlabel zic tic
 
 .if ${MKLLVM} != no
 SUBDIR+= \



CVS commit: src/tools

2011-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  2 20:36:41 UTC 2011

Modified Files:
src/tools: Makefile

Log Message:
move tic later, after all the tools it needs are built.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.152 src/tools/Makefile:1.153
--- src/tools/Makefile:1.152	Wed Nov  2 16:33:18 2011
+++ src/tools/Makefile	Wed Nov  2 16:36:41 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.152 2011/11/02 20:33:18 yamt Exp $
+#	$NetBSD: Makefile,v 1.153 2011/11/02 20:36:41 christos Exp $
 
 .include bsd.own.mk
 
@@ -53,6 +53,7 @@ SUBDIR=	host-mkdep .WAIT compat .WAIT \
 	.WAIT texinfo \
 	.WAIT yacc \
 	.WAIT awk \
+	.WAIT tic \
 	.WAIT lex \
 	.WAIT pax \
 	.WAIT ${TOOLCHAIN_BITS} \



CVS commit: [netbsd-5] src/external/ibm-public/postfix/dist

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:39:02 UTC 2011

Modified Files:
src/external/ibm-public/postfix/dist [netbsd-5]: HISTORY
src/external/ibm-public/postfix/dist/src/global [netbsd-5]:
mail_version.h mime_state.c
src/external/ibm-public/postfix/dist/src/master [netbsd-5]:
master_avail.c
src/external/ibm-public/postfix/dist/src/smtpd [netbsd-5]: smtpd.c
smtpd_proxy.c

Log Message:
Apply patch (requested by tron in ticket #1686):

external/ibm-public/postfix/dist/HISTORYpatch
external/ibm-public/postfix/dist/src/global/mail_version.h patch
external/ibm-public/postfix/dist/src/global/mime_state.c patch
external/ibm-public/postfix/dist/src/master/master_avail.c patch
external/ibm-public/postfix/dist/src/smtpd/smtpd.c patch
external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c patch

Update Postfix 2.7.7. Changes since version 2.7.6:
- The Postfix SMTP daemon sent bare newline characters
  instead of CRLF when a header_checks REJECT pattern
  matched multi-line header. This bug was introduced with
  Postfix 1.1.
- The Postfix SMTP daemon sent bare newline characters
  instead of CRLF when an smtpd_proxy_filter returned a
  multi-line response. This bug was introduced with Postfix
  2.1.
- For compatibility with future EAI (email address
  internationalization) implementations, the Postfix MIME
  processor no longer enforces the strict_mime_encoding_domain
  check on unknown message subtypes such as
  message/global*. This check is disabled by default.
- The Postfix master daemon could report a panic error
  (master_spawn: at process limit) after the process limit
  for some service was reduced with postfix reload. This bug
  existed in all Postfix versions.
[tron, ticket #1686]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2.2.8 -r1.1.1.2.2.9 \
src/external/ibm-public/postfix/dist/HISTORY
cvs rdiff -u -r1.1.1.2.2.8 -r1.1.1.2.2.9 \
src/external/ibm-public/postfix/dist/src/global/mail_version.h
cvs rdiff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 \
src/external/ibm-public/postfix/dist/src/global/mime_state.c
cvs rdiff -u -r1.1.1.1.2.4 -r1.1.1.1.2.5 \
src/external/ibm-public/postfix/dist/src/master/master_avail.c
cvs rdiff -u -r1.2.2.5 -r1.2.2.6 \
src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c
cvs rdiff -u -r1.1.1.1.2.4 -r1.1.1.1.2.5 \
src/external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c

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

Modified files:

Index: src/external/ibm-public/postfix/dist/HISTORY
diff -u src/external/ibm-public/postfix/dist/HISTORY:1.1.1.2.2.8 src/external/ibm-public/postfix/dist/HISTORY:1.1.1.2.2.9
--- src/external/ibm-public/postfix/dist/HISTORY:1.1.1.2.2.8	Sat Sep 17 18:57:32 2011
+++ src/external/ibm-public/postfix/dist/HISTORY	Wed Nov  2 20:39:01 2011
@@ -15956,3 +15956,36 @@ Apologies for any names omitted.
 	Bugfix: allow for Milters that send an SMTP server reply
 	without RFC 3463 enhanced status code. Reported by Vladimir
 	Vassiliev.  File: milter/milter8.c.
+
+20110903
+
+	Bugfix: master daemon panic with master_spawn: at process
+	limit error, when postfix reload reduced the process
+	limit from (a value larger than the current process count
+	for some service) to (a value = the current process count),
+	and then a new connection was made to that service.  This
+	is the smallest change that eliminates the problem. The
+	final solution involves structural change, and goes into
+	the development release. File: master/master_avail.c.
+
+20110921
+
+	Bugfix (introduced: Postfix 1.1): smtpd(8) did not sanitize
+	newline characters in cleanup(8) REJECT messages, causing
+	them to be sent out via SMTP as bare newline characters.
+	This happened when a REJECT pattern matched multi-line
+	header text.  Discovered by Kevin Locke.  File: smtpd/smtpd.c.
+
+20110922
+
+	Bugfix (introduced: Postfix 2.1): smtpd(8) sent multi-line
+	responses from a before-queue content filter as text with
+	bare LF instead of CRLF.  Found during code maintenance.
+	File: smtpd/smtpd_proxy.c.
+
+20111020
+
+	EAI Future-proofing: don't apply strict_mime_encoding_domain
+	checks to unknown message subtypes such as message/global*.
+	File: global/mime_state.c.
+

Index: src/external/ibm-public/postfix/dist/src/global/mail_version.h
diff -u src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.2.2.8 src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.2.2.9
--- src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.2.2.8	Sat Sep 17 18:57:34 2011
+++ src/external/ibm-public/postfix/dist/src/global/mail_version.h	Wed Nov  2 20:39:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mail_version.h,v 1.1.1.2.2.8 2011/09/17 

CVS commit: src/lib/libterminfo

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 20:39:41 UTC 2011

Modified Files:
src/lib/libterminfo: Makefile Makefile.hash

Log Message:
use the tools version of utilities for other scripts, too


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/lib/libterminfo/Makefile
cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/Makefile.hash

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

Modified files:

Index: src/lib/libterminfo/Makefile
diff -u src/lib/libterminfo/Makefile:1.19 src/lib/libterminfo/Makefile:1.20
--- src/lib/libterminfo/Makefile:1.19	Wed Nov  2 17:48:53 2011
+++ src/lib/libterminfo/Makefile	Wed Nov  2 20:39:41 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.19 2011/11/02 17:48:53 christos Exp $
+#	$NetBSD: Makefile,v 1.20 2011/11/02 20:39:41 yamt Exp $
 
 .include bsd.own.mk
 
@@ -44,9 +44,9 @@ term.c: compiled_terms.c
 termcap.c: termcap_hash.c
 
 # Generate our man pages
-terminfo.5: terminfo.5.in term.h termcap_map.c
+terminfo.5: genman terminfo.5.in term.h termcap_map.c
 		@echo Generating terminfo man pages
-		cd ${.CURDIR}  ${HOST_SH} ./genman ${.OBJDIR}/$@
+		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}  ${.TARGET}
 
 CLEANFILES+=	terminfo.5
 

Index: src/lib/libterminfo/Makefile.hash
diff -u src/lib/libterminfo/Makefile.hash:1.2 src/lib/libterminfo/Makefile.hash:1.3
--- src/lib/libterminfo/Makefile.hash:1.2	Wed Nov  2 20:30:00 2011
+++ src/lib/libterminfo/Makefile.hash	Wed Nov  2 20:39:41 2011
@@ -1,20 +1,25 @@
-#	$NetBSD: Makefile.hash,v 1.2 2011/11/02 20:30:00 christos Exp $
+#	$NetBSD: Makefile.hash,v 1.3 2011/11/02 20:39:41 yamt Exp $
+
+SCRIPT_ENV=	\
+	TOOL_AWK=${TOOL_AWK:Q} \
+	TOOL_NBPERF=${TOOL_NBPERF:Q} \
+	TOOL_SED=${TOOL_SED:Q} \
+	TOOL_SORT=${TOOL_SORT:Q} \
+	TOOL_TIC=${TOOL_TIC:Q}
 
 PARSEDIR:=${.PARSEDIR}
 # Generate our string and hash tables
 hash.c: genhash term.h
 		@echo Generating terminfo hash
-		TOOL_NBPERF=${TOOL_NBPERF} TOOL_AWK=${TOOL_AWK} \
-		TOOL_SED=${TOOL_SED} ${HOST_SH} ${.ALLSRC}  ${.TARGET}
+		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}  ${.TARGET}
 
 termcap_hash.c: genthash termcap_map.c
 		@echo Generating termcap hash
-		${HOST_SH} ${.ALLSRC}  ${.TARGET}
-
+		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}  ${.TARGET}
 
 # Allow terminfo descriptions to be compiled into libterminfo
 compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo
 		@echo Generating compiled terminfo descriptions
-		${HOST_SH} ${.ALLSRC}  ${.TARGET}
+		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}  ${.TARGET}
 
 CLEANFILES+=	hash.c termcap_hash.c compiled_terms.c



CVS commit: [netbsd-5] src/doc

2011-11-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Wed Nov  2 20:42:34 UTC 2011

Modified Files:
src/doc [netbsd-5]: CHANGES-5.2

Log Message:
Tickets 1665, 1674, 1676-1682, 1685-1686.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.106 -r1.1.2.107 src/doc/CHANGES-5.2

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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.106 src/doc/CHANGES-5.2:1.1.2.107
--- src/doc/CHANGES-5.2:1.1.2.106	Wed Nov  2 18:18:03 2011
+++ src/doc/CHANGES-5.2	Wed Nov  2 20:42:34 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.106 2011/11/02 18:18:03 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.107 2011/11/02 20:42:34 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5680,3 +5680,75 @@ share/zoneinfo/zone.tab			patch
 	Update to tzdata2011n.
 	[apb, ticket #1684]
 
+bin/sh/expand.c	1.85
+
+	Fix shell backquotes. PR#45269.
+	[christos, ticket #1665]
+
+sys/dev/ic/ciss.c1.25
+
+	Fix a DIAGNOSTIC panic in the ciss(4) driver.
+	[mhitch, ticket #1674]
+
+tools/compat/configure1.71
+tools/compat/configure.ac			1.71
+tools/compat/nbtool_config.h.in			1.24
+
+	Test for sys/endian.h and provide HAVE_SYS_ENDIAN_H.
+	Fixes FreeBSD hosted builds (PR 42440 and PR 42470).
+	[tsutsui, ticket #1676]
+
+libexec/tftpd/tftpd.81.22-1.24
+libexec/tftpd/tftpd.c1.32-1.34
+
+	Add -p pathsep option to tftpd.
+	[bouyer, ticket #1677]
+
+share/termcap/termcap.src		patch
+
+	Add minimal termcap entry for MacOS X Lion users.
+	[spz, ticket #1678]
+
+sys/fs/puffs/puffs_msgif.c			patch
+sys/fs/puffs/puffs_node.c			patch
+sys/fs/puffs/puffs_vfsops.c			patch
+sys/fs/puffs/puffs_vnops.c			patch
+
+	
+	Make sure pagedaemon does not sleep for memory. Avoids
+	deadlocks.
+	[manu, ticket #1679]
+
+gnu/usr.bin/binutils/gas/Makefile		patch
+	
+	Fix build on arm with USE_SSP set.
+	[mrg, ticket #1680]
+
+distrib/sets/sets.subr1.133
+sys/conf/osrelease.sh1.116-1.117
+
+	Fix module path logic for release branches.
+	[jmcneill, ticket #1681]
+
+sys/arch/xen/xen/xbdback_xenbus.c		1.45 via patch
+
+	Guard against spurious xbdback_backend_changed() calls which
+	would result in the block device being opened twice, and a
+	panic. PR#45158.
+	[bouyer, ticket #1682]
+
+sys/arch/xen/xen/xbdback_xenbus.c		1.48
+
+	Fix bogus KASSERT which triggers under Xen 4.
+	[bouyer, ticket #1685]
+
+external/ibm-public/postfix/dist/HISTORY			patch
+external/ibm-public/postfix/dist/src/global/mail_version.h	patch
+external/ibm-public/postfix/dist/src/global/mime_state.c	patch
+external/ibm-public/postfix/dist/src/master/master_avail.c	patch
+external/ibm-public/postfix/dist/src/smtpd/smtpd.c		patch
+external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c	patch
+
+	Update Postfix to version 2.7.7.
+	[tron, ticket #1686]
+



CVS commit: [yamt-pagecache] src/sys/uvm

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 21:55:39 UTC 2011

Added Files:
src/sys/uvm [yamt-pagecache]: uvm_page_array.c uvm_page_array.h
uvm_page_status.c

Log Message:
page cache related changes

- maintain object pages in radix tree rather than rb tree.
- reduce unnecessary page scan in putpages.  esp. when an object has a ton of
  pages cached but only a few of them are dirty.
- reduce the number of pmap operations by tracking page dirtiness more
  precisely in uvm layer.
- fix nfs commit range tracking.
- fix nfs write clustering.  XXX hack


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/sys/uvm/uvm_page_array.c \
src/sys/uvm/uvm_page_array.h src/sys/uvm/uvm_page_status.c

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

Added files:

Index: src/sys/uvm/uvm_page_array.c
diff -u /dev/null src/sys/uvm/uvm_page_array.c:1.1.2.1
--- /dev/null	Wed Nov  2 21:55:39 2011
+++ src/sys/uvm/uvm_page_array.c	Wed Nov  2 21:55:39 2011
@@ -0,0 +1,163 @@
+/*	$NetBSD: uvm_page_array.c,v 1.1.2.1 2011/11/02 21:55:39 yamt Exp $	*/
+
+/*-
+ * Copyright (c)2011 YAMAMOTO Takashi,
+ * 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 AUTHOR 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 AUTHOR 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.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: uvm_page_array.c,v 1.1.2.1 2011/11/02 21:55:39 yamt Exp $);
+
+#include sys/param.h
+#include sys/systm.h
+
+#include uvm/uvm_extern.h
+#include uvm/uvm_object.h
+#include uvm/uvm_page.h
+#include uvm/uvm_page_array.h
+
+/*
+ * uvm_page_array_init: initialize the array.
+ */
+
+void
+uvm_page_array_init(struct uvm_page_array *ar)
+{
+
+	ar-ar_idx = ar-ar_npages = 0;
+}
+
+/*
+ * uvm_page_array_fini: clean up the array.
+ */
+
+void
+uvm_page_array_fini(struct uvm_page_array *ar)
+{
+
+	/*
+	 * currently nothing to do.
+	 */
+#if defined(DIAGNOSTIC)
+	/*
+	 * poison to trigger assertion in uvm_page_array_peek to
+	 * detect usage errors.
+	 */
+	ar-ar_npages = 1;
+	ar-ar_idx = 1000;
+#endif /* defined(DIAGNOSTIC) */
+}
+
+/*
+ * uvm_page_array_clear: forget the cached pages and initialize the array.
+ */
+
+void
+uvm_page_array_clear(struct uvm_page_array *ar)
+{
+
+	KASSERT(ar-ar_idx = ar-ar_npages);
+	uvm_page_array_init(ar);
+}
+
+/*
+ * uvm_page_array_peek: return the next cached page.
+ */
+
+struct vm_page *
+uvm_page_array_peek(struct uvm_page_array *ar)
+{
+
+	KASSERT(ar-ar_idx = ar-ar_npages);
+	if (ar-ar_idx == ar-ar_npages) {
+		return NULL;
+	}
+	return ar-ar_pages[ar-ar_idx];
+}
+
+/*
+ * uvm_page_array_advance: advance the array to the next cached page
+ */
+
+void
+uvm_page_array_advance(struct uvm_page_array *ar)
+{
+
+	KASSERT(ar-ar_idx = ar-ar_npages);
+	ar-ar_idx++;
+	KASSERT(ar-ar_idx = ar-ar_npages);
+}
+
+/*
+ * uvm_page_array_fill: lookup pages and keep them cached.
+ *
+ * return 0 on success.  in that case, cache the result in the array
+ * so that they will be picked by later uvm_page_array_peek.
+ *
+ * return ENOENT if no pages are found.
+ *
+ * called with object lock held.
+ */
+
+int
+uvm_page_array_fill(struct uvm_page_array *ar, struct uvm_object *uobj,
+voff_t off, bool dirtyonly)
+{
+	unsigned int npages;
+#if defined(DEBUG)
+	unsigned int i;
+#endif /* defined(DEBUG) */
+	const unsigned int maxpages = __arraycount(ar-ar_pages);
+
+	KASSERT(mutex_owned(uobj-vmobjlock));
+	KASSERT(uvm_page_array_peek(ar) == NULL);
+	if (dirtyonly) {
+		npages = radix_tree_gang_lookup_tagged_node(
+		uobj-uo_pages, off  PAGE_SHIFT,
+		(void **)ar-ar_pages, maxpages,
+		UVM_PAGE_DIRTY_TAG);
+	} else {
+		npages = radix_tree_gang_lookup_node(
+		uobj-uo_pages, off  PAGE_SHIFT,
+		(void **)ar-ar_pages, maxpages);
+	}
+	

CVS commit: [yamt-pagecache] src/share/man/man4

2011-11-02 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Wed Nov  2 21:58:07 UTC 2011

Modified Files:
src/share/man/man4 [yamt-pagecache]: mpls.4

Log Message:
revert rev.1.7.2.1 which was mistakenly committed


To generate a diff of this commit:
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/share/man/man4/mpls.4

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

Modified files:

Index: src/share/man/man4/mpls.4
diff -u src/share/man/man4/mpls.4:1.7.2.1 src/share/man/man4/mpls.4:1.7.2.2
--- src/share/man/man4/mpls.4:1.7.2.1	Wed Nov  2 21:53:58 2011
+++ src/share/man/man4/mpls.4	Wed Nov  2 21:58:07 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: mpls.4,v 1.7.2.1 2011/11/02 21:53:58 yamt Exp $
+.\ $NetBSD: mpls.4,v 1.7.2.2 2011/11/02 21:58:07 yamt Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -181,8 +181,7 @@ Create an MPLS interface and set an IP a
 # ifconfig mpls0 inet 192.168.0.1/32
 .Ed
 .It
-Route IP packets for the subnet (10.0.0.0/8) into MPLS domain with
-a specific tag (25) and the next hop LSR (192.168.1.100).
+Route IP packets into MPLS domain with a specific tag
 .Bd -literal
 # route add 10.0.0.0/8 -ifp mpls0 -tag 25 -inet 192.168.1.100
 .Ed



CVS commit: src/lib/libc/time

2011-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  2 23:06:08 UTC 2011

Modified Files:
src/lib/libc/time: ctime.3

Log Message:
document where tm_zone comes from in the _z calls.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libc/time/ctime.3

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/time/ctime.3
diff -u src/lib/libc/time/ctime.3:1.45 src/lib/libc/time/ctime.3:1.46
--- src/lib/libc/time/ctime.3:1.45	Wed Nov  2 15:59:40 2011
+++ src/lib/libc/time/ctime.3	Wed Nov  2 19:06:08 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: ctime.3,v 1.45 2011/11/02 19:59:40 apb Exp $
+.\ $NetBSD: ctime.3,v 1.46 2011/11/02 23:06:08 christos Exp $
 .\
 .\ XXX: License missing?
 .\
@@ -436,9 +436,11 @@ functions conform to
 Rest of the functions conform to
 .St -p1003.1-2008 .
 .Sh CAVEATS
-The return values point to static data; the data is overwritten by
+The functions that do not take an explicit
+.Ft timezone_t
+argument return values point to static data; the data is overwritten by
 each call.
-The
+For the above functions the
 .Fa tm_zone
 field of a returned
 .Va struct tm
@@ -446,6 +448,18 @@ points to a static array of characters, 
 will also be overwritten at the next call
 (and by calls to
 .Xr tzset 3 ) .
+The functions that do take an explicit
+.Ft timezone_t
+argument and set the fields of a supplied
+.Va struct tm
+should not call
+.Fn tzfree
+since the
+.Fa tm_zone
+field of the
+.Va struct tm
+points to data allocated by
+.Fn tzalloc .
 .Pp
 The
 .Fn asctime



CVS commit: src/external/public-domain/sqlite/dist

2011-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov  2 23:19:49 UTC 2011

Modified Files:
src/external/public-domain/sqlite/dist: sqlite3.c

Log Message:
fix vax floating point overflows.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/public-domain/sqlite/dist/sqlite3.c

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

Modified files:

Index: src/external/public-domain/sqlite/dist/sqlite3.c
diff -u src/external/public-domain/sqlite/dist/sqlite3.c:1.1.1.1 src/external/public-domain/sqlite/dist/sqlite3.c:1.2
--- src/external/public-domain/sqlite/dist/sqlite3.c:1.1.1.1	Thu Oct 13 17:38:52 2011
+++ src/external/public-domain/sqlite/dist/sqlite3.c	Wed Nov  2 19:19:48 2011
@@ -7615,10 +7615,19 @@ SQLITE_PRIVATE void sqlite3HashClear(Has
 # define SQLITE_OMIT_TRACE 1
 # undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
 # undef SQLITE_HAVE_ISNAN
+#else
+# ifdef __vax__
+#  include float.h
+#  define SQLITE_BIG_DBL DBL_MAX
+#  define SQLITE_HUGE_DBL DBL_MAX
+# endif
 #endif
 #ifndef SQLITE_BIG_DBL
 # define SQLITE_BIG_DBL (1e99)
 #endif
+#ifndef SQLITE_HUGE_DBL
+# define SQLITE_HUGE_DBL (1.0e+308)
+#endif
 
 /*
 ** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0
@@ -21000,10 +21009,10 @@ do_atof_calc:
 while( e%308 ) { scale *= 1.0e+1; e -= 1; }
 if( esign0 ){
   result = s / scale;
-  result /= 1.0e+308;
+  result /= SQLITE_HUGE_DBL;
 }else{
   result = s * scale;
-  result *= 1.0e+308;
+  result *= SQLITE_HUGE_DBL;
 }
   }else{
 /* 1.0e+22 is the largest power of 10 than can be 
@@ -130632,7 +130641,7 @@ SQLITE_API int sqlite3_extension_init(
 **May you share freely, never taking more than you give.
 **
 *
-** $Id: sqlite3.c,v 1.1.1.1 2011/10/13 21:38:52 joerg Exp $
+** $Id: sqlite3.c,v 1.2 2011/11/02 23:19:48 christos Exp $
 **
 ** This file implements an integration between the ICU library 
 ** (International Components for Unicode, an open-source library 



CVS commit: src/tools

2011-11-02 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Wed Nov  2 23:47:07 UTC 2011

Modified Files:
src/tools: Makefile

Log Message:
Do not build tic more than once


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/tools/Makefile

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.153 src/tools/Makefile:1.154
--- src/tools/Makefile:1.153	Wed Nov  2 20:36:41 2011
+++ src/tools/Makefile	Wed Nov  2 23:47:07 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.153 2011/11/02 20:36:41 christos Exp $
+#	$NetBSD: Makefile,v 1.154 2011/11/02 23:47:07 njoly Exp $
 
 .include bsd.own.mk
 
@@ -65,7 +65,7 @@ SUBDIR=	host-mkdep .WAIT compat .WAIT \
 		.WAIT paxctl \
 		.WAIT fdisk \
 		.WAIT installboot \
-		pwd_mkdb stat strfile sunlabel zic tic
+		pwd_mkdb stat strfile sunlabel zic
 
 .if ${MKLLVM} != no
 SUBDIR+= \



CVS commit: src/share/man/man7

2011-11-02 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Thu Nov  3 00:29:00 UTC 2011

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Minor typo fix.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/share/man/man7/sysctl.7

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

Modified files:

Index: src/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.67 src/share/man/man7/sysctl.7:1.68
--- src/share/man/man7/sysctl.7:1.67	Sat Sep 24 17:08:16 2011
+++ src/share/man/man7/sysctl.7	Thu Nov  3 00:29:00 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: sysctl.7,v 1.67 2011/09/24 17:08:16 christos Exp $
+.\	$NetBSD: sysctl.7,v 1.68 2011/11/03 00:29:00 jym Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -142,7 +142,7 @@ The highest valid file system type numbe
 Returns configuration information about the file system type given as a fourth
 level identifier.
 .It Li vfs.generic.usermount ( VFS_USERMOUNT )
-Determines if non superuser mounts are allowed, default to no
+Determines if non superuser mounts are allowed, defaults to
 .Dv 0 .
 .It Li vfs.generic.magiclinks ( VFS_MAGICLINKS )
 Controls if expansion of variables is going to be performed on pathnames



CVS commit: src/sys/dev/usb

2011-11-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov  3 02:41:29 UTC 2011

Modified Files:
src/sys/dev/usb: files.usb ukbd.c

Log Message:
only build gdium Fn support with options GDIUM_KEYBOARD_HACK


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.112 -r1.113 src/sys/dev/usb/ukbd.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/usb/files.usb
diff -u src/sys/dev/usb/files.usb:1.115 src/sys/dev/usb/files.usb:1.116
--- src/sys/dev/usb/files.usb:1.115	Sun Oct  2 16:30:58 2011
+++ src/sys/dev/usb/files.usb	Thu Nov  3 02:41:29 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.115 2011/10/02 16:30:58 jmcneill Exp $
+#	$NetBSD: files.usb,v 1.116 2011/11/03 02:41:29 macallan Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -79,6 +79,8 @@ file	dev/usb/uhid.c			uhid			needs-flag
 
 # Keyboards
 defparam	UKBD_LAYOUT
+# Gdium's Fn key needs software translation
+defflag		opt_ukbd.h 	GDIUM_KEYBOARD_HACK
 device	ukbd: hid, wskbddev
 attach	ukbd at uhidbus
 file	dev/usb/ukbd.c			ukbd			needs-flag

Index: src/sys/dev/usb/ukbd.c
diff -u src/sys/dev/usb/ukbd.c:1.112 src/sys/dev/usb/ukbd.c:1.113
--- src/sys/dev/usb/ukbd.c:1.112	Wed Nov  2 08:49:08 2011
+++ src/sys/dev/usb/ukbd.c	Thu Nov  3 02:41:29 2011
@@ -1,4 +1,4 @@
-/*  $NetBSD: ukbd.c,v 1.112 2011/11/02 08:49:08 macallan Exp $*/
+/*  $NetBSD: ukbd.c,v 1.113 2011/11/03 02:41:29 macallan Exp $*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ukbd.c,v 1.112 2011/11/02 08:49:08 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: ukbd.c,v 1.113 2011/11/03 02:41:29 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -66,6 +66,7 @@ __KERNEL_RCSID(0, $NetBSD: ukbd.c,v 1.1
 #include dev/wscons/wsksymvar.h
 
 #ifdef _KERNEL_OPT
+#include opt_ukbd.h
 #include opt_ukbd_layout.h
 #include opt_wsdisplay_compat.h
 #include opt_ddb.h
@@ -145,6 +146,7 @@ Static const struct ukbd_keycodetrans tr
 	{ 0x00, 0x00 }
 };
 
+#ifdef GDIUM_KEYBOARD_HACK
 Static const struct ukbd_keycodetrans trtab_gdium_fn[] = {	
 #ifdef notyet
 		{ 58, 0 },	/* F1 - toggle camera */
@@ -169,6 +171,7 @@ Static const struct ukbd_keycodetrans tr
 		{ 81, 78 },	/* down - page down */
 		{ 82, 75 }	/* up - page up */
 };
+#endif
 
 #if defined(__NetBSD__)  defined(WSDISPLAY_COMPAT_RAWKBD)
 #define NN 0			/* no translation */
@@ -423,9 +426,11 @@ ukbd_attach(device_t parent, device_t se
 	if (qflags  UQ_APPLE_ISO)
 		sc-sc_flags |= FLAG_APPLE_FIX_ISO;
 
+#ifdef GDIUM_KEYBOARD_HACK
 	if (uha-uaa-vendor == USB_VENDOR_CYPRESS 
 	uha-uaa-product == USB_PRODUCT_CYPRESS_LPRDK)
 		sc-sc_flags = FLAG_GDIUM_FN;
+#endif
 
 #ifdef DIAGNOSTIC
 	aprint_normal(: %d modifier keys, %d key codes, sc-sc_nmod,
@@ -654,12 +659,14 @@ ukbd_intr(struct uhidev *addr, void *ibu
 		else
 			sc-sc_flags = ~FLAG_FN_PRESSED;
 	}
-	
+
+#ifdef GDIUM_KEYBOARD_HACK
 	if (sc-sc_flags  FLAG_GDIUM_FN) {
 		if (sc-sc_flags  FLAG_FN_PRESSED) {
 			ukbd_translate_keycodes(sc, ud, trtab_gdium_fn);
 		}
 	}
+#endif
 
 	if ((sc-sc_flags  FLAG_DEBOUNCE)  !(sc-sc_flags  FLAG_POLLING)) {
 		/*
@@ -758,12 +765,14 @@ ukbd_decode(struct ukbd_softc *sc, struc
 if (key == ud-keycode[j])
 	goto rfound;
 			DPRINTFN(3,(ukbd_intr: relse key=0x%02x\n, key));
+#ifdef GDIUM_KEYBOARD_HACK
 			if (sc-sc_flags  FLAG_GDIUM_FN) {
 if (key == 0x82) {
 	sc-sc_flags = ~FLAG_FN_PRESSED;
 	goto rfound;
 }
 			}
+#endif
 			ADDKEY(key | RELEASE);
 		rfound:
 			;
@@ -778,12 +787,14 @@ ukbd_decode(struct ukbd_softc *sc, struc
 if (key == sc-sc_odata.keycode[j])
 	goto pfound;
 			DPRINTFN(2,(ukbd_intr: press key=0x%02x\n, key));
+#ifdef GDIUM_KEYBOARD_HACK
 			if (sc-sc_flags  FLAG_GDIUM_FN) {
 if (key == 0x82) {
 	sc-sc_flags |= FLAG_FN_PRESSED;
 	goto pfound;
 }
 			}
+#endif
 			ADDKEY(key | PRESS);
 		pfound:
 			;



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

2011-11-02 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Nov  3 02:44:36 UTC 2011

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

Log Message:
add options GDIUM_KEYBOARD_HACK


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

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/LOONGSON
diff -u src/sys/arch/evbmips/conf/LOONGSON:1.5 src/sys/arch/evbmips/conf/LOONGSON:1.6
--- src/sys/arch/evbmips/conf/LOONGSON:1.5	Fri Sep  2 22:42:27 2011
+++ src/sys/arch/evbmips/conf/LOONGSON	Thu Nov  3 02:44:36 2011
@@ -1,4 +1,4 @@
-# $NetBSD: LOONGSON,v 1.5 2011/09/02 22:42:27 macallan Exp $
+# $NetBSD: LOONGSON,v 1.6 2011/11/03 02:44:36 macallan Exp $
 #
 # LOONGSON machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/evbmips/conf/std.loongson
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GDIUM-$Revision: 1.5 $
+#ident 		GDIUM-$Revision: 1.6 $
 
 maxusers	16
 
@@ -239,6 +239,7 @@ wsmouse*	at ums? mux 0
 # USB Keyboards
 ukbd*	at uhidev? reportid ?
 wskbd*	at ukbd? console ? mux 1
+options	GDIUM_KEYBOARD_HACK	# support Fn key on Gdium
 
 # USB Generic HID devices
 uhid*	at uhidev? reportid ?