CVS commit: src/sys/rump/librump/rumpkern

2010-06-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jun 12 07:13:54 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: rump.c rump_private.h

Log Message:
Support rumpkern components and rumpkern components depending on vfs init.


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/librump/rumpkern/rump_private.h

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

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.178 src/sys/rump/librump/rumpkern/rump.c:1.179
--- src/sys/rump/librump/rumpkern/rump.c:1.178	Thu Jun 10 21:40:42 2010
+++ src/sys/rump/librump/rumpkern/rump.c	Sat Jun 12 07:13:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.178 2010/06/10 21:40:42 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.179 2010/06/12 07:13:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.178 2010/06/10 21:40:42 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: rump.c,v 1.179 2010/06/12 07:13:54 pooka Exp $);
 
 #include sys/systm.h
 #define ELFSIZE ARCH_ELFSIZE
@@ -358,10 +358,15 @@
 	/* process dso's */
 	rumpuser_dl_bootstrap(add_linkedin_modules, rump_kernelfsym_load);
 
+	rump_component_init(RUMP_COMPONENT_KERN);
+
 	/* these do nothing if not present */
 	rump_vfs_init();
 	rump_net_init();
 	rump_dev_init();
+
+	rump_component_init(RUMP_COMPONENT_KERN_VFS);
+
 	cold = 0;
 
 	/* aidondest */

Index: src/sys/rump/librump/rumpkern/rump_private.h
diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.51 src/sys/rump/librump/rumpkern/rump_private.h:1.52
--- src/sys/rump/librump/rumpkern/rump_private.h:1.51	Thu Jun 10 21:40:42 2010
+++ src/sys/rump/librump/rumpkern/rump_private.h	Sat Jun 12 07:13:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_private.h,v 1.51 2010/06/10 21:40:42 pooka Exp $	*/
+/*	$NetBSD: rump_private.h,v 1.52 2010/06/12 07:13:54 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -64,6 +64,7 @@
 	RUMP_COMPONENT_DEV,
 	RUMP_COMPONENT_NET, RUMP_COMPONENT_NET_ROUTE, RUMP_COMPONENT_NET_IF,
 	RUMP_COMPONENT_VFS,
+	RUMP_COMPONENT_KERN, RUMP_COMPONENT_KERN_VFS,
 	RUMP_COMPONENT_MAX,
 };
 struct rump_component {



CVS commit: src/sys/net

2010-06-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jun 12 08:12:03 UTC 2010

Modified Files:
src/sys/net: if.c

Log Message:
Correct the argument order of ifreqn2o conversion.

Fixes PR/42585.


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/sys/net/if.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/if.c
diff -u src/sys/net/if.c:1.243 src/sys/net/if.c:1.244
--- src/sys/net/if.c:1.243	Wed Jun  2 23:41:14 2010
+++ src/sys/net/if.c	Sat Jun 12 08:12:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.243 2010/06/02 23:41:14 dyoung Exp $	*/
+/*	$NetBSD: if.c,v 1.244 2010/06/12 08:12:03 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.243 2010/06/02 23:41:14 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.244 2010/06/12 08:12:03 skrll Exp $);
 
 #include opt_inet.h
 
@@ -1817,7 +1817,7 @@
 	}
 #ifdef COMPAT_OIFREQ
 	if (cmd != ocmd)
-		ifreqn2o(oifr, ifr);
+		ifreqn2o(ifr, oifr);
 #endif
 
 	return error;



CVS commit: xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet

2010-06-12 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Sat Jun 12 10:46:15 UTC 2010

Modified Files:
xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet:
usbtablet.man

Log Message:
Kill empty .TP, try 2


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet/usbtablet.man

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

Modified files:

Index: xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet/usbtablet.man
diff -u xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet/usbtablet.man:1.3 xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet/usbtablet.man:1.4
--- xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet/usbtablet.man:1.3	Thu Jun 10 14:12:38 2010
+++ xsrc/xfree/xc/programs/Xserver/hw/xfree86/input/usbtablet/usbtablet.man	Sat Jun 12 10:46:15 2010
@@ -95,7 +95,6 @@
 .TP 4
 .B Option \fIDebugLevel\fP \fInumber \fP
 sets the level of debugging info reported.
-.TP 4
 .RE
 .SH SEE ALSO
 XFree86(1), XF86Config(__filemansuffix__), xf86config(1), Xserver(1), X(__miscmansuffix__).



CVS commit: src/tests/util

2010-06-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jun 12 13:15:01 UTC 2010

Modified Files:
src/tests/util: t_sort.sh

Log Message:
Make the test work on an installation without sharesrc.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/util/t_sort.sh

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

Modified files:

Index: src/tests/util/t_sort.sh
diff -u src/tests/util/t_sort.sh:1.1 src/tests/util/t_sort.sh:1.2
--- src/tests/util/t_sort.sh:1.1	Sat Jun  5 22:38:39 2010
+++ src/tests/util/t_sort.sh	Sat Jun 12 13:15:01 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_sort.sh,v 1.1 2010/06/05 22:38:39 dholland Exp $
+# $NetBSD: t_sort.sh,v 1.2 2010/06/12 13:15:01 pooka Exp $
 #
 # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -28,9 +28,6 @@
 # the implementation of sort to test
 : ${TEST_SORT:=sort}
 
-# a file large enough that sort makes temporary files
-WORDS=/usr/share/dict/words
-
 
 atf_test_case basic
 basic_head()
@@ -177,7 +174,8 @@
 	# old behavior: sort: ftmp: mkstemp(-k1.1): No such file or directory
 	echo - test: sort -T + $WORDS -
 	mkdir ./+
-	$TEST_SORT -T + $WORDS  /dev/null || atf_fail program failed
+	yes | sed 20q | $TEST_SORT -T +  /dev/null \
+	|| atf_fail program failed
 	rm -rf ./+
 }
 



CVS commit: src/tests/util

2010-06-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jun 12 13:15:54 UTC 2010

Modified Files:
src/tests/util: t_sort.sh

Log Message:
fix diagnostic output


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/util/t_sort.sh

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

Modified files:

Index: src/tests/util/t_sort.sh
diff -u src/tests/util/t_sort.sh:1.2 src/tests/util/t_sort.sh:1.3
--- src/tests/util/t_sort.sh:1.2	Sat Jun 12 13:15:01 2010
+++ src/tests/util/t_sort.sh	Sat Jun 12 13:15:54 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_sort.sh,v 1.2 2010/06/12 13:15:01 pooka Exp $
+# $NetBSD: t_sort.sh,v 1.3 2010/06/12 13:15:54 pooka Exp $
 #
 # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -172,7 +172,7 @@
 	rm -f in
 
 	# old behavior: sort: ftmp: mkstemp(-k1.1): No such file or directory
-	echo - test: sort -T + $WORDS -
+	echo - test: yes | sed 20q | sort -T + -
 	mkdir ./+
 	yes | sed 20q | $TEST_SORT -T +  /dev/null \
 	|| atf_fail program failed



CVS commit: src/tests/kernel

2010-06-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jun 12 13:31:36 UTC 2010

Modified Files:
src/tests/kernel: t_umount.sh

Log Message:
Fix silly test.  First it tests that it can't cd .., then it
wants to cd .. to complete the test.  CANNOT HAVE BOTH!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/t_umount.sh

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

Modified files:

Index: src/tests/kernel/t_umount.sh
diff -u src/tests/kernel/t_umount.sh:1.2 src/tests/kernel/t_umount.sh:1.3
--- src/tests/kernel/t_umount.sh:1.2	Fri Jun  4 08:39:40 2010
+++ src/tests/kernel/t_umount.sh	Sat Jun 12 13:31:35 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_umount.sh,v 1.2 2010/06/04 08:39:40 jmmv Exp $
+# $NetBSD: t_umount.sh,v 1.3 2010/06/12 13:31:35 pooka Exp $
 #
 # Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -66,6 +66,7 @@
 	test -e ${TMPMP}/in_mounted_directory || \
 	atf_fail Test file not present in mounted directory!
 
+	mydir=`pwd`
 	cd ${TMPMP}
 	atf_check -o ignore -e ignore umount -f ${BVND}${MPART}
 
@@ -77,7 +78,7 @@
 	atf_check -s ne:0 -e ignore -o inline:cd: can't cd to ..\n \
 	-x cd .. 21
 
-	cd ..
+	cd ${mydir}
 
 	test -e ${TMPMP}/under_the_mount || \
 	atf_fail Original mount point dissapeared!



CVS commit: src/tests/ipf

2010-06-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jun 12 14:07:19 UTC 2010

Modified Files:
src/tests/ipf: t_ipf.awk t_ipf.in

Log Message:
Skip failing tests.  When someone figures out where the problem is,
these can be reenabled.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/ipf/t_ipf.awk
cvs rdiff -u -r1.1 -r1.2 src/tests/ipf/t_ipf.in

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

Modified files:

Index: src/tests/ipf/t_ipf.awk
diff -u src/tests/ipf/t_ipf.awk:1.2 src/tests/ipf/t_ipf.awk:1.3
--- src/tests/ipf/t_ipf.awk:1.2	Fri Jun  4 08:39:40 2010
+++ src/tests/ipf/t_ipf.awk	Sat Jun 12 14:07:18 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_ipf.awk,v 1.2 2010/06/04 08:39:40 jmmv Exp $
+# $NetBSD: t_ipf.awk,v 1.3 2010/06/12 14:07:18 pooka Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -29,28 +29,48 @@
 	FS = :;
 };
 
-/^tc:/ {
-
-	desc = ($4 in descs) ? descs[$4] : $4;
+function maketc(name, type, desc, rest, skip)
+{
 
-	printf atf_test_case %s\n, $2;
-	printf %s_head()\n, $2;
+	printf atf_test_case %s\n, name;
+	printf %s_head()\n, name;
 	print  {
 	printf 	atf_set \descr\ \%s\\n, desc;
 	printf 	atf_set \use.fs\ \true\\n, desc;
 	print  }
-	printf %s_body()\n, $2;
+	printf %s_body()\n, name;
 	print  {
 
-	printf 	h_%s %s, $3, $2;
-	for (i = 5; i = NF; ++i)
-		printf  \%s\, $i;
+	if (skip) {
+		printf 	atf_skip \test suspected to be broken\\n\n
+	}
+	printf 	h_%s %s %s, type, name, rest;
 	printf \n;
 
 	print  }
 	print  
 
 	tcs[count++] = $2;
+}
+
+/^tc:/ {
+	desc = ($4 in descs) ? descs[$4] : $4;
+	rest = \ $5 \
+	for (i = 6; i = NF; ++i)
+		rest = rest  \ $i \
+
+	maketc($2, $3, desc, rest, 0)
+
+	next
+}
+
+/^tc_skip:/ {
+	desc = ($4 in descs) ? descs[$4] : $4;
+	rest = \ $5 \
+	for (i = 6; i = NF; ++i)
+		rest = rest  \ $i \
+
+	maketc($2, $3, desc, rest, 1)
 
 	next
 }

Index: src/tests/ipf/t_ipf.in
diff -u src/tests/ipf/t_ipf.in:1.1 src/tests/ipf/t_ipf.in:1.2
--- src/tests/ipf/t_ipf.in:1.1	Fri Feb 20 21:42:59 2009
+++ src/tests/ipf/t_ipf.in	Sat Jun 12 14:07:18 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_ipf.in,v 1.1 2009/02/20 21:42:59 jmmv Exp $
+# $NetBSD: t_ipf.in,v 1.2 2010/06/12 14:07:18 pooka Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -321,17 +321,17 @@
 tc:i21:itest:desc_i:text:ipf
 
 tc_desc:desc_n:Checks NAT
-tc:n1:nattest:desc_n:text:text
-tc:n2:nattest:desc_n:text:text
+tc_skip:n1:nattest:desc_n:text:text
+tc_skip:n2:nattest:desc_n:text:text
 tc:n3:nattest:desc_n:text:text
-tc:n4:nattest:desc_n:text:text
-tc:n5:nattest:desc_n:text:text
-tc:n6:nattest:desc_n:text:text
+tc_skip:n4:nattest:desc_n:text:text
+tc_skip:n5:nattest:desc_n:text:text
+tc_skip:n6:nattest:desc_n:text:text
 tc:n7:nattest:desc_n:text:text
 tc:n8:nattest:desc_n:hex:hex:-T fr_update_ipid=0
 tc:n9:nattest:desc_n:hex:hex:-T fr_update_ipid=0
 tc:n10:nattest:desc_n:hex:hex:-T fr_update_ipid=0
-tc:n11:nattest:desc_n:text:text
+tc_skip:n11:nattest:desc_n:text:text
 tc:n12:nattest:desc_n:hex:hex:-T fr_update_ipid=0
 tc:n13:nattest:desc_n:text:text
 tc:n14:nattest:desc_n:text:text
@@ -343,20 +343,20 @@
 tc:ni2:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni3:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni4:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
-tc:ni5:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
+tc_skip:ni5:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni6:natipftest:desc_ni:multi:hex:hex:-T fr_update_ipid=1
 tc:ni7:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni8:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni9:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
-tc:ni10:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
-tc:ni11:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
-tc:ni12:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
+tc_skip:ni10:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
+tc_skip:ni11:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
+tc_skip:ni12:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni13:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni14:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni15:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
 tc:ni16:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=1
-tc:ni19:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=0
-tc:ni20:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=0
+tc_skip:ni19:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=0
+tc_skip:ni20:natipftest:desc_ni:single:hex:hex:-T fr_update_ipid=0
 tc:ni21:natipftest:desc_ni:multi:text:text
 tc:ni23:natipftest:desc_ni:multi:text:text:-D
 
@@ -389,8 +389,8 @@
 tc:ipv6_6:dotest6:desc_ipv6:hex:text
 
 tc_desc:desc_bpf:Checks BPF
-tc:bpf1:itest:desc_bpf:text:ipf
-tc:bpf_f1:bpftest:desc_bpf:text:text
+tc_skip:bpf1:itest:desc_bpf:text:ipf

CVS commit: src/tests/net/sys

2010-06-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jun 12 14:18:21 UTC 2010

Modified Files:
src/tests/net/sys: Atffile

Log Message:
tp-glob t_* instead of * (so that atf-run works in the source directory)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/net/sys/Atffile

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

Modified files:

Index: src/tests/net/sys/Atffile
diff -u src/tests/net/sys/Atffile:1.4 src/tests/net/sys/Atffile:1.5
--- src/tests/net/sys/Atffile:1.4	Sun Dec 30 09:13:33 2007
+++ src/tests/net/sys/Atffile	Sat Jun 12 14:18:21 2010
@@ -1,6 +1,6 @@
 Content-Type: application/X-atf-atffile; version=1
-X-NetBSD-Id: $NetBSD: Atffile,v 1.4 2007/12/30 09:13:33 jmmv Exp $
+X-NetBSD-Id: $NetBSD: Atffile,v 1.5 2010/06/12 14:18:21 pooka Exp $
 
 prop: test-suite = NetBSD
 
-tp-glob: *
+tp-glob: t_*



CVS commit: src/tests/net/sys

2010-06-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Jun 12 14:31:29 UTC 2010

Modified Files:
src/tests/net/sys: t_connect.c

Log Message:
Connect to localhost instead of www.netbsd.org to a) make this work
in non-routed setups b) avoid the dubious security implications.
Also, to make the test actually do what it claims to do, call
getsockname() and verify we got a low port.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/net/sys/t_connect.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/net/sys/t_connect.c
diff -u src/tests/net/sys/t_connect.c:1.1 src/tests/net/sys/t_connect.c:1.2
--- src/tests/net/sys/t_connect.c:1.1	Thu May  1 15:38:17 2008
+++ src/tests/net/sys/t_connect.c	Sat Jun 12 14:31:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_connect.c,v 1.1 2008/05/01 15:38:17 jmmv Exp $	*/
+/*	$NetBSD: t_connect.c,v 1.2 2010/06/12 14:31:29 pooka Exp $	*/
 /*
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -45,11 +45,23 @@
 }
 ATF_TC_BODY(low_port, tc)
 {
-	struct sockaddr_in sin;
-	int sd, val;
+	struct sockaddr_in sin, sinlist;
+	int sd, val, slist;
+	socklen_t slen;
 
+	slist = socket(AF_INET, SOCK_STREAM, 0);
 	sd = socket(AF_INET, SOCK_STREAM, 0);
 
+	/* bind listening sucket */
+	memset(sinlist, 0, sizeof(sinlist));
+	sinlist.sin_family = AF_INET;
+	sinlist.sin_port = htons(31522);
+	sinlist.sin_addr.s_addr = inet_addr(127.0.0.1);
+
+	ATF_REQUIRE_EQ(bind(slist,
+	(struct sockaddr *)sinlist, sizeof(sinlist)), 0);
+	ATF_REQUIRE_EQ(listen(slist, 1), 0);
+
 	val = IP_PORTRANGE_LOW;
 	if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE, val,
 	sizeof(val)) == -1)
