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

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue May 10 06:58:17 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_alarm.c

Log Message:
Fix comment/string typos.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_alarm.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/gen/t_alarm.c
diff -u src/tests/lib/libc/gen/t_alarm.c:1.1 src/tests/lib/libc/gen/t_alarm.c:1.2
--- src/tests/lib/libc/gen/t_alarm.c:1.1	Thu May  5 13:22:56 2011
+++ src/tests/lib/libc/gen/t_alarm.c	Tue May 10 06:58:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_alarm.c,v 1.1 2011/05/05 13:22:56 jruoho Exp $ */
+/* $NetBSD: t_alarm.c,v 1.2 2011/05/10 06:58:17 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_alarm.c,v 1.1 2011/05/05 13:22:56 jruoho Exp $");
+__RCSID("$NetBSD: t_alarm.c,v 1.2 2011/05/10 06:58:17 jruoho Exp $");
 
 #include 
 
@@ -52,7 +52,7 @@
 ATF_TC(alarm_basic);
 ATF_TC_HEAD(alarm_basic, tc)
 {
-	atf_tc_set_md_var(tc, "descr", "A basic test of alarm(2)");
+	atf_tc_set_md_var(tc, "descr", "A basic test of alarm(3)");
 }
 
 ATF_TC_BODY(alarm_basic, tc)
@@ -110,7 +110,7 @@
 ATF_TC(alarm_previous);
 ATF_TC_HEAD(alarm_previous, tc)
 {
-	atf_tc_set_md_var(tc, "descr", "Test return value from alarm(2)");
+	atf_tc_set_md_var(tc, "descr", "Test return value from alarm(3)");
 }
 
 ATF_TC_BODY(alarm_previous, tc)
@@ -118,7 +118,7 @@
 	unsigned int rv;
 
 	/*
-	 * See that alarm(2) returns the amount
+	 * See that alarm(3) returns the amount
 	 * left on the timer from the previous call.
 	*/
 	rv = alarm(60);
@@ -136,7 +136,7 @@
 	return;
 
 fail:
-	atf_tc_fail("invalid return value from alarm(2)");
+	atf_tc_fail("invalid return value from alarm(3)");
 }
 
 ATF_TP_ADD_TCS(tp)



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

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue May 10 06:55:27 UTC 2011

