CVS commit: src/usr.bin/make

2012-06-05 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Jun  5 06:11:51 UTC 2012

Modified Files:
src/usr.bin/make: compat.c

Log Message:
Re-raising SIGINT etc, after running .INTERRUPT
provides much more reliable shutdown on some systems.
Based on CompatInterrupt in FreeBSD's make.


To generate a diff of this commit:
cvs rdiff -u -r1.86 -r1.87 src/usr.bin/make/compat.c

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

Modified files:

Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.86 src/usr.bin/make/compat.c:1.87
--- src/usr.bin/make/compat.c:1.86	Wed May 30 21:42:04 2012
+++ src/usr.bin/make/compat.c	Tue Jun  5 06:11:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.86 2012/05/30 21:42:04 sjg Exp $	*/
+/*	$NetBSD: compat.c,v 1.87 2012/06/05 06:11:51 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: compat.c,v 1.86 2012/05/30 21:42:04 sjg Exp $;
+static char rcsid[] = $NetBSD: compat.c,v 1.87 2012/06/05 06:11:51 sjg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)compat.c	8.2 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: compat.c,v 1.86 2012/05/30 21:42:04 sjg Exp $);
+__RCSID($NetBSD: compat.c,v 1.87 2012/06/05 06:11:51 sjg Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -180,7 +180,10 @@ CompatInterrupt(int signo)
 	}
 
 }
-_exit(signo);
+if (signo == SIGQUIT)
+	_exit(signo);
+bmake_signal(signo, SIG_DFL);
+raise(signo);
 }
 
 /*-



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

2012-06-05 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Jun  5 08:41:36 UTC 2012

Modified Files:
src/sys/arch/vax/conf: GENERIC

Log Message:
If a port is going to have wscons for virtual terminals then it really makes
sense to enable WSDISPLAY_COMPAT_USL so the system can switch between the
virtual terminals...


To generate a diff of this commit:
cvs rdiff -u -r1.180 -r1.181 src/sys/arch/vax/conf/GENERIC

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/vax/conf/GENERIC
diff -u src/sys/arch/vax/conf/GENERIC:1.180 src/sys/arch/vax/conf/GENERIC:1.181
--- src/sys/arch/vax/conf/GENERIC:1.180	Sat Mar 10 21:51:57 2012
+++ src/sys/arch/vax/conf/GENERIC	Tue Jun  5 08:41:36 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.180 2012/03/10 21:51:57 joerg Exp $
+# $NetBSD: GENERIC,v 1.181 2012/06/05 08:41:36 abs Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/vax/conf/std.vax
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.180 $
+#ident 		GENERIC-$Revision: 1.181 $
 
 # Here are all different supported CPU types listed.
 #options 	VAX8800		# VAX 8500, 8530, 8550, 8700, 8800
@@ -128,6 +128,7 @@ options 	NFS_BOOT_BOOTPARAM	# Use the Su
 # WS console uses VT100 terminal emulation
 options 	WSEMUL_VT100
 options 	WSDISPLAY_DEFAULTSCREENS=8
+options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
 options 	FONT_QVSS8x15
 
 # System V shared memory  semaphores support.



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

2012-06-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun  5 08:44:22 UTC 2012

Modified Files:
src/tests/lib/libc/sys: Makefile t_mincore.c

Log Message:
Try to estimate the number of locked pages the mincore() test will need and
check it against resource limits, skipping the tests if it probably is too
low.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/sys/t_mincore.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/Makefile
diff -u src/tests/lib/libc/sys/Makefile:1.23 src/tests/lib/libc/sys/Makefile:1.24
--- src/tests/lib/libc/sys/Makefile:1.23	Mon May 21 14:15:19 2012
+++ src/tests/lib/libc/sys/Makefile	Tue Jun  5 08:44:21 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2012/05/21 14:15:19 martin Exp $
+# $NetBSD: Makefile,v 1.24 2012/06/05 08:44:21 martin Exp $
 
 MKMAN=	no
 
@@ -66,6 +66,7 @@ SRCS.t_mprotect=	t_mprotect.c ${SRCS_EXE
 
 LDADD.t_getpid+=-lpthread
 LDADD.t_posix_fadvise+= -lrumpvfs -lrump -lrumpuser -lpthread
+LDADD.t_mincore+=	-lkvm
 
 WARNS=			4
 

Index: src/tests/lib/libc/sys/t_mincore.c
diff -u src/tests/lib/libc/sys/t_mincore.c:1.5 src/tests/lib/libc/sys/t_mincore.c:1.6
--- src/tests/lib/libc/sys/t_mincore.c:1.5	Wed May 23 16:08:32 2012
+++ src/tests/lib/libc/sys/t_mincore.c	Tue Jun  5 08:44:21 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_mincore.c,v 1.5 2012/05/23 16:08:32 martin Exp $ */
+/* $NetBSD: t_mincore.c,v 1.6 2012/06/05 08:44:21 martin Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__RCSID($NetBSD: t_mincore.c,v 1.5 2012/05/23 16:08:32 martin Exp $);
+__RCSID($NetBSD: t_mincore.c,v 1.6 2012/06/05 08:44:21 martin Exp $);
 
 #include sys/mman.h
 #include sys/shm.h
@@ -67,10 +67,13 @@ __RCSID($NetBSD: t_mincore.c,v 1.5 2012
 #include atf-c.h
 #include errno.h
 #include fcntl.h
+#include kvm.h
 #include stdio.h
 #include stdlib.h
 #include string.h
 #include unistd.h
+#include sys/resource.h
+#include sys/sysctl.h
 
 static long		page = 0;
 static const char	path[] = mincore;
@@ -101,6 +104,28 @@ check_residency(void *addr, size_t npgs)
 	return resident;
 }
 
+/*
+ * Get an estimate of the current VM size
+ */
+static size_t
+vm_cur_pages(void)
+{
+	size_t res = 0;
+	kvm_t *kvm;
+	struct kinfo_proc2 *pi;
+	int cnt;
+
+	kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, getprogname());
+	if (kvm == NULL)
+		return 0;
+	pi = kvm_getproc2(kvm, KERN_PROC_PID, getpid(), sizeof(*pi), cnt);
+	if (pi  cnt = 1)
+		res = pi[0].p_vm_vsize;
+	kvm_close(kvm);
+
+	return res;
+}
+
 ATF_TC(mincore_err);
 ATF_TC_HEAD(mincore_err, tc)
 {
@@ -142,6 +167,25 @@ ATF_TC_BODY(mincore_resid, tc)
 	size_t npgs = 0;
 	struct stat st;
 	int fd, rv;
+	struct rlimit rlim;
+	size_t needed_pages, limit_pages;
+
+	ATF_REQUIRE(getrlimit(RLIMIT_MEMLOCK, rlim) == 0);
+	limit_pages = rlim.rlim_cur / page;
+	/*
+	 * We can not exactly predict the number of pages resulting from
+	 * the test and the mlockall() call below.
+	 * Get a safe upper bound instead...
+	 */
+	needed_pages = vm_cur_pages();
+	/* we certainly will gow  by 128 pages */
+	needed_pages += 128;
+	/* add a bit of safety room */
+	needed_pages += 12;
+
+	if (needed_pages = limit_pages)
+		atf_tc_skip(too low limits on locked memory (may need %zu 
+		pages, limit is %zu pages), needed_pages, limit_pages);
 
 	(void)memset(st, 0, sizeof(struct stat));
 



CVS commit: src/sys/arch

2012-06-05 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Jun  5 08:44:16 UTC 2012

Modified Files:
src/sys/arch/amd64/conf: GENERIC XEN3_DOM0
src/sys/arch/atari/conf: MILAN.in
src/sys/arch/bebox/conf: GENERIC INSTALL
src/sys/arch/cats/conf: GENERIC INSTALL
src/sys/arch/evbarm/conf: ARMADILLO9 BEAGLEBOARD HPT5325 MMNET_GENERIC
MPCSA_GENERIC NETWALKER TS7200
src/sys/arch/evbppc/conf: EXPLORA451 VIRTEX_DFC VIRTEX_GSRD1
VIRTEX_GSRD2
src/sys/arch/hp700/conf: GENERIC
src/sys/arch/hpcmips/conf: GENERIC MPC303 TX3912 TX3922 VR41XX
src/sys/arch/hpcsh/conf: GENERIC
src/sys/arch/i386/conf: ALL GENERIC GENERIC_TINY INSTALL_FLOPPY
INSTALL_TINY XEN3_DOM0
src/sys/arch/netwinder/conf: GENERIC
src/sys/arch/next68k/conf: GENERIC SLAB
src/sys/arch/prep/conf: GENERIC
src/sys/arch/shark/conf: GENERIC INSTALL
src/sys/arch/sparc/conf: KRUPS TADPOLE3GX
src/sys/arch/sparc64/conf: GENERIC
src/sys/arch/zaurus/conf: GENERIC

Log Message:
Adjust the WSDISPLAY_COMPAT_USL comment to mention wsconscfg, to at least
give a hint that its not just for third party compat. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.355 -r1.356 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/atari/conf/MILAN.in
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/bebox/conf/GENERIC
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/bebox/conf/INSTALL
cvs rdiff -u -r1.139 -r1.140 src/sys/arch/cats/conf/GENERIC
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/cats/conf/INSTALL
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/evbarm/conf/ARMADILLO9
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbarm/conf/BEAGLEBOARD
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/HPT5325
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/MMNET_GENERIC
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/conf/NETWALKER
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/evbarm/conf/TS7200
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/evbppc/conf/EXPLORA451
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/evbppc/conf/VIRTEX_DFC
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbppc/conf/VIRTEX_GSRD1
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbppc/conf/VIRTEX_GSRD2
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/hp700/conf/GENERIC
cvs rdiff -u -r1.215 -r1.216 src/sys/arch/hpcmips/conf/GENERIC
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/hpcmips/conf/MPC303
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/hpcmips/conf/TX3912
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/hpcmips/conf/TX3922
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/hpcmips/conf/VR41XX
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/hpcsh/conf/GENERIC
cvs rdiff -u -r1.338 -r1.339 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1073 -r1.1074 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/i386/conf/GENERIC_TINY
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/conf/INSTALL_FLOPPY
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/i386/conf/INSTALL_TINY
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/i386/conf/XEN3_DOM0
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/netwinder/conf/GENERIC
cvs rdiff -u -r1.126 -r1.127 src/sys/arch/next68k/conf/GENERIC
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/next68k/conf/SLAB
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/prep/conf/GENERIC
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/shark/conf/GENERIC
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/shark/conf/INSTALL
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/sparc/conf/KRUPS
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/sparc/conf/TADPOLE3GX
cvs rdiff -u -r1.150 -r1.151 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/zaurus/conf/GENERIC

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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.355 src/sys/arch/amd64/conf/GENERIC:1.356
--- src/sys/arch/amd64/conf/GENERIC:1.355	Wed May 30 14:30:34 2012
+++ src/sys/arch/amd64/conf/GENERIC	Tue Jun  5 08:44:07 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.355 2012/05/30 14:30:34 nonaka Exp $
+# $NetBSD: GENERIC,v 1.356 2012/06/05 08:44:07 abs Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include	arch/amd64/conf/std.amd64
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.355 $
+#ident 		GENERIC-$Revision: 1.356 $
 
 maxusers	64		# estimated number of users
 
@@ -231,7 +231,7 @@ options 	WS_KERNEL_FG=WSCOL_GREEN
 # compatibility to other console drivers
 options 	WSDISPLAY_COMPAT_PCVT		# emulate some ioctls
 options 	WSDISPLAY_COMPAT_SYSCONS	# emulate some ioctls
-options 	WSDISPLAY_COMPAT_USL		# VT handling
+options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
 options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
 # don't attach pckbd as 

CVS commit: src/share/man/man4

2012-06-05 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Tue Jun  5 08:49:16 UTC 2012

Modified Files:
src/share/man/man4: wscons.4

Log Message:
Mention wsconscfg(8) needs WSDISPLAY_COMPAT_USL


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/wscons.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/wscons.4
diff -u src/share/man/man4/wscons.4:1.30 src/share/man/man4/wscons.4:1.31
--- src/share/man/man4/wscons.4:1.30	Sat Apr 21 12:27:28 2012
+++ src/share/man/man4/wscons.4	Tue Jun  5 08:49:16 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: wscons.4,v 1.30 2012/04/21 12:27:28 roy Exp $
+.\ $NetBSD: wscons.4,v 1.31 2012/06/05 08:49:16 abs Exp $
 .\
 .\ Copyright (c) 1999, 2004 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd April 5, 2012
+.Dd June 5, 2012
 .Dt WSCONS 4
 .Os
 .Sh NAME
@@ -185,7 +185,7 @@ or if no emulation type was passed to th
 utility.
 .Ss Compatibility options
 these options allow X servers and other programs using low-level
-console driver functions which were written specifically for other
+console driver functions usually written specifically for other
 console drivers to run on
 .Nx
 systems.
@@ -194,6 +194,10 @@ The options are in particular:
 .It Cd WSDISPLAY_COMPAT_USL
 Support the protocol for switches between multiple virtual screens on
 one display as used by most PC-UNIX variants.
+This is used by the
+.Nx
+.Xr wsconscfg 8
+utility.
 .It Cd WSDISPLAY_COMPAT_RAWKBD
 Allows to get raw XT keyboard scancodes from PC keyboards as needed
 by i386 X servers.



CVS commit: src/sys/arch/xen/xenbus

2012-06-05 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue Jun  5 10:58:57 UTC 2012

Modified Files:
src/sys/arch/xen/xenbus: xenbus_probe.c

Log Message:
Sort vif and vbd device IDs numerically so that attach order does not depend
on the order they are passed in through xenstore. While this works for
hand-crafted Xen configuration files, it does not work for XenServer, XCP or
EC2 instances. This means that adding an extra virtual disk can make the
domU unbootable.

ID is actually based on the Linux device major/minor so this approach isn't
entirely correct (for instance, you can specify devices to be non-contiguous
which doesn't fit too well with our autoconf approach), but it works as a
first approximation.

Tested by me on XenServer and riz@ on EC2. OK bouyer@


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/xen/xenbus/xenbus_probe.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/xenbus/xenbus_probe.c
diff -u src/sys/arch/xen/xenbus/xenbus_probe.c:1.35 src/sys/arch/xen/xenbus/xenbus_probe.c:1.36
--- src/sys/arch/xen/xenbus/xenbus_probe.c:1.35	Thu Sep 22 23:02:35 2011
+++ src/sys/arch/xen/xenbus/xenbus_probe.c	Tue Jun  5 10:58:56 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: xenbus_probe.c,v 1.35 2011/09/22 23:02:35 jym Exp $ */
+/* $NetBSD: xenbus_probe.c,v 1.36 2012/06/05 10:58:56 sborrill Exp $ */
 /**
  * Talks to Xen Store to figure out what devices we have.
  *
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xenbus_probe.c,v 1.35 2011/09/22 23:02:35 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: xenbus_probe.c,v 1.36 2012/06/05 10:58:56 sborrill Exp $);
 
 #if 0
 #define DPRINTK(fmt, args...) \
@@ -321,7 +321,8 @@ static int
 xenbus_probe_device_type(const char *path, const char *type,
 int (*create)(struct xenbus_device *))
 {
-	int err, i, msize;
+	int err, i, pos, msize;
+	int *lookup = NULL;
 	unsigned long state;
 	char **dir;
 	unsigned int dir_n = 0;
@@ -335,8 +336,58 @@ xenbus_probe_device_type(const char *pat
 	if (err)
 		return err;
 
-	for (i = 0; i  dir_n; i++) {
+	/* Only sort frontend devices i.e. create == NULL*/
+	if (dir_n  1  create == NULL) {
+		int minp;
+		unsigned long minv;
+		unsigned long *id;
+
+		lookup = malloc(sizeof(int) * dir_n, M_DEVBUF,
+		M_WAITOK | M_ZERO);
+		if (lookup == NULL)
+			panic(can't malloc lookup);
+
+		id = malloc(sizeof(unsigned long) * dir_n, M_DEVBUF,
+		M_WAITOK | M_ZERO);
+		if (id == NULL)
+			panic(can't malloc id);
+
+		/* Convert string values to numeric; skip invalid */
+		for (i = 0; i  dir_n; i++) {
+			id[i] = strtoul(dir[i], ep, 10);
+			if (dir[i][0] == '\0' || *ep != '\0')
+id[i] = 0;
+		}
+		
+		/* Build lookup table in ascending order */
+		for (pos = 0; pos  dir_n; ) {
+			minv = UINT32_MAX;
+			minp = -1;
+			for (i = 0; i  dir_n; i++) {
+if (id[i]  minv  id[i]  0) {
+	minv = id[i];
+	minp = i;
+}
+			}
+			if (minp = 0) {
+lookup[pos++] = minp;
+id[minp] = 0;
+			}
+			else
+break;
+		}
+		
+		free(id, M_DEVBUF);
+		/* Adjust in case we had to skip non-numeric entries */
+		dir_n = pos;
+	}
+
+	for (pos = 0; pos  dir_n; pos++) {
 		err = 0;
+		if (lookup)
+			i = lookup[pos];
+		else
+			i = pos;
 		/*
 		 * add size of path to size of xenbus_device. xenbus_device
 		 * already has room for one char in xbusd_path.
@@ -413,6 +464,9 @@ xenbus_probe_device_type(const char *pat
 		watch_otherend(xbusd);
 	}
 	free(dir, M_DEVBUF);
+	if (lookup)
+		free(lookup, M_DEVBUF);
+	
 	return err;
 }
 



CVS commit: src/etc

2012-06-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jun  5 13:20:01 UTC 2012

Modified Files:
src/etc: MAKEDEV.tmpl

Log Message:
Invoke MAKEDEV.local via $HOST_SH (default ${HOST_SH:=sh}) instead of
hardcoded sh to avoid unexpected errors on cross build hosts in
src/distrib/common/Makefile.makedev etc.

Should fix PR toolchain/46537, ok apb@


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/etc/MAKEDEV.tmpl

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

Modified files:

Index: src/etc/MAKEDEV.tmpl
diff -u src/etc/MAKEDEV.tmpl:1.155 src/etc/MAKEDEV.tmpl:1.156
--- src/etc/MAKEDEV.tmpl:1.155	Sat May 26 00:36:15 2012
+++ src/etc/MAKEDEV.tmpl	Tue Jun  5 13:20:01 2012
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.155 2012/05/26 00:36:15 riz Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.156 2012/06/05 13:20:01 tsutsui Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -421,6 +421,7 @@ setup()
 {
 	PATH=/sbin:/usr/sbin:/bin:/usr/bin:/rescue
 
+	: ${HOST_SH:=sh}
 	: ${TOOL_MKNOD:=mknod}
 	: ${TOOL_MTREE:=mtree}
 	: ${TOOL_PAX:=pax}
@@ -2092,9 +2093,9 @@ local)
 		umask 0
 		if [ -n $count_nodes ]; then
 			count_nodes=$((count_nodes + \
-			$(linecount $(sh $0.local $opts -s all)) ))
+			$(linecount $($HOST_SH $0.local $opts -s all)) ))
 		else
-			sh $0.local $opts all
+			$HOST_SH $0.local $opts all
 		fi
 		umask 077
 	fi



CVS commit: src

2012-06-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jun  5 13:41:23 UTC 2012

Modified Files:
src/sbin/fdisk: fdisk.c
src/tools/fdisk: Makefile

Log Message:
Use ${DESTDIR}/usr/mdec for DEFAULT_BOOTDIR on tools fdisk(8)
rather than unknown build host's /usr/mdec directory.

XXX: no option to leave MBR bootcode empty on x86 targets


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sbin/fdisk/fdisk.c
cvs rdiff -u -r1.6 -r1.7 src/tools/fdisk/Makefile

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

Modified files:

Index: src/sbin/fdisk/fdisk.c
diff -u src/sbin/fdisk/fdisk.c:1.141 src/sbin/fdisk/fdisk.c:1.142
--- src/sbin/fdisk/fdisk.c:1.141	Sat May  5 16:03:55 2012
+++ src/sbin/fdisk/fdisk.c	Tue Jun  5 13:41:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdisk.c,v 1.141 2012/05/05 16:03:55 tsutsui Exp $ */
+/*	$NetBSD: fdisk.c,v 1.142 2012/06/05 13:41:23 tsutsui Exp $ */
 
 /*
  * Mach Operating System
@@ -39,7 +39,7 @@
 #include sys/cdefs.h
 
 #ifndef lint
-__RCSID($NetBSD: fdisk.c,v 1.141 2012/05/05 16:03:55 tsutsui Exp $);
+__RCSID($NetBSD: fdisk.c,v 1.142 2012/06/05 13:41:23 tsutsui Exp $);
 #endif /* not lint */
 
 #define MBRPTYPENAMES
@@ -86,7 +86,9 @@ __RCSID($NetBSD: fdisk.c,v 1.141 2012/0
 #endif
 #endif /* HAVE_NBTOOL_CONFIG_H */
 
+#ifndef	DEFAULT_BOOTDIR
 #define	DEFAULT_BOOTDIR		/usr/mdec
+#endif
 
 #define	LE_MBR_MAGIC		htole16(MBR_MAGIC)
 #define	LE_MBR_BS_MAGIC		htole16(MBR_BS_MAGIC)

Index: src/tools/fdisk/Makefile
diff -u src/tools/fdisk/Makefile:1.6 src/tools/fdisk/Makefile:1.7
--- src/tools/fdisk/Makefile:1.6	Mon Jun  4 18:53:03 2012
+++ src/tools/fdisk/Makefile	Tue Jun  5 13:41:23 2012
@@ -1,9 +1,11 @@
-#	$NetBSD: Makefile,v 1.6 2012/06/04 18:53:03 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2012/06/05 13:41:23 tsutsui Exp $
 
 HOSTPROGNAME=	${MACHINE_GNU_PLATFORM}-fdisk
 HOST_SRCDIR=	sbin/fdisk
 HOST_SRCS=	disklabel.c
 
+HOST_CPPFLAGS=	-DDEFAULT_BOOTDIR=\${DESTDIR}/usr/mdec\
+
 .include ${.CURDIR}/../Makefile.nbincludes
 .include ${.CURDIR}/../Makefile.host
 



CVS commit: src/share/man/man4/man4.amiga

2012-06-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jun  5 14:17:44 UTC 2012

Modified Files:
src/share/man/man4/man4.amiga: empb.4

Log Message:
Remove trailing whitespace. Use more macros.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.amiga/empb.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/man4.amiga/empb.4
diff -u src/share/man/man4/man4.amiga/empb.4:1.1 src/share/man/man4/man4.amiga/empb.4:1.2
--- src/share/man/man4/man4.amiga/empb.4:1.1	Mon Jun  4 20:16:57 2012
+++ src/share/man/man4/man4.amiga/empb.4	Tue Jun  5 14:17:43 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: empb.4,v 1.1 2012/06/04 20:16:57 rkujawa Exp $
+.\ $NetBSD: empb.4,v 1.2 2012/06/05 14:17:43 wiz Exp $
 .\
 .\ Copyright (c) 2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -32,7 +32,7 @@
 .Os
 .Sh NAME
 .Nm empb
-.Nd ELBOX Mediator 1200 PCI bridge driver 
+.Nd ELBOX Mediator 1200 PCI bridge driver
 .Sh SYNOPSIS
 .Cd empb0 at zbus0
 .Cd emmem0 at zbus0
@@ -48,11 +48,11 @@ The
 .Nm
 driver supports the following hardware:
 .Bl -tag -offset indent
-.It ELBOX Mediator 1200 
-.It ELBOX Mediator 1200 LT2 
-.It ELBOX Mediator 1200 LT4 
-.It ELBOX Mediator 1200 SX 
-.It ELBOX Mediator 1200 TX 
+.It ELBOX Mediator 1200
+.It ELBOX Mediator 1200 LT2
+.It ELBOX Mediator 1200 LT4
+.It ELBOX Mediator 1200 SX
+.It ELBOX Mediator 1200 TX
 .El
 .Sh SEE ALSO
 .Xr mppb 4 ,
@@ -70,7 +70,11 @@ The
 driver was written by
 .An Radoslaw Kujawa Aq radoslaw.kuj...@gmail.com .
 It was developed using information obtained through reverse engineering
-by Frank Wille and Radoslaw Kujawa. The authors have no access to official
+by
+.An Frank Wille
+and
+.An Radoslaw Kujawa .
+The authors have no access to official
 documentation (which is only available under NDA).
 .Sh CAVEATS
 Mediator 4000 and ZIV models are not supported, but support could easily be



CVS commit: src

2012-06-05 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Jun  5 15:04:18 UTC 2012

Modified Files:
src/lib/libperfuse: perfuse_if.h
src/usr.sbin/perfused: perfused.c

Log Message:
Add placeholder so that we can later add allbacks without breaking the ABI


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libperfuse/perfuse_if.h
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/perfused/perfused.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/libperfuse/perfuse_if.h
diff -u src/lib/libperfuse/perfuse_if.h:1.18 src/lib/libperfuse/perfuse_if.h:1.19
--- src/lib/libperfuse/perfuse_if.h:1.18	Wed Dec 28 17:33:53 2011
+++ src/lib/libperfuse/perfuse_if.h	Tue Jun  5 15:04:18 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse_if.h,v 1.18 2011/12/28 17:33:53 manu Exp $ */
+/*  $NetBSD: perfuse_if.h,v 1.19 2012/06/05 15:04:18 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -141,6 +141,7 @@ struct perfuse_callbacks {
 	perfuse_get_outhdr_fn pc_get_outhdr;
 	perfuse_get_outpayload_fn pc_get_outpayload;
 	perfuse_umount_fn pc_umount;
+	void *pc_reserved[16];
 };
 
 /* 

Index: src/usr.sbin/perfused/perfused.c
diff -u src/usr.sbin/perfused/perfused.c:1.22 src/usr.sbin/perfused/perfused.c:1.23
--- src/usr.sbin/perfused/perfused.c:1.22	Sat Feb  4 18:36:30 2012
+++ src/usr.sbin/perfused/perfused.c	Tue Jun  5 15:04:18 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfused.c,v 1.22 2012/02/04 18:36:30 joerg Exp $ */
+/*  $NetBSD: perfused.c,v 1.23 2012/06/05 15:04:18 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
@@ -245,6 +245,7 @@ new_mount(int fd, int pmnt_flags)
 	/*
 	 * Initialize libperfuse, which will initialize libpuffs
 	 */
+	(void)memset(pc, 0, sizeof(pc));
 	pc.pc_new_msg = perfused_new_pb;
 	pc.pc_xchg_msg = perfused_xchg_pb;
 	pc.pc_destroy_msg = (perfuse_destroy_msg_fn)puffs_framebuf_destroy;



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

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 15:35:42 UTC 2012

Modified Files:
src/sys/arch/x68k/x68k [netbsd-6]: clock.c

Log Message:
Pull up revision 1.34 (requested by isaki in ticket #281).

With the freerunnnig mode, set 0 (=256count) not 0xff (=255count)
in Timer-D.  It fixes the clock ticked faster when timecounter uses
mfp (as default choice).  It was introduced in rev 1.24 in 2006.
Thanks tsutsui@ for many comments.
Should be pulled up to netbsd-6 and netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.10.1 src/sys/arch/x68k/x68k/clock.c

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

Modified files:

Index: src/sys/arch/x68k/x68k/clock.c
diff -u src/sys/arch/x68k/x68k/clock.c:1.33 src/sys/arch/x68k/x68k/clock.c:1.33.10.1
--- src/sys/arch/x68k/x68k/clock.c:1.33	Tue Feb  8 20:20:26 2011
+++ src/sys/arch/x68k/x68k/clock.c	Tue Jun  5 15:35:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.33 2011/02/08 20:20:26 rmind Exp $	*/
+/*	$NetBSD: clock.c,v 1.33.10.1 2012/06/05 15:35:41 jdc Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.33 2011/02/08 20:20:26 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.33.10.1 2012/06/05 15:35:41 jdc Exp $);
 
 #include clock.h
 
@@ -143,7 +143,7 @@ cpu_initclocks(void)
 	mfp_set_tcdr(CLOCKS_PER_SEC / hz);
 	mfp_bit_set_ierb(MFP_INTR_TIMER_C);
 
-	mfp_set_tddr(0xff);	/* maximum free run -- only 8 bits wide */
+	mfp_set_tddr(0);	/* maximum free run -- only 8 bits wide */
 	mfp_set_tcdcr(mfp_get_tcdcr() | 0x07);	/* 1/200 prescaler */
 
 	tc_init(tc);



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

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 15:36:00 UTC 2012

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

Log Message:
Pull up revision 1.56 (requested by cegger in ticket #282).

destroy mutex and cv first.
Fixes LOCKDEBUG crash when a guest shut down.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.55.2.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.55 src/sys/arch/xen/xen/xbdback_xenbus.c:1.55.2.1
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.55	Wed Dec  7 15:47:43 2011
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Tue Jun  5 15:36:00 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.55 2011/12/07 15:47:43 cegger Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55 2011/12/07 15:47:43 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.55.2.1 2012/06/05 15:36:00 jdc Exp $);
 
 #include sys/atomic.h
 #include sys/buf.h
@@ -513,6 +513,8 @@ xbdback_xenbus_destroy(void *arg)
 		vn_close(xbdi-xbdi_vp, FREAD, NOCRED);
 	}
 	SLIST_REMOVE(xbdback_instances, xbdi, xbdback_instance, next);
+	mutex_destroy(xbdi-xbdi_lock);
+	cv_destroy(xbdi-xbdi_cv);
 	kmem_free(xbdi, sizeof(*xbdi));
 	return 0;
 }



CVS commit: [netbsd-6] src

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 15:37:23 UTC 2012

Modified Files:
src/distrib/sets/lists/base [netbsd-6]: mi
src/distrib/sets/lists/comp [netbsd-6]: mi
src/distrib/sets/lists/man [netbsd-6]: mi
src/usr.sbin [netbsd-6]: Makefile
Added Files:
src/usr.sbin/wakeonlan [netbsd-6]: Makefile wakeonlan.8 wakeonlan.c
Removed Files:
src/usr.sbin/wake [netbsd-6]: Makefile wake.8 wake.c

Log Message:
Pull up revisions:
  src/distrib/sets/lists/base/mi revision 1.992
  src/distrib/sets/lists/comp/mi revision 1.1759
  src/distrib/sets/lists/man/mi revision 1.1391
  src/usr.sbin/Makefile revision 1.265
  src/usr.sbin/wake/Makefile delete
  src/usr.sbin/wake/wake.8 delete
  src/usr.sbin/wake/wake.c delete
  src/usr.sbin/wakeonlan/Makefile add
  src/usr.sbin/wakeonlan/wakeonlan.8 add
  src/usr.sbin/wakeonlan/wakeonlan.c add
(requested by uebayasi in ticket #283).

Rename wake(8) to wakeonlan(8). Approved by core@.


To generate a diff of this commit:
cvs rdiff -u -r1.984.2.3 -r1.984.2.4 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1738.2.3 -r1.1738.2.4 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.1379.2.4 -r1.1379.2.5 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.263 -r1.263.2.1 src/usr.sbin/Makefile
cvs rdiff -u -r1.2 -r0 src/usr.sbin/wake/Makefile
cvs rdiff -u -r1.8 -r0 src/usr.sbin/wake/wake.8
cvs rdiff -u -r1.13 -r0 src/usr.sbin/wake/wake.c
cvs rdiff -u -r0 -r1.1.2.2 src/usr.sbin/wakeonlan/Makefile \
src/usr.sbin/wakeonlan/wakeonlan.8 src/usr.sbin/wakeonlan/wakeonlan.c

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.984.2.3 src/distrib/sets/lists/base/mi:1.984.2.4
--- src/distrib/sets/lists/base/mi:1.984.2.3	Sat May 19 15:23:41 2012
+++ src/distrib/sets/lists/base/mi	Tue Jun  5 15:37:18 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.984.2.3 2012/05/19 15:23:41 riz Exp $
+# $NetBSD: mi,v 1.984.2.4 2012/06/05 15:37:18 jdc Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -1493,7 +1493,8 @@
 ./usr/sbin/veriexecgenbase-sysutil-bin
 ./usr/sbin/vipw	base-sysutil-bin
 ./usr/sbin/vnconfigbase-sysutil-bin
-./usr/sbin/wake	base-netutil-bin
+./usr/sbin/wake	base-obsolete
+./usr/sbin/wakeonlanbase-netutil-bin
 ./usr/sbin/wiconfigbase-sysutil-bin
 ./usr/sbin/wire-testbase-netutil-bin
 ./usr/sbin/wlanctlbase-sysutil-bin

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1738.2.3 src/distrib/sets/lists/comp/mi:1.1738.2.4
--- src/distrib/sets/lists/comp/mi:1.1738.2.3	Sat May 19 15:23:39 2012
+++ src/distrib/sets/lists/comp/mi	Tue Jun  5 15:37:19 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1738.2.3 2012/05/19 15:23:39 riz Exp $
+#	$NetBSD: mi,v 1.1738.2.4 2012/06/05 15:37:19 jdc Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -4317,7 +4317,8 @@
 ./usr/libdata/debug/usr/sbin/veriexecgen.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/vipw.debug		comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/vnconfig.debug	comp-sysutil-debug	debug
-./usr/libdata/debug/usr/sbin/wake.debug		comp-netutil-debug	debug
+./usr/libdata/debug/usr/sbin/wake.debug		comp-obsolete		obsolete
+./usr/libdata/debug/usr/sbin/wakeonlan.debug	comp-netutil-debug	debug
 ./usr/libdata/debug/usr/sbin/wiconfig.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/wire-test.debug	comp-netutil-debug	debug
 ./usr/libdata/debug/usr/sbin/wlanctl.debug	comp-sysutil-debug	debug

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1379.2.4 src/distrib/sets/lists/man/mi:1.1379.2.5
--- src/distrib/sets/lists/man/mi:1.1379.2.4	Sat May 19 15:23:43 2012
+++ src/distrib/sets/lists/man/mi	Tue Jun  5 15:37:22 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1379.2.4 2012/05/19 15:23:43 riz Exp $
+# $NetBSD: mi,v 1.1379.2.5 2012/06/05 15:37:22 jdc Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -2945,7 +2945,8 @@
 ./usr/share/man/cat8/virtual.0			man-postfix-catman	postfix,.cat
 ./usr/share/man/cat8/vmstat.0			man-obsolete		obsolete
 ./usr/share/man/cat8/vnconfig.0			man-sysutil-catman	.cat
-./usr/share/man/cat8/wake.0			man-netutil-catman	.cat
+./usr/share/man/cat8/wake.0			man-obsolete		obsolete
+./usr/share/man/cat8/wakeonlan.0		man-netutil-catman	.cat
 ./usr/share/man/cat8/walnut/MAKEDEV.0		man-obsolete		obsolete
 ./usr/share/man/cat8/walnut/makedev.0		man-obsolete		obsolete
 ./usr/share/man/cat8/wdogctl.0			man-sysutil-catman	.cat
@@ -5517,7 +5518,8 @@
 ./usr/share/man/html8/virecover.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/virtual.html		man-postfix-htmlman	postfix,html
 ./usr/share/man/html8/vnconfig.html		man-sysutil-htmlman	html
-./usr/share/man/html8/wake.html			

CVS commit: [netbsd-6] src

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 15:38:02 UTC 2012

Modified Files:
src/distrib/sets/lists/base [netbsd-6]: rescue.mi
src/rescue [netbsd-6]: list

Log Message:
Pull up revisions:
  src/distrib/sets/lists/base/rescue.mi revision 1.34
  src/rescue/list revision 1.43
(requested by jnemeth in ticket #284).

PR/46393 - Nat Sloss -- add gpt(8) to /rescue


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.32.8.1 src/distrib/sets/lists/base/rescue.mi
cvs rdiff -u -r1.42 -r1.42.4.1 src/rescue/list

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

Modified files:

Index: src/distrib/sets/lists/base/rescue.mi
diff -u src/distrib/sets/lists/base/rescue.mi:1.32 src/distrib/sets/lists/base/rescue.mi:1.32.8.1
--- src/distrib/sets/lists/base/rescue.mi:1.32	Thu Feb 11 09:06:50 2010
+++ src/distrib/sets/lists/base/rescue.mi	Tue Jun  5 15:38:02 2012
@@ -1,4 +1,4 @@
-# $NetBSD: rescue.mi,v 1.32 2010/02/11 09:06:50 roy Exp $
+# $NetBSD: rescue.mi,v 1.32.8.1 2012/06/05 15:38:02 jdc Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -46,6 +46,7 @@
 ./rescue/fsdb	base-rescue-root
 ./rescue/fsirandbase-rescue-root
 ./rescue/ftp	base-rescue-root
+./rescue/gpt	base-rescue-root
 ./rescue/grep	base-rescue-root
 ./rescue/gunzip	base-rescue-root
 ./rescue/gzcat	base-rescue-root

Index: src/rescue/list
diff -u src/rescue/list:1.42 src/rescue/list:1.42.4.1
--- src/rescue/list:1.42	Sun Jul  3 22:05:01 2011
+++ src/rescue/list	Tue Jun  5 15:38:02 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: list,v 1.42 2011/07/03 22:05:01 tron Exp $
+#	$NetBSD: list,v 1.42.4.1 2012/06/05 15:38:02 jdc Exp $
 
 SRCDIRS	bin
 
@@ -60,6 +60,7 @@ PROG	fsck_lfs
 PROG	fsck_msdos
 PROG	fsdb
 PROG	fsirand
+PROG	gpt
 PROG	ifconfig
 PROG	init		init.bak
 PROG	lmcconfig



CVS commit: [netbsd-6] src/distrib/sets/lists/base

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 15:49:12 UTC 2012

Modified Files:
src/distrib/sets/lists/base [netbsd-6]: mi

Log Message:
Pull up revision 1.993 (requested by uebayasi in ticket #285).

really mark wake as obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.984.2.4 -r1.984.2.5 src/distrib/sets/lists/base/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.984.2.4 src/distrib/sets/lists/base/mi:1.984.2.5
--- src/distrib/sets/lists/base/mi:1.984.2.4	Tue Jun  5 15:37:18 2012
+++ src/distrib/sets/lists/base/mi	Tue Jun  5 15:49:12 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.984.2.4 2012/06/05 15:37:18 jdc Exp $
+# $NetBSD: mi,v 1.984.2.5 2012/06/05 15:49:12 jdc Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -1493,7 +1493,7 @@
 ./usr/sbin/veriexecgenbase-sysutil-bin
 ./usr/sbin/vipw	base-sysutil-bin
 ./usr/sbin/vnconfigbase-sysutil-bin
-./usr/sbin/wake	base-obsolete
+./usr/sbin/wake	base-obsolete		obsolete
 ./usr/sbin/wakeonlanbase-netutil-bin
 ./usr/sbin/wiconfigbase-sysutil-bin
 ./usr/sbin/wire-testbase-netutil-bin



CVS commit: [netbsd-6] src/external/public-domain/sqlite/lib

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 15:51:46 UTC 2012

Modified Files:
src/external/public-domain/sqlite/lib [netbsd-6]: sqlite3.pc

Log Message:
Pull up revision 1.2 (requested by ryoon in ticket #287).

Update version to 3.7.10, since that's what's currently in dist/
From Ryo ONODERA in PR 46300.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.4.1 src/external/public-domain/sqlite/lib/sqlite3.pc

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/lib/sqlite3.pc
diff -u src/external/public-domain/sqlite/lib/sqlite3.pc:1.1 src/external/public-domain/sqlite/lib/sqlite3.pc:1.1.4.1
--- src/external/public-domain/sqlite/lib/sqlite3.pc:1.1	Thu Oct 13 21:40:28 2011
+++ src/external/public-domain/sqlite/lib/sqlite3.pc	Tue Jun  5 15:51:46 2012
@@ -1,4 +1,4 @@
 Name: SQLite
 Description: SQL database engine
-Version: 3.7.9
+Version: 3.7.10
 Libs: -lsqlite3



CVS commit: [netbsd-6] src/share/man/man4

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 16:14:36 UTC 2012

Modified Files:
src/share/man/man4 [netbsd-6]: wsdisplay.4 wskbd.4 wsmouse.4

Log Message:
Pull up revisions:
  src/share/man/man4/wsdisplay.4 revision 1.39-1.40
  src/share/man/man4/wskbd.4 revision 1.15-1.16
  src/share/man/man4/wsmouse.4 revision 1.21-1.22
(requested by abs in ticket #288).

Document WSDISPLAYIO_SETVERSION, WSKBDIO_SETVERSION and WSMOUSEIO_SETVERSION
ioctls(). Also at least enumerate the WSKBDIO_ ioctls().

New sentence, new line. Use more markup. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.4.1 src/share/man/man4/wsdisplay.4
cvs rdiff -u -r1.14 -r1.14.6.1 src/share/man/man4/wskbd.4
cvs rdiff -u -r1.20 -r1.20.2.1 src/share/man/man4/wsmouse.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/wsdisplay.4
diff -u src/share/man/man4/wsdisplay.4:1.38 src/share/man/man4/wsdisplay.4:1.38.4.1
--- src/share/man/man4/wsdisplay.4:1.38	Thu Jun 30 22:13:02 2011
+++ src/share/man/man4/wsdisplay.4	Tue Jun  5 16:14:35 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: wsdisplay.4,v 1.38 2011/06/30 22:13:02 wiz Exp $
+.\ $NetBSD: wsdisplay.4,v 1.38.4.1 2012/06/05 16:14:35 jdc Exp $
 .\
 .\ Copyright (c) 1999 Matthias Drochner.
 .\ Copyright (c) 2002 Ben Harris.
@@ -26,7 +26,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd June 30, 2011
+.Dd May 27, 2012
 .Dt WSDISPLAY 4
 .Os
 .Sh NAME
@@ -561,6 +561,21 @@ and the driver will set data_size to the
 Otherwise the EDID block will be written into the buffer pointed
 at by edid_data and data_size will be set to the number of bytes
 written.
+.It Dv WSDISPLAYIO_SETVERSION Pq Li int
+Set the wscons_event protocol version.
+The default is 0 for binary compatibility.
+The latest version is
+always available as
+.Dv WSDISPLAYIO_EVENT_VERSION ,
+and is currently 1.
+All new code should use a call similar to the below to ensure the
+correct version is returned.
+.Bd -literal -offset indent
+int ver = WSDISPLAY_EVENT_VERSION;
+if (ioctl(fd, WSDISPLAYIO_SETVERSION, ver) == -1)
+err(EXIT_FAILURE, cannot set version);
+.Ed
+.El
 .El
 .Sh FILES
 .Bl -item

Index: src/share/man/man4/wskbd.4
diff -u src/share/man/man4/wskbd.4:1.14 src/share/man/man4/wskbd.4:1.14.6.1
--- src/share/man/man4/wskbd.4:1.14	Sun Mar  6 17:39:05 2011
+++ src/share/man/man4/wskbd.4	Tue Jun  5 16:14:35 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: wskbd.4,v 1.14 2011/03/06 17:39:05 wiz Exp $
+.\ $NetBSD: wskbd.4,v 1.14.6.1 2012/06/05 16:14:35 jdc Exp $
 .\
 .\ Copyright (c) 1999
 .\ 	Matthias Drochner.  All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd October 31, 2006
+.Dd May 27, 2012
 .Dt WSKBD 4
 .Os
 .Sh NAME
@@ -114,6 +114,44 @@ match if the device is in use as system 
 (The console device selection in early system startup is not influenced.)
 This way, the console device can be connected to a known
 wskbd device instance.
+.Ss Ioctls
+The following
+.Xr ioctl 2
+calls are provided by the
+.Nm
+driver or by devices which use it.
+Their definitions are found in
+.Pa dev/wscons/wsconsio.h .
+.Bl -tag -width Dv
+.It Dv WSKBDIO_GTYPE
+Get the keyboard type.
+.It Dv WSKBDIO_COMPLEXBELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL, WSKBDIO_SETDEFAULTBELL, WSKBDIO_GETDEFAULTBELL Pq Li struct wsmouse_repeat
+Get and set keyboard bell settings.
+.It Dv WSKBDIO_SETKEYREPEAT, WSKBDIO_GETKEYREPEAT, WSKBDIO_SETDEFAULTKEYREPEAT, WSKBDIO_GETDEFAULTKEYREPEAT Pq Li struct wskbd_keyrepeat_data
+Get and set keyboard autorepeat settings.
+.It Dv WSKBDIO_SETLEDS, WSKBDIO_GETLEDS Pq Li int
+Get and set keyboard LED settings.
+.It Dv WSKBDIO_GETMAP, WSKBDIO_SETMAP Pq Li struct wskbd_map_data
+Get and set keyboard keymapping settings.
+.It Dv WSKBDIO_GETENCODING, WSKBDIO_SETENCODING Pq Li kbd_t
+Get and set keyboard encoding settings.
+.It Dv WSKBDIO_GETKEYCLICK, WSKBDIO_SETKEYCLICK Pq Li int
+Get and set keyboard keyclick settings.
+.It Dv WSKBDIO_SETVERSION Pq Li int
+Set the wscons_event protocol version.
+The default is 0 for binary compatibility.
+The latest version is
+always available as
+.Dv WSKBD_EVENT_VERSION ,
+and is currently 1.
+All new code should use a call similar to the below to ensure the
+correct version is returned.
+.Bd -literal -offset indent
+int ver = WSKBD_EVENT_VERSION;
+if (ioctl(fd, WSKBDIO_SETVERSION, ver) == -1)
+err(EXIT_FAILURE, cannot set version);
+.Ed
+.El
 .Sh FILES
 .Bl -item
 .It

Index: src/share/man/man4/wsmouse.4
diff -u src/share/man/man4/wsmouse.4:1.20 src/share/man/man4/wsmouse.4:1.20.2.1
--- src/share/man/man4/wsmouse.4:1.20	Tue Jan 17 08:23:40 2012
+++ src/share/man/man4/wsmouse.4	Tue Jun  5 16:14:35 2012
@@ -1,4 +1,4 @@
-.\ $NetBSD: wsmouse.4,v 1.20 2012/01/17 08:23:40 wiz Exp $
+.\ $NetBSD: wsmouse.4,v 1.20.2.1 

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

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 16:22:24 UTC 2012

Modified Files:
src/sys/arch/sparc/include [netbsd-6]: bootinfo.h
src/sys/arch/sparc/sparc [netbsd-6]: autoconf.c
src/sys/arch/sparc/stand/boot [netbsd-6]: boot.c
src/sys/arch/sparc/stand/ofwboot [netbsd-6]: boot.c
src/sys/arch/sparc64/sparc64 [netbsd-6]: autoconf.c

Log Message:
Pull up revisions:
  src/sys/arch/sparc/include/bootinfo.h revision 1.6
  src/sys/arch/sparc/sparc/autoconf.c revision 1.243
  src/sys/arch/sparc/stand/boot/boot.c revision 1.28
  src/sys/arch/sparc/stand/ofwboot/boot.c revision 1.29
  src/sys/arch/sparc64/include/bootinfo.h revision 1.6-1.7
  src/sys/arch/sparc64/sparc64/autoconf.c revision 1.186
(requested by martin in ticket #289).

Pass the boothowto from the bootloader to the kernel.
If (an old) bootloader did not pass the flags, check explicitly if we
missed RB_USERCONF and invoke userconf_prompt() in MD code, as MI code
already missed it.
This fixes PR 46466.

Ooops, remove definitions duplicated in sparc/bootinfo.h


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.112.1 src/sys/arch/sparc/include/bootinfo.h
cvs rdiff -u -r1.242 -r1.242.8.1 src/sys/arch/sparc/sparc/autoconf.c
cvs rdiff -u -r1.27 -r1.27.10.1 src/sys/arch/sparc/stand/boot/boot.c
cvs rdiff -u -r1.28 -r1.28.10.1 src/sys/arch/sparc/stand/ofwboot/boot.c
cvs rdiff -u -r1.185 -r1.185.2.1 src/sys/arch/sparc64/sparc64/autoconf.c

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

Modified files:

Index: src/sys/arch/sparc/include/bootinfo.h
diff -u src/sys/arch/sparc/include/bootinfo.h:1.5 src/sys/arch/sparc/include/bootinfo.h:1.5.112.1
--- src/sys/arch/sparc/include/bootinfo.h:1.5	Sat Mar  4 03:39:02 2006
+++ src/sys/arch/sparc/include/bootinfo.h	Tue Jun  5 16:22:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootinfo.h,v 1.5 2006/03/04 03:39:02 uwe Exp $	*/
+/*	$NetBSD: bootinfo.h,v 1.5.112.1 2012/06/05 16:22:23 jdc Exp $	*/
 
 /*
  * Copyright (c) 1997
@@ -42,6 +42,7 @@ struct btinfo_common {
 #define BTINFO_MAGIC		1
 #define BTINFO_SYMTAB		2
 #define BTINFO_KERNELFILE	3
+#define BTINFO_BOOTHOWTO	4
 
 struct btinfo_magic {
 	struct btinfo_common common;
@@ -60,6 +61,11 @@ struct btinfo_kernelfile {
 	char name[1];	/* variable length */
 };
 
+struct btinfo_boothowto {
+	struct btinfo_common common;
+	int boothowto;
+};
+
 #ifdef _KERNEL
 void *lookup_bootinfo(int);
 #endif

Index: src/sys/arch/sparc/sparc/autoconf.c
diff -u src/sys/arch/sparc/sparc/autoconf.c:1.242 src/sys/arch/sparc/sparc/autoconf.c:1.242.8.1
--- src/sys/arch/sparc/sparc/autoconf.c:1.242	Sun Jul 17 23:18:23 2011
+++ src/sys/arch/sparc/sparc/autoconf.c	Tue Jun  5 16:22:23 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.242 2011/07/17 23:18:23 mrg Exp $ */
+/*	$NetBSD: autoconf.c,v 1.242.8.1 2012/06/05 16:22:23 jdc Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.242 2011/07/17 23:18:23 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.242.8.1 2012/06/05 16:22:23 jdc Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -75,6 +75,7 @@ __KERNEL_RCSID(0, $NetBSD: autoconf.c,v
 #include sys/msgbuf.h
 #include sys/boot_flag.h
 #include sys/ksyms.h
+#include sys/userconf.h
 
 #include net/if.h
 #include net/if_ether.h
@@ -270,6 +271,7 @@ bootstrap(void)
 #else
 	extern int end[];
 #endif
+	struct btinfo_boothowto *bi_howto;
 
 	prom_init();
 
@@ -352,6 +354,11 @@ bootstrap(void)
 		(void*)bi_sym-esym);
 	}
 #endif
+
+	if ((bi_howto = lookup_bootinfo(BTINFO_BOOTHOWTO)) != NULL) {
+		boothowto = bi_howto-boothowto;
+printf(initialized boothowt from bootloader: %x\n, boothowto);
+	}
 }
 
 #if defined(SUN4M)  !defined(MSIIEP)
@@ -915,12 +922,21 @@ void
 cpu_configure(void)
 {
 	struct pcb *pcb0;
+	bool userconf = (boothowto  RB_USERCONF) != 0;
 
 	/* initialise the softintr system */
 	sparc_softintr_init();
 
 	/* build the bootpath */
 	bootpath_build();
+	if (((boothowto  RB_USERCONF) != 0)  !userconf)
+		/*
+		 * Old bootloaders do not pass boothowto, and MI code
+		 * has already handled userconfig before we get here
+		 * and finally fetch the right options. So if we missed
+		 * it, just do it here.
+ 		 */
+		userconf_prompt();
 
 #if defined(SUN4)
 	if (CPU_ISSUN4) {

Index: src/sys/arch/sparc/stand/boot/boot.c
diff -u src/sys/arch/sparc/stand/boot/boot.c:1.27 src/sys/arch/sparc/stand/boot/boot.c:1.27.10.1
--- src/sys/arch/sparc/stand/boot/boot.c:1.27	Sat Jan 22 19:19:23 2011
+++ src/sys/arch/sparc/stand/boot/boot.c	Tue Jun  5 16:22:24 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.27 2011/01/22 19:19:23 joerg Exp $ */
+/*	$NetBSD: boot.c,v 1.27.10.1 2012/06/05 16:22:24 jdc Exp $ */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -244,6 +244,7 @@ main(void)
 	const char *k;
 	u_long	marks[MARK_MAX], bootinfo;
 	struct btinfo_symtab bi_sym;
+	struct btinfo_boothowto 

CVS commit: [netbsd-6] src/lib/libperfuse

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 16:25:24 UTC 2012

Modified Files:
src/lib/libperfuse [netbsd-6]: ops.c

Log Message:
Pull up revision 1.55 (requested by manu in ticket #290).

Setting mode by fchmod(2) will break on glusterfs-3.3 is we attempt
to set atime and mtime at the same time. Detect that situation just
like we detected ftruncate(2) and wipe atime and mtime if it occurs.


To generate a diff of this commit:
cvs rdiff -u -r1.50.2.2 -r1.50.2.3 src/lib/libperfuse/ops.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/libperfuse/ops.c
diff -u src/lib/libperfuse/ops.c:1.50.2.2 src/lib/libperfuse/ops.c:1.50.2.3
--- src/lib/libperfuse/ops.c:1.50.2.2	Mon Apr 23 16:48:59 2012
+++ src/lib/libperfuse/ops.c	Tue Jun  5 16:25:24 2012
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.50.2.2 2012/04/23 16:48:59 riz Exp $ */
+/*  $NetBSD: ops.c,v 1.50.2.3 2012/06/05 16:25:24 jdc Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -1849,6 +1849,19 @@ perfuse_node_setattr_ttl(struct puffs_us
 		fsi-mtimensec = 0;
 		fsi-valid = ~(FUSE_FATTR_ATIME|FUSE_FATTR_MTIME);
 	}
+
+	/*
+	 * There is the same mess with fchmod()
+	 */
+	if ((vap-va_mode != (mode_t)PUFFS_VNOVAL) 
+	(vap-va_uid == (uid_t)PUFFS_VNOVAL) 
+	(vap-va_gid == (gid_t)PUFFS_VNOVAL)) {
+		fsi-atime = 0;
+		fsi-atimensec = 0;
+		fsi-mtime = 0;
+		fsi-mtimensec = 0;
+		fsi-valid = ~(FUSE_FATTR_ATIME|FUSE_FATTR_MTIME);
+	}
 		
 	/*
 	 * If nothing remain, discard the operation.



CVS commit: src/sys/dev/iscsi

2012-06-05 Thread Michael L. Hitch
Module Name:src
Committed By:   mhitch
Date:   Tue Jun  5 16:36:07 UTC 2012

Modified Files:
src/sys/dev/iscsi: iscsi_rcv.c iscsi_send.c

Log Message:
Fix system freeze when trying to write to a raw iSCSI device with MAXPHYS
bytes.  Newfs does large writes when initializing the filesystem.
First, don't copy the head of a TAILQ to make a copy - the first entry will
still point back to the original head.  This caused the ccb list to link to
itself, resulting in a continous loop processing the same ccb and blocked
interrupts.  Use TAILQ_CONCAT() to copy the list.
Next, the ccb disposition was not set in the ccb when the ccb was throttled,
losing the CCBDISP_SCSIPI, so when a throttled ccb was resent, it failed to
call scscipi_done(), and left that I/O hanging.
I am now able to newfs an iSCSI device, was well as issued large writes
using dd.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/iscsi/iscsi_rcv.c \
src/sys/dev/iscsi/iscsi_send.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/iscsi/iscsi_rcv.c
diff -u src/sys/dev/iscsi/iscsi_rcv.c:1.1 src/sys/dev/iscsi/iscsi_rcv.c:1.2
--- src/sys/dev/iscsi/iscsi_rcv.c:1.1	Sun Oct 23 21:15:02 2011
+++ src/sys/dev/iscsi/iscsi_rcv.c	Tue Jun  5 16:36:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_rcv.c,v 1.1 2011/10/23 21:15:02 agc Exp $	*/
+/*	$NetBSD: iscsi_rcv.c,v 1.2 2012/06/05 16:36:06 mhitch Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1138,8 +1138,8 @@ receive_pdu(connection_t *conn, pdu_t *p
 		DEBC(conn, 1, (Unthrottling - MaxCmdSN = %d\n, MaxCmdSN));
 
 		CS_BEGIN;
-		waiting = sess-ccbs_throttled;
-		TAILQ_INIT(sess-ccbs_throttled);
+		TAILQ_INIT(waiting);
+		TAILQ_CONCAT(waiting, sess-ccbs_throttled, chain);
 		CS_END;
 		while ((req_ccb = TAILQ_FIRST(waiting)) != NULL) {
 			TAILQ_REMOVE(waiting, req_ccb, chain);
Index: src/sys/dev/iscsi/iscsi_send.c
diff -u src/sys/dev/iscsi/iscsi_send.c:1.1 src/sys/dev/iscsi/iscsi_send.c:1.2
--- src/sys/dev/iscsi/iscsi_send.c:1.1	Sun Oct 23 21:15:02 2011
+++ src/sys/dev/iscsi/iscsi_send.c	Tue Jun  5 16:36:07 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_send.c,v 1.1 2011/10/23 21:15:02 agc Exp $	*/
+/*	$NetBSD: iscsi_send.c,v 1.2 2012/06/05 16:36:07 mhitch Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1345,6 +1345,7 @@ send_command(ccb_t *ccb, ccb_disp_t disp
 		if (/*CONSTCOND*/ISCSI_TROTTLING_ENABLED 
 		/*CONSTCOND*/ISCSI_SERVER_TRUSTED 
 		!sn_a_le_b(sess-CmdSN, sess-MaxCmdSN)) {
+			ccb-disp = disp;
 			TAILQ_INSERT_TAIL(sess-ccbs_throttled, ccb, chain);
 			splx(s);
 			PDEBOUT((Throttling S - CmdSN = %d, MaxCmdSN = %d\n,
@@ -1363,6 +1364,7 @@ send_command(ccb_t *ccb, ccb_disp_t disp
 		while (/*CONSTCOND*/ISCSI_TROTTLING_ENABLED 
 		   /*CONSTCOND*/ISCSI_SERVER_TRUSTED 
 		   !sn_a_le_b(sess-CmdSN, sess-MaxCmdSN)) {
+			ccb-disp = disp;
 			ccb-flags |= CCBF_WAITING;
 			TAILQ_INSERT_TAIL(sess-ccbs_throttled, ccb, chain);
 			PDEBOUT((Throttling W - CmdSN = %d, MaxCmdSN = %d\n,



CVS commit: [netbsd-6] src/doc

2012-06-05 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Tue Jun  5 16:43:04 UTC 2012

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

Log Message:
Tickets 281-285,287-290.


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

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.111 src/doc/CHANGES-6.0:1.1.2.112
--- src/doc/CHANGES-6.0:1.1.2.111	Sun Jun  3 21:45:49 2012
+++ src/doc/CHANGES-6.0	Tue Jun  5 16:43:04 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.111 2012/06/03 21:45:49 jdc Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.112 2012/06/05 16:43:04 jdc Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -2604,3 +2604,70 @@ sys/arch/amd64/amd64/trap.c			1.71
 	value before entering the trap handler.
 	[dsl, ticket #280]
 
+sys/arch/x68k/x68k/clock.c			1.34
+	With the freerunnnig mode, set 0 (=256count) not 0xff (=255count)
+	in Timer-D.  It fixes the clock ticked faster when timecounter uses
+	mfp (as default choice).  It was introduced in rev 1.24 in 2006.
+	Thanks tsutsui@ for many comments.
+	[isaki, ticket #281]
+
+sys/arch/xen/xen/xbdback_xenbus.c		1.56
+	destroy mutex and cv first.
+	Fixes LOCKDEBUG crash when a guest shut down.
+	[cegger, ticket #282]
+
+distrib/sets/lists/base/mi			1.992
+distrib/sets/lists/comp/mi			1.1759
+distrib/sets/lists/man/mi			1.1391
+usr.sbin/Makefile1.265
+usr.sbin/wake/Makefiledelete
+usr.sbin/wake/wake.8delete
+usr.sbin/wake/wake.cdelete
+usr.sbin/wakeonlan/Makefile			add
+usr.sbin/wakeonlan/wakeonlan.8			add
+usr.sbin/wakeonlan/wakeonlan.c			add
+	Rename wake(8) to wakeonlan(8). Approved by core@.
+	[uebayasi, ticket #283]
+
+distrib/sets/lists/base/rescue.mi		1.34
+rescue/list	1.43
+	PR#46393 - Nat Sloss -- add gpt(8) to /rescue
+	[jnemeth, ticket #284]
+
+distrib/sets/lists/base/mi			1.993
+	really mark wake as obsolete.
+	[uebayasi, ticket #285]
+
+external/public-domain/sqlite/lib/sqlite3.pc	1.2
+	Update version to 3.7.10, since that's what's currently in dist/
+	From Ryo ONODERA in PR 46300.
+	[ryoon, ticket #287]
+
+share/man/man4/wsdisplay.4			1.39-1.40
+share/man/man4/wskbd.41.15-1.16
+share/man/man4/wsmouse.4			1.21-1.22
+	Document WSDISPLAYIO_SETVERSION, WSKBDIO_SETVERSION and
+	WSMOUSEIO_SETVERSION ioctls(). Also at least enumerate the WSKBDIO_
+	ioctls().
+	[abs, ticket #288]
+
+sys/arch/sparc/include/bootinfo.h		1.6
+sys/arch/sparc/sparc/autoconf.c			1.243
+sys/arch/sparc/stand/boot/boot.c		1.28
+sys/arch/sparc/stand/ofwboot/boot.c		1.29
+sys/arch/sparc64/include/bootinfo.h		1.6-1.7
+sys/arch/sparc64/sparc64/autoconf.c		1.186
+sys/arch/sparc64/include/bootinfo.h		1.7
+	Pass the boothowto from the bootloader to the kernel.
+	If (an old) bootloader did not pass the flags, check explicitly if we
+	missed RB_USERCONF and invoke userconf_prompt() in MD code, as MI code
+	already missed it.
+	This fixes PR#46466.
+	[martin, ticket #289]
+
+lib/libperfuse/ops.c1.55
+	Setting mode by fchmod(2) will break on glusterfs-3.3 is we attempt
+	to set atime and mtime at the same time. Detect that situation just
+	like we detected ftruncate(2) and wipe atime and mtime if it occurs.
+	[manu, ticket #290]
+



CVS commit: src/lib/libterminfo

2012-06-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jun  5 17:22:01 UTC 2012

Modified Files:
src/lib/libterminfo: terminfo.5.in

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libterminfo/terminfo.5.in

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/terminfo.5.in
diff -u src/lib/libterminfo/terminfo.5.in:1.16 src/lib/libterminfo/terminfo.5.in:1.17
--- src/lib/libterminfo/terminfo.5.in:1.16	Sun Jun  3 23:19:10 2012
+++ src/lib/libterminfo/terminfo.5.in	Tue Jun  5 17:22:01 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: terminfo.5.in,v 1.16 2012/06/03 23:19:10 joerg Exp $
+.\	$NetBSD: terminfo.5.in,v 1.17 2012/06/05 17:22:01 wiz Exp $
 .\
 .\ Copyright (c) 2009, 2010, 2011 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 March 10, 2011
+.Dd June 6, 2012
 .Dt TERMINFO 5
 .Os
 .Sh NAME



CVS commit: src/usr.bin/make

2012-06-05 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Tue Jun  5 17:31:04 UTC 2012

Modified Files:
src/usr.bin/make: compat.c

Log Message:
kill(2) is more appropriate and more portable than raise(3)


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/usr.bin/make/compat.c

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

Modified files:

Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.87 src/usr.bin/make/compat.c:1.88
--- src/usr.bin/make/compat.c:1.87	Tue Jun  5 06:11:51 2012
+++ src/usr.bin/make/compat.c	Tue Jun  5 17:31:04 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat.c,v 1.87 2012/06/05 06:11:51 sjg Exp $	*/
+/*	$NetBSD: compat.c,v 1.88 2012/06/05 17:31:04 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = $NetBSD: compat.c,v 1.87 2012/06/05 06:11:51 sjg Exp $;
+static char rcsid[] = $NetBSD: compat.c,v 1.88 2012/06/05 17:31:04 sjg Exp $;
 #else
 #include sys/cdefs.h
 #ifndef lint
 #if 0
 static char sccsid[] = @(#)compat.c	8.2 (Berkeley) 3/19/94;
 #else
-__RCSID($NetBSD: compat.c,v 1.87 2012/06/05 06:11:51 sjg Exp $);
+__RCSID($NetBSD: compat.c,v 1.88 2012/06/05 17:31:04 sjg Exp $);
 #endif
 #endif /* not lint */
 #endif
@@ -183,7 +183,7 @@ CompatInterrupt(int signo)
 if (signo == SIGQUIT)
 	_exit(signo);
 bmake_signal(signo, SIG_DFL);
-raise(signo);
+kill(myPid, signo);
 }
 
 /*-



CVS commit: src/usr.sbin/syslogd

2012-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jun  5 19:33:18 UTC 2012

Modified Files:
src/usr.sbin/syslogd: syslogd.c

Log Message:
Open and write to ttys using non-blocking I/O to prevent DoS when hardware
or software flow control prevents tty writes or when the tty line is too
slow to respond.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/usr.sbin/syslogd/syslogd.c

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

Modified files:

Index: src/usr.sbin/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.107 src/usr.sbin/syslogd/syslogd.c:1.108
--- src/usr.sbin/syslogd/syslogd.c:1.107	Mon May 14 21:22:50 2012
+++ src/usr.sbin/syslogd/syslogd.c	Tue Jun  5 15:33:17 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.107 2012/05/15 01:22:50 christos Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.108 2012/06/05 19:33:17 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)syslogd.c	8.3 (Berkeley) 4/4/94;
 #else
-__RCSID($NetBSD: syslogd.c,v 1.107 2012/05/15 01:22:50 christos Exp $);
+__RCSID($NetBSD: syslogd.c,v 1.108 2012/06/05 19:33:17 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -70,6 +70,7 @@ __RCSID($NetBSD: syslogd.c,v 1.107 2012
  * TLS, syslog-protocol, and syslog-sign code by Martin Schuette.
  */
 #define SYSLOG_NAMES
+#include poll.h
 #include syslogd.h
 #include extern.h
 
@@ -266,6 +267,7 @@ void		free_cred_SLIST(struct peer_cred_h
 static inline void
 		free_incoming_tls_sockets(void);
 #endif /* !DISABLE_TLS */
+static int writev1(int, struct iovec *, size_t);
 
 /* for make_timestamp() */
 #define TIMESTAMPBUFSIZE 35
@@ -1835,7 +1837,7 @@ logmsg(struct buf_msg *buffer)
 	/* log the message to the particular outputs */
 	if (!Initialized) {
 		f = consfile;
-		f-f_file = open(ctty, O_WRONLY, 0);
+		f-f_file = open(ctty, O_WRONLY | O_NDELAY, 0);
 
 		if (f-f_file = 0) {
 			DELREF(f-f_prevmsg);
@@ -2404,7 +2406,8 @@ fprintlog(struct filed *f, struct buf_ms
 		DPRINTF(D_MISC, Logging to %s %s\n,
 			TypeInfo[f-f_type].name, f-f_un.f_fname);
 	again:
-		if (writev(f-f_file, iov, v - iov)  0) {
+		if ((f-f_type == F_FILE ? writev(f-f_file, iov, v - iov) :
+		writev1(f-f_file, iov, v - iov))  0) {
 			e = errno;
 			if (f-f_type == F_FILE  e == ENOSPC) {
 int lasterror = f-f_lasterror;
@@ -2419,7 +2422,7 @@ fprintlog(struct filed *f, struct buf_ms
 			 */
 			if ((e == EIO || e == EBADF)  f-f_type != F_FILE) {
 f-f_file = open(f-f_un.f_fname,
-O_WRONLY|O_APPEND, 0);
+O_WRONLY|O_APPEND|O_NDELAY, 0);
 if (f-f_file  0) {
 	f-f_type = F_UNUSED;
 	logerror(%s, f-f_un.f_fname);
@@ -3605,7 +3608,7 @@ cfline(size_t linenum, const char *line,
 const char *host)
 {
 	struct addrinfo hints, *res;
-	interror, i, pri, syncfile;
+	interror, i, pri, syncfile, flags;
 	const char   *p, *q;
 	char *bp;
 	char   buf[MAXLINE];
@@ -3819,19 +3822,22 @@ cfline(size_t linenum, const char *line,
 			f-f_flags |= FFLAG_SIGN;
 #endif /* !DISABLE_SIGN */
 		(void)strlcpy(f-f_un.f_fname, p, sizeof(f-f_un.f_fname));
-		if ((f-f_file = open(p, O_WRONLY|O_APPEND, 0))  0) {
+		if (isatty(f-f_file)) {
+			f-f_type = F_TTY;
+			if (strcmp(p, ctty) == 0)
+f-f_type = F_CONSOLE;
+			flags = O_NDELAY;
+		} else {
+			f-f_type = F_FILE;
+			flags = 0;
+		}
+		if ((f-f_file = open(p, O_WRONLY|O_APPEND|flags, 0))  0) {
 			f-f_type = F_UNUSED;
 			logerror(%s, p);
 			break;
 		}
 		if (syncfile)
 			f-f_flags |= FFLAG_SYNC;
-		if (isatty(f-f_file))
-			f-f_type = F_TTY;
-		else
-			f-f_type = F_FILE;
-		if (strcmp(p, ctty) == 0)
-			f-f_type = F_CONSOLE;
 		break;
 
 	case '|':
@@ -4695,3 +4701,42 @@ copy_config_value_word(char **mem, const
 	*p = ++q;
 	return true;
 }
+
+static int
+writev1(int fd, struct iovec *iov, size_t count)
+{
+	ssize_t nw = 0, tot = 0;
+	size_t ntries = 5;
+
+	while (ntries--) {
+		switch ((nw = writev(fd, iov, count))) {
+		case -1:
+			if (errno == EAGAIN || errno == EWOULDBLOCK) {
+struct pollfd pfd;
+pfd.fd = fd;
+pfd.events = POLLOUT;
+pfd.revents = 0;
+(void)poll(pfd, 1, 500);
+continue;
+			} else
+return -1;
+		case 0:
+			return 0;
+		default:
+			tot += nw;
+			while (nw  0) {
+if (iov-iov_len  nw) {
+	iov-iov_len -= nw;
+	iov-iov_base += nw;
+	break;
+} else {
+	if (count-- == 0)
+		return tot;
+	nw -= iov-iov_len;
+	iov++;
+}
+			}
+		}
+	}
+	return tot == 0 ? nw : tot;
+}



CVS commit: src/games/fortune/datfiles

2012-06-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jun  5 19:35:44 UTC 2012

Modified Files:
src/games/fortune/datfiles: fortunes

Log Message:
Attribute the `Consequences, Schmonsequences...' quote to Daffy Duck.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/games/fortune/datfiles/fortunes

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

Modified files:

Index: src/games/fortune/datfiles/fortunes
diff -u src/games/fortune/datfiles/fortunes:1.49 src/games/fortune/datfiles/fortunes:1.50
--- src/games/fortune/datfiles/fortunes:1.49	Tue Dec  6 19:41:03 2011
+++ src/games/fortune/datfiles/fortunes	Tue Jun  5 19:35:44 2012
@@ -2824,7 +2824,7 @@ Conscious is when you are aware of somet
 wish you weren't.
 %
 Consequences, Schmonsequences, as long as I'm rich.
-		-- Ali Baba Bunny [1957, Chuck Jones]
+		-- Daffy Duck, Ali Baba Bunny, [1957, Chuck Jones]
 %
 Consultants are mystical people who ask a company for a number and then
 give it back to them.



CVS commit: [jmcneill-usbmp] src/sys/dev/usb

2012-06-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Jun  5 19:42:02 UTC 2012

Modified Files:
src/sys/dev/usb [jmcneill-usbmp]: TODO.usbmp

Log Message:
Note ucycom as working.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/sys/dev/usb/TODO.usbmp

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/TODO.usbmp
diff -u src/sys/dev/usb/TODO.usbmp:1.1.2.15 src/sys/dev/usb/TODO.usbmp:1.1.2.16
--- src/sys/dev/usb/TODO.usbmp:1.1.2.15	Sun Jun  3 09:34:04 2012
+++ src/sys/dev/usb/TODO.usbmp	Tue Jun  5 19:42:02 2012
@@ -1,4 +1,4 @@
-$NetBSD: TODO.usbmp,v 1.1.2.15 2012/06/03 09:34:04 skrll Exp $
+$NetBSD: TODO.usbmp,v 1.1.2.16 2012/06/05 19:42:02 skrll Exp $
 
 
 the majority of the USB MP device interface is documented in usbdivar.h.
@@ -119,7 +119,7 @@ driver testing:		STATUS
   - ums			working
   - uts
   - ukbd		working
-  - ucycom
+  - ucycom		working
   - uep
   - udl
   - ulpt		attaches ok, MERGE ISSUE



CVS commit: [netbsd-5] src/dist/bind

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 19:51:27 UTC 2012

Modified Files:
src/dist/bind [netbsd-5]: CHANGES version
src/dist/bind/bin/tests/system/unknown [netbsd-5]: clean.sh tests.sh
src/dist/bind/bin/tests/system/unknown/ns1 [netbsd-5]: example-in.db
src/dist/bind/lib/dns [netbsd-5]: rdata.c rdataslab.c

Log Message:
Apply patch, requested by christos in ticket #1767
src/dist/bind/CHANGES   patch
src/dist/bind/version   patch
src/dist/bind/bin/tests/system/unknown/clean.sh patch
src/dist/bind/bin/tests/system/unknown/tests.sh patch
src/dist/bind/bin/tests/system/unknown/ns1/example-in.dbpatch
src/dist/bind/lib/dns/rdata.c   patch
src/dist/bind/lib/dns/rdataslab.c   patch
Update bind to 9.7.3-P4:
3331.  [security]  dns_rdataslab_fromrdataset could produce bad
   rdataslabs. [RT #29644]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.11.4.5 -r1.1.1.11.4.6 src/dist/bind/CHANGES \
src/dist/bind/version
cvs rdiff -u -r1.1.1.5.4.1 -r1.1.1.5.4.2 \
src/dist/bind/bin/tests/system/unknown/clean.sh \
src/dist/bind/bin/tests/system/unknown/tests.sh
cvs rdiff -u -r1.1.1.5.4.1 -r1.1.1.5.4.2 \
src/dist/bind/bin/tests/system/unknown/ns1/example-in.db
cvs rdiff -u -r1.1.1.5.4.3 -r1.1.1.5.4.4 src/dist/bind/lib/dns/rdata.c \
src/dist/bind/lib/dns/rdataslab.c

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

Modified files:

Index: src/dist/bind/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.11.4.5 src/dist/bind/CHANGES:1.1.1.11.4.6
--- src/dist/bind/CHANGES:1.1.1.11.4.5	Thu Jul  7 12:44:24 2011
+++ src/dist/bind/CHANGES	Tue Jun  5 19:51:27 2012
@@ -1,3 +1,8 @@
+	--- 9.7.3-P4 released ---
+
+3331.	[security]	dns_rdataslab_fromrdataset could produce bad
+			rdataslabs. [RT #29644]
+
 	--- 9.7.3-P3 released ---
 
 3124.	[bug]		Use an rdataset attribute flag to indicate
Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.11.4.5 src/dist/bind/version:1.1.1.11.4.6
--- src/dist/bind/version:1.1.1.11.4.5	Thu Jul  7 12:44:24 2011
+++ src/dist/bind/version	Tue Jun  5 19:51:27 2012
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=7
 PATCHVER=3
 RELEASETYPE=-P
-RELEASEVER=3
+RELEASEVER=4

Index: src/dist/bind/bin/tests/system/unknown/clean.sh
diff -u src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.4.1 src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.4.2
--- src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.4.1	Sat Jun 18 11:20:09 2011
+++ src/dist/bind/bin/tests/system/unknown/clean.sh	Tue Jun  5 19:51:27 2012
@@ -19,3 +19,6 @@
 
 rm -f dig.out
 rm -f */named.memstats
+rm -f */*.bk
+rm -f */*.bk.*
+rm -f ns3/Kexample.*
Index: src/dist/bind/bin/tests/system/unknown/tests.sh
diff -u src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.4.1 src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.4.2
--- src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.4.1	Sat Jun 18 11:20:09 2011
+++ src/dist/bind/bin/tests/system/unknown/tests.sh	Tue Jun  5 19:51:27 2012
@@ -22,13 +22,13 @@ SYSTEMTESTTOP=..
 
 status=0
 
-DIGOPTS=@10.53.0.1 -p 5300
+DIGOPTS=-p 5300
 
 echo I:querying for various representations of an IN A record
 for i in 1 2 3 4 5 6 7 8 9 10 11 12
 do
 	ret=0
-	$DIG +short $DIGOPTS a$i.example a in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 a$i.example a in  dig.out || ret=1
 	echo 10.0.0.1 | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -41,7 +41,7 @@ echo I:querying for various representat
 for i in 1 2 3 4 5 6 7
 do
 	ret=0
-	$DIG +short $DIGOPTS txt$i.example txt in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt in  dig.out || ret=1
 	echo 'hello' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -54,7 +54,7 @@ echo I:querying for various representat
 for i in 1 2 3
 do
 	ret=0
-	$DIG +short $DIGOPTS unk$i.example type123 in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 unk$i.example type123 in  dig.out || ret=1
 	echo '\# 1 00' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -67,7 +67,7 @@ echo I:querying for various representat
 for i in 1 2
 do
 	ret=0
-	$DIG +short $DIGOPTS a$i.example a class10  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 a$i.example a class10  dig.out || ret=1
 	echo '\# 4 0A01' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -80,7 +80,7 @@ echo I:querying for various representat
 for i in 1 2 3 4
 do
 	ret=0
-	$DIG +short $DIGOPTS txt$i.example txt class10  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt class10  dig.out || ret=1
 	echo 'hello' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -93,7 +93,7 @@ echo I:querying for various representat
 for i in 1 2
 do
 	

CVS commit: [netbsd-5-0] src/dist/bind

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 19:52:26 UTC 2012

Modified Files:
src/dist/bind [netbsd-5-0]: CHANGES version
src/dist/bind/bin/tests/system/unknown [netbsd-5-0]: clean.sh tests.sh
src/dist/bind/bin/tests/system/unknown/ns1 [netbsd-5-0]: example-in.db
src/dist/bind/lib/dns [netbsd-5-0]: rdata.c rdataslab.c

Log Message:
Apply patch, requested by christos in ticket #1767
src/dist/bind/CHANGES   patch
src/dist/bind/version   patch
src/dist/bind/bin/tests/system/unknown/clean.sh patch
src/dist/bind/bin/tests/system/unknown/tests.sh patch
src/dist/bind/bin/tests/system/unknown/ns1/example-in.dbpatch
src/dist/bind/lib/dns/rdata.c   patch
src/dist/bind/lib/dns/rdataslab.c   patch
Update bind to 9.7.3-P4:
3331.  [security]  dns_rdataslab_fromrdataset could produce bad
   rdataslabs. [RT #29644]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.11.8.5 -r1.1.1.11.8.6 src/dist/bind/CHANGES \
src/dist/bind/version
cvs rdiff -u -r1.1.1.5.8.1 -r1.1.1.5.8.2 \
src/dist/bind/bin/tests/system/unknown/clean.sh \
src/dist/bind/bin/tests/system/unknown/tests.sh
cvs rdiff -u -r1.1.1.5.8.1 -r1.1.1.5.8.2 \
src/dist/bind/bin/tests/system/unknown/ns1/example-in.db
cvs rdiff -u -r1.1.1.5.8.3 -r1.1.1.5.8.4 src/dist/bind/lib/dns/rdata.c \
src/dist/bind/lib/dns/rdataslab.c

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

Modified files:

Index: src/dist/bind/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.11.8.5 src/dist/bind/CHANGES:1.1.1.11.8.6
--- src/dist/bind/CHANGES:1.1.1.11.8.5	Thu Jul  7 20:27:41 2011
+++ src/dist/bind/CHANGES	Tue Jun  5 19:52:25 2012
@@ -1,3 +1,8 @@
+	--- 9.7.3-P4 released ---
+
+3331.	[security]	dns_rdataslab_fromrdataset could produce bad
+			rdataslabs. [RT #29644]
+
 	--- 9.7.3-P3 released ---
 
 3124.	[bug]		Use an rdataset attribute flag to indicate
Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.11.8.5 src/dist/bind/version:1.1.1.11.8.6
--- src/dist/bind/version:1.1.1.11.8.5	Thu Jul  7 20:27:41 2011
+++ src/dist/bind/version	Tue Jun  5 19:52:25 2012
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=7
 PATCHVER=3
 RELEASETYPE=-P
-RELEASEVER=3
+RELEASEVER=4

Index: src/dist/bind/bin/tests/system/unknown/clean.sh
diff -u src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.8.1 src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.8.2
--- src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.8.1	Sat Jun 18 11:36:03 2011
+++ src/dist/bind/bin/tests/system/unknown/clean.sh	Tue Jun  5 19:52:25 2012
@@ -19,3 +19,6 @@
 
 rm -f dig.out
 rm -f */named.memstats
+rm -f */*.bk
+rm -f */*.bk.*
+rm -f ns3/Kexample.*
Index: src/dist/bind/bin/tests/system/unknown/tests.sh
diff -u src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.8.1 src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.8.2
--- src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.8.1	Sat Jun 18 11:36:03 2011
+++ src/dist/bind/bin/tests/system/unknown/tests.sh	Tue Jun  5 19:52:25 2012
@@ -22,13 +22,13 @@ SYSTEMTESTTOP=..
 
 status=0
 
-DIGOPTS=@10.53.0.1 -p 5300
+DIGOPTS=-p 5300
 
 echo I:querying for various representations of an IN A record
 for i in 1 2 3 4 5 6 7 8 9 10 11 12
 do
 	ret=0
-	$DIG +short $DIGOPTS a$i.example a in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 a$i.example a in  dig.out || ret=1
 	echo 10.0.0.1 | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -41,7 +41,7 @@ echo I:querying for various representat
 for i in 1 2 3 4 5 6 7
 do
 	ret=0
-	$DIG +short $DIGOPTS txt$i.example txt in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt in  dig.out || ret=1
 	echo 'hello' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -54,7 +54,7 @@ echo I:querying for various representat
 for i in 1 2 3
 do
 	ret=0
-	$DIG +short $DIGOPTS unk$i.example type123 in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 unk$i.example type123 in  dig.out || ret=1
 	echo '\# 1 00' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -67,7 +67,7 @@ echo I:querying for various representat
 for i in 1 2
 do
 	ret=0
-	$DIG +short $DIGOPTS a$i.example a class10  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 a$i.example a class10  dig.out || ret=1
 	echo '\# 4 0A01' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -80,7 +80,7 @@ echo I:querying for various representat
 for i in 1 2 3 4
 do
 	ret=0
-	$DIG +short $DIGOPTS txt$i.example txt class10  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt class10  dig.out || ret=1
 	echo 'hello' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -93,7 +93,7 @@ echo I:querying for various representat
 for i in 1 2
 

CVS commit: [netbsd-5-1] src/dist/bind

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 19:53:03 UTC 2012

Modified Files:
src/dist/bind [netbsd-5-1]: CHANGES version
src/dist/bind/bin/tests/system/unknown [netbsd-5-1]: clean.sh tests.sh
src/dist/bind/bin/tests/system/unknown/ns1 [netbsd-5-1]: example-in.db
src/dist/bind/lib/dns [netbsd-5-1]: rdata.c rdataslab.c

Log Message:
Apply patch, requested by christos in ticket #1767
src/dist/bind/CHANGES   patch
src/dist/bind/version   patch
src/dist/bind/bin/tests/system/unknown/clean.sh patch
src/dist/bind/bin/tests/system/unknown/tests.sh patch
src/dist/bind/bin/tests/system/unknown/ns1/example-in.dbpatch
src/dist/bind/lib/dns/rdata.c   patch
src/dist/bind/lib/dns/rdataslab.c   patch
Update bind to 9.7.3-P4:
3331.  [security]  dns_rdataslab_fromrdataset could produce bad
   rdataslabs. [RT #29644]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.11.4.2.2.3 -r1.1.1.11.4.2.2.4 src/dist/bind/CHANGES \
src/dist/bind/version
cvs rdiff -u -r1.1.1.5.12.1 -r1.1.1.5.12.2 \
src/dist/bind/bin/tests/system/unknown/clean.sh \
src/dist/bind/bin/tests/system/unknown/tests.sh
cvs rdiff -u -r1.1.1.5.12.1 -r1.1.1.5.12.2 \
src/dist/bind/bin/tests/system/unknown/ns1/example-in.db
cvs rdiff -u -r1.1.1.5.4.1.2.2 -r1.1.1.5.4.1.2.3 \
src/dist/bind/lib/dns/rdata.c src/dist/bind/lib/dns/rdataslab.c

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

Modified files:

Index: src/dist/bind/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.11.4.2.2.3 src/dist/bind/CHANGES:1.1.1.11.4.2.2.4
--- src/dist/bind/CHANGES:1.1.1.11.4.2.2.3	Fri Jul  8 21:04:03 2011
+++ src/dist/bind/CHANGES	Tue Jun  5 19:53:02 2012
@@ -1,3 +1,8 @@
+	--- 9.7.3-P4 released ---
+
+3331.	[security]	dns_rdataslab_fromrdataset could produce bad
+			rdataslabs. [RT #29644]
+
 	--- 9.7.3-P3 released ---
 
 3124.	[bug]		Use an rdataset attribute flag to indicate
Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.11.4.2.2.3 src/dist/bind/version:1.1.1.11.4.2.2.4
--- src/dist/bind/version:1.1.1.11.4.2.2.3	Fri Jul  8 21:04:03 2011
+++ src/dist/bind/version	Tue Jun  5 19:53:02 2012
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=7
 PATCHVER=3
 RELEASETYPE=-P
-RELEASEVER=3
+RELEASEVER=4

Index: src/dist/bind/bin/tests/system/unknown/clean.sh
diff -u src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.12.1 src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.12.2
--- src/dist/bind/bin/tests/system/unknown/clean.sh:1.1.1.5.12.1	Sat Jun 18 11:27:46 2011
+++ src/dist/bind/bin/tests/system/unknown/clean.sh	Tue Jun  5 19:53:02 2012
@@ -19,3 +19,6 @@
 
 rm -f dig.out
 rm -f */named.memstats
+rm -f */*.bk
+rm -f */*.bk.*
+rm -f ns3/Kexample.*
Index: src/dist/bind/bin/tests/system/unknown/tests.sh
diff -u src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.12.1 src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.12.2
--- src/dist/bind/bin/tests/system/unknown/tests.sh:1.1.1.5.12.1	Sat Jun 18 11:27:46 2011
+++ src/dist/bind/bin/tests/system/unknown/tests.sh	Tue Jun  5 19:53:02 2012
@@ -22,13 +22,13 @@ SYSTEMTESTTOP=..
 
 status=0
 
-DIGOPTS=@10.53.0.1 -p 5300
+DIGOPTS=-p 5300
 
 echo I:querying for various representations of an IN A record
 for i in 1 2 3 4 5 6 7 8 9 10 11 12
 do
 	ret=0
-	$DIG +short $DIGOPTS a$i.example a in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 a$i.example a in  dig.out || ret=1
 	echo 10.0.0.1 | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -41,7 +41,7 @@ echo I:querying for various representat
 for i in 1 2 3 4 5 6 7
 do
 	ret=0
-	$DIG +short $DIGOPTS txt$i.example txt in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt in  dig.out || ret=1
 	echo 'hello' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -54,7 +54,7 @@ echo I:querying for various representat
 for i in 1 2 3
 do
 	ret=0
-	$DIG +short $DIGOPTS unk$i.example type123 in  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 unk$i.example type123 in  dig.out || ret=1
 	echo '\# 1 00' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -67,7 +67,7 @@ echo I:querying for various representat
 for i in 1 2
 do
 	ret=0
-	$DIG +short $DIGOPTS a$i.example a class10  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 a$i.example a class10  dig.out || ret=1
 	echo '\# 4 0A01' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -80,7 +80,7 @@ echo I:querying for various representat
 for i in 1 2 3 4
 do
 	ret=0
-	$DIG +short $DIGOPTS txt$i.example txt class10  dig.out || ret=1
+	$DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt class10  dig.out || ret=1
 	echo 'hello' | diff - dig.out || ret=1
 	if [ $ret != 0 ]
 	then
@@ -93,7 +93,7 @@ echo 

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

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 19:54:53 UTC 2012

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

Log Message:
ticket #1767


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/doc/CHANGES-5.1.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.1.3
diff -u src/doc/CHANGES-5.1.3:1.1.2.16 src/doc/CHANGES-5.1.3:1.1.2.17
--- src/doc/CHANGES-5.1.3:1.1.2.16	Sun Jun  3 08:48:25 2012
+++ src/doc/CHANGES-5.1.3	Tue Jun  5 19:54:53 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.3,v 1.1.2.16 2012/06/03 08:48:25 jdc Exp $
+# $NetBSD: CHANGES-5.1.3,v 1.1.2.17 2012/06/05 19:54:53 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1.2 release to the NetBSD 5.1.3
 release:
@@ -126,3 +126,16 @@ sys/kern/uipc_usrreq.c1.137
 	via SCM_RIGHT anxiliary socket messages.
 	[martin, ticket #1766]
 
+dist/bind/CHANGES	patch
+dist/bind/version	patch
+dist/bind/bin/tests/system/unknown/clean.sh		patch
+dist/bind/bin/tests/system/unknown/tests.sh		patch
+dist/bind/bin/tests/system/unknown/ns1/example-in.db	patch
+dist/bind/lib/dns/rdata.cpatch
+dist/bind/lib/dns/rdataslab.cpatch
+	
+	Update bind to 9.7.3-P4:
+	3331.  [security]  dns_rdataslab_fromrdataset could produce bad
+			   rdataslabs. [RT #29644]
+	 [christos, ticket #1767]
+



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

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 19:55:20 UTC 2012

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

Log Message:
ticket #1767


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.75 -r1.1.2.76 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.75 src/doc/CHANGES-5.0.3:1.1.2.76
--- src/doc/CHANGES-5.0.3:1.1.2.75	Sun Jun  3 08:48:22 2012
+++ src/doc/CHANGES-5.0.3	Tue Jun  5 19:55:19 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.75 2012/06/03 08:48:22 jdc Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.76 2012/06/05 19:55:19 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -3040,3 +3040,16 @@ sys/kern/uipc_usrreq.c1.137
 	via SCM_RIGHT anxiliary socket messages.
 	[martin, ticket #1766]
 
+dist/bind/CHANGES	patch
+dist/bind/version	patch
+dist/bind/bin/tests/system/unknown/clean.sh		patch
+dist/bind/bin/tests/system/unknown/tests.sh		patch
+dist/bind/bin/tests/system/unknown/ns1/example-in.db	patch
+dist/bind/lib/dns/rdata.cpatch
+dist/bind/lib/dns/rdataslab.cpatch
+	
+	Update bind to 9.7.3-P4:
+	3331.  [security]  dns_rdataslab_fromrdataset could produce bad
+			   rdataslabs. [RT #29644]
+	 [christos, ticket #1767]
+



CVS commit: [netbsd-5] src/doc

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 19:55:45 UTC 2012

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

Log Message:
ticket #1767


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.170 -r1.1.2.171 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.170 src/doc/CHANGES-5.2:1.1.2.171
--- src/doc/CHANGES-5.2:1.1.2.170	Sun Jun  3 08:48:20 2012
+++ src/doc/CHANGES-5.2	Tue Jun  5 19:55:45 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.170 2012/06/03 08:48:20 jdc Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.171 2012/06/05 19:55:45 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -6429,3 +6429,16 @@ sys/kern/uipc_usrreq.c1.137
 	via SCM_RIGHT anxiliary socket messages.
 	[martin, ticket #1766]
 
+dist/bind/CHANGES	patch
+dist/bind/version	patch
+dist/bind/bin/tests/system/unknown/clean.sh		patch
+dist/bind/bin/tests/system/unknown/tests.sh		patch
+dist/bind/bin/tests/system/unknown/ns1/example-in.db	patch
+dist/bind/lib/dns/rdata.cpatch
+dist/bind/lib/dns/rdataslab.cpatch
+	
+	Update bind to 9.7.3-P4:
+	3331.  [security]  dns_rdataslab_fromrdataset could produce bad
+			   rdataslabs. [RT #29644]
+	 [christos, ticket #1767]
+



CVS commit: [netbsd-4] src/dist/bind

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 20:01:03 UTC 2012

Modified Files:
src/dist/bind [netbsd-4]: CHANGES version
src/dist/bind/lib/dns [netbsd-4]: rdata.c rdataslab.c

Log Message:
Apply patch, requested by christos in ticket #1447
dist/bind/CHANGES   patch
dist/bind/version   patch
dist/bind/lib/dns/rdata.c   patch
dist/bind/lib/dns/rdataslab.c   patch
Update bind to 9.4-ESV-R4-P2
3331.  [security]  dns_rdataslab_fromrdataset could produce bad
   rdataslabs. [RT #29644]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4.4.8 -r1.1.1.4.4.9 src/dist/bind/CHANGES \
src/dist/bind/version
cvs rdiff -u -r1.1.1.3.4.2 -r1.1.1.3.4.3 src/dist/bind/lib/dns/rdata.c
cvs rdiff -u -r1.1.1.3.4.3 -r1.1.1.3.4.4 src/dist/bind/lib/dns/rdataslab.c

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

Modified files:

Index: src/dist/bind/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.4.4.8 src/dist/bind/CHANGES:1.1.1.4.4.9
--- src/dist/bind/CHANGES:1.1.1.4.4.8	Sun Nov 20 13:02:25 2011
+++ src/dist/bind/CHANGES	Tue Jun  5 20:01:02 2012
@@ -1,3 +1,8 @@
+	--- 9.4-ESV-R4-P2 released ---
+
+3331.	[security]	dns_rdataslab_fromrdataset could produce bad
+			rdataslabs. [RT #29644]
+
 3218.   [security]  Cache lookup could return RRSIG data associated with
 nonexistent records, leading to an assertion
 failure. [RT #26590]
Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.4.4.8 src/dist/bind/version:1.1.1.4.4.9
--- src/dist/bind/version:1.1.1.4.4.8	Sat Jun 18 10:36:30 2011
+++ src/dist/bind/version	Tue Jun  5 20:01:02 2012
@@ -1,4 +1,4 @@
-# $Id: version,v 1.1.1.4.4.8 2011/06/18 10:36:30 bouyer Exp $
+# $Id: version,v 1.1.1.4.4.9 2012/06/05 20:01:02 bouyer Exp $
 #
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=4
 PATCHVER=
 RELEASETYPE=-ESV
-RELEASEVER=-R4-P1
+RELEASEVER=-R4-P2

Index: src/dist/bind/lib/dns/rdata.c
diff -u src/dist/bind/lib/dns/rdata.c:1.1.1.3.4.2 src/dist/bind/lib/dns/rdata.c:1.1.1.3.4.3
--- src/dist/bind/lib/dns/rdata.c:1.1.1.3.4.2	Sun Jan 23 21:47:39 2011
+++ src/dist/bind/lib/dns/rdata.c	Tue Jun  5 20:01:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdata.c,v 1.1.1.3.4.2 2011/01/23 21:47:39 bouyer Exp $	*/
+/*	$NetBSD: rdata.c,v 1.1.1.3.4.3 2012/06/05 20:01:02 bouyer Exp $	*/
 
 /*
  * Copyright (C) 2004-2006, 2008  Internet Systems Consortium, Inc. (ISC)
@@ -338,6 +338,8 @@ dns_rdata_compare(const dns_rdata_t *rda
 	REQUIRE(rdata2 != NULL);
 	REQUIRE(rdata1-data != NULL);
 	REQUIRE(rdata2-data != NULL);
+	REQUIRE(rdata1-length == 0 || rdata1-data != NULL);
+	REQUIRE(rdata2-length == 0 || rdata2-data != NULL);
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
 

Index: src/dist/bind/lib/dns/rdataslab.c
diff -u src/dist/bind/lib/dns/rdataslab.c:1.1.1.3.4.3 src/dist/bind/lib/dns/rdataslab.c:1.1.1.3.4.4
--- src/dist/bind/lib/dns/rdataslab.c:1.1.1.3.4.3	Sun Jan 23 21:47:39 2011
+++ src/dist/bind/lib/dns/rdataslab.c	Tue Jun  5 20:01:03 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdataslab.c,v 1.1.1.3.4.3 2011/01/23 21:47:39 bouyer Exp $	*/
+/*	$NetBSD: rdataslab.c,v 1.1.1.3.4.4 2012/06/05 20:01:03 bouyer Exp $	*/
 
 /*
  * Copyright (C) 2004-2007, 2009, 2010  Internet Systems Consortium, Inc. (ISC)
@@ -130,6 +130,11 @@ isc_result_t
 dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
 			   isc_region_t *region, unsigned int reservelen)
 {
+	/*
+	 * Use removed as a sentinal pointer for duplicate
+	 * rdata as rdata.data == NULL is valid.
+	 */
+	static unsigned char removed;
 	struct xrdata  *x;
 	unsigned char  *rawbuf;
 #if DNS_RDATASET_FIXED
@@ -168,6 +173,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 		INSIST(result == ISC_R_SUCCESS);
 		dns_rdata_init(x[i].rdata);
 		dns_rdataset_current(rdataset, x[i].rdata);
+		INSIST(x[i].rdata.data != removed);
 #if DNS_RDATASET_FIXED
 		x[i].order = i;
 #endif
@@ -200,8 +206,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 	 */
 	for (i = 1; i  nalloc; i++) {
 		if (compare_rdata(x[i-1].rdata, x[i].rdata) == 0) {
-			x[i-1].rdata.data = NULL;
-			x[i-1].rdata.length = 0;
+			x[i-1].rdata.data = removed;
 #if DNS_RDATASET_FIXED
 			/*
 			 * Preserve the least order so A, B, A - A, B
@@ -277,7 +282,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 #endif
 
 	for (i = 0; i  nalloc; i++) {
-		if (x[i].rdata.data == NULL)
+		if (x[i].rdata.data == removed)
 			continue;
 #if DNS_RDATASET_FIXED
 		offsettable[x[i].order] = rawbuf - offsetbase;



CVS commit: [netbsd-4-0] src/dist/bind

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 20:01:32 UTC 2012

Modified Files:
src/dist/bind [netbsd-4-0]: CHANGES version
src/dist/bind/lib/dns [netbsd-4-0]: rdata.c rdataslab.c

Log Message:
Apply patch, requested by christos in ticket #1447
dist/bind/CHANGES   patch
dist/bind/version   patch
dist/bind/lib/dns/rdata.c   patch
dist/bind/lib/dns/rdataslab.c   patch
Update bind to 9.4-ESV-R4-P2
3331.  [security]  dns_rdataslab_fromrdataset could produce bad
   rdataslabs. [RT #29644]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4.4.2.2.6 -r1.1.1.4.4.2.2.7 src/dist/bind/CHANGES
cvs rdiff -u -r1.1.1.4.4.3.2.5 -r1.1.1.4.4.3.2.6 src/dist/bind/version
cvs rdiff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2 \
src/dist/bind/lib/dns/rdata.c
cvs rdiff -u -r1.1.1.3.4.1.2.2 -r1.1.1.3.4.1.2.3 \
src/dist/bind/lib/dns/rdataslab.c

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

Modified files:

Index: src/dist/bind/CHANGES
diff -u src/dist/bind/CHANGES:1.1.1.4.4.2.2.6 src/dist/bind/CHANGES:1.1.1.4.4.2.2.7
--- src/dist/bind/CHANGES:1.1.1.4.4.2.2.6	Sun Nov 20 13:02:15 2011
+++ src/dist/bind/CHANGES	Tue Jun  5 20:01:31 2012
@@ -1,3 +1,8 @@
+	--- 9.4-ESV-R4-P2 released ---
+
+3331.	[security]	dns_rdataslab_fromrdataset could produce bad
+			rdataslabs. [RT #29644]
+
 3218.   [security]  Cache lookup could return RRSIG data associated with
 nonexistent records, leading to an assertion
 failure. [RT #26590]

Index: src/dist/bind/version
diff -u src/dist/bind/version:1.1.1.4.4.3.2.5 src/dist/bind/version:1.1.1.4.4.3.2.6
--- src/dist/bind/version:1.1.1.4.4.3.2.5	Sat Jun 18 10:38:27 2011
+++ src/dist/bind/version	Tue Jun  5 20:01:32 2012
@@ -1,4 +1,4 @@
-# $Id: version,v 1.1.1.4.4.3.2.5 2011/06/18 10:38:27 bouyer Exp $
+# $Id: version,v 1.1.1.4.4.3.2.6 2012/06/05 20:01:32 bouyer Exp $
 #
 # This file must follow /bin/sh rules.  It is imported directly via
 # configure.
@@ -7,4 +7,4 @@ MAJORVER=9
 MINORVER=4
 PATCHVER=
 RELEASETYPE=-ESV
-RELEASEVER=-R4-P1
+RELEASEVER=-R4-P2

Index: src/dist/bind/lib/dns/rdata.c
diff -u src/dist/bind/lib/dns/rdata.c:1.1.1.3.4.1.2.1 src/dist/bind/lib/dns/rdata.c:1.1.1.3.4.1.2.2
--- src/dist/bind/lib/dns/rdata.c:1.1.1.3.4.1.2.1	Sun Jan 23 21:52:12 2011
+++ src/dist/bind/lib/dns/rdata.c	Tue Jun  5 20:01:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdata.c,v 1.1.1.3.4.1.2.1 2011/01/23 21:52:12 bouyer Exp $	*/
+/*	$NetBSD: rdata.c,v 1.1.1.3.4.1.2.2 2012/06/05 20:01:32 bouyer Exp $	*/
 
 /*
  * Copyright (C) 2004-2006, 2008  Internet Systems Consortium, Inc. (ISC)
@@ -338,6 +338,8 @@ dns_rdata_compare(const dns_rdata_t *rda
 	REQUIRE(rdata2 != NULL);
 	REQUIRE(rdata1-data != NULL);
 	REQUIRE(rdata2-data != NULL);
+	REQUIRE(rdata1-length == 0 || rdata1-data != NULL);
+	REQUIRE(rdata2-length == 0 || rdata2-data != NULL);
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
 

Index: src/dist/bind/lib/dns/rdataslab.c
diff -u src/dist/bind/lib/dns/rdataslab.c:1.1.1.3.4.1.2.2 src/dist/bind/lib/dns/rdataslab.c:1.1.1.3.4.1.2.3
--- src/dist/bind/lib/dns/rdataslab.c:1.1.1.3.4.1.2.2	Sun Jan 23 21:52:12 2011
+++ src/dist/bind/lib/dns/rdataslab.c	Tue Jun  5 20:01:32 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdataslab.c,v 1.1.1.3.4.1.2.2 2011/01/23 21:52:12 bouyer Exp $	*/
+/*	$NetBSD: rdataslab.c,v 1.1.1.3.4.1.2.3 2012/06/05 20:01:32 bouyer Exp $	*/
 
 /*
  * Copyright (C) 2004-2007, 2009, 2010  Internet Systems Consortium, Inc. (ISC)
@@ -130,6 +130,11 @@ isc_result_t
 dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
 			   isc_region_t *region, unsigned int reservelen)
 {
+	/*
+	 * Use removed as a sentinal pointer for duplicate
+	 * rdata as rdata.data == NULL is valid.
+	 */
+	static unsigned char removed;
 	struct xrdata  *x;
 	unsigned char  *rawbuf;
 #if DNS_RDATASET_FIXED
@@ -168,6 +173,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 		INSIST(result == ISC_R_SUCCESS);
 		dns_rdata_init(x[i].rdata);
 		dns_rdataset_current(rdataset, x[i].rdata);
+		INSIST(x[i].rdata.data != removed);
 #if DNS_RDATASET_FIXED
 		x[i].order = i;
 #endif
@@ -200,8 +206,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 	 */
 	for (i = 1; i  nalloc; i++) {
 		if (compare_rdata(x[i-1].rdata, x[i].rdata) == 0) {
-			x[i-1].rdata.data = NULL;
-			x[i-1].rdata.length = 0;
+			x[i-1].rdata.data = removed;
 #if DNS_RDATASET_FIXED
 			/*
 			 * Preserve the least order so A, B, A - A, B
@@ -277,7 +282,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_
 #endif
 
 	for (i = 0; i  nalloc; i++) {
-		if (x[i].rdata.data == NULL)
+		if (x[i].rdata.data == removed)
 			continue;
 #if DNS_RDATASET_FIXED
 		offsettable[x[i].order] = rawbuf - offsetbase;



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

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 20:02:04 UTC 2012

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

Log Message:
ticket #1447


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.101 -r1.1.2.102 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.101 src/doc/CHANGES-4.0.2:1.1.2.102
--- src/doc/CHANGES-4.0.2:1.1.2.101	Tue May 22 18:57:40 2012
+++ src/doc/CHANGES-4.0.2	Tue Jun  5 20:02:04 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.0.2,v 1.1.2.101 2012/05/22 18:57:40 riz Exp $
+#	$NetBSD: CHANGES-4.0.2,v 1.1.2.102 2012/06/05 20:02:04 bouyer Exp $
 
 A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2
 release:
@@ -1375,3 +1375,13 @@ crypto/dist/openssl/ssl/d1_enc.c		patch
 	Address CVE-2012-2333.
 	[drochner, ticket #1446]
 
+dist/bind/CHANGES	patch
+dist/bind/version	patch
+dist/bind/lib/dns/rdata.cpatch
+dist/bind/lib/dns/rdataslab.cpatch
+	
+	Update bind to 9.4-ESV-R4-P2:
+	3331.  [security]  dns_rdataslab_fromrdataset could produce bad
+			   rdataslabs. [RT #29644]
+	[christos, ticket #1447]
+



CVS commit: [netbsd-4] src/doc

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 20:02:32 UTC 2012

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

Log Message:
ticket #1447


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.239 -r1.1.2.240 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.239 src/doc/CHANGES-4.1:1.1.2.240
--- src/doc/CHANGES-4.1:1.1.2.239	Tue May 22 18:57:00 2012
+++ src/doc/CHANGES-4.1	Tue Jun  5 20:02:32 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.239 2012/05/22 18:57:00 riz Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.240 2012/06/05 20:02:32 bouyer Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4636,3 +4636,13 @@ crypto/dist/openssl/ssl/d1_enc.c		patch
 	Address CVE-2012-2333.
 	[drochner, ticket #1446]
 
+dist/bind/CHANGES	patch
+dist/bind/version	patch
+dist/bind/lib/dns/rdata.cpatch
+dist/bind/lib/dns/rdataslab.cpatch
+	
+	Update bind to 9.4-ESV-R4-P2:
+	3331.  [security]  dns_rdataslab_fromrdataset could produce bad
+			   rdataslabs. [RT #29644]
+	[christos, ticket #1447]
+



CVS commit: [netbsd-6] src/lib/libedit

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 20:22:14 UTC 2012

Modified Files:
src/lib/libedit [netbsd-6]: readline.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #309):
lib/libedit/readline.c: revision 1.104
don't crash if add_history is called from an empty line. Called from
nslookup in new bind.
XXX: pullup to 6


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.100.2.1 src/lib/libedit/readline.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/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.100 src/lib/libedit/readline.c:1.100.2.1
--- src/lib/libedit/readline.c:1.100	Fri Nov 18 20:38:42 2011
+++ src/lib/libedit/readline.c	Tue Jun  5 20:22:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.100 2011/11/18 20:38:42 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.100.2.1 2012/06/05 20:22:14 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include config.h
 #if !defined(lint)  !defined(SCCSID)
-__RCSID($NetBSD: readline.c,v 1.100 2011/11/18 20:38:42 christos Exp $);
+__RCSID($NetBSD: readline.c,v 1.100.2.1 2012/06/05 20:22:14 bouyer Exp $);
 #endif /* not lint  not SCCSID */
 
 #include sys/types.h
@@ -1371,6 +1371,9 @@ add_history(const char *line)
 {
 	HistEvent ev;
 
+	if (line == NULL)
+		return 0;
+
 	if (h == NULL || e == NULL)
 		rl_initialize();
 



CVS commit: [netbsd-6] src/doc

2012-06-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun  5 20:28:12 UTC 2012

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

Log Message:
ticket 309


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

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

Modified files:

Index: src/doc/CHANGES-6.0
diff -u src/doc/CHANGES-6.0:1.1.2.112 src/doc/CHANGES-6.0:1.1.2.113
--- src/doc/CHANGES-6.0:1.1.2.112	Tue Jun  5 16:43:04 2012
+++ src/doc/CHANGES-6.0	Tue Jun  5 20:28:12 2012
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.112 2012/06/05 16:43:04 jdc Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.113 2012/06/05 20:28:12 bouyer Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -2671,3 +2671,9 @@ lib/libperfuse/ops.c1.55
 	like we detected ftruncate(2) and wipe atime and mtime if it occurs.
 	[manu, ticket #290]
 
+lib/libedit/readline.c1.104
+
+	don't crash if add_history is called from an empty line. Called from
+	nslookup in new bind.
+	[christos, ticket #309]
+



CVS commit: src/sys/kern

2012-06-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Jun  5 20:51:37 UTC 2012

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

Log Message:
Add hash_list_size() and simplify slightly.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/kern/subr_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/sys/kern/subr_hash.c
diff -u src/sys/kern/subr_hash.c:1.4 src/sys/kern/subr_hash.c:1.5
--- src/sys/kern/subr_hash.c:1.4	Sun Dec 25 02:23:09 2011
+++ src/sys/kern/subr_hash.c	Tue Jun  5 20:51:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_hash.c,v 1.4 2011/12/25 02:23:09 christos Exp $	*/
+/*	$NetBSD: subr_hash.c,v 1.5 2012/06/05 20:51:36 rmind Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1991, 1993
@@ -37,12 +37,36 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_hash.c,v 1.4 2011/12/25 02:23:09 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_hash.c,v 1.5 2012/06/05 20:51:36 rmind Exp $);
 
 #include sys/param.h
 #include sys/kmem.h
 #include sys/systm.h
 
+static size_t
+hash_list_size(enum hashtype htype)
+{
+	LIST_HEAD(, generic) *hashtbl_list;
+	SLIST_HEAD(, generic) *hashtbl_slist;
+	TAILQ_HEAD(, generic) *hashtbl_tailq;
+	size_t esize;
+
+	switch (htype) {
+	case HASH_LIST:
+		esize = sizeof(*hashtbl_list);
+		break;
+	case HASH_SLIST:
+		esize = sizeof(*hashtbl_slist);
+		break;
+	case HASH_TAILQ:
+		esize = sizeof(*hashtbl_tailq);
+		break;
+	default:
+		panic(hashdone: invalid table type);
+	}
+	return esize;
+}
+
 /*
  * General routine to allocate a hash table.
  * Allocate enough memory to hold at least `elements' list-head pointers.
@@ -52,14 +76,14 @@ __KERNEL_RCSID(0, $NetBSD: subr_hash.c,
 void *
 hashinit(u_int elements, enum hashtype htype, bool waitok, u_long *hashmask)
 {
-	u_long hashsize, i;
 	LIST_HEAD(, generic) *hashtbl_list;
 	SLIST_HEAD(, generic) *hashtbl_slist;
 	TAILQ_HEAD(, generic) *hashtbl_tailq;
+	u_long hashsize, i;
 	size_t esize;
 	void *p;
-	if (elements == 0)
-		panic(hashinit: bad cnt);
+
+	KASSERT(elements  0);
 
 #define MAXELEMENTS (1U  ((sizeof(elements) * NBBY) - 1))
 	if (elements  MAXELEMENTS)
@@ -68,23 +92,10 @@ hashinit(u_int elements, enum hashtype h
 	for (hashsize = 1; hashsize  elements; hashsize = 1)
 		continue;
 
-	switch (htype) {
-	case HASH_LIST:
-		esize = sizeof(*hashtbl_list);
-		break;
-	case HASH_SLIST:
-		esize = sizeof(*hashtbl_slist);
-		break;
-	case HASH_TAILQ:
-		esize = sizeof(*hashtbl_tailq);
-		break;
-	default:
-		panic(hashinit: invalid table type);
-	}
-
-	p = kmem_alloc(hashsize * esize, (waitok ? KM_SLEEP : KM_NOSLEEP));
+	esize = hash_list_size(htype);
+	p = kmem_alloc(hashsize * esize, waitok ? KM_SLEEP : KM_NOSLEEP);
 	if (p == NULL)
-		return (NULL);
+		return NULL;
 
 	switch (htype) {
 	case HASH_LIST:
@@ -104,7 +115,7 @@ hashinit(u_int elements, enum hashtype h
 		break;
 	}
 	*hashmask = hashsize - 1;
-	return (p);
+	return p;
 }
 
 /*
@@ -113,24 +124,6 @@ hashinit(u_int elements, enum hashtype h
 void
 hashdone(void *hashtbl, enum hashtype htype, u_long hashmask)
 {
-	LIST_HEAD(, generic) *hashtbl_list;
-	SLIST_HEAD(, generic) *hashtbl_slist;
-	TAILQ_HEAD(, generic) *hashtbl_tailq;
-	size_t esize;
-
-	switch (htype) {
-	case HASH_LIST:
-		esize = sizeof(*hashtbl_list);
-		break;
-	case HASH_SLIST:
-		esize = sizeof(*hashtbl_slist);
-		break;
-	case HASH_TAILQ:
-		esize = sizeof(*hashtbl_tailq);
-		break;
-	default:
-		panic(hashdone: invalid table type);
-	}
-
+	const size_t esize = hash_list_size(htype);
 	kmem_free(hashtbl, esize * (hashmask + 1));
 }



CVS commit: src/sys/kern

2012-06-05 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Tue Jun  5 22:28:11 UTC 2012

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

Log Message:
As pool reclaiming is unlikely to happen at interrupt or softint
context, re-enable the portion of code that allows invalidation of CPU-bound
pool caches.

Two reasons:
- CPU cached objects being invalidated, the probability of fetching an
obsolete object from the pool_cache(9) is greatly reduced. This speeds up
pool_cache_get() quite a bit as it does not have to keep destroying objects
until it finds an updated one when an invalidation is in progress.

- for situations where we have to ensure that no obsolete object remains
after a state transition (canonical example: pmap mappings between Xen VM
restoration), invalidating all pool_cache(9) is the safest way to go.

As it uses xcall(9) to broadcast the execution of pool_cache_transfer(),
pool_cache_invalidate() cannot be called from interrupt or softint context
(scheduling a xcall(9) can put a LWP to sleep).

pool_cache_xcall() = pool_cache_transfer() to reflect its use.

Invalidation being a costly process (1000s objects may be destroyed),
all places where pool_cache_invalidate() may be called from
interrupt/softint context will now get caught by the proper KASSERT(), and
fixed. Ping me when you see one.

Tested under i386 and amd64 by running ATF suite within 64MiB HVM
domains (tried triggering pgdaemon a few times).

No objection on tech-kern@.

XXX a similar fix has to be pulled up to NetBSD-6, but with a more
conservative approach.

See http://mail-index.netbsd.org/tech-kern/2012/05/29/msg013245.html


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/sys/kern/subr_pool.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/subr_pool.c
diff -u src/sys/kern/subr_pool.c:1.195 src/sys/kern/subr_pool.c:1.196
--- src/sys/kern/subr_pool.c:1.195	Sat May  5 19:15:10 2012
+++ src/sys/kern/subr_pool.c	Tue Jun  5 22:28:11 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_pool.c,v 1.195 2012/05/05 19:15:10 rmind Exp $	*/
+/*	$NetBSD: subr_pool.c,v 1.196 2012/06/05 22:28:11 jym Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.195 2012/05/05 19:15:10 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: subr_pool.c,v 1.196 2012/06/05 22:28:11 jym Exp $);
 
 #include opt_ddb.h
 #include opt_lockdebug.h
@@ -191,7 +191,7 @@ static bool	pool_cache_get_slow(pool_cac
 static void	pool_cache_cpu_init1(struct cpu_info *, pool_cache_t);
 static void	pool_cache_invalidate_groups(pool_cache_t, pcg_t *);
 static void	pool_cache_invalidate_cpu(pool_cache_t, u_int);
-static void	pool_cache_xcall(pool_cache_t);
+static void	pool_cache_transfer(pool_cache_t);
 
 static int	pool_catchup(struct pool *);
 static void	pool_prime_page(struct pool *, void *,
@@ -1425,7 +1425,7 @@ pool_drain_start(struct pool **ppp, uint
 	/* If there is a pool_cache, drain CPU level caches. */
 	*ppp = pp;
 	if (pp-pr_cache != NULL) {
-		*wp = xc_broadcast(0, (xcfunc_t)pool_cache_xcall,
+		*wp = xc_broadcast(0, (xcfunc_t)pool_cache_transfer,
 		pp-pr_cache, NULL);
 	}
 }
@@ -2007,31 +2007,39 @@ pool_cache_invalidate_groups(pool_cache_
  *	Note: For pool caches that provide constructed objects, there
  *	is an assumption that another level of synchronization is occurring
  *	between the input to the constructor and the cache invalidation.
+ *
+ *	Invalidation is a costly process and should not be called from
+ *	interrupt context.
  */
 void
 pool_cache_invalidate(pool_cache_t pc)
 {
-	pcg_t *full, *empty, *part;
-#if 0
 	uint64_t where;
+	pcg_t *full, *empty, *part;
+
+	KASSERT(!cpu_intr_p()  !cpu_softintr_p());
 
 	if (ncpu  2 || !mp_online) {
 		/*
 		 * We might be called early enough in the boot process
 		 * for the CPU data structures to not be fully initialized.
-		 * In this case, simply gather the local CPU's cache now
-		 * since it will be the only one running.
+		 * In this case, transfer the content of the local CPU's
+		 * cache back into global cache as only this CPU is currently
+		 * running.
 		 */
-		pool_cache_xcall(pc);
+		pool_cache_transfer(pc);
 	} else {
 		/*
-		 * Gather all of the CPU-specific caches into the
-		 * global cache.
+		 * Signal all CPUs that they must transfer their local
+		 * cache back to the global pool then wait for the xcall to
+		 * complete.
 		 */
-		where = xc_broadcast(0, (xcfunc_t)pool_cache_xcall, pc, NULL);
+		where = xc_broadcast(0, (xcfunc_t)pool_cache_transfer,
+		pc, NULL);
 		xc_wait(where);
 	}
-#endif
+
+	/* Empty pool caches, then invalidate objects */
 	mutex_enter(pc-pc_lock);
 	full = pc-pc_fullgroups;
 	empty = pc-pc_emptygroups;
@@ -2415,13 +2423,13 @@ pool_cache_put_paddr(pool_cache_t pc, vo
 }
 
 /*
- * pool_cache_xcall:
+ * pool_cache_transfer:
  *
  *	Transfer objects 

CVS commit: src/sys/net/npf

2012-06-05 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Tue Jun  5 22:46:54 UTC 2012

Modified Files:
src/sys/net/npf: npf_state_tcp.c

Log Message:
npf_state_tcp: add an assert; fix some comments while here.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/net/npf/npf_state_tcp.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/net/npf/npf_state_tcp.c
diff -u src/sys/net/npf/npf_state_tcp.c:1.5 src/sys/net/npf/npf_state_tcp.c:1.6
--- src/sys/net/npf/npf_state_tcp.c:1.5	Wed May 30 21:38:03 2012
+++ src/sys/net/npf/npf_state_tcp.c	Tue Jun  5 22:46:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_state_tcp.c,v 1.5 2012/05/30 21:38:03 rmind Exp $	*/
+/*	$NetBSD: npf_state_tcp.c,v 1.6 2012/06/05 22:46:54 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2010-2011 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_state_tcp.c,v 1.5 2012/05/30 21:38:03 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_state_tcp.c,v 1.6 2012/06/05 22:46:54 rmind Exp $);
 
 #include sys/param.h
 #include sys/types.h
@@ -54,7 +54,7 @@ __KERNEL_RCSID(0, $NetBSD: npf_state_tc
  * NPF TCP states.  Note: these states are different from the TCP FSM
  * states of RFC 793.  The packet filter is a man-in-the-middle.
  */
-#define NPF_TCPS_OK		(-1)
+#define	NPF_TCPS_OK		(-1)
 #define	NPF_TCPS_CLOSED		0
 #define	NPF_TCPS_SYN_SENT	1
 #define	NPF_TCPS_SIMSYN_SENT	2
@@ -330,8 +330,9 @@ npf_tcp_inwindow(const npf_cache_t *npc,
 	 */
 	if (__predict_false(fstate-nst_maxwin == 0)) {
 		/*
-		 * Should be first SYN or re-transmission of SYN.  State of
-		 * other side will get set with a SYN-ACK reply (see below).
+		 * Normally, it should be the first SYN or a re-transmission
+		 * of SYN.  The state of the other side will get set with a
+		 * SYN-ACK reply (see below).
 		 */
 		fstate-nst_end = end;
 		fstate-nst_maxend = end;
@@ -370,6 +371,7 @@ npf_tcp_inwindow(const npf_cache_t *npc,
 			wscale : 0;
 		}
 	}
+
 	if ((tcpfl  TH_ACK) == 0) {
 		/* Pretend that an ACK was sent. */
 		ack = tstate-nst_end;
@@ -384,7 +386,7 @@ npf_tcp_inwindow(const npf_cache_t *npc,
 	}
 #if 0
 	/* Strict in-order sequence for RST packets. */
-	if (((tcpfl  TH_RST) != 0)  (fstate-nst_end - seq)  1) {
+	if ((tcpfl  TH_RST) != 0  (fstate-nst_end - seq)  1) {
 		return false;
 	}
 #endif
@@ -404,7 +406,7 @@ npf_tcp_inwindow(const npf_cache_t *npc,
 	}
 
 	/*
-	 * Boundaries for valid acknowledgments (III, IV) - on predicted
+	 * Boundaries for valid acknowledgments (III, IV) - one predicted
 	 * window up or down, since packets may be fragmented.
 	 */
 	ackskew = tstate-nst_end - ack;
@@ -420,6 +422,7 @@ npf_tcp_inwindow(const npf_cache_t *npc,
 	 * Negative ackskew might be due to fragmented packets.  Since the
 	 * total length of the packet is unknown - bump the boundary.
 	 */
+
 	if (ackskew  0) {
 		tstate-nst_end = ack;
 	}
@@ -444,6 +447,8 @@ npf_state_tcp(const npf_cache_t *npc, nb
 	const int tcpfl = th-th_flags, state = nst-nst_state;
 	int nstate;
 
+	KASSERT(mutex_owned(nst-nst_lock));
+
 	/* Look for a transition to a new state. */
 	if (__predict_true((tcpfl  TH_RST) == 0)) {
 		const int flagcase = npf_tcpfl2case(tcpfl);



CVS commit: src/games/colorbars

2012-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  6 00:13:36 UTC 2012

Added Files:
src/games/colorbars: Makefile colorbars.6 colorbars.c

Log Message:
new colorbars program from Nathanial Sloss


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/games/colorbars/Makefile \
src/games/colorbars/colorbars.6 src/games/colorbars/colorbars.c

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

Added files:

Index: src/games/colorbars/Makefile
diff -u /dev/null src/games/colorbars/Makefile:1.1
--- /dev/null	Tue Jun  5 20:13:36 2012
+++ src/games/colorbars/Makefile	Tue Jun  5 20:13:36 2012
@@ -0,0 +1,6 @@
+PROG=  colorbars
+MAN=   colorbars.6
+DPADD= ${LIBCURSES}
+LDADD= -lcurses
+
+.include bsd.prog.mk
Index: src/games/colorbars/colorbars.6
diff -u /dev/null src/games/colorbars/colorbars.6:1.1
--- /dev/null	Tue Jun  5 20:13:36 2012
+++ src/games/colorbars/colorbars.6	Tue Jun  5 20:13:36 2012
@@ -0,0 +1,47 @@
+.\	$NetBSD: colorbars.6,v 1.1 2012/06/06 00:13:36 christos Exp $
+.\
+.\ Copyright (c) 2012 Nathanial Sloss nathanialsl...@yahoo.com.au
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\ POSSIBILITY OF SUCH DAMAGE.
+.\
+.Dd June 5, 2012
+.Dt COLORBARS 6
+.Os
+.Sh NAME
+.Nm colorbars
+.Nd display ANSI color bars
+.Sh SYNOPSIS
+.Nm
+.Sh DESCRIPTION
+The
+.Nm
+command displays ANSI color bars on a color capable terminal using
+.Xr curses 3 .
+.Sh SEE ALSO
+.Xr curses 3
+.Sh AUTHORS
+Nathanial Sloss
+.Sh HISTORY
+.Nm
+appeared in 
+.Nx 7 .
Index: src/games/colorbars/colorbars.c
diff -u /dev/null src/games/colorbars/colorbars.c:1.1
--- /dev/null	Tue Jun  5 20:13:36 2012
+++ src/games/colorbars/colorbars.c	Tue Jun  5 20:13:36 2012
@@ -0,0 +1,124 @@
+/*	$NetBSD: colorbars.c,v 1.1 2012/06/06 00:13:36 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2012 Nathanial Sloss nathanialsl...@yahoo.com.au
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include sys/cdefs.h
+__RCSID($NetBSD: colorbars.c,v 1.1 2012/06/06 00:13:36 christos Exp $);
+
+#include curses.h
+#include stdio.h
+#include string.h
+#include err.h
+#include stdlib.h
+
+int
+main(void)
+{
+	static struct colorInfo {
+		const char *name;
+		int color;
+	} colorInfo[] = {
+		{ Black, COLOR_BLACK },
+		{ Red, COLOR_RED },
+		{ Green, COLOR_GREEN },
+		{ Yellow, COLOR_YELLOW },
+		{ Blue, COLOR_BLUE },
+		{ Magenta, 

CVS commit: src/games

2012-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  6 00:16:01 UTC 2012

Modified Files:
src/games: Makefile

Log Message:
add colorbars


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/games/Makefile

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

Modified files:

Index: src/games/Makefile
diff -u src/games/Makefile:1.26 src/games/Makefile:1.27
--- src/games/Makefile:1.26	Mon Dec 14 15:47:23 2009
+++ src/games/Makefile	Tue Jun  5 20:16:01 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2009/12/14 20:47:23 matt Exp $
+#	$NetBSD: Makefile,v 1.27 2012/06/06 00:16:01 christos Exp $
 #	@(#)Makefile	8.3 (Berkeley) 7/24/94
 
 # Missing: dungeon warp
@@ -9,7 +9,7 @@
 
 SUBDIR=	adventure arithmetic atc \
 	backgammon banner battlestar bcd boggle \
-	caesar canfield ching countmail cribbage \
+	caesar canfield ching colorbars countmail cribbage \
 	dm factor fish fortune gomoku \
 	hack hangman hunt larn mille monop morse number \
 	phantasia pig pom ppt primes quiz \



CVS commit: src/distrib/sets/lists

2012-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  6 00:23:10 UTC 2012

Modified Files:
src/distrib/sets/lists/comp: mi
src/distrib/sets/lists/games: mi

Log Message:
add colorbars


To generate a diff of this commit:
cvs rdiff -u -r1.1762 -r1.1763 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.46 -r1.47 src/distrib/sets/lists/games/mi

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1762 src/distrib/sets/lists/comp/mi:1.1763
--- src/distrib/sets/lists/comp/mi:1.1762	Sat May 26 22:35:43 2012
+++ src/distrib/sets/lists/comp/mi	Tue Jun  5 20:23:08 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1762 2012/05/27 02:35:43 matt Exp $
+#	$NetBSD: mi,v 1.1763 2012/06/06 00:23:08 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -3934,6 +3934,7 @@
 ./usr/libdata/debug/usr/games/caesar.debug	comp-utils-debug	debug
 ./usr/libdata/debug/usr/games/canfield.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/games/cfscores.debug	comp-games-debug	debug
+./usr/libdata/debug/usr/games/colorbars.debug	comp-utils-debug	debug
 ./usr/libdata/debug/usr/games/cribbage.debug	comp-games-debug	debug
 ./usr/libdata/debug/usr/games/dab.debug		comp-games-debug	debug
 ./usr/libdata/debug/usr/games/dm.debug		comp-games-debug	debug

Index: src/distrib/sets/lists/games/mi
diff -u src/distrib/sets/lists/games/mi:1.46 src/distrib/sets/lists/games/mi:1.47
--- src/distrib/sets/lists/games/mi:1.46	Sun Dec 13 21:01:54 2009
+++ src/distrib/sets/lists/games/mi	Tue Jun  5 20:23:09 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.46 2009/12/14 02:01:54 matt Exp $
+# $NetBSD: mi,v 1.47 2012/06/06 00:23:09 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -16,6 +16,7 @@
 ./usr/games/cfscoresgames-games-bin
 ./usr/games/chessgames-obsolete		obsolete
 ./usr/games/chinggames-games-bin
+./usr/games/colorbarsgames-utils-bin
 ./usr/games/countmailgames-utils-bin
 ./usr/games/cribbagegames-games-bin
 ./usr/games/dab	games-games-bin		cxx
@@ -202,6 +203,7 @@
 ./usr/share/man/cat6/canfield.0			games-games-catman	.cat
 ./usr/share/man/cat6/chess.0			games-obsolete		obsolete
 ./usr/share/man/cat6/ching.0			games-games-catman	.cat
+./usr/share/man/cat6/colorbars.0		games-utils-catman	.cat
 ./usr/share/man/cat6/countmail.0		games-utils-catman	.cat
 ./usr/share/man/cat6/cribbage.0			games-games-catman	.cat
 ./usr/share/man/cat6/dab.0			games-games-catman	.cat,cxx
@@ -254,6 +256,7 @@
 ./usr/share/man/html6/caesar.html		games-utils-htmlman	html
 ./usr/share/man/html6/canfield.html		games-games-htmlman	html
 ./usr/share/man/html6/ching.html		games-games-htmlman	html
+./usr/share/man/html6/colorbars.html		games-utils-htmlman	html
 ./usr/share/man/html6/countmail.html		games-utils-htmlman	html
 ./usr/share/man/html6/cribbage.html		games-games-htmlman	html
 ./usr/share/man/html6/dab.html			games-games-htmlman	html,cxx
@@ -307,6 +310,7 @@
 ./usr/share/man/man6/canfield.6			games-games-man		.man
 ./usr/share/man/man6/chess.6			games-obsolete		obsolete
 ./usr/share/man/man6/ching.6			games-games-man		.man
+./usr/share/man/man6/colorbars.6		games-utils-man		.man
 ./usr/share/man/man6/countmail.6		games-utils-man		.man
 ./usr/share/man/man6/cribbage.6			games-games-man		.man
 ./usr/share/man/man6/dab.6			games-games-man		.man,cxx



CVS commit: src/games/colorbars

2012-06-05 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jun  6 00:28:02 UTC 2012

Modified Files:
src/games/colorbars: colorbars.6

Log Message:
Sort sections; remove trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/games/colorbars/colorbars.6

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

Modified files:

Index: src/games/colorbars/colorbars.6
diff -u src/games/colorbars/colorbars.6:1.1 src/games/colorbars/colorbars.6:1.2
--- src/games/colorbars/colorbars.6:1.1	Wed Jun  6 00:13:36 2012
+++ src/games/colorbars/colorbars.6	Wed Jun  6 00:28:02 2012
@@ -1,4 +1,4 @@
-.\	$NetBSD: colorbars.6,v 1.1 2012/06/06 00:13:36 christos Exp $
+.\	$NetBSD: colorbars.6,v 1.2 2012/06/06 00:28:02 wiz Exp $
 .\
 .\ Copyright (c) 2012 Nathanial Sloss nathanialsl...@yahoo.com.au
 .\ All rights reserved.
@@ -39,9 +39,9 @@ command displays ANSI color bars on a co
 .Xr curses 3 .
 .Sh SEE ALSO
 .Xr curses 3
-.Sh AUTHORS
-Nathanial Sloss
 .Sh HISTORY
 .Nm
-appeared in 
+appeared in
 .Nx 7 .
+.Sh AUTHORS
+Nathanial Sloss



CVS commit: src/usr.sbin/syslogd

2012-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  6 00:33:45 UTC 2012

Modified Files:
src/usr.sbin/syslogd: Makefile sign.c syslogd.c tls.c

Log Message:
WARNS=4


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/syslogd/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/syslogd/sign.c
cvs rdiff -u -r1.108 -r1.109 src/usr.sbin/syslogd/syslogd.c
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/syslogd/tls.c

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

Modified files:

Index: src/usr.sbin/syslogd/Makefile
diff -u src/usr.sbin/syslogd/Makefile:1.23 src/usr.sbin/syslogd/Makefile:1.24
--- src/usr.sbin/syslogd/Makefile:1.23	Wed Jun  9 17:55:42 2010
+++ src/usr.sbin/syslogd/Makefile	Tue Jun  5 20:33:45 2012
@@ -1,7 +1,8 @@
-#	$NetBSD: Makefile,v 1.23 2010/06/09 21:55:42 riz Exp $
+#	$NetBSD: Makefile,v 1.24 2012/06/06 00:33:45 christos Exp $
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
 .include bsd.own.mk
 
+WARNS?=4
 USE_FORT?= yes	# network server
 
 LINTFLAGS+=-X 132,247,135,259,117,298

Index: src/usr.sbin/syslogd/sign.c
diff -u src/usr.sbin/syslogd/sign.c:1.4 src/usr.sbin/syslogd/sign.c:1.5
--- src/usr.sbin/syslogd/sign.c:1.4	Mon Feb 13 02:40:24 2012
+++ src/usr.sbin/syslogd/sign.c	Tue Jun  5 20:33:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sign.c,v 1.4 2012/02/13 07:40:24 spz Exp $	*/
+/*	$NetBSD: sign.c,v 1.5 2012/06/06 00:33:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: sign.c,v 1.4 2012/02/13 07:40:24 spz Exp $);
+__RCSID($NetBSD: sign.c,v 1.5 2012/06/06 00:33:45 christos Exp $);
 
 #ifndef DISABLE_SIGN
 #include syslogd.h
@@ -154,7 +154,7 @@ sign_global_init(struct filed *Files)
  * GlobalSign.privkey, and GlobalSign.pubkey
  */
 bool
-sign_get_keys()
+sign_get_keys(void)
 {
 	EVP_PKEY *pubkey = NULL, *privkey = NULL;
 	unsigned char *der_pubkey = NULL, *ptr_der_pubkey = NULL;
@@ -447,7 +447,7 @@ sign_sg_init(struct filed *Files)
  * free all SGs for a given algorithm
  */
 void
-sign_global_free()
+sign_global_free(void)
 {
 	struct signature_group_t *sg, *tmp_sg;
 	struct filed_queue *fq, *tmp_fq;
@@ -894,7 +894,7 @@ sign_string_sign(char *line, char **sign
 }
 
 void
-sign_new_reboot_session()
+sign_new_reboot_session(void)
 {
 	struct signature_group_t *sg;
 
@@ -930,7 +930,7 @@ sign_assign_msg_num(struct signature_gro
 
 /* increment gbc, check overflow */
 void
-sign_inc_gbc()
+sign_inc_gbc(void)
 {
 	if (++GlobalSign.gbc  SIGN_MAX_COUNT)
 		sign_new_reboot_session();

Index: src/usr.sbin/syslogd/syslogd.c
diff -u src/usr.sbin/syslogd/syslogd.c:1.108 src/usr.sbin/syslogd/syslogd.c:1.109
--- src/usr.sbin/syslogd/syslogd.c:1.108	Tue Jun  5 15:33:17 2012
+++ src/usr.sbin/syslogd/syslogd.c	Tue Jun  5 20:33:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslogd.c,v 1.108 2012/06/05 19:33:17 christos Exp $	*/
+/*	$NetBSD: syslogd.c,v 1.109 2012/06/06 00:33:45 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)syslogd.c	8.3 (Berkeley) 4/4/94;
 #else
-__RCSID($NetBSD: syslogd.c,v 1.108 2012/06/05 19:33:17 christos Exp $);
+__RCSID($NetBSD: syslogd.c,v 1.109 2012/06/06 00:33:45 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -4725,9 +4725,9 @@ writev1(int fd, struct iovec *iov, size_
 		default:
 			tot += nw;
 			while (nw  0) {
-if (iov-iov_len  nw) {
+if (iov-iov_len  (size_t)nw) {
 	iov-iov_len -= nw;
-	iov-iov_base += nw;
+	iov-iov_base = (char *)iov-iov_base + nw;
 	break;
 } else {
 	if (count-- == 0)

Index: src/usr.sbin/syslogd/tls.c
diff -u src/usr.sbin/syslogd/tls.c:1.9 src/usr.sbin/syslogd/tls.c:1.10
--- src/usr.sbin/syslogd/tls.c:1.9	Mon Feb 13 02:40:24 2012
+++ src/usr.sbin/syslogd/tls.c	Tue Jun  5 20:33:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: tls.c,v 1.9 2012/02/13 07:40:24 spz Exp $	*/
+/*	$NetBSD: tls.c,v 1.10 2012/06/06 00:33:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tls.c,v 1.9 2012/02/13 07:40:24 spz Exp $);
+__RCSID($NetBSD: tls.c,v 1.10 2012/06/06 00:33:45 christos Exp $);
 
 #ifndef DISABLE_TLS
 #include syslogd.h
@@ -143,7 +143,7 @@ getVerifySetting(const char *x509verifys
  * calls die() on serious error.
  */
 char*
-init_global_TLS_CTX()
+init_global_TLS_CTX(void)
 {
 	const char *keyfilename	  = tls_opt.keyfile;
 	const char *certfilename  = tls_opt.certfile;



CVS commit: src/games/colorbars

2012-06-05 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun  6 00:34:32 UTC 2012

Modified Files:
src/games/colorbars: Makefile

Log Message:
rcsid, warns


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/games/colorbars/Makefile

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

Modified files:

Index: src/games/colorbars/Makefile
diff -u src/games/colorbars/Makefile:1.1 src/games/colorbars/Makefile:1.2
--- src/games/colorbars/Makefile:1.1	Tue Jun  5 20:13:36 2012
+++ src/games/colorbars/Makefile	Tue Jun  5 20:34:32 2012
@@ -1,3 +1,6 @@
+# $NetBSD: Makefile,v 1.2 2012/06/06 00:34:32 christos Exp $
+
+WARNS?=	4
 PROG=  colorbars
 MAN=   colorbars.6
 DPADD= ${LIBCURSES}



CVS commit: src/sys/kern

2012-06-05 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Jun  6 05:10:54 UTC 2012

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

Log Message:
Make sure va_end is used even when errors are encountered.


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/sys/kern/kern_sysctl.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/kern_sysctl.c
diff -u src/sys/kern/kern_sysctl.c:1.235 src/sys/kern/kern_sysctl.c:1.236
--- src/sys/kern/kern_sysctl.c:1.235	Sat Jun  2 21:36:46 2012
+++ src/sys/kern/kern_sysctl.c	Wed Jun  6 05:10:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sysctl.c,v 1.235 2012/06/02 21:36:46 dsl Exp $	*/
+/*	$NetBSD: kern_sysctl.c,v 1.236 2012/06/06 05:10:54 matt Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.235 2012/06/02 21:36:46 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_sysctl.c,v 1.236 2012/06/06 05:10:54 matt Exp $);
 
 #include opt_defcorename.h
 #include ksyms.h
@@ -1957,19 +1957,26 @@ sysctl_createv(struct sysctllog **log, i
 	 */
 	va_start(ap, newlen);
 	namelen = 0;
+	error = 0;
 	ni = -1;
 	do {
-		if (++ni == CTL_MAXNAME)
-			return (ENAMETOOLONG);
+		if (++ni == CTL_MAXNAME) {
+			error = ENAMETOOLONG;
+			break;
+		}
 		name[ni] = va_arg(ap, int);
 		/*
 		 * sorry, this is not supported from here
 		 */
-		if (name[ni] == CTL_CREATESYM)
-			return (EINVAL);
+		if (name[ni] == CTL_CREATESYM) {
+			error = EINVAL;
+			break;
+		}
 	} while (name[ni] != CTL_EOL  name[ni] != CTL_CREATE);
-	namelen = ni + (name[ni] == CTL_CREATE ? 1 : 0);
 	va_end(ap);
+	if (error)
+		return error;
+	namelen = ni + (name[ni] == CTL_CREATE ? 1 : 0);
 
 	/*
 	 * what's it called