@@ -57,8 +69,8 @@
 
 	memset(sin, 0, sizeof(sin));
 
-	sin.sin_port = htons(80);
-	sin.sin_addr.s_addr = inet_addr(204.152.190.12); /* www.NetBSD.org */
+	sin.sin_port = htons(31522);
+	sin.sin_addr.s_addr = inet_addr(127.0.0.1);
 	sin.sin_family = AF_INET;
 
 	if (connect(sd, (struct sockaddr *)sin, sizeof(sin)) == -1) {
@@ -69,6 +81,11 @@
 		source-changes/2007/12/16/0011.html));
 	}
 
+	slen = sizeof(sin);
+	ATF_REQUIRE_EQ(getsockname(sd, (struct sockaddr *)sin, slen), 0);
+	ATF_REQUIRE_EQ(slen, sizeof(sin));
+	ATF_REQUIRE(ntohs(sin.sin_port) = IPPORT_RESERVEDMAX);
+
 	close(sd);
 }
 



CVS commit: src/tests/net/sys

2010-06-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Jun 12 15:01:04 UTC 2010

Modified Files:
src/tests/net/sys: t_connect.c

Log Message:
Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/net/sys/t_connect.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/net/sys/t_connect.c
diff -u src/tests/net/sys/t_connect.c:1.2 src/tests/net/sys/t_connect.c:1.3
--- src/tests/net/sys/t_connect.c:1.2	Sat Jun 12 14:31:29 2010
+++ src/tests/net/sys/t_connect.c	Sat Jun 12 15:01:04 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_connect.c,v 1.2 2010/06/12 14:31:29 pooka Exp $	*/
+/*	$NetBSD: t_connect.c,v 1.3 2010/06/12 15:01:04 wiz Exp $	*/
 /*
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -52,7 +52,7 @@
 	slist = socket(AF_INET, SOCK_STREAM, 0);
 	sd = socket(AF_INET, SOCK_STREAM, 0);
 
-	/* bind listening sucket */
+	/* bind listening socket */
 	memset(sinlist, 0, sizeof(sinlist));
 	sinlist.sin_family = AF_INET;
 	sinlist.sin_port = htons(31522);



CVS commit: [netbsd-5] src/sys/net

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jun 12 16:37:55 UTC 2010

Modified Files:
src/sys/net [netbsd-5]: if.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1416):
sys/net/if.c: revision 1.244
Correct the argument order of ifreqn2o conversion.
Fixes PR/42585.


To generate a diff of this commit:
cvs rdiff -u -r1.230.4.2 -r1.230.4.3 src/sys/net/if.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/if.c
diff -u src/sys/net/if.c:1.230.4.2 src/sys/net/if.c:1.230.4.3
--- src/sys/net/if.c:1.230.4.2	Sat Nov 28 15:47:05 2009
+++ src/sys/net/if.c	Sat Jun 12 16:37:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.230.4.2 2009/11/28 15:47:05 bouyer Exp $	*/
+/*	$NetBSD: if.c,v 1.230.4.3 2010/06/12 16:37:55 riz Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.2 2009/11/28 15:47:05 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.3 2010/06/12 16:37:55 riz Exp $);
 
 #include opt_inet.h
 
@@ -1713,7 +1713,7 @@
 	}
 #ifdef COMPAT_OIFREQ
 	if (cmd != ocmd)
-		ifreqn2o(oifr, ifr);
+		ifreqn2o(ifr, oifr);
 #endif
 
 	return error;



CVS commit: [netbsd-5] src/doc

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jun 12 16:40:14 UTC 2010

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

Log Message:
Ticket 1416 snuck in.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.233 -r1.1.2.234 src/doc/CHANGES-5.1

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

Modified files:

Index: src/doc/CHANGES-5.1
diff -u src/doc/CHANGES-5.1:1.1.2.233 src/doc/CHANGES-5.1:1.1.2.234
--- src/doc/CHANGES-5.1:1.1.2.233	Sat Jun 12 02:51:37 2010
+++ src/doc/CHANGES-5.1	Sat Jun 12 16:40:14 2010
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1,v 1.1.2.233 2010/06/12 02:51:37 riz Exp $
+# $NetBSD: CHANGES-5.1,v 1.1.2.234 2010/06/12 16:40:14 riz Exp $
 
 A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1
 release:
@@ -17342,6 +17342,11 @@
 	add a note about native xorg updates
 	[mrg, ticket #1413]
 
+sys/net/if.c	1.244
+
+	Correct the argument order of ifreqn2o conversion.  Fixes PR/42585.
+	[skrll, ticket #1416]
+
 gnu/usr.bin/groff/tmac/mdoc.local		patch
 sys/sys/param.h	patch
 



CVS commit: [netbsd-4] src/external/bsd/fetch/dist/libfetch

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jun 12 17:58:13 UTC 2010

Modified Files:
src/external/bsd/fetch/dist/libfetch [netbsd-4]: common.c common.h
fetch.3 fetch.c fetch.cat3 fetch.h file.c ftp.c http.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1384):
external/bsd/fetch/dist/libfetch/common.c   1.1.1.6-8
external/bsd/fetch/dist/libfetch/common.h   1.1.1.5-6
external/bsd/fetch/dist/libfetch/fetch.31.1.1.7-8
external/bsd/fetch/dist/libfetch/fetch.c1.1.1.8
external/bsd/fetch/dist/libfetch/fetch.cat3 1.1.1.4-5
external/bsd/fetch/dist/libfetch/fetch.h1.1.1.5-7
external/bsd/fetch/dist/libfetch/file.c 1.1.1.5-6
external/bsd/fetch/dist/libfetch/ftp.c  1.1.1.7-10
external/bsd/fetch/dist/libfetch/http.c 1.1.1.5-7

Import libfetch-2.25:
- address a number of lint warnings
- fix strict-alignment issues for GCC 4.4
- fix a bug in the line reading optimisation
- do not reuse a FTP connection if there is an active transfer on it

libfetch-2.26:
- Add support to aggressively cache directory listenings, useful for
HTTP
- Avoid leaking memory in error cases. From Xavier from Arch Linux.

libfetch-2.30:
- Revamped connection cache, allowing more than one active session
- HTTP keep-alive support


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5.4.2 -r1.1.1.5.4.3 \
src/external/bsd/fetch/dist/libfetch/common.c \
src/external/bsd/fetch/dist/libfetch/fetch.h \
src/external/bsd/fetch/dist/libfetch/file.c \
src/external/bsd/fetch/dist/libfetch/http.c
cvs rdiff -u -r1.1.1.4.4.2 -r1.1.1.4.4.3 \
src/external/bsd/fetch/dist/libfetch/common.h
cvs rdiff -u -r1.1.1.6.4.2 -r1.1.1.6.4.3 \
src/external/bsd/fetch/dist/libfetch/fetch.3 \
src/external/bsd/fetch/dist/libfetch/ftp.c
cvs rdiff -u -r1.1.1.7.4.2 -r1.1.1.7.4.3 \
src/external/bsd/fetch/dist/libfetch/fetch.c
cvs rdiff -u -r1.1.1.3.4.2 -r1.1.1.3.4.3 \
src/external/bsd/fetch/dist/libfetch/fetch.cat3

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

Modified files:

Index: src/external/bsd/fetch/dist/libfetch/common.c
diff -u src/external/bsd/fetch/dist/libfetch/common.c:1.1.1.5.4.2 src/external/bsd/fetch/dist/libfetch/common.c:1.1.1.5.4.3
--- src/external/bsd/fetch/dist/libfetch/common.c:1.1.1.5.4.2	Fri Jun  5 17:19:28 2009
+++ src/external/bsd/fetch/dist/libfetch/common.c	Sat Jun 12 17:58:12 2010
@@ -1,7 +1,7 @@
-/*	$NetBSD: common.c,v 1.1.1.5.4.2 2009/06/05 17:19:28 snj Exp $	*/
+/*	$NetBSD: common.c,v 1.1.1.5.4.3 2010/06/12 17:58:12 riz Exp $	*/
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
- * Copyright (c) 2008 Joerg Sonnenberger jo...@netbsd.org
+ * Copyright (c) 2008, 2010 Joerg Sonnenberger jo...@netbsd.org
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -62,12 +62,13 @@
 #include string.h
 #include unistd.h
 