Modified Files:
src/tests/lib/libc/string: t_strerror.c

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_strerror.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/string/t_strerror.c
diff -u src/tests/lib/libc/string/t_strerror.c:1.2 src/tests/lib/libc/string/t_strerror.c:1.3
--- src/tests/lib/libc/string/t_strerror.c:1.2	Mon May  9 06:05:54 2011
+++ src/tests/lib/libc/string/t_strerror.c	Tue May 10 06:55:27 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_strerror.c,v 1.2 2011/05/09 06:05:54 jruoho Exp $ */
+/* $NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_strerror.c,v 1.2 2011/05/09 06:05:54 jruoho Exp $");
+__RCSID("$NetBSD: t_strerror.c,v 1.3 2011/05/10 06:55:27 jruoho Exp $");
 
 #include 
 #include 
@@ -77,7 +77,7 @@
 ATF_TC(strerror_r_basic);
 ATF_TC_HEAD(strerror_r_basic, tc)
 {
-	atf_tc_set_md_var(tc, "descr", "A basic test of strerrorr_(3)");
+	atf_tc_set_md_var(tc, "descr", "A basic test of strerror_r(3)");
 }
 
 ATF_TC_BODY(strerror_r_basic, tc)



CVS commit: othersrc/external/bsd/gensetlist

2011-05-09 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue May 10 06:42:13 UTC 2011

Modified Files:
othersrc/external/bsd/gensetlist: Makefile bsd.setlist.mk

Log Message:
add license

set binary directory explicitly


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/gensetlist/Makefile
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/gensetlist/bsd.setlist.mk

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

Modified files:

Index: othersrc/external/bsd/gensetlist/Makefile
diff -u othersrc/external/bsd/gensetlist/Makefile:1.1.1.1 othersrc/external/bsd/gensetlist/Makefile:1.2
--- othersrc/external/bsd/gensetlist/Makefile:1.1.1.1	Sat Mar 12 08:20:42 2011
+++ othersrc/external/bsd/gensetlist/Makefile	Tue May 10 06:42:13 2011
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.1.1.1 2011/03/12 08:20:42 agc Exp $
+# $NetBSD: Makefile,v 1.2 2011/05/10 06:42:13 agc Exp $
 
 SRCS=gensetlist.c
 PROG=gensetlist
 WARNS=4
 MAN=gensetlist.8
+BINDIR=/usr/bin
 
 .include 
 

Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk
diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.2 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.3
--- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.2	Mon May  9 15:03:58 2011
+++ othersrc/external/bsd/gensetlist/bsd.setlist.mk	Tue May 10 06:42:13 2011
@@ -1,6 +1,30 @@
-# $NetBSD: bsd.setlist.mk,v 1.2 2011/05/09 15:03:58 agc Exp $
+# $NetBSD: bsd.setlist.mk,v 1.3 2011/05/10 06:42:13 agc Exp $
 
-# Makefile fragment to hand the args to "setlist" from the Makefile
+# Copyright (c) 2010,2011 Alistair Crooks 
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR 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.
+#
+
+# Makefile fragment to hand the args to "gensetlist" from the Makefile
 
 .if defined(LIB)
 GENSETLIST_ARGS+=-v LIB=${LIB:Q}
@@ -48,5 +72,5 @@
 GENSETLIST_ARGS+=-c ${CATEGORY:Q}
 .endif
 
-setlist:
+setlist: .PHONY
 	gensetlist ${GENSETLIST_ARGS}



CVS commit: othersrc/external/bsd/gensetlist

2011-05-09 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Tue May 10 06:41:26 UTC 2011

Modified Files:
othersrc/external/bsd/gensetlist: gensetlist.c

Log Message:
Occasional MAN definitions can hold multiple pages (see src/bin/pax for one
example).

Change the parsing of the contents of MAN definitions so that both single
and multiple definitions of man pages can be recognised.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/gensetlist/gensetlist.c

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

Modified files:

Index: othersrc/external/bsd/gensetlist/gensetlist.c
diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.2 othersrc/external/bsd/gensetlist/gensetlist.c:1.3
--- othersrc/external/bsd/gensetlist/gensetlist.c:1.2	Mon May  9 14:47:15 2011
+++ othersrc/external/bsd/gensetlist/gensetlist.c	Tue May 10 06:41:26 2011
@@ -111,6 +111,7 @@
 	static regex_t	 bindir;
 	static regex_t	 libdir;
 	static regex_t	 mandir;
+	static regex_t	 subman;
 	static regex_t	 mlinks;
 	static regex_t	 shlib;
 	static regex_t	 incs;
@@ -124,7 +125,8 @@
 	if (!compiled) {
 		(void) regcomp(&lib, "^[ \t]*LIB[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED);
 		(void) regcomp(&libdir, "^[ \t]*LIBDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED);
-		(void) regcomp(&man, "^[ \t]*MAN[ \t]*([+]?=)[ \t]*([^ \t]+)", REG_EXTENDED);
+		(void) regcomp(&man, "^[ \t]*MAN[ \t]*=", REG_EXTENDED);
+		(void) regcomp(&subman, "^[ \t]*([^ \t]+)", REG_EXTENDED);
 		(void) regcomp(&prog, "^[ \t]*PROG[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED);
 		(void) regcomp(&bindir, "^[ \t]*BINDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED);
 		(void) regcomp(&mandir, "^[ \t]*MANDIR[ \t]*=[ \t]*([^ \t]+)", REG_EXTENDED);
@@ -151,10 +153,14 @@
 		return 1;
 	}
 	if (regexec(&man, in, 10, matches, 0) == 0) {
-		(void) asprintf(&vars->mans[vars->manc++], 
-			"%.*s",
-			(int)(matches[2].rm_eo - matches[2].rm_so),
-			&in[(int)matches[2].rm_so]);
+		for (cp = &in[(int)matches[0].rm_eo] ; 
+		 regexec(&subman, cp, 10, matches, 0) == 0 ;
+		 cp += matches[0].rm_eo) {
+			(void) asprintf(&vars->mans[vars->manc++], 
+"%.*s",
+(int)(matches[1].rm_eo - matches[1].rm_so),
+&cp[(int)matches[1].rm_so]);
+		}
 		return 1;
 	}
 	if (regexec(&prog, in, 10, matches, 0) == 0) {



CVS commit: src/share/man/man3

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue May 10 06:39:46 UTC 2011

Modified Files:
src/share/man/man3: ilog2.3

Log Message:
Xref ilogb(3).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man3/ilog2.3

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/man3/ilog2.3
diff -u src/share/man/man3/ilog2.3:1.4 src/share/man/man3/ilog2.3:1.5
--- src/share/man/man3/ilog2.3:1.4	Fri Apr  8 08:40:05 2011
+++ src/share/man/man3/ilog2.3	Tue May 10 06:39:45 2011
@@ -1,4 +1,4 @@
-.\" $NetBSD: ilog2.3,v 1.4 2011/04/08 08:40:05 jruoho Exp $ $
+.\" $NetBSD: ilog2.3,v 1.5 2011/05/10 06:39:45 jruoho Exp $ $
 .\"
 .\" Copyright (c) 2010 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 April 8, 2011
+.Dd May 10, 2011
 .Dt ILOG2 3
 .Os
 .Sh NAME
@@ -55,6 +55,7 @@
 A value \-1 is returned on error.
 .Sh SEE ALSO
 .Xr bitops 3 ,
+.Xr ilogb 3 ,
 .Xr log2 3 ,
 .Xr imax 9 ,
 .Xr powerof2 9



CVS commit: src/lib/libm

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Tue May 10 06:38:33 UTC 2011

Modified Files:
src/lib/libm: Makefile
src/lib/libm/man: ieee.3
Added Files:
src/lib/libm/man: ilogb.3

Log Message:
Split out the ilogb(3) family out of ieee(3) and properly document it.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/lib/libm/Makefile
cvs rdiff -u -r1.24 -r1.25 src/lib/libm/man/ieee.3
cvs rdiff -u -r0 -r1.1 src/lib/libm/man/ilogb.3

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

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.107 src/lib/libm/Makefile:1.108
--- src/lib/libm/Makefile:1.107	Sat Apr 16 05:48:50 2011
+++ src/lib/libm/Makefile	Tue May 10 06:38:33 2011
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.107 2011/04/16 05:48:50 jruoho Exp $
+#  $NetBSD: Makefile,v 1.108 2011/05/10 06:38:33 jruoho Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -204,7 +204,7 @@
 	ceil.3 copysign.3 cos.3 cosh.3 \
 	erf.3 exp.3 \
 	fabs.3 fmod.3 frexp.3 hypot.3 ieee.3 \
-	ieee_test.3 isinff.3 j0.3 ldexp.3 lgamma.3 lrint.3 \
+	ieee_test.3 ilogb.3 isinff.3 j0.3 ldexp.3 lgamma.3 lrint.3 \
 	math.3 modf.3 nextafter.3 \
 	remainder.3 rint.3 round.3 \
 	sin.3 sinh.3 sqrt.3 \
@@ -249,11 +249,11 @@
 MLINKS+=fmod.3 fmodf.3
 MLINKS+=hypot.3 hypotf.3
 MLINKS+=ieee.3 finite.3 ieee.3 finitef.3 \
-	ieee.3 ilogb.3 ieee.3 ilogbf.3	\
 	ieee.3 scalbn.3 ieee.3 scalbnf.3
 MLINKS+=ieee_test.3 logb.3 ieee_test.3 logbf.3
 MLINKS+=ieee_test.3 scalb.3 ieee_test.3 scalbf.3
 MLINKS+=ieee_test.3 significand.3 ieee_test.3 significandf.3
+MLINKS+=ilogb.3 ilogbf.3	\
 MLINKS+=isinff.3 isnanf.3
 MLINKS+=j0.3 j0f.3 j0.3 j1.3 j0.3 j1f.3 j0.3 jn.3 j0.3 jnf.3 \
 	j0.3 y0.3 j0.3 y0f.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3 j0.3 ynf.3

Index: src/lib/libm/man/ieee.3
diff -u src/lib/libm/man/ieee.3:1.24 src/lib/libm/man/ieee.3:1.25
--- src/lib/libm/man/ieee.3:1.24	Wed Apr 13 04:57:10 2011
+++ src/lib/libm/man/ieee.3	Tue May 10 06:38:33 2011
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)ieee.3	6.4 (Berkeley) 5/6/91
-.\"	$NetBSD: ieee.3,v 1.24 2011/04/13 04:57:10 jruoho Exp $
+.\"	$NetBSD: ieee.3,v 1.25 2011/05/10 06:38:33 jruoho Exp $
 .\"
 .Dd April 12, 2011
 .Dt IEEE 3
@@ -34,8 +34,6 @@
 .Sh NAME
 .Nm finite ,
 .Nm finitef ,
-.Nm ilogb ,
-.Nm ilogbf ,
 .Nm scalbn ,
 .Nm scalbnf
 .Nd functions for IEEE arithmetic
@@ -47,10 +45,6 @@
 .Fn finite "double x"
 .Ft int
 .Fn finitef "float x"
-.Ft int
-.Fn ilogb "double x"
-.Ft int
-.Fn ilogbf "float x"
 .Ft double
 .Fn scalbn "double x" "int n"
 .Ft float
@@ -72,20 +66,6 @@
 .Fa x
 is \*(Na).
 .Pp
-.Fn ilogb
-returns
-.Fa x Ns 's exponent
-.Fa n ,
-in integer format.
-.Fn ilogb \*(Pm\*(If
-returns
-.Dv INT_MAX
-and
-.Fn ilogb 0
-returns
-.Dv INT_MIN .
-is even.
-.Pp
 .Fn scalbn
 returns
 .Fa x Ns \(**(2** Ns Fa n )

Added files:

Index: src/lib/libm/man/ilogb.3
diff -u /dev/null src/lib/libm/man/ilogb.3:1.1
--- /dev/null	Tue May 10 06:38:34 2011
+++ src/lib/libm/man/ilogb.3	Tue May 10 06:38:33 2011
@@ -0,0 +1,110 @@
+.\" $NetBSD: ilogb.3,v 1.1 2011/05/10 06:38:33 jruoho Exp $
+.\"
+.\" Copyright (c) 2011 Jukka Ruohonen 
+.\" 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 May 10, 2011
+.Dt ILOGB 3
+.Os
+.Sh NAME
+.Nm ilogb ,
+.Nm ilogbf
+.Nd an unbiased exponent
+.Sh LIBRARY
+.Lb libm
+.Sh SYNOPSIS
+.In math.h
+.Ft int
+.Fn ilogb "double x"
+.Ft int
+.Fn ilogbf "float x"
+.Sh DESCRIPTION
+The
+.Fn ilogb
+and
+.Fn ilogbf
+functions return the exponent of the non-zero real floating-point number
+.Fa x
+as a signed integer value.
+Formally the return val

CVS commit: src/sys/dev/raidframe

2011-05-09 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue May 10 05:08:51 UTC 2011

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
print "raidN: detached" when unconfiguring a raid device.


To generate a diff of this commit:
cvs rdiff -u -r1.289 -r1.290 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.289 src/sys/dev/raidframe/rf_netbsdkintf.c:1.290
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.289	Thu May  5 04:20:51 2011
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Tue May 10 05:08:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.289 2011/05/05 04:20:51 mrg Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.290 2011/05/10 05:08:51 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.289 2011/05/05 04:20:51 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.290 2011/05/10 05:08:51 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -962,6 +962,8 @@
 	disk_detach(&rs->sc_dkdev);
 	disk_destroy(&rs->sc_dkdev);
 
+	aprint_normal_dev(rs->sc_dev, "detached\n");
+
 	return 0;
 }
 



CVS commit: src/usr.bin/netstat

2011-05-09 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Tue May 10 04:40:16 UTC 2011

Modified Files:
src/usr.bin/netstat: vtw.c

Log Message:
Use ptrdiff_t to hold pointer difference to avoid coredump on LP64 system.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/netstat/vtw.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/netstat/vtw.c
diff -u src/usr.bin/netstat/vtw.c:1.4 src/usr.bin/netstat/vtw.c:1.5
--- src/usr.bin/netstat/vtw.c:1.4	Wed May  4 03:43:30 2011
+++ src/usr.bin/netstat/vtw.c	Tue May 10 04:40:16 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vtw.c,v 1.4 2011/05/04 03:43:30 pgoyette Exp $	*/
+/*	$NetBSD: vtw.c,v 1.5 2011/05/10 04:40:16 enami Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
 #if 0
 static char sccsid[] = "from: @(#)inet.c	8.4 (Berkeley) 4/20/94";
 #else
-__RCSID("$NetBSD: vtw.c,v 1.4 2011/05/04 03:43:30 pgoyette Exp $");
+__RCSID("$NetBSD: vtw.c,v 1.5 2011/05/10 04:40:16 enami Exp $");
 #endif
 #endif /* not lint */
 