+#ifndef MSG_NOSIGNAL
+#include signal.h
+#endif
+
 #include fetch.h
 #include common.h
 
-#define DECONST(x,y) ((x)(uintptr_t)(y))
-
-
 /*** Local data **/
 
 /*
@@ -83,10 +84,6 @@
 	{ -1,		FETCH_UNKNOWN,	Unknown resolver error }
 };
 
-/* End-of-Line */
-static const char ENDL[2] = \r\n;
-
-
 /*** Error-reporting functions ***/
 
 /*
@@ -234,22 +231,10 @@
 	/* allocate and fill connection structure */
 	if ((conn = calloc(1, sizeof(*conn))) == NULL)
 		return (NULL);
+	conn-cache_url = NULL;
 	conn-next_buf = NULL;
 	conn-next_len = 0;
 	conn-sd = sd;
-	++conn-ref;
-	return (conn);
-}
-
-
-/*
- * Bump a connection's reference count.
- */
-conn_t *
-fetch_ref(conn_t *conn)
-{
-
-	++conn-ref;
 	return (conn);
 }
 
@@ -261,17 +246,17 @@
 fetch_bind(int sd, int af, const char *addr)
 {
 	struct addrinfo hints, *res, *res0;
-	int error;
 
 	memset(hints, 0, sizeof(hints));
 	hints.ai_family = af;
 	hints.ai_socktype = SOCK_STREAM;
 	hints.ai_protocol = 0;
-	if ((error = getaddrinfo(addr, NULL, hints, res0)) != 0)
+	if (getaddrinfo(addr, NULL, hints, res0))
 		return (-1);
-	for (res = res0; res; res = res-ai_next)
+	for (res = res0; res; res = res-ai_next) {
 		if (bind(sd, res-ai_addr, res-ai_addrlen) == 0)
 			return (0);
+	}
 	return (-1);
 }
 
@@ -280,7 +265,7 @@
  * Establish a TCP connection to the specified port on the specified host.
  */
 conn_t *