@@ -251,7 +251,7 @@
 	for (i = 0; i < VTW_NCLASS; ++i) {
 		vtw_v4_t *kbase, *klim;
 		vtw_v4_t *ubase, *ulim;
-		int delta;
+		ptrdiff_t delta;
 
 		kbase = vtw_tcpv4[i].base.v4;
 		klim = vtw_tcpv4[i].lim.v4;
@@ -354,7 +354,7 @@
 	for (i = 0; i < VTW_NCLASS; ++i) {
 		vtw_v6_t *kbase, *klim;
 		vtw_v6_t *ubase, *ulim;
-		int delta;
+		ptrdiff_t delta;
 
 		kbase = vtw_tcpv6[i].base.v6;
 		klim = vtw_tcpv6[i].lim.v6;



CVS commit: src/usr.sbin/traceroute6

2011-05-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue May 10 01:58:58 UTC 2011

Modified Files:
src/usr.sbin/traceroute6: traceroute6.8 traceroute6.c

Log Message:
AS additions from Zafer Aydogan to print the AS path. Minor cleanups to compile
without WARNS=1 hackery.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/traceroute6/traceroute6.8
cvs rdiff -u -r1.39 -r1.40 src/usr.sbin/traceroute6/traceroute6.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/traceroute6/traceroute6.8
diff -u src/usr.sbin/traceroute6/traceroute6.8:1.11 src/usr.sbin/traceroute6/traceroute6.8:1.12
--- src/usr.sbin/traceroute6/traceroute6.8:1.11	Sat Sep 17 11:16:11 2005
+++ src/usr.sbin/traceroute6/traceroute6.8	Mon May  9 21:58:58 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: traceroute6.8,v 1.11 2005/09/17 15:16:11 ginsbach Exp $
+.\"	$NetBSD: traceroute6.8,v 1.12 2011/05/10 01:58:58 christos Exp $
 .\"	$KAME: traceroute6.8,v 1.8 2000/06/12 16:29:18 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -39,7 +39,7 @@
 .Sh SYNOPSIS
 .Nm traceroute6
 .Bk -words
-.Op Fl dIlnrv
+.Op Fl adIlnrv
 .Ek
 .Bk -words
 .Op Fl f Ar firsthop
@@ -63,12 +63,19 @@
 .Op Fl w Ar waittime
 .Ek
 .Bk -words
+.Op Fl A Ar as_server
+.Ek
+.Bk -words
 .Ar target
 .Op Ar datalen
 .Ek
 .\"
 .Sh DESCRIPTION
 .Bl -tag -width Ds
+.It Fl a
+Turn on AS# lookups for each hop encountered.
+.It Fl A
+Turn on AS# lookups and use the given server instead of the default.
 .It Fl d
 Debug mode.
 .It Fl f Ar firsthop

Index: src/usr.sbin/traceroute6/traceroute6.c
diff -u src/usr.sbin/traceroute6/traceroute6.c:1.39 src/usr.sbin/traceroute6/traceroute6.c:1.40
--- src/usr.sbin/traceroute6/traceroute6.c:1.39	Thu May 13 14:19:18 2010
+++ src/usr.sbin/traceroute6/traceroute6.c	Mon May  9 21:58:58 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: traceroute6.c,v 1.39 2010/05/13 18:19:18 christos Exp $	*/
+/*	$NetBSD: traceroute6.c,v 1.40 2011/05/10 01:58:58 christos Exp $	*/
 /*	$KAME: traceroute6.c,v 1.67 2004/01/25 03:24:39 itojun Exp $	*/
 
 /*
@@ -75,7 +75,7 @@
 #else
 #include 
 #ifndef lint
-__RCSID("$NetBSD: traceroute6.c,v 1.39 2010/05/13 18:19:18 christos Exp $");
+__RCSID("$NetBSD: traceroute6.c,v 1.40 2011/05/10 01:58:58 christos Exp $");
 #endif
 #endif
 
@@ -282,6 +282,8 @@
 #include 
 #endif
 
+#include "as.h"
+
 #define DUMMY_PORT 10010
 
 #define	MAXPACKET	65535	/* max ip packet size */
@@ -306,68 +308,71 @@
 	struct tv32 tv;		/* time packet left */
 } __packed;
 
-u_char	packet[512];		/* last inbound (icmp) packet */
-struct opacket	*outpacket;	/* last output (udp) packet */
+static u_char	packet[512];		/* last inbound (icmp) packet */
+static struct opacket	*outpacket;	/* last output (udp) packet */
 
-int	main __P((int, char *[]));
-int	wait_for_reply __P((int, struct msghdr *));
+static ssize_t	wait_for_reply(int, struct msghdr *);
 #ifdef IPSEC
 #ifdef IPSEC_POLICY_IPSEC
-int	setpolicy __P((int so, char *policy));
+static int	setpolicy(int so, const char *policy);
+#endif
 #endif
+static void send_probe(int, u_long);
+static struct udphdr *get_udphdr(struct ip6_hdr *, u_char *);
+#if 0
+static int get_hoplim(struct msghdr *);
 #endif
-void	send_probe __P((int, u_long));
-struct udphdr *get_udphdr __P((struct ip6_hdr *, u_char *));
-int	get_hoplim __P((struct msghdr *));
-double	deltaT __P((struct timeval *, struct timeval *));
-char	*pr_type __P((int));
-int	packet_ok __P((struct msghdr *, int, int));
-void	print __P((struct msghdr *, int));
-const char *inetname __P((struct sockaddr *));
-void	usage __P((void));
-
-int rcvsock;			/* receive (icmp) socket file descriptor */
-int sndsock;			/* send (udp) socket file descriptor */
-
-struct msghdr rcvmhdr;
-struct iovec rcviov[2];
-int rcvhlim;
-struct in6_pktinfo *rcvpktinfo;
+static double deltaT(struct timeval *, struct timeval *);
+static const char *pr_type(int);
+static int packet_ok(struct msghdr *, ssize_t, int);
+static void print(struct msghdr *, int);
+static const char *inetname(struct sockaddr *);
+static void usage(void) __attribute__((__noreturn__));
+
+static int rcvsock;		/* receive (icmp) socket file descriptor */
+static int sndsock;		/* send (udp) socket file descriptor */
+
+static struct msghdr rcvmhdr;
+static struct iovec rcviov[2];
+static int rcvhlim;
+static struct in6_pktinfo *rcvpktinfo;
 
-struct sockaddr_in6 Src, Dst, Rcv;
-u_long datalen;			/* How much data */
+static struct sockaddr_in6 Src, Dst, Rcv;
+static u_long datalen;			/* How much data */
 #define	ICMP6ECHOLEN	8
 /* XXX: 2064 = 127(max hops in type 0 rthdr) * sizeof(ip6_hdr) + 16(margin) */
-char rtbuf[2064];
+static char rtbuf[2064];
 #ifdef USE_RFC3542
-struct ip6_rthdr *rth;
+static struct ip6_rthdr *rth;
 #endif
-struct cmsghdr *cmsg;
+static struct cmsghdr *cmsg;
 
-char *source = 0;
-char *hostname;
+static char *source;
+static char *hostname;
 
-u_long nprobes = 3

CVS commit: src/sys/fs/tmpfs

2011-05-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 10 00:34:26 UTC 2011

Modified Files:
src/sys/fs/tmpfs: tmpfs_vnops.c

Log Message:
yes, more C99 please (back out previous change).


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/fs/tmpfs/tmpfs_vnops.c

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

Modified files:

Index: src/sys/fs/tmpfs/tmpfs_vnops.c
diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.79 src/sys/fs/tmpfs/tmpfs_vnops.c:1.80
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.79	Sun May  8 00:03:35 2011
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Tue May 10 00:34:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.79 2011/05/08 00:03:35 christos Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.80 2011/05/10 00:34:26 matt Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.79 2011/05/08 00:03:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.80 2011/05/10 00:34:26 matt Exp $");
 
 #include 
 #include 
@@ -1466,8 +1466,7 @@
 
 #if defined(DEBUG)
 	if (!error && pgs) {
-		int i;
-		for (i = 0; i < npages; i++) {
+		for (int i = 0; i < npages; i++) {
 			KASSERT(pgs[i] != NULL);
 		}
 	}



CVS commit: src/sys/rump

2011-05-09 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue May 10 00:33:58 UTC 2011

Modified Files:
src/sys/rump: Makefile.rump

Log Message:
Make rump compile things with -std=gnu99 like the kernel and modules.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/rump/Makefile.rump

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/Makefile.rump
diff -u src/sys/rump/Makefile.rump:1.60 src/sys/rump/Makefile.rump:1.61
--- src/sys/rump/Makefile.rump:1.60	Tue Feb  1 01:15:51 2011
+++ src/sys/rump/Makefile.rump	Tue May 10 00:33:58 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rump,v 1.60 2011/02/01 01:15:51 matt Exp $
+#	$NetBSD: Makefile.rump,v 1.61 2011/05/10 00:33:58 matt Exp $
 #
 
 WARNS?=		3	# XXX: src/sys won't compile with -Wsign-compare yet
@@ -16,6 +16,11 @@
 .endif
 
 CFLAGS+=	-ffreestanding -fno-strict-aliasing
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 3
+CFLAGS+=	-Wsign-compare
+CFLAGS+=	-Wno-pointer-sign -Wno-attributes
+CFLAGS+=	-std=gnu99
+.endif
 CWARNFLAGS+=	-Wno-format-zero-length -Wno-pointer-sign
 CPPFLAGS+=	-D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR
 CPPFLAGS+=	-DMAXUSERS=32



CVS commit: [netbsd-4] src/doc

2011-05-09 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon May  9 19:39:19 UTC 2011

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

Log Message:
Ticket 1429


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.223 -r1.1.2.224 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.223 src/doc/CHANGES-4.1:1.1.2.224
--- src/doc/CHANGES-4.1:1.1.2.223	Sun May  8 17:32:20 2011
+++ src/doc/CHANGES-4.1	Mon May  9 19:39:18 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.223 2011/05/08 17:32:20 bouyer Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.224 2011/05/09 19:39:18 bouyer Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -4451,3 +4451,12 @@
 	same for consistency).
 	[christos, ticket #1428]
 
+lib/libc/resolv/res_init.c			1.11, 1.12 via patch
+
+	Don't check for ext being NULL to destroy the res_state. Instead
+	check the option bits like we did before.
+	Only try free-ing a version of res if it is not supposed to be
+	pre-inited like before. Fixes issues with programs passing random
+	uninitialized data as res_state.
+	[taca, ticket #1429]
+



CVS commit: [netbsd-4] src/lib/libc/resolv

2011-05-09 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon May  9 19:37:30 UTC 2011

Modified Files:
src/lib/libc/resolv [netbsd-4]: res_init.c

Log Message:
Pull up following revision(s) (requested by taca in ticket #1429):
lib/libc/resolv/res_init.c: revisions 1.11, 1.12 via patch
Don't check for ext being NULL to destroy the res_state. Instead check
the option bits like we did before.
Only try free-ing a version of res if it is not supposed to be pre-inited
like before. Fixes issues with programs passing random uninitialized data
as res_state.


To generate a diff of this commit:
cvs rdiff -u -r1.8.4.3 -r1.8.4.4 src/lib/libc/resolv/res_init.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/resolv/res_init.c
diff -u src/lib/libc/resolv/res_init.c:1.8.4.3 src/lib/libc/resolv/res_init.c:1.8.4.4
--- src/lib/libc/resolv/res_init.c:1.8.4.3	Sun Jan 23 21:47:51 2011
+++ src/lib/libc/resolv/res_init.c	Mon May  9 19:37:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_init.c,v 1.8.4.3 2011/01/23 21:47:51 bouyer Exp $	*/
+/*	$NetBSD: res_init.c,v 1.8.4.4 2011/05/09 19:37:30 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1985, 1989, 1993
@@ -77,7 +77,7 @@
 static const char rcsid[] = "Id: res_init.c,v 1.16.18.7 2007/07/09 01:52:58 mar
 ka Exp";
 #else
-__RCSID("$NetBSD: res_init.c,v 1.8.4.3 2011/01/23 21:47:51 bouyer Exp $");
+__RCSID("$NetBSD: res_init.c,v 1.8.4.4 2011/05/09 19:37:30 bouyer Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -194,8 +194,6 @@
 	int maxns = MAXNS;
 
 	RES_SET_H_ERRNO(statp, 0);
-	if (statp->_u._ext.ext != NULL)
-		res_ndestroy(statp);
 
 	if (!preinit) {
 		statp->retrans = RES_TIMEOUT;



CVS commit: src/lib/libcrypt

2011-05-09 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Mon May  9 19:15:29 UTC 2011

Modified Files:
src/lib/libcrypt: crypt-sha1.c

Log Message:
rearrange variable usage to kill __UNCONST
reviewed by sjg


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libcrypt/crypt-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/lib/libcrypt/crypt-sha1.c
diff -u src/lib/libcrypt/crypt-sha1.c:1.3 src/lib/libcrypt/crypt-sha1.c:1.4
--- src/lib/libcrypt/crypt-sha1.c:1.3	Fri Oct 27 18:22:56 2006
+++ src/lib/libcrypt/crypt-sha1.c	Mon May  9 19:15:28 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: crypt-sha1.c,v 1.3 2006/10/27 18:22:56 drochner Exp $ */
+/* $NetBSD: crypt-sha1.c,v 1.4 2011/05/09 19:15:28 drochner Exp $ */
 
 /*
  * Copyright (c) 2004, Juniper Networks, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: crypt-sha1.c,v 1.3 2006/10/27 18:22:56 drochner Exp $");
+__RCSID("$NetBSD: crypt-sha1.c,v 1.4 2011/05/09 19:15:28 drochner Exp $");
 #endif /* not lint */
 
 #include 
@@ -122,7 +122,7 @@
 static unsigned char hmac_buf[SHA1_SIZE];
 static char passwd[(2 * sizeof(SHA1_MAGIC)) +
 		   CRYPT_SHA1_SALT_LENGTH + SHA1_SIZE];
-char *sp;
+const char *sp;
 char *ep;
 unsigned long ul;
 int sl;
@@ -136,26 +136,25 @@
  * $$$salt[$]
  * If it does not start with $ we use our default iterations.
  */
-sp = __UNCONST(salt);
 
 /* If it starts with the magic string, then skip that */
-if (!strncmp(sp, magic, strlen(magic))) {
-	sp += strlen(magic);
+if (!strncmp(salt, magic, strlen(magic))) {
+	salt += strlen(magic);
 	/* and get the iteration count */
-	iterations = strtoul(sp, &ep, 10);
+	iterations = strtoul(salt, &ep, 10);
 	if (*ep != '$')
 	return NULL;		/* invalid input */
-	sp = ep + 1;			/* skip over the '$' */
+	salt = ep + 1;			/* skip over the '$' */
 } else {
 	iterations = __crypt_sha1_iterations(0);
 }
 
 /* It stops at the next '$', max CRYPT_SHA1_ITERATIONS chars */
-for (ep = sp; *ep && *ep != '$' && ep < (sp + CRYPT_SHA1_ITERATIONS); ep++)
+for (sp = salt; *sp && *sp != '$' && sp < (salt + CRYPT_SHA1_ITERATIONS); sp++)
 	continue;
 
 /* Get the length of the actual salt */
-sl = ep - sp;
+sl = sp - salt;
 pl = strlen(pw);
 
 /*
@@ -163,18 +162,17 @@
  * Prime the pump with 
  */
 dl = snprintf(passwd, sizeof (passwd), "%.*s%s%u", 
-		  sl, sp, magic, iterations);
+		  sl, salt, magic, iterations);
 /*
  * Then hmac using  as key, and repeat...
  */
-ep = __UNCONST(pw);			/* keep gcc happy */
-__hmac_sha1(passwd, dl, ep, pl, hmac_buf);
+__hmac_sha1(passwd, dl, pw, pl, hmac_buf);
 for (i = 1; i < iterations; i++) {
-	__hmac_sha1(hmac_buf, SHA1_SIZE, ep, pl, hmac_buf);
+	__hmac_sha1(hmac_buf, SHA1_SIZE, pw, pl, hmac_buf);
 }
 /* Now output... */
 pl = snprintf(passwd, sizeof(passwd), "%s%u$%.*s$",
-		  magic, iterations, sl, sp);
+		  magic, iterations, sl, salt);
 ep = passwd + pl;
 
 /* Every 3 bytes of hash gives 24 bits which is 4 base64 chars */



CVS commit: src/tests/sbin/sysctl

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May  9 17:55:38 UTC 2011

Modified Files:
src/tests/sbin/sysctl: t_perm.sh

Log Message:
Add one missing cleanup routine declaration.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/sysctl/t_perm.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/sbin/sysctl/t_perm.sh
diff -u src/tests/sbin/sysctl/t_perm.sh:1.1 src/tests/sbin/sysctl/t_perm.sh:1.2
--- src/tests/sbin/sysctl/t_perm.sh:1.1	Mon May  9 17:53:54 2011
+++ src/tests/sbin/sysctl/t_perm.sh	Mon May  9 17:55:37 2011
@@ -1,6 +1,6 @@
 #! /usr/bin/atf-sh
 #
-# $NetBSD: t_perm.sh,v 1.1 2011/05/09 17:53:54 jruoho Exp $
+# $NetBSD: t_perm.sh,v 1.2 2011/05/09 17:55:37 jruoho Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -100,7 +100,7 @@
 
 # kern.
 #
-atf_test_case sysctl_kern #cleanup
+atf_test_case sysctl_kern cleanup
 sysctl_kern_head() {
 	atf_set "require.user" "unprivileged"
 	atf_set "descr" "Test writing to 'kern' sysctl node as an user"



CVS commit: src

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May  9 17:53:54 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/sbin: Makefile
Added Files:
src/tests/sbin/sysctl: Makefile t_perm.sh

Log Message:
Add a test case for PR kern/44946. This tests that common first level sysctl
nodes (ddb, hw, machdep, etc.) are not writable by a normal user.


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.47 -r1.48 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.4 -r1.5 src/tests/sbin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/sbin/sysctl/Makefile \
src/tests/sbin/sysctl/t_perm.sh

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.334 src/distrib/sets/lists/tests/mi:1.335
--- src/distrib/sets/lists/tests/mi:1.334	Mon May  9 07:31:50 2011
+++ src/distrib/sets/lists/tests/mi	Mon May  9 17:53:54 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.334 2011/05/09 07:31:50 jruoho Exp $
+# $NetBSD: mi,v 1.335 2011/05/09 17:53:54 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2293,6 +2293,9 @@
 ./usr/tests/sbin/routetests-sbin-tests
 ./usr/tests/sbin/route/Atffile			tests-sbin-tests	atf
 ./usr/tests/sbin/route/t_missing		tests-sbin-tests	atf
+./usr/tests/sbin/sysctltests-sbin-tests
+./usr/tests/sbin/sysctl/Atffile			tests-sbin-tests	atf
+./usr/tests/sbin/sysctl/t_perm			tests-sbin-tests	atf
 ./usr/tests/sys	tests-sys-tests
 ./usr/tests/sys/Atffiletests-sys-tests	atf
 ./usr/tests/sys/rctests-sys-tests

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.47 src/etc/mtree/NetBSD.dist.tests:1.48
--- src/etc/mtree/NetBSD.dist.tests:1.47	Thu May  5 05:39:11 2011
+++ src/etc/mtree/NetBSD.dist.tests	Mon May  9 17:53:54 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.47 2011/05/05 05:39:11 jruoho Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.48 2011/05/09 17:53:54 jruoho Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -234,6 +234,7 @@
 ./usr/tests/sbin/newfs
 ./usr/tests/sbin/resize_ffs
 ./usr/tests/sbin/route
+./usr/tests/sbin/sysctl
 ./usr/tests/sys
 ./usr/tests/sys/rc
 ./usr/tests/syscall

Index: src/tests/sbin/Makefile
diff -u src/tests/sbin/Makefile:1.4 src/tests/sbin/Makefile:1.5
--- src/tests/sbin/Makefile:1.4	Tue May  3 07:56:42 2011
+++ src/tests/sbin/Makefile	Mon May  9 17:53:54 2011
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.4 2011/05/03 07:56:42 jruoho Exp $
+#	$NetBSD: Makefile,v 1.5 2011/05/09 17:53:54 jruoho Exp $
 #
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/sbin
 
-TESTS_SUBDIRS+=	fsck_ffs ifconfig newfs resize_ffs route
+TESTS_SUBDIRS+=	fsck_ffs ifconfig newfs resize_ffs route sysctl
 
 .include 

Added files:

Index: src/tests/sbin/sysctl/Makefile
diff -u /dev/null src/tests/sbin/sysctl/Makefile:1.1
--- /dev/null	Mon May  9 17:53:54 2011
+++ src/tests/sbin/sysctl/Makefile	Mon May  9 17:53:54 2011
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2011/05/09 17:53:54 jruoho Exp $
+
+.include 
+
+TESTSDIR=	${TESTSBASE}/sbin/sysctl
+
+TESTS_SH=	t_perm
+
+.include 
Index: src/tests/sbin/sysctl/t_perm.sh
diff -u /dev/null src/tests/sbin/sysctl/t_perm.sh:1.1
--- /dev/null	Mon May  9 17:53:54 2011
+++ src/tests/sbin/sysctl/t_perm.sh	Mon May  9 17:53:54 2011
@@ -0,0 +1,207 @@
+#! /usr/bin/atf-sh
+#
+# $NetBSD: t_perm.sh,v 1.1 2011/05/09 17:53:54 jruoho Exp $
+#
+# Copyright (c) 2011 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Jukka Ruohonen.
+#
+# 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 OTHERWI

CVS commit: src/distrib/sets/lists

2011-05-09 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon May  9 17:13:21 UTC 2011

Modified Files:
src/distrib/sets/lists/base: ad.mips64eb ad.mips64el md.amd64
md.sparc64 mi shl.mi
src/distrib/sets/lists/comp: ad.mips64eb ad.mips64el md.amd64
md.sparc64 mi shl.mi
src/distrib/sets/lists/man: mi

Log Message:
Attempt to fix build after perfuse addition (there is no MKPERFUSE)


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/base/ad.mips64eb
cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/base/ad.mips64el
cvs rdiff -u -r1.120 -r1.121 src/distrib/sets/lists/base/md.amd64
cvs rdiff -u -r1.113 -r1.114 src/distrib/sets/lists/base/md.sparc64
cvs rdiff -u -r1.937 -r1.938 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.582 -r1.583 src/distrib/sets/lists/base/shl.mi
cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/comp/ad.mips64eb \
src/distrib/sets/lists/comp/ad.mips64el
cvs rdiff -u -r1.112 -r1.113 src/distrib/sets/lists/comp/md.amd64
cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/comp/md.sparc64
cvs rdiff -u -r1.1622 -r1.1623 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.169 -r1.170 src/distrib/sets/lists/comp/shl.mi
cvs rdiff -u -r1.1315 -r1.1316 src/distrib/sets/lists/man/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/ad.mips64eb
diff -u src/distrib/sets/lists/base/ad.mips64eb:1.47 src/distrib/sets/lists/base/ad.mips64eb:1.48
--- src/distrib/sets/lists/base/ad.mips64eb:1.47	Mon May  9 08:51:08 2011
+++ src/distrib/sets/lists/base/ad.mips64eb	Mon May  9 17:13:19 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.47 2011/05/09 08:51:08 manu Exp $
+# $NetBSD: ad.mips64eb,v 1.48 2011/05/09 17:13:19 manu Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -179,8 +179,8 @@
 ./usr/lib/64/libpcap.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libpci.so.2			base-compat-shlib	compat,pic
 ./usr/lib/64/libpci.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/64/libperfuse.so.0			base-compat-shlib	compat,pic,perfuse
-./usr/lib/64/libperfuse.so.0.0			base-compat-shlib	compat,pic,perfuse
+./usr/lib/64/libperfuse.so.0			base-compat-shlib	compat,pic
+./usr/lib/64/libperfuse.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libposix.so.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libposix.so.0.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libprop.so.1			base-compat-shlib	compat,pic
@@ -456,8 +456,8 @@
 ./usr/lib/o32/libpcap.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libpci.so.2			base-compat-shlib	compat,pic
 ./usr/lib/o32/libpci.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/o32/libperfuse.so.0			base-compat-shlib	compat,pic,perfuse
-./usr/lib/o32/libperfuse.so.0.0			base-compat-shlib	compat,pic,perfuse
+./usr/lib/o32/libperfuse.so.0			base-compat-shlib	compat,pic
+./usr/lib/o32/libperfuse.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libposix.so.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libposix.so.0.1			base-compat-shlib	compat,pic
 ./usr/lib/o32/libprop.so.1			base-compat-shlib	compat,pic

Index: src/distrib/sets/lists/base/ad.mips64el
diff -u src/distrib/sets/lists/base/ad.mips64el:1.45 src/distrib/sets/lists/base/ad.mips64el:1.46
--- src/distrib/sets/lists/base/ad.mips64el:1.45	Mon May  9 08:51:08 2011
+++ src/distrib/sets/lists/base/ad.mips64el	Mon May  9 17:13:19 2011
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.45 2011/05/09 08:51:08 manu Exp $
+# $NetBSD: ad.mips64el,v 1.46 2011/05/09 17:13:19 manu Exp $
 ./libexec/ld.elf_so-64base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32base-sysutil-bin	compat,pic
 ./usr/lib/64	base-compat-lib
@@ -179,8 +179,8 @@
 ./usr/lib/64/libpcap.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libpci.so.2			base-compat-shlib	compat,pic
 ./usr/lib/64/libpci.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/64/libperfuse.so.0			base-compat-shlib	compat,pic,perfuse
-./usr/lib/64/libperfuse.so.0.0			base-compat-shlib	compat,pic,perfuse
+./usr/lib/64/libperfuse.so.0			base-compat-shlib	compat,pic
+./usr/lib/64/libperfuse.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libposix.so.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libposix.so.0.1			base-compat-shlib	compat,pic
 ./usr/lib/64/libprop.so.1			base-compat-shlib	compat,pic
@@ -456,8 +456,8 @@
 ./usr/lib/o32/libpcap.so.4.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libpci.so.2			base-compat-shlib	compat,pic
 ./usr/lib/o32/libpci.so.2.0			base-compat-shlib	compat,pic
-./usr/lib/o32/libperfuse.so.0			base-compat-shlib	compat,pic,perfuse
-./usr/lib/o32/libperfuse.so.0.0			base-compat-shlib	compat,pic,perfuse
+./usr/lib/o32/libperfuse.so.0			base-compat-shlib	compat,pic
+./usr/lib/o32/libperfuse.so.0.0			base-compat-shlib	compat,pic
 ./usr/lib/o32/libposix.so.0			base-co

CVS commit: othersrc/external/bsd/gensetlist

2011-05-09 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Mon May  9 15:03:58 UTC 2011

Modified Files:
othersrc/external/bsd/gensetlist: bsd.setlist.mk

Log Message:
derive syspkg category (CATEGORY) from LIB or PROG if one of them is defined

don't try to be smart with the gensetlist invocation, just call it when
needed.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/gensetlist/bsd.setlist.mk

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

Modified files:

Index: othersrc/external/bsd/gensetlist/bsd.setlist.mk
diff -u othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.1.1.1 othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.2
--- othersrc/external/bsd/gensetlist/bsd.setlist.mk:1.1.1.1	Sat Mar 12 08:20:42 2011
+++ othersrc/external/bsd/gensetlist/bsd.setlist.mk	Mon May  9 15:03:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.setlist.mk,v 1.1.1.1 2011/03/12 08:20:42 agc Exp $
+# $NetBSD: bsd.setlist.mk,v 1.2 2011/05/09 15:03:58 agc Exp $
 
 # Makefile fragment to hand the args to "setlist" from the Makefile
 
@@ -31,13 +31,22 @@
 GENSETLIST_ARGS+=-v SYMLINKS=${SYMLINKS:Q}
 .endif
 
+# guard keyword i.e. MKWIBBLE - just give the "wibble" part
 .if defined(GUARD)
 GENSETLIST_ARGS+=-D ${GUARD:Q}
 .endif
 
+# syspkg category
+.if !defined(CATEGORY)
+.  if defined(PROG)
+CATEGORY=${PROG}
+.  elif defined(LIB)
+CATEGORY=${LIB}
+.  endif
+.endif
 .if defined(CATEGORY)
 GENSETLIST_ARGS+=-c ${CATEGORY:Q}
 .endif
 
 setlist:
-	${.CURDIR}/../gensetlist ${GENSETLIST_ARGS}
+	gensetlist ${GENSETLIST_ARGS}



CVS commit: othersrc/external/bsd/gensetlist

2011-05-09 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Mon May  9 14:47:15 UTC 2011

Modified Files:
othersrc/external/bsd/gensetlist: gensetlist.c

Log Message:
Add a ".debug" extension to all compat debug libraries - as pointed out by
Nicholas Joly on tech-userlevel.

Many thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/gensetlist/gensetlist.c

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

Modified files:

Index: othersrc/external/bsd/gensetlist/gensetlist.c
diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.1.1.1 othersrc/external/bsd/gensetlist/gensetlist.c:1.2
--- othersrc/external/bsd/gensetlist/gensetlist.c:1.1.1.1	Sat Mar 12 08:20:42 2011
+++ othersrc/external/bsd/gensetlist/gensetlist.c	Mon May  9 14:47:15 2011
@@ -438,7 +438,7 @@
 vars.libdir, compat->arch32, vars.libname,
 pdefs(&vars, buf, sizeof(buf), "compat,pic"));
 			if (vars.shlib) {
-printf("./usr/libdata/debug%s/%s/lib%s.so.%s.%s\t\tcomp-compat-shlib\t%s\n",
+printf("./usr/libdata/debug%s/%s/lib%s.so.%s.%s.debug\t\tcomp-compat-shlib\t%s\n",
 	vars.libdir, compat->arch32, vars.libname, vars.major, vars.minor,
 	pdefs(&vars, buf, sizeof(buf), "compat,pic,debug"));
 			}



CVS commit: src/distrib/sets

2011-05-09 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Mon May  9 14:45:45 UTC 2011

Modified Files:
src/distrib/sets: sets.subr

Log Message:
Mention MKPERFUSE keyword here, too. I have forgot to commit this file before.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/distrib/sets/sets.subr

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

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.130 src/distrib/sets/sets.subr:1.131
--- src/distrib/sets/sets.subr:1.130	Thu Apr 21 20:59:38 2011
+++ src/distrib/sets/sets.subr	Mon May  9 14:45:44 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.130 2011/04/21 20:59:38 joerg Exp $
+#	$NetBSD: sets.subr,v 1.131 2011/05/09 14:45:44 haad Exp $
 #
 
 #
@@ -172,7 +172,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.130 2011/04/21 20:59:38 joerg Exp $
+# 	# $NetBSD: sets.subr,v 1.131 2011/05/09 14:45:44 haad Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -237,6 +237,7 @@
 #	pic			${MKPIC} != no
 #	postfix			${MKPOSTFIX} != no
 #	profile			${MKPROFILE} != no
+#	perfuse			${MKPERFUSE} != no
 #	share			${MKSHARE} != no
 #	skey			${MKSKEY} != no
 #	solaris			${MKDTRACE} != no or ${MKZFS} != no



CVS commit: src/share/mk

2011-05-09 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Mon May  9 14:36:48 UTC 2011

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
Add MKPERFUSE flag to those who are enabled by default.


To generate a diff of this commit:
cvs rdiff -u -r1.663 -r1.664 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.663 src/share/mk/bsd.own.mk:1.664
--- src/share/mk/bsd.own.mk:1.663	Thu Apr 21 14:26:35 2011
+++ src/share/mk/bsd.own.mk	Mon May  9 14:36:48 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.663 2011/04/21 14:26:35 joerg Exp $
+#	$NetBSD: bsd.own.mk,v 1.664 2011/05/09 14:36:48 haad Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -733,7 +733,7 @@
 	MKNLS \
 	MKNPF \
 	MKOBJ \
-	MKPAM \
+	MKPAM MKPERFUSE \
 	MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
 	MKSHARE MKSKEY MKSTATICLIB \
 	MKX11FONTS \



CVS commit: src/doc

2011-05-09 Thread Takahiro Kambe
Module Name:src
Committed By:   taca
Date:   Mon May  9 12:45:25 UTC 2011

Modified Files:
src/doc: 3RDPARTY

Log Message:
Postfix 2.8.3 has released.


To generate a diff of this commit:
cvs rdiff -u -r1.834 -r1.835 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.834 src/doc/3RDPARTY:1.835
--- src/doc/3RDPARTY:1.834	Fri May  6 15:29:06 2011
+++ src/doc/3RDPARTY	Mon May  9 12:45:25 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.834 2011/05/06 15:29:06 taca Exp $
+#	$NetBSD: 3RDPARTY,v 1.835 2011/05/09 12:45:25 taca Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -897,7 +897,7 @@
 
 Package:	postfix
 Version:	2.8.2
-Current Vers:	2.8.2
+Current Vers:	2.8.3
 Maintainer:	Wietse Venema 
 Archive Site:	ftp://postfix.cloud9.net/official/
 Home Page:	http://www.postfix.org/



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

2011-05-09 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Mon May  9 11:55:34 UTC 2011

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

Log Message:
Small typo (perfuse.debug -> perfused.debug).


To generate a diff of this commit:
cvs rdiff -u -r1.1621 -r1.1622 src/distrib/sets/lists/comp/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.1621 src/distrib/sets/lists/comp/mi:1.1622
--- src/distrib/sets/lists/comp/mi:1.1621	Mon May  9 08:51:08 2011
+++ src/distrib/sets/lists/comp/mi	Mon May  9 11:55:33 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1621 2011/05/09 08:51:08 manu Exp $
+#	$NetBSD: mi,v 1.1622 2011/05/09 11:55:33 njoly Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3812,7 +3812,7 @@
 ./usr/libdata/debug/usr/sbin/pac.debug		comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/paxctl.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/pcictl.debug	comp-sysutil-debug	debug
-./usr/libdata/debug/usr/sbin/perfuse.debug	comp-perfuse-debug	debug,perfuse
+./usr/libdata/debug/usr/sbin/perfused.debug	comp-perfuse-debug	debug,perfuse
 ./usr/libdata/debug/usr/sbin/pkg_add.debug	comp-pkgutil-debug	debug,crypto
 ./usr/libdata/debug/usr/sbin/pkg_admin.debug	comp-pkgutil-debug	debug,crypto
 ./usr/libdata/debug/usr/sbin/pkg_create.debug	comp-pkgutil-debug	debug,crypto



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

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May  9 11:05:36 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_closefrom.c

Log Message:
On a second thought, require that close(2) fails for a descriptor already
closed with closefrom(3). For some odd reason (yet to be determined), this
check fails on 5.99.51 (amd64).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/t_closefrom.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/gen/t_closefrom.c
diff -u src/tests/lib/libc/gen/t_closefrom.c:1.2 src/tests/lib/libc/gen/t_closefrom.c:1.3
--- src/tests/lib/libc/gen/t_closefrom.c:1.2	Mon May  9 10:50:02 2011
+++ src/tests/lib/libc/gen/t_closefrom.c	Mon May  9 11:05:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_closefrom.c,v 1.2 2011/05/09 10:50:02 jruoho Exp $ */
+/* $NetBSD: t_closefrom.c,v 1.3 2011/05/09 11:05:36 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_closefrom.c,v 1.2 2011/05/09 10:50:02 jruoho Exp $");
+__RCSID("$NetBSD: t_closefrom.c,v 1.3 2011/05/09 11:05:36 jruoho Exp $");
 
 #include 
 #include 
@@ -61,6 +61,8 @@
 
 	ATF_REQUIRE(cur2 >= 0);
 	ATF_REQUIRE(cur1 - 1 == cur2);
+
+	ATF_REQUIRE(close(fd) == -1);
 	ATF_REQUIRE(unlink(path) == 0);
 }
 



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

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May  9 10:50:03 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_closefrom.c

Log Message:
Remove superfluous close(2) pointed out by martin@.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_closefrom.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/gen/t_closefrom.c
diff -u src/tests/lib/libc/gen/t_closefrom.c:1.1 src/tests/lib/libc/gen/t_closefrom.c:1.2
--- src/tests/lib/libc/gen/t_closefrom.c:1.1	Mon May  9 05:17:12 2011
+++ src/tests/lib/libc/gen/t_closefrom.c	Mon May  9 10:50:02 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_closefrom.c,v 1.1 2011/05/09 05:17:12 jruoho Exp $ */
+/* $NetBSD: t_closefrom.c,v 1.2 2011/05/09 10:50:02 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_closefrom.c,v 1.1 2011/05/09 05:17:12 jruoho Exp $");
+__RCSID("$NetBSD: t_closefrom.c,v 1.2 2011/05/09 10:50:02 jruoho Exp $");
 
 #include 
 #include 
@@ -61,8 +61,6 @@
 
 	ATF_REQUIRE(cur2 >= 0);
 	ATF_REQUIRE(cur1 - 1 == cur2);
-
-	ATF_REQUIRE(close(fd) == 0);
 	ATF_REQUIRE(unlink(path) == 0);
 }
 



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

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May  9 09:27:37 UTC 2011

Modified Files:
src/tests/lib/libc/gen: t_raise.c

Log Message:
Add one more naive unit test.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/gen/t_raise.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/gen/t_raise.c
diff -u src/tests/lib/libc/gen/t_raise.c:1.3 src/tests/lib/libc/gen/t_raise.c:1.4
--- src/tests/lib/libc/gen/t_raise.c:1.3	Tue Apr  5 14:04:42 2011
+++ src/tests/lib/libc/gen/t_raise.c	Mon May  9 09:27:37 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_raise.c,v 1.3 2011/04/05 14:04:42 jruoho Exp $ */
+/*	$NetBSD: t_raise.c,v 1.4 2011/05/09 09:27:37 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_raise.c,v 1.3 2011/04/05 14:04:42 jruoho Exp $");
+__RCSID("$NetBSD: t_raise.c,v 1.4 2011/05/09 09:27:37 jruoho Exp $");
 
 #include 
 
@@ -39,11 +39,12 @@
 #include 
 
 static bool	fail;
-static void	handler(int);
+static void	handler_err(int);
+static void	handler_ret(int);
 static int	sig[] = { SIGALRM, SIGIO, SIGUSR1, SIGUSR2, SIGPWR };
 
 static void
-handler(int signo)
+handler_err(int signo)
 {
 	size_t i;
 
@@ -56,6 +57,15 @@
 	}
 }
 
+static void
+handler_ret(int signo)
+{
+
+	(void)sleep(1);
+
+	fail = false;
+}
+
 ATF_TC(raise_err);
 ATF_TC_HEAD(raise_err, tc)
 {
@@ -74,6 +84,33 @@
 	}
 }
 
+ATF_TC(raise_ret);
+ATF_TC_HEAD(raise_ret, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "Test return order of raise(3)");
+}
+
+ATF_TC_BODY(raise_ret, tc)
+{
+	struct sigaction sa;
+
+	fail = true;
+
+	sa.sa_flags = 0;
+	sa.sa_handler = handler_ret;
+
+	/*
+	 * Verify that raise(3) does not return
+	 * before the signal handler returns.
+	 */
+	ATF_REQUIRE(sigemptyset(&sa.sa_mask) == 0);
+	ATF_REQUIRE(sigaction(SIGUSR1, &sa, 0) == 0);
+	ATF_REQUIRE(raise(SIGUSR1) == 0);
+
+	if (fail != false)
+		atf_tc_fail("raise(3) returned before signal handler");
+}
+
 ATF_TC(raise_sig);
 ATF_TC_HEAD(raise_sig, tc)
 {
@@ -96,7 +133,7 @@
 		tv.tv_nsec = 2;
 
 		sa.sa_flags = 0;
-		sa.sa_handler = handler;
+		sa.sa_handler = handler_err;
 
 		ATF_REQUIRE(sigemptyset(&sa.sa_mask) == 0);
 		ATF_REQUIRE(sigaction(sig[i], &sa, 0) == 0);
@@ -112,6 +149,7 @@
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, raise_err);
+	ATF_TP_ADD_TC(tp, raise_ret);
 	ATF_TP_ADD_TC(tp, raise_sig);
 
 	return atf_no_error();



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

2011-05-09 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon May  9 09:06:28 UTC 2011

Modified Files:
src/sys/arch/sparc64/dev: ffb.c

Log Message:
Alter the sync-on-green and composite-sync settings:

  if the monitor doesn't support composite sync, enable sync-on-green

  then, if the monitor supports separate sync, disable composite vsync

(Prompted by macallan@.)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/sparc64/dev/ffb.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/sparc64/dev/ffb.c
diff -u src/sys/arch/sparc64/dev/ffb.c:1.40 src/sys/arch/sparc64/dev/ffb.c:1.41
--- src/sys/arch/sparc64/dev/ffb.c:1.40	Wed Apr 20 09:57:59 2011
+++ src/sys/arch/sparc64/dev/ffb.c	Mon May  9 09:06:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffb.c,v 1.40 2011/04/20 09:57:59 martin Exp $	*/
+/*	$NetBSD: ffb.c,v 1.41 2011/05/09 09:06:28 jdc Exp $	*/
 /*	$OpenBSD: creator.c,v 1.20 2002/07/30 19:48:15 jason Exp $	*/
 
 /*
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.40 2011/04/20 09:57:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffb.c,v 1.41 2011/05/09 09:06:28 jdc Exp $");
 
 #include 
 #include 
@@ -1362,10 +1362,10 @@
 		}
 	}
 #define EDID_VID_INP	sc->sc_edid_info.edid_video_input
-	if (!(EDID_VID_INP & EDID_VIDEO_INPUT_COMPOSITE_SYNC) &&
-	(EDID_VID_INP & EDID_VIDEO_INPUT_SYNC_ON_GRN)) {
+	if (!(EDID_VID_INP & EDID_VIDEO_INPUT_COMPOSITE_SYNC)) {
 		dcl |= FFB_DAC_DAC_CTRL_SYNC_G;
-		tgc |= FFB_DAC_TGC_VSYNC_DISABLE;
+		if (EDID_VID_INP & EDID_VIDEO_INPUT_SEPARATE_SYNCS)
+			tgc |= FFB_DAC_TGC_VSYNC_DISABLE;
 	}
 	if (EDID_VID_INP & EDID_VIDEO_INPUT_BLANK_TO_BLACK)
 		dcl |= FFB_DAC_DAC_CTRL_PED_ENABLE;



CVS commit: src/lib/libc/gen

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May  9 09:06:21 UTC 2011

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

Log Message:
Xref raise_default_signal(3).


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gen/raise.3

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

Modified files:

Index: src/lib/libc/gen/raise.3
diff -u src/lib/libc/gen/raise.3:1.9 src/lib/libc/gen/raise.3:1.10
--- src/lib/libc/gen/raise.3:1.9	Fri Jan 30 23:52:28 2009
+++ src/lib/libc/gen/raise.3	Mon May  9 09:06:21 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: raise.3,v 1.9 2009/01/30 23:52:28 wiz Exp $
+.\"	$NetBSD: raise.3,v 1.10 2011/05/09 09:06:21 jruoho Exp $
 .\"
 .\" Copyright (c) 1990, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\"
 .\" @(#)raise.3	8.1 (Berkeley) 6/4/93
 .\"
-.Dd January 29, 2009
+.Dd May 9, 2011
 .Dt RAISE 3
 .Os
 .Sh NAME
@@ -68,7 +68,8 @@
 and
 .Xr _lwp_kill 2 .
 .Sh SEE ALSO
-.Xr kill 2
+.Xr kill 2 ,
+.Xr raise_default_signal 3
 .Sh STANDARDS
 The
 .Fn raise



CVS commit: src

2011-05-09 Thread Emmanuel Dreyfus
at8/peace.0			man-obsolete		obsolete
+./usr/share/man/cat8/perfused.0			man-perfuse-catman	.cat,perfuse
 ./usr/share/man/cat8/pfctl.0			man-pf-catman		pf,.cat
 ./usr/share/man/cat8/pflogd.0			man-pf-catman		pf,.cat
 ./usr/share/man/cat8/pfs.0man-pf-catman		pf,.cat
@@ -5120,6 +5121,7 @@
 ./usr/share/man/html8/pcnfsd.html		man-nfsserver-htmlman	html
 ./usr/share/man/html8/pdisk.html		man-sysutil-htmlman	html
 ./usr/share/man/html8/peace.html		man-obsolete		obsolete
+./usr/share/man/html8/perfused.html		man-perfuse-htmlman	html,perfuse
 ./usr/share/man/html8/pfctl.html		man-pf-htmlman		pf,html
 ./usr/share/man/html8/pflogd.html		man-pf-htmlman		pf,html
 ./usr/share/man/html8/pfs.html			man-pf-htmlman		pf,html
@@ -7911,6 +7913,7 @@
 ./usr/share/man/man8/pcnfsd.8			man-nfsserver-man	.man
 ./usr/share/man/man8/pdisk.8			man-sysutil-man		.man
 ./usr/share/man/man8/peace.8			man-obsolete		obsolete
+./usr/share/man/man8/perfused.8			man-perfuse-man		.man,perfuse
 ./usr/share/man/man8/pfctl.8			man-pf-man		pf,.man
 ./usr/share/man/man8/pflogd.8			man-pf-man		pf,.man
 ./usr/share/man/man8/pfs.8man-pf-man		pf,.man

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1544 src/doc/CHANGES:1.1545
--- src/doc/CHANGES:1.1544	Mon May  2 21:00:46 2011
+++ src/doc/CHANGES	Mon May  9 08:51:18 2011
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1544 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1545 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1003,3 +1003,6 @@
 		[jym 20110429]
 	powerpc: Converted PowerPC to use PCU to manage FPU/AltiVec/SPE.
 		[matt 20110502]
+	perfuse: Add the PUFFS RElay to FUSE library, which bridges the kernel
+		 level API for FUSE filesystems with native PUFFS. 
+		 [manu 20110509]

Index: src/lib/Makefile
diff -u src/lib/Makefile:1.166 src/lib/Makefile:1.167
--- src/lib/Makefile:1.166	Fri Apr 15 18:05:44 2011
+++ src/lib/Makefile	Mon May  9 08:51:18 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.166 2011/04/15 18:05:44 elric Exp $
+#	$NetBSD: Makefile,v 1.167 2011/05/09 08:51:18 manu Exp $
 #	from: @(#)Makefile	5.25.1.1 (Berkeley) 5/7/91
 
 .include 
@@ -79,6 +79,7 @@
 SUBDIR+=	libedit		# depends on libterminfo
 SUBDIR+=	libquota	# depends on libprop and librpcsvc
 SUBDIR+=	librefuse	# depends on libpuffs
+SUBDIR+=	libperfuse	# depends on libpuffs
 SUBDIR+=	librumpuser	# depends on libpthread
 
 .if (${MKNPF} != "no")

Index: src/lib/libperfuse/Makefile
diff -u src/lib/libperfuse/Makefile:1.2 src/lib/libperfuse/Makefile:1.3
--- src/lib/libperfuse/Makefile:1.2	Tue May  3 13:14:09 2011
+++ src/lib/libperfuse/Makefile	Mon May  9 08:51:18 2011
@@ -1,17 +1,19 @@
+# $NetBSD: Makefile,v 1.3 2011/05/09 08:51:18 manu Exp $
+
 LIB=perfuse
 LIBDPLIBS+= puffs	${.CURDIR}/../libpuffs
 
-
+.ifdef DEBUG
 PERFUSE_OPT_DEBUG_FLAGS=   -g -DPERFUSE_DEBUG
+.endif
 
 CFLAGS+=${PERFUSE_OPT_DEBUG_FLAGS}
 CPPFLAGS+=	-I${.CURDIR} 
 CPPFLAGS+=	-I${NETBSDSRCDIR}/lib/libpuffs 
-CPPFLAGS+=	-I${NETBSDSRCDIR}/sys -I${ARCHDIR} 
 SRCS=   perfuse.c ops.c subr.c debug.c
 MAN=		libperfuse.3
 WARNS=  4
 INCS=   perfuse.h
-INCSDIR=/usr/include
+INCSDIR=	/usr/include
 
 .include 

Index: src/usr.sbin/Makefile
diff -u src/usr.sbin/Makefile:1.255 src/usr.sbin/Makefile:1.256
--- src/usr.sbin/Makefile:1.255	Fri Apr 15 18:05:46 2011
+++ src/usr.sbin/Makefile	Mon May  9 08:51:18 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.255 2011/04/15 18:05:46 elric Exp $
+#	$NetBSD: Makefile,v 1.256 2011/05/09 08:51:18 manu Exp $
 #	from: @(#)Makefile	5.20 (Berkeley) 6/12/93
 
 .include 
@@ -14,7 +14,7 @@
 	kgmon lastlogin ldpd link lmcconfig lockstat lpr mailwrapper makefs \
 	map-mbone mdconfig memswitch mlxctl mmcformat mopd mountd moused \
 	mrinfo mrouted mscdlabel mtrace \
-	mtree ndbootd ndiscvt netgroup_mkdb nfsd ofctl paxctl pcictl \
+	mtree ndbootd ndiscvt netgroup_mkdb nfsd ofctl paxctl pcictl perfused \
 	pppd psrset pstat pwd_mkdb postinstall powerd puffs quot quotacheck \
 	quotactl quotaon rarpd rbootd rdate \
 	repquota rmt rpc.bootparamd rpc.lockd rpc.pcnfsd \

Index: src/usr.sbin/perfused/Makefile
diff -u src/usr.sbin/perfused/Makefile:1.1 src/usr.sbin/perfused/Makefile:1.2
--- src/usr.sbin/perfused/Makefile:1.1	Wed Aug 25 07:18:01 2010
+++ src/usr.sbin/perfused/Makefile	Mon May  9 08:51:18 2011
@@ -1,13 +1,17 @@
+# $NetBSD: Makefile,v 1.2 2011/05/09 08:51:18 manu Exp $
+
 PROG=perfused
 
+.ifdef DEBUG
 PERFUSE_OPT_DEBUG_FLAGS=   -g -DPERFUSE_DEBUG
+.endif
 
-CFLAGS=${PERFUSE_OPT_DEBUG_FLAGS}
+CFLAGS+=${PERFUSE_OPT_DEBUG_FLAGS}
 SRCS=   perfused.c msg.c debug.c
 MAN=		perfused.8
 WARNS=  4
 
-LDADD+= -lperfuse -lpuffs #-L/usr/pkg/lib -lefence
+LDADD+= -lperfuse -lpuffs
 DPADD+= ${LIBPUFFS}
 
 .include 

Index: src/usr.sbin/perfused/msg.c
diff -u src/usr.sbin/perfused/msg.c:1.11 src/usr.sbin/perfused/msg.c:1.12
--- src/usr.sbin/perfused/msg

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

2011-05-09 Thread Julian Coleman
Module Name:src
Committed By:   jdc
Date:   Mon May  9 08:44:22 UTC 2011

Modified Files:
src/sys/arch/sparc64/dev: ffbreg.h

Log Message:
Correc the "enable pedestal" register definition.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc64/dev/ffbreg.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/sparc64/dev/ffbreg.h
diff -u src/sys/arch/sparc64/dev/ffbreg.h:1.7 src/sys/arch/sparc64/dev/ffbreg.h:1.8
--- src/sys/arch/sparc64/dev/ffbreg.h:1.7	Sat Apr  9 19:31:15 2011
+++ src/sys/arch/sparc64/dev/ffbreg.h	Mon May  9 08:44:22 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffbreg.h,v 1.7 2011/04/09 19:31:15 jdc Exp $	*/
+/*	$NetBSD: ffbreg.h,v 1.8 2011/05/09 08:44:22 jdc Exp $	*/
 /*	$OpenBSD: creatorreg.h,v 1.5 2002/07/29 06:21:45 jason Exp $	*/
 
 /*
@@ -102,7 +102,7 @@
 
 /* 0x5001 DAC control */
 #define	FFB_DAC_DAC_CTRL_SYNC_G		0x0020	/* enable sync on green */
-#define FFB_DAC_DAC_CTRL_PED_ENABLE	0x0030	/* enable pedestal */
+#define FFB_DAC_DAC_CTRL_PED_ENABLE	0x0040	/* enable pedestal */
 #define FFB_DAC_DAC_CTRL_VSYNC_REV	0x0080	/* reverse vsync (BT497A) */
 #define FFB_DAC_DAC_CTRL_POS_SYNC	0x0100	/* enable pos. sync (BT497A) */
 



CVS commit: src

2011-05-09 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Mon May  9 07:31:51 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/lib/libc/stdlib: Makefile
Added Files:
src/tests/lib/libc/stdlib: t_exit.c

Log Message:
Few basic tests for exit(3).


To generate a diff of this commit:
cvs rdiff -u -r1.333 -r1.334 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libc/stdlib/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/stdlib/t_exit.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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.333 src/distrib/sets/lists/tests/mi:1.334
--- src/distrib/sets/lists/tests/mi:1.333	Mon May  9 06:04:14 2011
+++ src/distrib/sets/lists/tests/mi	Mon May  9 07:31:50 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.333 2011/05/09 06:04:14 jruoho Exp $
+# $NetBSD: mi,v 1.334 2011/05/09 07:31:50 jruoho Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -433,6 +433,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_div.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_environment_pth.debug	tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_exit.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_hsearch.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_mi_vector_hash.debug	tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/stdlib/t_posix_memalign.debug	tests-lib-debug		debug,atf
@@ -1936,6 +1937,7 @@
 ./usr/tests/lib/libc/stdlib/t_div		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_environment	tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_environment_pth	tests-lib-tests		atf
+./usr/tests/lib/libc/stdlib/t_exit		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_getopt		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_hsearch		tests-lib-tests		atf
 ./usr/tests/lib/libc/stdlib/t_mi_vector_hash	tests-lib-tests		atf

Index: src/tests/lib/libc/stdlib/Makefile
diff -u src/tests/lib/libc/stdlib/Makefile:1.11 src/tests/lib/libc/stdlib/Makefile:1.12
--- src/tests/lib/libc/stdlib/Makefile:1.11	Tue Apr  5 08:24:28 2011
+++ src/tests/lib/libc/stdlib/Makefile	Mon May  9 07:31:51 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2011/04/05 08:24:28 jruoho Exp $
+# $NetBSD: Makefile,v 1.12 2011/05/09 07:31:51 jruoho Exp $
 
 .include 
 
@@ -7,6 +7,7 @@
 TESTS_C+=	t_div
 TESTS_C+=	t_environment
 TESTS_C+=	t_environment_pth
+TESTS_C+=	t_exit
 TESTS_C+=	t_hsearch
 TESTS_C+=	t_mi_vector_hash
 TESTS_C+=	t_posix_memalign

Added files:

Index: src/tests/lib/libc/stdlib/t_exit.c
diff -u /dev/null src/tests/lib/libc/stdlib/t_exit.c:1.1
--- /dev/null	Mon May  9 07:31:51 2011
+++ src/tests/lib/libc/stdlib/t_exit.c	Mon May  9 07:31:51 2011
@@ -0,0 +1,186 @@
+/* $NetBSD: t_exit.c,v 1.1 2011/05/09 07:31:51 jruoho Exp $ */
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jukka Ruohonen.
+ *
+ * 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 
+__RCSID("$NetBSD: t_exit.c,v 1.1 2011/05/09 07:31:51 jruoho Exp $");
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static bool	fail;
+static void	func(void);
+
+static void
+func(void)
+{
+	fail = false;
+}
+
+ATF_TC(exit_atexit);
+ATF_TC_HEAD(exit_atexit, tc)
+{
+	atf_tc_set_md_var(tc, "descr", "A basic test of a