-fetch_connect(const char *host, int port, int af, int verbose)
+fetch_connect(struct url *url, int af, int verbose)
 {
 	conn_t *conn;
 	char pbuf[10];
@@ -289,22 +274,22 @@
 	int sd, error;
 
 	if (verbose)
-		fetch_info(looking up %s, host);
+		fetch_info(looking up %s, url-host);
 
 	/* look up host name and set up socket address structure */
-	snprintf(pbuf, sizeof(pbuf), %d, port);
+	snprintf(pbuf, sizeof(pbuf), %d, url-port);
 	

CVS commit: src/usr.sbin/chrtbl

2010-06-12 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Sat Jun 12 18:02:31 UTC 2010

Modified Files:
src/usr.sbin/chrtbl: ctypeio.c

Log Message:
s/_CTYPE_NUM_CHARS/_CTYPE_CACHE_SIZE/


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/chrtbl/ctypeio.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/chrtbl/ctypeio.c
diff -u src/usr.sbin/chrtbl/ctypeio.c:1.3 src/usr.sbin/chrtbl/ctypeio.c:1.4
--- src/usr.sbin/chrtbl/ctypeio.c:1.3	Sat May 22 06:38:16 2010
+++ src/usr.sbin/chrtbl/ctypeio.c	Sat Jun 12 18:02:31 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: ctypeio.c,v 1.3 2010/05/22 06:38:16 tnozaki Exp $ */
+/* $NetBSD: ctypeio.c,v 1.4 2010/06/12 18:02:31 tnozaki Exp $ */
 
 /*
  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.
@@ -26,7 +26,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: ctypeio.c,v 1.3 2010/05/22 06:38:16 tnozaki Exp $);
+__RCSID($NetBSD: ctypeio.c,v 1.4 2010/06/12 18:02:31 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include sys/types.h
@@ -46,7 +46,7 @@
 short *new_toupper, short *new_tolower)
 {
 	FILE *fp;
-	uint32_t i, len = _CTYPE_NUM_CHARS;
+	uint32_t i, len = _CTYPE_CACHE_SIZE;
 
 	_DIAGASSERT(name != NULL);
 	_DIAGASSERT(new_ctype != NULL);



CVS commit: src/lib/libc/locale

2010-06-12 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Sat Jun 12 18:03:09 UTC 2010

Modified Files:
src/lib/libc/locale: bsdctype.h

Log Message:
s/_CTYPE_NUM_CHARS/_CTYPE_CACHE_SIZE/


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/locale/bsdctype.h

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

Modified files:

Index: src/lib/libc/locale/bsdctype.h
diff -u src/lib/libc/locale/bsdctype.h:1.4 src/lib/libc/locale/bsdctype.h:1.5
--- src/lib/libc/locale/bsdctype.h:1.4	Tue Jun  1 18:00:28 2010
+++ src/lib/libc/locale/bsdctype.h	Sat Jun 12 18:03:09 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bsdctype.h,v 1.4 2010/06/01 18:00:28 tnozaki Exp $ */
+/* $NetBSD: bsdctype.h,v 1.5 2010/06/12 18:03:09 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -35,9 +35,9 @@
 	char			fbl_id[8];
 	uint32_t		fbl_rev;
 	uint32_t		fbl_num_chars;
-	uint8_t			fbl_ctype_tab  [_CTYPE_NUM_CHARS];
-	int16_t			fbl_tolower_tab[_CTYPE_NUM_CHARS];
-	int16_t			fbl_toupper_tab[_CTYPE_NUM_CHARS];
+	uint8_t			fbl_ctype_tab  [_CTYPE_CACHE_SIZE];
+	int16_t			fbl_tolower_tab[_CTYPE_CACHE_SIZE];
+	int16_t			fbl_toupper_tab[_CTYPE_CACHE_SIZE];
 } __packed _FileBSDCTypeLocale;
 
 typedef struct {



CVS commit: [netbsd-4] src/doc

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jun 12 18:27:43 UTC 2010

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

Log Message:
Tickets 1384, 1385.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.198 -r1.1.2.199 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.198 src/doc/CHANGES-4.1:1.1.2.199
--- src/doc/CHANGES-4.1:1.1.2.198	Sun Mar 28 18:49:28 2010
+++ src/doc/CHANGES-4.1	Sat Jun 12 18:27:43 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.198 2010/03/28 18:49:28 snj Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.199 2010/06/12 18:27:43 riz Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4073,3 +4073,47 @@
 	an OpenSSL client or server to crash due to a read attempt at NULL.
 	[bouyer, ticket #1392]
 
+external/bsd/fetch/dist/libfetch/common.c	1.1.1.6-8
+external/bsd/fetch/dist/libfetch/common.h	1.1.1.5-6
+external/bsd/fetch/dist/libfetch/fetch.3	1.1.1.7-8
+external/bsd/fetch/dist/libfetch/fetch.c	1.1.1.8
+external/bsd/fetch/dist/libfetch/fetch.cat3	1.1.1.4-5
+external/bsd/fetch/dist/libfetch/fetch.h	1.1.1.5-7
+external/bsd/fetch/dist/libfetch/file.c		1.1.1.5-6
+external/bsd/fetch/dist/libfetch/ftp.c		1.1.1.7-10
+external/bsd/fetch/dist/libfetch/http.c		1.1.1.5-7
+
+	Update to libfetch-2.30
+	[joerg, ticket #1384]
+
+external/bsd/pkg_install/dist/add/add.h			patch
+external/bsd/pkg_install/dist/add/main.c		patch
+external/bsd/pkg_install/dist/add/perform.c		patch
+external/bsd/pkg_install/dist/add/pkg_add.1		patch
+external/bsd/pkg_install/dist/admin/README		removed
+external/bsd/pkg_install/dist/admin/check.c		patch
+external/bsd/pkg_install/dist/admin/main.c		patch
+external/bsd/pkg_install/dist/admin/pkg_admin.1		patch
+external/bsd/pkg_install/dist/create/build.c		patch
+external/bsd/pkg_install/dist/create/create.h		patch
+external/bsd/pkg_install/dist/create/main.c		patch
+external/bsd/pkg_install/dist/create/perform.c		patch
+external/bsd/pkg_install/dist/create/pkg_create.1	patch
+external/bsd/pkg_install/dist/create/pl.c		patch
+external/bsd/pkg_install/dist/delete/pkg_delete.1	patch
+external/bsd/pkg_install/dist/delete/pkg_delete.c	patch
+external/bsd/pkg_install/dist/info/main.c		patch
+external/bsd/pkg_install/dist/info/perform.c		patch
+external/bsd/pkg_install/dist/info/pkg_info.1		patch
+external/bsd/pkg_install/dist/lib/conflicts.c		patch
+external/bsd/pkg_install/dist/lib/iterate.c		patch
+external/bsd/pkg_install/dist/lib/lib.h			patch
+external/bsd/pkg_install/dist/lib/license.c		patch
+external/bsd/pkg_install/dist/lib/parse-config.c	patch
+external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in	patch
+external/bsd/pkg_install/dist/lib/pkgdb.c		patch
+external/bsd/pkg_install/dist/lib/version.c		patch
+external/bsd/pkg_install/dist/lib/version.h		patch
+	
+	Update to pkg_install-20100204.
+	[joerg, ticket #1385]



CVS commit: [netbsd-4] src/crypto/dist/openssl/crypto/evp

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jun 12 18:32:22 UTC 2010

Modified Files:
src/crypto/dist/openssl/crypto/evp [netbsd-4]: m_sha1.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1386):
crypto/dist/openssl/crypto/evp/m_sha1.c: patch
Ensure that SHA384 always calls the SHA384 functions.
Should fix PR 42881.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4.4.1 -r1.1.1.4.4.2 \
src/crypto/dist/openssl/crypto/evp/m_sha1.c

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

Modified files:

Index: src/crypto/dist/openssl/crypto/evp/m_sha1.c
diff -u src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.1.1.4.4.1 src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.1.1.4.4.2
--- src/crypto/dist/openssl/crypto/evp/m_sha1.c:1.1.1.4.4.1	Wed Jul 22 22:31:06 2009
+++ src/crypto/dist/openssl/crypto/evp/m_sha1.c	Sat Jun 12 18:32:22 2010
@@ -158,8 +158,12 @@
 static int init512(EVP_MD_CTX *ctx)
 	{ return SHA512_Init(ctx-md_data); }
 /* See comment in SHA224/256 section */
+static int update384(EVP_MD_CTX *ctx,const void *data,size_t count)
+	{ return SHA384_Update(ctx-md_data,data,count); }
 static int update512(EVP_MD_CTX *ctx,const void *data,size_t count)
 	{ return SHA512_Update(ctx-md_data,data,count); }
+static int final384(EVP_MD_CTX *ctx,unsigned char *md)
+	{ return SHA384_Final(md,ctx-md_data); }
 static int final512(EVP_MD_CTX *ctx,unsigned char *md)
 	{ return SHA512_Final(md,ctx-md_data); }
 
@@ -170,8 +174,8 @@
 	SHA384_DIGEST_LENGTH,
 	0,
 	init384,
-	update512,
-	final512,
+	update384,
+	final384,
 	NULL,
 	NULL,
 	EVP_PKEY_RSA_method,



CVS commit: [netbsd-4] src/sys/compat

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jun 12 18:38:02 UTC 2010

Modified Files:
src/sys/compat/common [netbsd-4]: vfs_syscalls_30.c
src/sys/compat/ibcs2 [netbsd-4]: ibcs2_misc.c
src/sys/compat/irix [netbsd-4]: irix_dirent.c
src/sys/compat/linux/common [netbsd-4]: linux_file64.c linux_misc.c
src/sys/compat/sunos [netbsd-4]: sunos_misc.c
src/sys/compat/sunos32 [netbsd-4]: sunos32_misc.c
src/sys/compat/svr4 [netbsd-4]: svr4_misc.c
src/sys/compat/svr4_32 [netbsd-4]: svr4_32_misc.c

Log Message:
Pull up following revision(s) (requested by he in ticket #1387):
sys/compat/svr4/svr4_misc.c: revision 1.149
sys/compat/linux/common/linux_misc.c: revision 1.214
sys/compat/common/vfs_syscalls_30.c: revision 1.31
sys/compat/sunos/sunos_misc.c: revision 1.166
sys/compat/linux/common/linux_file64.c: revision 1.50
sys/compat/svr4_32/svr4_32_misc.c: revision 1.68
sys/compat/ibcs2/ibcs2_misc.c: revision 1.110
sys/compat/linux32/common/linux32_dirent.c: revision 1.10
sys/compat/sunos32/sunos32_misc.c: revision 1.69
sys/compat/irix/irix_dirent.c: revision 1.24
sys/compat/osf1/osf1_file.c: revision 1.38
When implementing read directory, when there are too many empty entries
in a row, and we need to try to read the next block, and have passed a
non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie
buffer before re-doing VOP_READDIR, so that we don't leak memory.
This fix is similar to nfs_serv.c revisions 1.115 + 1.124.
This should fix the long-standing problem observed by e.g. using Linux-
emulated programs to take backup of servers, which is one of the problems
which were reported in PR#42661.
Thanks to pooka@ for the hints for traversing the VOP* layer.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/compat/common/vfs_syscalls_30.c
cvs rdiff -u -r1.81 -r1.81.2.1 src/sys/compat/ibcs2/ibcs2_misc.c
cvs rdiff -u -r1.16 -r1.16.18.1 src/sys/compat/irix/irix_dirent.c
cvs rdiff -u -r1.34 -r1.34.8.1 src/sys/compat/linux/common/linux_file64.c
cvs rdiff -u -r1.165.2.2 -r1.165.2.3 src/sys/compat/linux/common/linux_misc.c
cvs rdiff -u -r1.143 -r1.143.2.1 src/sys/compat/sunos/sunos_misc.c
cvs rdiff -u -r1.42 -r1.42.2.1 src/sys/compat/sunos32/sunos32_misc.c
cvs rdiff -u -r1.121 -r1.121.2.1 src/sys/compat/svr4/svr4_misc.c
cvs rdiff -u -r1.39 -r1.39.2.1 src/sys/compat/svr4_32/svr4_32_misc.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/compat/common/vfs_syscalls_30.c
diff -u src/sys/compat/common/vfs_syscalls_30.c:1.18 src/sys/compat/common/vfs_syscalls_30.c:1.18.2.1
--- src/sys/compat/common/vfs_syscalls_30.c:1.18	Thu Nov 16 01:32:41 2006
+++ src/sys/compat/common/vfs_syscalls_30.c	Sat Jun 12 18:38:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_syscalls_30.c,v 1.18 2006/11/16 01:32:41 christos Exp $	*/
+/*	$NetBSD: vfs_syscalls_30.c,v 1.18.2.1 2010/06/12 18:38:01 riz Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_syscalls_30.c,v 1.18 2006/11/16 01:32:41 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_syscalls_30.c,v 1.18.2.1 2010/06/12 18:38:01 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -335,8 +335,12 @@
 	}
 
 	/* if we squished out the whole block, try again */
-	if (outp == SCARG(uap, buf))
+	if (outp == SCARG(uap, buf)) {
+		if (cookiebuf)
+			free(cookiebuf, M_TEMP);
+		cookiebuf = NULL;
 		goto again;
+	}
 	fp-f_offset = off;	/* update the vnode offset */
 
 eof:

Index: src/sys/compat/ibcs2/ibcs2_misc.c
diff -u src/sys/compat/ibcs2/ibcs2_misc.c:1.81 src/sys/compat/ibcs2/ibcs2_misc.c:1.81.2.1
--- src/sys/compat/ibcs2/ibcs2_misc.c:1.81	Thu Nov 16 01:32:42 2006
+++ src/sys/compat/ibcs2/ibcs2_misc.c	Sat Jun 12 18:38:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibcs2_misc.c,v 1.81 2006/11/16 01:32:42 christos Exp $	*/
+/*	$NetBSD: ibcs2_misc.c,v 1.81.2.1 2010/06/12 18:38:01 riz Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -95,7 +95,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ibcs2_misc.c,v 1.81 2006/11/16 01:32:42 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: ibcs2_misc.c,v 1.81.2.1 2010/06/12 18:38:01 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -504,8 +504,12 @@
 	}
 
 	/* if we squished out the whole block, try again */
-	if (outp == SCARG(uap, buf))
+	if (outp == SCARG(uap, buf)) {
+		if (cookiebuf)
+			free(cookiebuf, M_TEMP);
+		cookiebuf = NULL;
 		goto again;
+	}
 	fp-f_offset = off;	/* update the vnode offset */
 
 eof:
@@ -638,8 +642,12 @@
 		resid -= ibcs2_reclen;
 	}
 	/* if we squished out the whole block, try again */
-	if (outp == SCARG(uap, buf))
+	if (outp == SCARG(uap, buf)) {
+		if (cookiebuf)
+			free(cookiebuf, M_TEMP);
+		cookiebuf = NULL;

CVS commit: [netbsd-4] src/doc

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Jun 12 18:39:02 UTC 2010

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

Log Message:
Tickets 1386, 1387


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.199 -r1.1.2.200 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.199 src/doc/CHANGES-4.1:1.1.2.200
--- src/doc/CHANGES-4.1:1.1.2.199	Sat Jun 12 18:27:43 2010
+++ src/doc/CHANGES-4.1	Sat Jun 12 18:39:02 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.199 2010/06/12 18:27:43 riz Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.200 2010/06/12 18:39:02 riz Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4117,3 +4117,26 @@
 	
 	Update to pkg_install-20100204.
 	[joerg, ticket #1385]
+
+crypto/dist/openssl/crypto/evp/m_sha1.c		patch
+
+	Ensure that SHA384 always calls the SHA384 functions.
+	Should fix PR 42881.
+	[joerg, ticket #1386]
+
+sys/compat/common/vfs_syscalls_30.c		1.31 via patch
+sys/compat/ibcs2/ibcs2_misc.c			1.110 via patch
+sys/compat/irix/irix_dirent.c			1.24 via patch
+sys/compat/linux/common/linux_file64.c		1.50 via patch
+sys/compat/linux/common/linux_misc.c		1.214 via patch
+sys/compat/linux32/common/linux32_dirent.c	1.10 via patch
+sys/compat/osf1/osf1_file.c			1.38 via patch
+sys/compat/sunos/sunos_misc.c			1.166 via patch
+sys/compat/sunos32/sunos32_misc.c		1.69 via patch
+sys/compat/svr4/svr4_misc.c			1.149 via patch
+sys/compat/svr4_32/svr4_32_misc.c		1.68 via patch
+
+	Ensure that we free the cookie buffer before re-doing
+	VOP_READDIR, so that we don't leak memory. PR#42661.
+	[he, ticket #1387]
+



CVS commit: src/sys/nfs

2010-06-12 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jun 12 21:10:55 UTC 2010

Modified Files:
src/sys/nfs: nfs_bio.c

Log Message:
Fix memory leak during some NFS writes.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/nfs/nfs_bio.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/nfs/nfs_bio.c
diff -u src/sys/nfs/nfs_bio.c:1.184 src/sys/nfs/nfs_bio.c:1.185
--- src/sys/nfs/nfs_bio.c:1.184	Fri Apr 23 15:38:47 2010
+++ src/sys/nfs/nfs_bio.c	Sat Jun 12 21:10:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bio.c,v 1.184 2010/04/23 15:38:47 pooka Exp $	*/
+/*	$NetBSD: nfs_bio.c,v 1.185 2010/06/12 21:10:55 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.184 2010/04/23 15:38:47 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.185 2010/06/12 21:10:55 jakllsch Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_nfs.h
@@ -1049,7 +1049,7 @@
 pgs[i]-flags = ~(PG_NEEDCOMMIT | PG_RDONLY);
 			}
 			mutex_exit(uobj-vmobjlock);
-			return 0;
+			goto out;
 		} else if (error == NFSERR_STALEWRITEVERF) {
 			nfs_clearcommit(vp-v_mount);
 			goto again;



CVS commit: src/sys/dev/usb

2010-06-12 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jun 12 23:15:19 UTC 2010

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add a couple more product IDs for the ASIX Ethernet interfaces


To generate a diff of this commit:
cvs rdiff -u -r1.553 -r1.554 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.553 src/sys/dev/usb/usbdevs:1.554
--- src/sys/dev/usb/usbdevs:1.553	Fri Jun 11 18:22:06 2010
+++ src/sys/dev/usb/usbdevs	Sat Jun 12 23:15:18 2010
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.553 2010/06/11 18:22:06 tnn Exp $
+$NetBSD: usbdevs,v 1.554 2010/06/12 23:15:18 pgoyette Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -718,6 +718,7 @@
 product ASIX AX88172		0x1720	AX88172 USB 2.0 10/100 Ethernet adapter
 product ASIX AX88178		0x1780	AX88178 USB 2.0 10/100 Ethernet adapter
 product ASIX AX88772		0x7720	AX88772 USB 2.0 10/100 Ethernet adapter
+product ASIX AX88772A		0x772a	AX88772A USB 2.0 10/100 Ethernet adapter
 
 /* ASUSTeK computer products */
 product ASUSTEK WL167G		0x1707	WL-167g USB2.0 WLAN Adapter
@@ -1586,6 +1587,7 @@
 product MSI RT2573_2		0x6877	RT2573
 product MSI RT2573_3		0xa861	RT2573
 product MSI RT2573_4		0xa874	RT2573
+product MSI AX88772A		0xa877	AX88772A USB 2.0 10/100 Ethernet adapter
 
 /* Microchip Technology products */
 product MICROCHIP PICKIT1	0x0032	PICkit(TM) 1 FLASH Starter Kit



CVS commit: src/sys/dev/rasops

2010-06-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 13 01:55:24 UTC 2010

Modified Files:
src/sys/dev/rasops: rasops.c

Log Message:
Put underline properly (not upperline) on CCW screen.
Tested on hpcarm WS003SH.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/dev/rasops/rasops.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.64 src/sys/dev/rasops/rasops.c:1.65
--- src/sys/dev/rasops/rasops.c:1.64	Thu May  6 04:30:18 2010
+++ src/sys/dev/rasops/rasops.c	Sun Jun 13 01:55:24 2010
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.64 2010/05/06 04:30:18 macallan Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.65 2010/06/13 01:55:24 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rasops.c,v 1.64 2010/05/06 04:30:18 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: rasops.c,v 1.65 2010/06/13 01:55:24 tsutsui Exp $);
 
 #include opt_rasops.h
 #include rasops_glue.h
@@ -1456,7 +1456,8 @@
 
 	/* Do rotated underline */
 	rp = ri-ri_bits + (ri-ri_cols - col - 1) * ri-ri_yscale +
-	row * ri-ri_xscale;
+	row * ri-ri_xscale +
+	(ri-ri_font-fontwidth - 1) * ri-ri_pelbytes;
 	height = ri-ri_font-fontheight;
 
 	/* XXX this assumes 16-bit color depth */



CVS commit: src/sys/arch

2010-06-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 13 02:11:23 UTC 2010

Modified Files:
src/sys/arch/acorn32/include: intr.h
src/sys/arch/arm/arm32: intr.c
src/sys/arch/arm/at91: at91aic.c
src/sys/arch/arm/ep93xx: ep93xx_intr.c
src/sys/arch/arm/footbridge/isa: isa_machdep.c
src/sys/arch/arm/ixp12x0: ixp12x0_intr.c
src/sys/arch/arm/xscale: i80321_icu.c ixp425_intr.c pxa2x0_intr.c
src/sys/arch/evbarm/include: intr.h
src/sys/arch/hpcarm/include: intr.h
src/sys/arch/shark/include: intr.h

Log Message:
Apply fixes for PR port-arm/43339:
 Set proper IPL_SOFTfoo values even in FAST_SOFTINT case.
 Some assertions in MI code expect they have unique values,
 per comments from rm...@.

Also cleanup various interrupt hierarchy code since IPL_NONE and
IPL_SOFTfoo should not be set by any hardware interrupt establish functions.

Ok'ed by mrg@, tested on shark and hpcarm.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/acorn32/include/intr.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/arm32/intr.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/at91/at91aic.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/ep93xx/ep93xx_intr.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/footbridge/isa/isa_machdep.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/ixp12x0/ixp12x0_intr.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/xscale/i80321_icu.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/xscale/ixp425_intr.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/xscale/pxa2x0_intr.c
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/include/intr.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcarm/include/intr.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/shark/include/intr.h

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

Modified files:

Index: src/sys/arch/acorn32/include/intr.h
diff -u src/sys/arch/acorn32/include/intr.h:1.8 src/sys/arch/acorn32/include/intr.h:1.9
--- src/sys/arch/acorn32/include/intr.h:1.8	Sun Apr 27 18:58:43 2008
+++ src/sys/arch/acorn32/include/intr.h	Sun Jun 13 02:11:22 2010
@@ -1,4 +1,4 @@
-/* 	$NetBSD: intr.h,v 1.8 2008/04/27 18:58:43 matt Exp $	*/
+/* 	$NetBSD: intr.h,v 1.9 2010/06/13 02:11:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -41,7 +41,6 @@
 /* Hardware Interrupt Priority Levels are not mutually exclusive. */
 
 #define	IPL_NONE	0
-#ifdef __HAVE_FAST_SOFTINTS
 #define	IPL_SOFTCLOCK	1
 #define	IPL_SOFTBIO	2
 #define	IPL_SOFTNET	3
@@ -50,16 +49,6 @@
 #define	IPL_SCHED	6
 #define IPL_HIGH	7
 #define NIPL		8
-#else
-#define IPL_VM		1
-#define	IPL_SCHED	2
-#define IPL_HIGH	3
-#define	IPL_SOFTSERIAL	IPL_NONE
-#define	IPL_SOFTNET	IPL_NONE
-#define	IPL_SOFTBIO	IPL_NONE
-#define	IPL_SOFTCLOCK	IPL_NONE
-#define NIPL		4
-#endif
 
 #define	IST_UNUSABLE	-1	/* interrupt cannot be used */
 #define	IST_NONE	0	/* none (dummy) */

Index: src/sys/arch/arm/arm32/intr.c
diff -u src/sys/arch/arm/arm32/intr.c:1.30 src/sys/arch/arm/arm32/intr.c:1.31
--- src/sys/arch/arm/arm32/intr.c:1.30	Wed Nov 19 06:30:49 2008
+++ src/sys/arch/arm/arm32/intr.c	Sun Jun 13 02:11:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.30 2008/11/19 06:30:49 matt Exp $	*/
+/*	$NetBSD: intr.c,v 1.31 2010/06/13 02:11:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.30 2008/11/19 06:30:49 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.31 2010/06/13 02:11:22 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -65,10 +65,14 @@
 		spl_masks[loop] = 0x;
 	}
 
-	spl_masks[IPL_VM]	= irqmasks[IPL_VM];
-	spl_masks[IPL_SCHED]	= irqmasks[IPL_SCHED];
-	spl_masks[IPL_HIGH]	= irqmasks[IPL_HIGH];
-	spl_masks[IPL_NONE]	= irqmasks[IPL_NONE];
+	spl_masks[IPL_VM]	  = irqmasks[IPL_VM];
+	spl_masks[IPL_SCHED]	  = irqmasks[IPL_SCHED];
+	spl_masks[IPL_HIGH]	  = irqmasks[IPL_HIGH];
+	spl_masks[IPL_SOFTSERIAL] = irqmasks[IPL_SOFTSERIAL];
+	spl_masks[IPL_SOFTNET]	  = irqmasks[IPL_SOFTNET];
+	spl_masks[IPL_SOFTBIO]	  = irqmasks[IPL_SOFTBIO];
+	spl_masks[IPL_SOFTCLOCK]  = irqmasks[IPL_SOFTCLOCK];
+	spl_masks[IPL_NONE]	  = irqmasks[IPL_NONE];
 
 }
 

Index: src/sys/arch/arm/at91/at91aic.c
diff -u src/sys/arch/arm/at91/at91aic.c:1.3 src/sys/arch/arm/at91/at91aic.c:1.4
--- src/sys/arch/arm/at91/at91aic.c:1.3	Fri Oct 23 06:53:12 2009
+++ src/sys/arch/arm/at91/at91aic.c	Sun Jun 13 02:11:22 2010
@@ -1,5 +1,5 @@
-/*	$Id: at91aic.c,v 1.3 2009/10/23 06:53:12 snj Exp $	*/
-/*	$NetBSD: at91aic.c,v 1.3 2009/10/23 06:53:12 snj Exp $	*/
+/*	$Id: at91aic.c,v 1.4 2010/06/13 02:11:22 tsutsui Exp $	*/
+/*	$NetBSD: at91aic.c,v 1.4 2010/06/13 02:11:22 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2007 Embedtronics Oy.
@@ -145,23 +145,20 @@
 		aic_imask[ipl] = aic_irqs;
 	}
 
-	aic_imask[IPL_NONE] = 0;
+	/* IPL_NONE must open up all interrupts */
+	KASSERT(aic_imask[IPL_NONE] == 0);
+	

CVS commit: src/sys/dev/usb

2010-06-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 13 02:36:18 UTC 2010

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen from usbdevs rev 1.555:
 Add vendor IDs and device IDs for forthcoming upgt(4),
 Intersil PrismGT wireless LAN.  From OpenBSD via FUKAUMI Naoki's patch
 posted on current-users:
 http://mail-index.NetBSD.org/current-users/2010/05/28/msg013570.html


To generate a diff of this commit:
cvs rdiff -u -r1.548 -r1.549 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.549 -r1.550 src/sys/dev/usb/usbdevs_data.h

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

Modified files:

Index: src/sys/dev/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.548 src/sys/dev/usb/usbdevs.h:1.549
--- src/sys/dev/usb/usbdevs.h:1.548	Sat Jun 12 23:16:02 2010
+++ src/sys/dev/usb/usbdevs.h	Sun Jun 13 02:36:18 2010
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.548 2010/06/12 23:16:02 pgoyette Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.549 2010/06/13 02:36:18 tsutsui Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.554 2010/06/12 23:15:18 pgoyette Exp
+ *	NetBSD: usbdevs,v 1.555 2010/06/13 02:33:54 tsutsui Exp
  */
 
 /*
@@ -184,6 +184,7 @@
 #define	USB_VENDOR_ETEK	0x056c		/* e-TEK Labs */
 #define	USB_VENDOR_EIZO	0x056d		/* EIZO */
 #define	USB_VENDOR_ELECOM	0x056e		/* Elecom */
+#define	USB_VENDOR_XYRATEX	0x0572		/* Xyratex */
 #define	USB_VENDOR_HAUPPAUGE	0x0573		/* Hauppauge Computer Works */
 #define	USB_VENDOR_BAFO	0x0576		/* BAFO/Quality Computer Accessories */
 #define	USB_VENDOR_YEDATA	0x057b		/* Y-E Data */
@@ -340,6 +341,7 @@
 #define	USB_VENDOR_AUDIOTECHNICA	0x0909		/* Audio-Technica */
 #define	USB_VENDOR_TRUMPION	0x090a		/* Trumpion Microelectronics */
 #define	USB_VENDOR_ALATION	0x0910		/* Alation Systems */
+#define	USB_VENDOR_GLOBESPAN	0x0915		/* Globespan */
 #define	USB_VENDOR_CONCORDCAMERA	0x0919		/* Concord Camera */
 #define	USB_VENDOR_GARMIN	0x091e		/* Garmin */
 #define	USB_VENDOR_GOHUBS	0x0921		/* GoHubs */
@@ -402,6 +404,7 @@
 #define	USB_VENDOR_AMBIT	0x0bb2		/* Ambit Microsystems */
 #define	USB_VENDOR_REALTEK	0x0bda		/* Realtek */
 #define	USB_VENDOR_ADDONICS2	0x0bf6		/* Addonics Technology */
+#define	USB_VENDOR_FSC	0x0bf8		/* Fujitsu Siemens Computers */
 #define	USB_VENDOR_AGATE	0x0c08		/* Agate Technologies */
 #define	USB_VENDOR_DMI	0x0c0b		/* DMI */
 #define	USB_VENDOR_CHICONY2	0x0c45		/* Chicony Electronics */
@@ -415,6 +418,7 @@
 #define	USB_VENDOR_PEN	0x0d7d		/* Pen Drive */
 #define	USB_VENDOR_ACDC	0x0d7e		/* American Computer  Digital Components */
 #define	USB_VENDOR_CMEDIA	0x0d8c		/* C-Media Electronics Inc. */
+#define	USB_VENDOR_CONCEPTRONIC2	0x0d8e		/* Conceptronic */
 #define	USB_VENDOR_MSI	0x0db0		/* Micro Star */
 #define	USB_VENDOR_ELCON	0x0db7		/* ELCON Systemtechnik */
 #define	USB_VENDOR_SITECOMEU	0x0df6		/* Sitecom Europe */
@@ -452,6 +456,7 @@
 #define	USB_VENDOR_NETINDEX	0x11f6		/* NetIndex */
 #define	USB_VENDOR_FUJITSU2	0x1221		/* Fujitsu Ltd. */
 #define	USB_VENDOR_TSUNAMI	0x1241		/* Tsunami */
+#define	USB_VENDOR_PHEENET	0x124a		/* Pheenet */
 #define	USB_VENDOR_TARGUS	0x1267		/* Targus */
 #define	USB_VENDOR_TWINMOS	0x126f		/* TwinMOS */
 #define	USB_VENDOR_CREATIVE2	0x1292		/* Creative Labs */
@@ -581,6 +586,7 @@
 #define	USB_PRODUCT_ACCTON_USB320_EC	0x1046		/* USB320-EC Ethernet Adapter */
 #define	USB_PRODUCT_ACCTON_111	0x3503		/* T-Sinus 111 WLAN */
 #define	USB_PRODUCT_ACCTON_SMCWUSBG	0x4505		/* SMCWUSB-G */
+#define	USB_PRODUCT_ACCTON_PRISM_GT	0x4521		/* PrismGT USB 2.0 WLAN */
 #define	USB_PRODUCT_ACCTON_SS1001	0x5046		/* SpeedStream Ethernet Adapter */
 #define	USB_PRODUCT_ACCTON_ZD1211B	0xe501		/* ZD1211B */
 
@@ -662,6 +668,10 @@
 /* AKS products */
 #define	USB_PRODUCT_AKS_USBHASP	0x0001		/* USB-HASP 0.06 */
 
+/* Alcatel Telecom products */
+#define	USB_PRODUCT_ALCATELT_ST120G	0x0120		/* SpeedTouch 120g */
+#define	USB_PRODUCT_ALCATELT_ST121G	0x0121		/* SpeedTouch 121g */
+
 /* Alcor Micro, Inc. products */
 #define	USB_PRODUCT_ALCOR2_KBD_HUB	0x2802		/* Kbd Hub */
 
@@ -860,6 +870,8 @@
 #define	USB_PRODUCT_CHPRODUCTS_FLIGHTYOKE	0x00ff		/* Flight Sim Yoke */
 
 /* Cisco-Linksys products */
+#define	USB_PRODUCT_CISCOLINKSYS_WUSB54GV2	0x000a		/* WUSB54G v2 */
+#define	USB_PRODUCT_CISCOLINKSYS_WUSB54AG	0x000c		/* WUSB54AG */
 #define	USB_PRODUCT_CISCOLINKSYS_WUSB54G	0x000d		/* WUSB54G Wireless-G USB Network Adapter */
 #define	USB_PRODUCT_CISCOLINKSYS_WUSB54GP	0x0011		/* WUSB54GP Wireless-G USB Network Adapter */
 #define	USB_PRODUCT_CISCOLINKSYS_USB200MV2	0x0018		/* USB200M v2 */
@@ -881,6 +893,7 @@
 #define	USB_PRODUCT_COMPOSITE_USBPS2	0x0001		/* USB to PS2 Adaptor */
 
 /* Conceptronic products */
+#define	USB_PRODUCT_CONCEPTRONIC2_PRISM_GT	0x3762		/* PrismGT USB 2.0 WLAN */
 #define	USB_PRODUCT_CONCEPTRONIC_C54RU	0x3c02		/* C54RU WLAN */
 #define	USB_PRODUCT_CONCEPTRONIC_C54RU2	

CVS commit: src/sys/dev/ic

2010-06-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 13 03:08:15 UTC 2010

Modified Files:
src/sys/dev/ic: rt2560.c

Log Message:
No need to include PCI header files in bus independent code.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/rt2560.c

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

Modified files:

Index: src/sys/dev/ic/rt2560.c
diff -u src/sys/dev/ic/rt2560.c:1.23 src/sys/dev/ic/rt2560.c:1.24
--- src/sys/dev/ic/rt2560.c:1.23	Mon Apr  5 07:19:35 2010
+++ src/sys/dev/ic/rt2560.c	Sun Jun 13 03:08:15 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rt2560.c,v 1.23 2010/04/05 07:19:35 joerg Exp $	*/
+/*	$NetBSD: rt2560.c,v 1.24 2010/06/13 03:08:15 tsutsui Exp $	*/
 /*	$OpenBSD: rt2560.c,v 1.15 2006/04/20 20:31:12 miod Exp $  */
 /*	$FreeBSD: rt2560.c,v 1.3 2006/03/21 21:15:43 damien Exp $*/
 
@@ -24,7 +24,7 @@
  * http://www.ralinktech.com/
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rt2560.c,v 1.23 2010/04/05 07:19:35 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: rt2560.c,v 1.24 2010/06/13 03:08:15 tsutsui Exp $);
 
 
 #include sys/param.h
@@ -62,10 +62,6 @@
 #include dev/ic/rt2560reg.h
 #include dev/ic/rt2560var.h
 
-#include dev/pci/pcireg.h
-#include dev/pci/pcivar.h
-#include dev/pci/pcidevs.h
-
 #ifdef RAL_DEBUG
 #define DPRINTF(x)	do { if (rt2560_debug  0) printf x; } while (0)
 #define DPRINTFN(n, x)	do { if (rt2560_debug = (n)) printf x; } while (0)



CVS commit: src/sys/dev/isa

2010-06-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 13 03:09:32 UTC 2010

Modified Files:
src/sys/dev/isa: files.isa

Log Message:
Tidy up a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/dev/isa/files.isa

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/isa/files.isa
diff -u src/sys/dev/isa/files.isa:1.159 src/sys/dev/isa/files.isa:1.160
--- src/sys/dev/isa/files.isa:1.159	Sun Feb 21 05:16:29 2010
+++ src/sys/dev/isa/files.isa	Sun Jun 13 03:09:32 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.isa,v 1.159 2010/02/21 05:16:29 cnst Exp $
+#	$NetBSD: files.isa,v 1.160 2010/06/13 03:09:32 tsutsui Exp $
 #
 # Config file and device description for machine-independent ISA code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -198,8 +198,8 @@
 file	dev/isa/if_ntwoc_isa.c  ntwoc_isa
 
 
-# Allied Telesis MB8695-based boards
-# (Allied Telesis AT1700)
+# Allied Telesis MB86965-based boards
+# (Allied Telesis AT1700/RE2000)
 # device in sys/conf/files
 attach	ate at isa with ate_isa
 file	dev/isa/if_ate.c		ate_isa



CVS commit: src/sys/sys

2010-06-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 13 03:31:28 UTC 2010

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

Log Message:
remove __dead from the prototype of lwp_exit, which actually can
return these days.


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 src/sys/sys/lwp.h

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

Modified files:

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.134 src/sys/sys/lwp.h:1.135
--- src/sys/sys/lwp.h:1.134	Thu Jun 10 20:54:53 2010
+++ src/sys/sys/lwp.h	Sun Jun 13 03:31:28 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.134 2010/06/10 20:54:53 pooka Exp $	*/
+/*	$NetBSD: lwp.h,v 1.135 2010/06/13 03:31:28 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -312,7 +312,7 @@
 void	cpu_setfunc(lwp_t *, void (*)(void *), void *);
 void	startlwp(void *);
 void	upcallret(lwp_t *);
-void	lwp_exit(lwp_t *) __dead;
+void	lwp_exit(lwp_t *);
 void	lwp_exit_switchaway(lwp_t *) __dead;
 int	lwp_suspend(lwp_t *, lwp_t *);
 int	lwp_create1(lwp_t *, const void *, size_t, u_long, lwpid_t *);



CVS commit: src/sys/kern

2010-06-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 13 03:32:48 UTC 2010

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

Log Message:
use NULL instead of 0 for pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/kern/tty_pty.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/tty_pty.c
diff -u src/sys/kern/tty_pty.c:1.121 src/sys/kern/tty_pty.c:1.122
--- src/sys/kern/tty_pty.c:1.121	Sun Jan 24 19:56:26 2010
+++ src/sys/kern/tty_pty.c	Sun Jun 13 03:32:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty_pty.c,v 1.121 2010/01/24 19:56:26 dholland Exp $	*/
+/*	$NetBSD: tty_pty.c,v 1.122 2010/06/13 03:32:47 yamt Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tty_pty.c,v 1.121 2010/01/24 19:56:26 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: tty_pty.c,v 1.122 2010/06/13 03:32:47 yamt Exp $);
 
 #include opt_ptm.h
 
@@ -449,7 +449,7 @@
 	struct pt_softc *pti = pt_softc[minor(dev)];
 	struct tty *tp = pti-pt_tty;
 
-	if (tp-t_oproc == 0)
+	if (tp-t_oproc == NULL)
 		return (EIO);
 	return ((*tp-t_linesw-l_write)(tp, uio, flag));
 }
@@ -463,7 +463,7 @@
 	struct pt_softc *pti = pt_softc[minor(dev)];
 	struct tty *tp = pti-pt_tty;
 
-	if (tp-t_oproc == 0)
+	if (tp-t_oproc == NULL)
 		return (POLLHUP);
 
 	return ((*tp-t_linesw-l_poll)(tp, events, l));
@@ -577,7 +577,7 @@
 	(void)(*tp-t_linesw-l_modem)(tp, 0);
 	mutex_spin_enter(tty_lock);
 	CLR(tp-t_state, TS_CARR_ON);
-	tp-t_oproc = 0;		/* mark closed */
+	tp-t_oproc = NULL;		/* mark closed */
 	mutex_spin_exit(tty_lock);
 	return (0);
 }



CVS commit: src/sys/kern

2010-06-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 13 03:34:19 UTC 2010

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

Log Message:
update a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/sys/kern/tty.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/tty.c
diff -u src/sys/kern/tty.c:1.235 src/sys/kern/tty.c:1.236
--- src/sys/kern/tty.c:1.235	Wed May 26 23:53:21 2010
+++ src/sys/kern/tty.c	Sun Jun 13 03:34:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.235 2010/05/26 23:53:21 pooka Exp $	*/
+/*	$NetBSD: tty.c,v 1.236 2010/06/13 03:34:19 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tty.c,v 1.235 2010/05/26 23:53:21 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: tty.c,v 1.236 2010/06/13 03:34:19 yamt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -2575,8 +2575,8 @@
 
 /*
  * Sleep on chan, returning ERESTART if tty changed while we napped and
- * returning any errors (e.g. EINTR/ETIMEDOUT) reported by tsleep.  If
- * the tty is revoked, restarting a pending call will redo validation done
+ * returning any errors (e.g. EINTR/ETIMEDOUT) reported by cv_timedwait(_sig).
+ * If the tty is revoked, restarting a pending call will redo validation done
  * at the start of the call.
  *
  * Must be called with the tty lock held.



CVS commit: src/sys/compat/irix

2010-06-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 13 04:08:49 UTC 2010

Modified Files:
src/sys/compat/irix: irix_exec.c

Log Message:
remove an unnecessary check of PK_MARKER


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/compat/irix/irix_exec.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/compat/irix/irix_exec.c
diff -u src/sys/compat/irix/irix_exec.c:1.56 src/sys/compat/irix/irix_exec.c:1.57
--- src/sys/compat/irix/irix_exec.c:1.56	Mon Dec 14 00:47:10 2009
+++ src/sys/compat/irix/irix_exec.c	Sun Jun 13 04:08:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: irix_exec.c,v 1.56 2009/12/14 00:47:10 matt Exp $ */
+/*	$NetBSD: irix_exec.c,v 1.57 2010/06/13 04:08:49 yamt Exp $ */
 
 /*-
  * Copyright (c) 2001-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.56 2009/12/14 00:47:10 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: irix_exec.c,v 1.57 2010/06/13 04:08:49 yamt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_syscall_debug.h
@@ -190,8 +190,6 @@
 	 */
 	mutex_enter(proc_lock);
 	PROCLIST_FOREACH(pp, allproc) {
-		if ((pp-p_flag  PK_MARKER) != 0)
-			continue;
 		/* Select IRIX processes */
 		if (irix_check_exec(pp) == 0)
 			continue;



CVS commit: src/sys

2010-06-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 13 04:13:32 UTC 2010

Modified Files:
src/sys/compat/mach: mach_thread.c
src/sys/compat/sa: compat_sa.c
src/sys/kern: kern_fork.c kern_kthread.c kern_lwp.c sys_aio.c sys_lwp.c

Log Message:
increment p_nrlwps in lwp_create rather than letting callers do so
as it's always decremented by lwp_exit.  this fixes error recovery of
eg. aio_procinit.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/compat/mach/mach_thread.c
cvs rdiff -u -r1.12 -r1.13 src/sys/compat/sa/compat_sa.c
cvs rdiff -u -r1.176 -r1.177 src/sys/kern/kern_fork.c
cvs rdiff -u -r1.29 -r1.30 src/sys/kern/kern_kthread.c
cvs rdiff -u -r1.148 -r1.149 src/sys/kern/kern_lwp.c
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/sys_aio.c
cvs rdiff -u -r1.50 -r1.51 src/sys/kern/sys_lwp.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/compat/mach/mach_thread.c
diff -u src/sys/compat/mach/mach_thread.c:1.49 src/sys/compat/mach/mach_thread.c:1.50
--- src/sys/compat/mach/mach_thread.c:1.49	Wed Oct 21 21:12:05 2009
+++ src/sys/compat/mach/mach_thread.c	Sun Jun 13 04:13:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mach_thread.c,v 1.49 2009/10/21 21:12:05 rmind Exp $ */
+/*	$NetBSD: mach_thread.c,v 1.50 2010/06/13 04:13:31 yamt Exp $ */
 
 /*-
  * Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: mach_thread.c,v 1.49 2009/10/21 21:12:05 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: mach_thread.c,v 1.50 2010/06/13 04:13:31 yamt Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -210,7 +210,6 @@
 	mctc.mctc_lwp-l_private = 0;
 	mctc.mctc_lwp-l_stat = LSRUN;
 	sched_enqueue(mctc.mctc_lwp, false);
-	p-p_nrlwps++;
 	lwp_unlock(mctc.mctc_lwp);
 	mutex_exit(p-p_lock);
 

Index: src/sys/compat/sa/compat_sa.c
diff -u src/sys/compat/sa/compat_sa.c:1.12 src/sys/compat/sa/compat_sa.c:1.13
--- src/sys/compat/sa/compat_sa.c:1.12	Wed Oct 21 21:12:05 2009
+++ src/sys/compat/sa/compat_sa.c	Sun Jun 13 04:13:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_sa.c,v 1.12 2009/10/21 21:12:05 rmind Exp $	*/
+/*	$NetBSD: compat_sa.c,v 1.13 2010/06/13 04:13:31 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2004, 2005, 2006 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 #include opt_ktrace.h
 #include opt_multiprocessor.h
 #include opt_sa.h
-__KERNEL_RCSID(0, $NetBSD: compat_sa.c,v 1.12 2009/10/21 21:12:05 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_sa.c,v 1.13 2010/06/13 04:13:31 yamt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1837,9 +1837,6 @@
 	 * newlwp helpfully puts it there. Unclear if newlwp should
 	 * be tweaked.
 	 */
-	mutex_enter(p-p_lock);
-	p-p_nrlwps++;
-	mutex_exit(p-p_lock);
 
 	vp = (targ_vp) ? targ_vp : l-l_savp;
 	mutex_enter(vp-savp_mutex);

Index: src/sys/kern/kern_fork.c
diff -u src/sys/kern/kern_fork.c:1.176 src/sys/kern/kern_fork.c:1.177
--- src/sys/kern/kern_fork.c:1.176	Mon Mar  1 21:10:16 2010
+++ src/sys/kern/kern_fork.c	Sun Jun 13 04:13:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_fork.c,v 1.176 2010/03/01 21:10:16 darran Exp $	*/
+/*	$NetBSD: kern_fork.c,v 1.177 2010/06/13 04:13:31 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.176 2010/03/01 21:10:16 darran Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_fork.c,v 1.177 2010/06/13 04:13:31 yamt Exp $);
 
 #include opt_ktrace.h
 
@@ -502,6 +502,7 @@
 	getmicrotime(p2-p_stats-p_start);
 	p2-p_acflag = AFORK;
 	lwp_lock(l2);
+	KASSERT(p2-p_nrlwps == 1);
 	if (p2-p_sflag  PS_STOPFORK) {
 		p2-p_nrlwps = 0;
 		p2-p_stat = SSTOP;

Index: src/sys/kern/kern_kthread.c
diff -u src/sys/kern/kern_kthread.c:1.29 src/sys/kern/kern_kthread.c:1.30
--- src/sys/kern/kern_kthread.c:1.29	Wed May 12 15:53:20 2010
+++ src/sys/kern/kern_kthread.c	Sun Jun 13 04:13:31 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_kthread.c,v 1.29 2010/05/12 15:53:20 haad Exp $	*/
+/*	$NetBSD: kern_kthread.c,v 1.30 2010/06/13 04:13:31 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.29 2010/05/12 15:53:20 haad Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.30 2010/06/13 04:13:31 yamt Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -149,12 +149,6 @@
 		lwp_unlock(l);
 	} else
 		lwp_unlock_to(l, ci-ci_schedstate.spc_lwplock);
-
-	/*
-	 * The LWP is not created suspended or stopped and cannot be set
-	 * into those states later, so must be considered runnable.
-	 */
-	proc0.p_nrlwps++;
 	mutex_exit(proc0.p_lock);
 
 	/* All done! */

Index: src/sys/kern/kern_lwp.c
diff -u src/sys/kern/kern_lwp.c:1.148 src/sys/kern/kern_lwp.c:1.149
--- src/sys/kern/kern_lwp.c:1.148	Fri Jun 11 07:32:32 2010
+++ 

CVS commit: src

2010-06-12 Thread Takehiko NOZAKI
Module Name:src
Committed By:   tnozaki
Date:   Sun Jun 13 04:14:57 UTC 2010

Modified Files:
src/lib/libc/citrus: citrus_lc_ctype.c citrus_lc_messages.c
citrus_lc_monetary.c citrus_lc_numeric.c citrus_lc_time.c
src/lib/libc/locale: _wctrans.c _wctype.c bsdctype.c ctype_local.h
global_locale.c iswctype_mb.c localeio_lc_ctype.c multibyte_amd1.c
multibyte_c90.c rune.c runeglue.c runetable.c runetype_local.h
src/usr.bin/mklocale: lex.l yacc.y
src/usr.sbin/chrtbl: ctypeio.c
Added Files:
src/lib/libc/locale: bsdctype_file.h bsdctype_local.h runetype_file.h
Removed Files:
src/lib/libc/locale: bsdctype.h rune_local.h

Log Message:
1. split runetype_local.h - runetype_file.h
   and remove renameing _Rune* - _NBRune* namespace protection.

   FreeBSD traditionaly exposes struct _Rune* in runetype.h
   which included by ctype.h. it may cause conflicting type error
   in our cross build process, former we use renaming namespace
   to avoid this problem, now i reworked more resonable way.

2. merge rune_local.h to runetype_local.h, and remove it.
3. split bsdctype.h - bsdctype_{file,local}.h


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/citrus/citrus_lc_ctype.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/citrus/citrus_lc_messages.c \
src/lib/libc/citrus/citrus_lc_monetary.c \
src/lib/libc/citrus/citrus_lc_numeric.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/citrus/citrus_lc_time.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/locale/_wctrans.c
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/locale/_wctype.c \
src/lib/libc/locale/multibyte_amd1.c
cvs rdiff -u -r1.6 -r1.7 src/lib/libc/locale/bsdctype.c
cvs rdiff -u -r1.5 -r0 src/lib/libc/locale/bsdctype.h
cvs rdiff -u -r0 -r1.1 src/lib/libc/locale/bsdctype_file.h \
src/lib/libc/locale/bsdctype_local.h src/lib/libc/locale/runetype_file.h
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/locale/ctype_local.h
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/locale/global_locale.c \
src/lib/libc/locale/runetype_local.h
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/locale/iswctype_mb.c
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/locale/localeio_lc_ctype.c
cvs rdiff -u -r1.7 -r1.8 src/lib/libc/locale/multibyte_c90.c
cvs rdiff -u -r1.37 -r1.38 src/lib/libc/locale/rune.c
cvs rdiff -u -r1.16 -r0 src/lib/libc/locale/rune_local.h
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/locale/runeglue.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/locale/runetable.c
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/mklocale/lex.l
cvs rdiff -u -r1.30 -r1.31 src/usr.bin/mklocale/yacc.y
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/chrtbl/ctypeio.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/libc/citrus/citrus_lc_ctype.c
diff -u src/lib/libc/citrus/citrus_lc_ctype.c:1.7 src/lib/libc/citrus/citrus_lc_ctype.c:1.8
--- src/lib/libc/citrus/citrus_lc_ctype.c:1.7	Mon Jun  7 13:52:29 2010
+++ src/lib/libc/citrus/citrus_lc_ctype.c	Sun Jun 13 04:14:56 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_ctype.c,v 1.7 2010/06/07 13:52:29 tnozaki Exp $ */
+/* $NetBSD: citrus_lc_ctype.c,v 1.8 2010/06/13 04:14:56 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: citrus_lc_ctype.c,v 1.7 2010/06/07 13:52:29 tnozaki Exp $);
+__RCSID($NetBSD: citrus_lc_ctype.c,v 1.8 2010/06/13 04:14:56 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include reentrant.h
@@ -57,7 +57,7 @@
 #include citrus_module.h
 #include citrus_ctype.h
 
-#include rune_local.h
+#include runetype_local.h
 #include multibyte.h
 
 /*

Index: src/lib/libc/citrus/citrus_lc_messages.c
diff -u src/lib/libc/citrus/citrus_lc_messages.c:1.3 src/lib/libc/citrus/citrus_lc_messages.c:1.4
--- src/lib/libc/citrus/citrus_lc_messages.c:1.3	Sat May 22 08:13:18 2010
+++ src/lib/libc/citrus/citrus_lc_messages.c	Sun Jun 13 04:14:57 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_lc_messages.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $ */
+/* $NetBSD: citrus_lc_messages.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $ */
 
 /*-
  * Copyright (c)2008 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: citrus_lc_messages.c,v 1.3 2010/05/22 08:13:18 tnozaki Exp $);
+__RCSID($NetBSD: citrus_lc_messages.c,v 1.4 2010/06/13 04:14:57 tnozaki Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include namespace.h
@@ -61,7 +61,7 @@
 #include citrus_db.h
 #include citrus_db_hash.h
 #include citrus_memstream.h
-#include rune_local.h
+#include runetype_local.h
 
 /*
  * macro required by all template headers
Index: src/lib/libc/citrus/citrus_lc_monetary.c
diff -u src/lib/libc/citrus/citrus_lc_monetary.c:1.3 src/lib/libc/citrus/citrus_lc_monetary.c:1.4
--- src/lib/libc/citrus/citrus_lc_monetary.c:1.3	Sat May 22 08:13:18 2010
+++ src/lib/libc/citrus/citrus_lc_monetary.c	Sun 

CVS commit: src/sys/kern

2010-06-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Jun 13 04:45:51 UTC 2010

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

Log Message:
aio_enqueue_job: don't bother to check curjob.
- it's an undefined behaviour anyway.
- the check sometimes prevent legal reuse of userland aiocb.
  note that the userland can notice the i/o completion and reuse the aiocb
  before the aio_worker kernel thread clears curjob.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/kern/sys_aio.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/sys_aio.c
diff -u src/sys/kern/sys_aio.c:1.32 src/sys/kern/sys_aio.c:1.33
--- src/sys/kern/sys_aio.c:1.32	Sun Jun 13 04:13:31 2010
+++ src/sys/kern/sys_aio.c	Sun Jun 13 04:45:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_aio.c,v 1.32 2010/06/13 04:13:31 yamt Exp $	*/
+/*	$NetBSD: sys_aio.c,v 1.33 2010/06/13 04:45:50 yamt Exp $	*/
 
 /*
  * Copyright (c) 2007 Mindaugas Rasiukevicius rmind at NetBSD org
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.32 2010/06/13 04:13:31 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.33 2010/06/13 04:45:50 yamt Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_ddb.h
@@ -520,13 +520,6 @@
 	aio = p-p_aio;
 	if (aio) {
 		mutex_enter(aio-aio_mtx);
-		if (aio-curjob) {
-			a_job = aio-curjob;
-			if (a_job-aiocb_uptr == aiocb_uptr) {
-mutex_exit(aio-aio_mtx);
-return EINVAL;
-			}
-		}
 		TAILQ_FOREACH(a_job, aio-jobs_queue, list) {
 			if (a_job-aiocb_uptr != aiocb_uptr)
 continue;



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

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Jun 13 05:48:58 UTC 2010

Modified Files:
src/sys/arch/xen/x86 [netbsd-4]: xen_bus_dma.c

Log Message:
Pull up following revision(s) (requested by jym in ticket #1388):
sys/arch/xen/x86/xen_bus_dma.c: revision 1.20
Although Xen's documentation states that the address_bits field is not used
by XENMEM_decrease_reservation, it is checked by the hypervisor. In certain
circumstances (stack leak), the field could have an improper value, leading
to a fail of the hypercall.
Set it to 0 (no addressing restriction) to avoid that.
Patch tested by Sam Fourman and h...@.
This should fix the rare failed allocating DMA memory encountered
under NetBSD dom0. Will ask for a pull-up.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.6.1 src/sys/arch/xen/x86/xen_bus_dma.c

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

Modified files:

Index: src/sys/arch/xen/x86/xen_bus_dma.c
diff -u src/sys/arch/xen/x86/xen_bus_dma.c:1.8 src/sys/arch/xen/x86/xen_bus_dma.c:1.8.6.1
--- src/sys/arch/xen/x86/xen_bus_dma.c:1.8	Sun Sep  3 19:04:20 2006
+++ src/sys/arch/xen/x86/xen_bus_dma.c	Sun Jun 13 05:48:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xen_bus_dma.c,v 1.8 2006/09/03 19:04:20 bouyer Exp $	*/
+/*	$NetBSD: xen_bus_dma.c,v 1.8.6.1 2010/06/13 05:48:58 riz Exp $	*/
 /*	NetBSD bus_dma.c,v 1.21 2005/04/16 07:53:35 yamt Exp */
 
 /*-
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xen_bus_dma.c,v 1.8 2006/09/03 19:04:20 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: xen_bus_dma.c,v 1.8.6.1 2010/06/13 05:48:58 riz Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -106,6 +106,7 @@
 		res.extent_start = mfn;
 		res.nr_extents = 1;
 		res.extent_order = 0;
+		res.address_bits = 0;
 		res.domid = DOMID_SELF;
 		if (HYPERVISOR_memory_op(XENMEM_decrease_reservation, res)
 		 0) {



CVS commit: [netbsd-4] src/external/bsd/fetch/dist/libfetch

2010-06-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sun Jun 13 05:59:11 UTC 2010

Modified Files:
src/external/bsd/fetch/dist/libfetch [netbsd-4]: common.c common.h
ftp.c
Removed Files:
src/external/bsd/fetch/dist/libfetch [netbsd-4]: fetch.cat3

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1390):

external/bsd/fetch/dist/libfetch/common.c: patch
external/bsd/fetch/dist/libfetch/common.h: patch
external/bsd/fetch/dist/libfetch/fetch.cat3: removed
external/bsd/fetch/dist/libfetch/ftp.c: patch

libfetch-2.31:

PR 43013 by Brook Milligan: fetch(3) violates RFC 1738 for ftp:// URLs
if the home directory is not the root directory.

Remember the current directory the first time a CWD / CDUP has to be
issued. Use the document as full URL if the URL started with two /
(quoted or not), otherwise append it to the initial directory.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.5.4.3 -r1.1.1.5.4.4 \
src/external/bsd/fetch/dist/libfetch/common.c
cvs rdiff -u -r1.1.1.4.4.3 -r1.1.1.4.4.4 \
src/external/bsd/fetch/dist/libfetch/common.h
cvs rdiff -u -r1.1.1.3.4.3 -r0 \
src/external/bsd/fetch/dist/libfetch/fetch.cat3
cvs rdiff -u -r1.1.1.6.4.3 -r1.1.1.6.4.4 \
src/external/bsd/fetch/dist/libfetch/ftp.c

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

Modified files:

Index: src/external/bsd/fetch/dist/libfetch/common.c
diff -u src/external/bsd/fetch/dist/libfetch/common.c:1.1.1.5.4.3 src/external/bsd/fetch/dist/libfetch/common.c:1.1.1.5.4.4
--- src/external/bsd/fetch/dist/libfetch/common.c:1.1.1.5.4.3	Sat Jun 12 17:58:12 2010
+++ src/external/bsd/fetch/dist/libfetch/common.c	Sun Jun 13 05:59:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.1.1.5.4.3 2010/06/12 17:58:12 riz Exp $	*/
+/*	$NetBSD: common.c,v 1.1.1.5.4.4 2010/06/13 05:59:10 riz Exp $	*/
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
  * Copyright (c) 2008, 2010 Joerg Sonnenberger jo...@netbsd.org
@@ -231,6 +231,7 @@
 	/* allocate and fill connection structure */
 	if ((conn = calloc(1, sizeof(*conn))) == NULL)
 		return (NULL);
+	conn-ftp_home = NULL;
 	conn-cache_url = NULL;
 	conn-next_buf = NULL;
 	conn-next_len = 0;
@@ -711,6 +712,7 @@
 	ret = close(conn-sd);
 	if (conn-cache_url)
 		fetchFreeURL(conn-cache_url);
+	free(conn-ftp_home);
 	free(conn-buf);
 	free(conn);
 	return (ret);

Index: src/external/bsd/fetch/dist/libfetch/common.h
diff -u src/external/bsd/fetch/dist/libfetch/common.h:1.1.1.4.4.3 src/external/bsd/fetch/dist/libfetch/common.h:1.1.1.4.4.4
--- src/external/bsd/fetch/dist/libfetch/common.h:1.1.1.4.4.3	Sat Jun 12 17:58:12 2010
+++ src/external/bsd/fetch/dist/libfetch/common.h	Sun Jun 13 05:59:10 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.h,v 1.1.1.4.4.3 2010/06/12 17:58:12 riz Exp $	*/
+/*	$NetBSD: common.h,v 1.1.1.4.4.4 2010/06/13 05:59:10 riz Exp $	*/
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
  * All rights reserved.
@@ -73,6 +73,8 @@
 #  endif
 #endif
 
+	char		*ftp_home;
+
 	struct url	*cache_url;
 	int		cache_af;
 	int		(*cache_close)(conn_t *);

Index: src/external/bsd/fetch/dist/libfetch/ftp.c
diff -u src/external/bsd/fetch/dist/libfetch/ftp.c:1.1.1.6.4.3 src/external/bsd/fetch/dist/libfetch/ftp.c:1.1.1.6.4.4
--- src/external/bsd/fetch/dist/libfetch/ftp.c:1.1.1.6.4.3	Sat Jun 12 17:58:13 2010
+++ src/external/bsd/fetch/dist/libfetch/ftp.c	Sun Jun 13 05:59:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ftp.c,v 1.1.1.6.4.3 2010/06/12 17:58:13 riz Exp $	*/
+/*	$NetBSD: ftp.c,v 1.1.1.6.4.4 2010/06/13 05:59:11 riz Exp $	*/
 /*-
  * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
  * Copyright (c) 2008, 2009, 2010 Joerg Sonnenberger jo...@netbsd.org
@@ -252,7 +252,7 @@
  * command.
  */
 static int
-ftp_pwd(conn_t *conn, char *pwd, size_t pwdlen)
+ftp_pwd(conn_t *conn, char **pwd)
 {
 	char *src, *dst, *end;
 	int q;
@@ -264,7 +264,10 @@
 	src = conn-buf + 4;
 	if (src = end || *src++ != '')
 		return (FTP_PROTOCOL_ERROR);
-	for (q = 0, dst = pwd; src  end  pwdlen--; ++src) {
+	*pwd = malloc(end - src + 1);
+	if (*pwd == NULL)
+		return (FTP_PROTOCOL_ERROR);
+	for (q = 0, dst = *pwd; src  end; ++src) {
 		if (!q  *src == '')
 			q = 1;
 		else if (q  *src != '')
@@ -274,9 +277,12 @@
 		else
 			*dst++ = *src;
 	}
-	if (!pwdlen)
-		return (FTP_PROTOCOL_ERROR);
 	*dst = '\0';
+	if (**pwd != '/') {
+		free(*pwd);
+		*pwd = NULL;
+		return (FTP_PROTOCOL_ERROR);
+	}
 	return (FTP_OK);
 }
 
@@ -285,69 +291,109 @@
  * file.
  */
 static int
-ftp_cwd(conn_t *conn, const char *file, int subdir)
+ftp_cwd(conn_t *conn, const char *path, int subdir)
 {
 	const char *beg, *end;
-	char pwd[PATH_MAX];
+	char *pwd, *dst;
 	int e, i, len;
 
-	/* If no slashes in name, no need to change dirs. */
-	if (subdir)
-		end = file + strlen(file);
-	else if ((end = strrchr(file, '/')) == NULL)
-		return (0);
+	if (*path != '/') {
+		ftp_seterr(501);
+		return (-1);
+	}
+	++path;
+
+	/* Simple