CVS commit: src/lib/libterminfo

2011-11-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  3 07:19:39 UTC 2011

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

Log Message:
Fix dependencies on generated files.


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

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

Modified files:

Index: src/lib/libterminfo/Makefile
diff -u src/lib/libterminfo/Makefile:1.20 src/lib/libterminfo/Makefile:1.21
--- src/lib/libterminfo/Makefile:1.20	Wed Nov  2 20:39:41 2011
+++ src/lib/libterminfo/Makefile	Thu Nov  3 07:19:39 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.20 2011/11/02 20:39:41 yamt Exp $
+#	$NetBSD: Makefile,v 1.21 2011/11/03 07:19:39 joerg Exp $
 
 .include bsd.own.mk
 
@@ -39,10 +39,6 @@ CPPFLAGS+=	-I${.OBJDIR}
 
 .include Makefile.hash
 
-term.c: compiled_terms.c
-
-termcap.c: termcap_hash.c
-
 # Generate our man pages
 terminfo.5: genman terminfo.5.in term.h termcap_map.c
 		@echo Generating terminfo man pages

Index: src/lib/libterminfo/Makefile.hash
diff -u src/lib/libterminfo/Makefile.hash:1.3 src/lib/libterminfo/Makefile.hash:1.4
--- src/lib/libterminfo/Makefile.hash:1.3	Wed Nov  2 20:39:41 2011
+++ src/lib/libterminfo/Makefile.hash	Thu Nov  3 07:19:39 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.hash,v 1.3 2011/11/02 20:39:41 yamt Exp $
+#	$NetBSD: Makefile.hash,v 1.4 2011/11/03 07:19:39 joerg Exp $
 
 SCRIPT_ENV=	\
 	TOOL_AWK=${TOOL_AWK:Q} \
@@ -22,4 +22,6 @@ compiled_terms.c: genterms term.h ${NETB
 		@echo Generating compiled terminfo descriptions
 		${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC}  ${.TARGET}
 
+DPSRCS+=	hash.c termcap_hash.c compiled_terms.c
+
 CLEANFILES+=	hash.c termcap_hash.c compiled_terms.c



CVS commit: src/tools

2011-11-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  3 07:42:56 UTC 2011

Modified Files:
src/tools: Makefile

Log Message:
Revert .WAIT removal and add comment why it is needed between *tblgen.


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

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

Modified files:

Index: src/tools/Makefile
diff -u src/tools/Makefile:1.154 src/tools/Makefile:1.155
--- src/tools/Makefile:1.154	Wed Nov  2 23:47:07 2011
+++ src/tools/Makefile	Thu Nov  3 07:42:56 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.154 2011/11/02 23:47:07 njoly Exp $
+#	$NetBSD: Makefile,v 1.155 2011/11/03 07:42:56 joerg Exp $
 
 .include bsd.own.mk
 
@@ -68,10 +68,12 @@ SUBDIR=	host-mkdep .WAIT compat .WAIT \
 		pwd_mkdb stat strfile sunlabel zic
 
 .if ${MKLLVM} != no
+# .WAIT between llvm-tblgen and llvm-clang-tblgen ensures install
+# rules works correctly
 SUBDIR+= \
 	llvm .WAIT \
 	llvm-lib/libLLVMSupport llvm-lib/libLLVMTableGen .WAIT \
-	llvm-tblgen llvm-clang-tblgen .WAIT \
+	llvm-tblgen .WAIT llvm-clang-tblgen .WAIT \
 	llvm-include .WAIT \
 	llvm-lib .WAIT \
 	llvm-clang



CVS commit: src/usr.bin/tic

2011-11-03 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Nov  3 10:12:58 UTC 2011

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

Log Message:
Use memmove as we are effectively moving memory from left to right so
that the use=foo capability is removed when merging foo.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/tic/tic.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/tic/tic.c
diff -u src/usr.bin/tic/tic.c:1.10 src/usr.bin/tic/tic.c:1.11
--- src/usr.bin/tic/tic.c:1.10	Mon Feb 22 23:05:39 2010
+++ src/usr.bin/tic/tic.c	Thu Nov  3 10:12:57 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: tic.c,v 1.10 2010/02/22 23:05:39 roy Exp $ */
+/* $NetBSD: tic.c,v 1.11 2011/11/03 10:12:57 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include sys/cdefs.h
-__RCSID($NetBSD: tic.c,v 1.10 2010/02/22 23:05:39 roy Exp $);
+__RCSID($NetBSD: tic.c,v 1.11 2011/11/03 10:12:57 roy Exp $);
 
 #include sys/types.h
 
@@ -357,7 +357,7 @@ merge_use(int flags)
 cap += sizeof(uint16_t) + num;
 memn = rtic-extras.bufpos -
 (cap - rtic-extras.buf);
-memcpy(scap, cap, memn);
+memmove(scap, cap, memn);
 rtic-extras.bufpos -= cap - scap;
 cap = scap;
 rtic-extras.entries--;



CVS commit: src/tools/compat

2011-11-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  3 14:13:54 UTC 2011

Modified Files:
src/tools/compat: compat_defs.h configure configure.ac
nbtool_config.h.in

Log Message:
Add getline(3) compat glue.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/tools/compat/compat_defs.h
cvs rdiff -u -r1.72 -r1.73 src/tools/compat/configure
cvs rdiff -u -r1.73 -r1.74 src/tools/compat/configure.ac
cvs rdiff -u -r1.26 -r1.27 src/tools/compat/nbtool_config.h.in

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

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.81 src/tools/compat/compat_defs.h:1.82
--- src/tools/compat/compat_defs.h:1.81	Mon Sep  5 07:38:52 2011
+++ src/tools/compat/compat_defs.h	Thu Nov  3 14:13:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.81 2011/09/05 07:38:52 jdc Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.82 2011/11/03 14:13:53 joerg Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -276,6 +276,11 @@ int flock(int, int);
 char *fparseln(FILE *, size_t *, size_t *, const char [3], int);
 #endif
 
+#if !HAVE_GETLINE
+ssize_t getdelim(char **, size_t *, int, FILE *);
+ssize_t getline(char **, size_t *, FILE *);
+#endif
+
 #if !HAVE_ISSETUGID
 int issetugid(void);
 #endif

Index: src/tools/compat/configure
diff -u src/tools/compat/configure:1.72 src/tools/compat/configure:1.73
--- src/tools/compat/configure:1.72	Sun Aug 14 20:25:01 2011
+++ src/tools/compat/configure	Thu Nov  3 14:13:53 2011
@@ -4981,8 +4981,8 @@ EOF
 fi
 
 for ac_func in atoll asprintf asnprintf basename devname dirfd dirname \
-	esetfunc fgetln flock fpurge __fpurge futimes getopt getopt_long \
-	group_from_gid gid_from_group \
+	esetfunc fgetln flock fpurge __fpurge futimes getline \
+	getopt getopt_long group_from_gid gid_from_group \
 	heapsort isblank issetugid lchflags lchmod lchown lutimes mkstemp \
 	mkdtemp poll pread putc_unlocked pwcache_userdb pwcache_groupdb \
 	pwrite raise_default_signal random setenv \

Index: src/tools/compat/configure.ac
diff -u src/tools/compat/configure.ac:1.73 src/tools/compat/configure.ac:1.74
--- src/tools/compat/configure.ac:1.73	Sun Aug 14 20:22:42 2011
+++ src/tools/compat/configure.ac	Thu Nov  3 14:13:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: configure.ac,v 1.73 2011/08/14 20:22:42 apb Exp $
+#	$NetBSD: configure.ac,v 1.74 2011/11/03 14:13:53 joerg Exp $
 #
 # Autoconf definition file for libnbcompat.
 #
@@ -146,8 +146,8 @@ AC_CHECK_DECLS(sys_signame,,, [#include 
 # Library functions (where a .h check isn't enough).
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(atoll asprintf asnprintf basename devname dirfd dirname \
-	esetfunc fgetln flock fpurge __fpurge futimes getopt getopt_long \
-	group_from_gid gid_from_group \
+	esetfunc fgetln flock fpurge __fpurge futimes getline \
+	getopt getopt_long group_from_gid gid_from_group \
 	heapsort isblank issetugid lchflags lchmod lchown lutimes mkstemp \
 	mkdtemp poll pread putc_unlocked pwcache_userdb pwcache_groupdb \
 	pwrite raise_default_signal random setenv \

Index: src/tools/compat/nbtool_config.h.in
diff -u src/tools/compat/nbtool_config.h.in:1.26 src/tools/compat/nbtool_config.h.in:1.27
--- src/tools/compat/nbtool_config.h.in:1.26	Sun Aug 14 20:25:01 2011
+++ src/tools/compat/nbtool_config.h.in	Thu Nov  3 14:13:53 2011
@@ -1,6 +1,6 @@
 /* nbtool_config.h.in.  Generated automatically from configure.ac by autoheader.  */
 
-/*  $NetBSD: nbtool_config.h.in,v 1.26 2011/08/14 20:25:01 apb Exp $*/
+/*  $NetBSD: nbtool_config.h.in,v 1.27 2011/11/03 14:13:53 joerg Exp $*/
  
 #ifndef __NETBSD_NBTOOL_CONFIG_H__
 #define __NETBSD_NBTOOL_CONFIG_H__
@@ -267,6 +267,9 @@
 /* Define if you have the `futimes' function. */
 #undef HAVE_FUTIMES
 
+/* Define if you have the `getline' function. */
+#undef HAVE_GETLINE
+
 /* Define if you have the `getopt' function. */
 #undef HAVE_GETOPT
 



CVS commit: src/sys/arch/m68k/m68k

2011-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Nov  3 14:39:05 UTC 2011

Modified Files:
src/sys/arch/m68k/m68k: pmap_motorola.c

Log Message:
Use pool_allocator_meta rather than pool_allocator_nointr to allocate
struct pv_entry pool in the previous fix for PR port-m68k/45519.
Per comment from yamt@ on source-changes-d@:
http://mail-index.NetBSD.org/source-changes-d/2011/10/31/msg004211.html


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/m68k/m68k/pmap_motorola.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/m68k/m68k/pmap_motorola.c
diff -u src/sys/arch/m68k/m68k/pmap_motorola.c:1.63 src/sys/arch/m68k/m68k/pmap_motorola.c:1.64
--- src/sys/arch/m68k/m68k/pmap_motorola.c:1.63	Sat Oct 29 18:26:19 2011
+++ src/sys/arch/m68k/m68k/pmap_motorola.c	Thu Nov  3 14:39:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_motorola.c,v 1.63 2011/10/29 18:26:19 tsutsui Exp $*/
+/*	$NetBSD: pmap_motorola.c,v 1.64 2011/11/03 14:39:05 tsutsui Exp $*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -119,7 +119,7 @@
 #include opt_m68k_arch.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_motorola.c,v 1.63 2011/10/29 18:26:19 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_motorola.c,v 1.64 2011/11/03 14:39:05 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -547,7 +547,7 @@ pmap_init(void)
 	 * Initialize the pv_entry pools.
 	 */
 	pool_init(pmap_pv_pool, sizeof(struct pv_entry), 0, 0, 0, pvpl,
-	pool_allocator_nointr, IPL_NONE);
+	pool_allocator_meta, IPL_NONE);
 
 	/*
 	 * Now that this is done, mark the pages shared with the



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

2011-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Nov  3 14:56:39 UTC 2011

Modified Files:
src/sys/arch/news68k/news68k: locore.s

Log Message:
unifdef __ELF__


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.56 src/sys/arch/news68k/news68k/locore.s:1.57
--- src/sys/arch/news68k/news68k/locore.s:1.56	Tue Feb  8 20:20:21 2011
+++ src/sys/arch/news68k/news68k/locore.s	Thu Nov  3 14:56:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.56 2011/02/08 20:20:21 rmind Exp $	*/
+/*	$NetBSD: locore.s,v 1.57 2011/11/03 14:56:39 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -1056,11 +1056,7 @@ ENTRY_NOPROFILE(_delay)
 	 * operations and that the loop will run from a single cache
 	 * half-line.
 	 */
-#ifdef __ELF__
 	.align  8
-#else
-	.align	3
-#endif
 L_delay:
 	subl	%d1,%d0
 	jgt	L_delay



CVS commit: src/sys/arch/hp300/hp300

2011-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Nov  3 15:13:02 UTC 2011

Modified Files:
src/sys/arch/hp300/hp300: locore.s

Log Message:
unifdef __ELF__


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/arch/hp300/hp300/locore.s

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

Modified files:

Index: src/sys/arch/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.159 src/sys/arch/hp300/hp300/locore.s:1.160
--- src/sys/arch/hp300/hp300/locore.s:1.159	Sun Mar  6 14:51:21 2011
+++ src/sys/arch/hp300/hp300/locore.s	Thu Nov  3 15:13:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.159 2011/03/06 14:51:21 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.160 2011/11/03 15:13:02 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -1364,11 +1364,7 @@ ENTRY_NOPROFILE(_delay)
 	 * operations and that the loop will run from a single cache
 	 * half-line.
 	 */
-#ifdef __ELF__
 	.align	8
-#else
-	.align	3
-#endif
 L_delay:
 	subl	%d1,%d0
 	jgt	L_delay



CVS commit: src

2011-11-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  3 17:52:54 UTC 2011

Modified Files:
src/external/bsd/llvm: Makefile.inc
src/external/bsd/llvm/bin/clang: Makefile
src/external/bsd/llvm/config/llvm/Config: config.h llvm-config.h
src/external/bsd/llvm/lib: Makefile
src/external/bsd/llvm/lib/libLLVMARMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMLinker: Makefile
src/external/bsd/llvm/lib/libLLVMMipsCodeGen: Makefile
src/external/bsd/llvm/lib/libLLVMScalarOpts: Makefile
src/external/bsd/llvm/lib/libLLVMSelectionDAG: Makefile
src/external/bsd/llvm/lib/libLLVMTransformsUtils: Makefile
src/external/bsd/llvm/lib/libclangAnalysis: Makefile
src/external/bsd/llvm/lib/libclangFrontend: Makefile
src/external/bsd/llvm/lib/libclangSema: Makefile
src/external/bsd/llvm/lib/libclangStaticAnalyzerCore: Makefile
Added Files:
src/tools/llvm-lib/libLLVMLinker: Makefile

Log Message:
Update LLVM/Clang snapshot to r143571 for the improved optimizer.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/bsd/llvm/Makefile.inc
cvs rdiff -u -r1.15 -r1.16 src/external/bsd/llvm/bin/clang/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/config/llvm/Config/config.h
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/llvm/config/llvm/Config/llvm-config.h
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/llvm/lib/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/llvm/lib/libLLVMARMCodeGen/Makefile
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/llvm/lib/libLLVMCodeGen/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/llvm/lib/libLLVMLinker/Makefile
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/llvm/lib/libLLVMMipsCodeGen/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/lib/libLLVMScalarOpts/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/llvm/lib/libLLVMSelectionDAG/Makefile
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/llvm/lib/libLLVMTransformsUtils/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/llvm/lib/libclangAnalysis/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/llvm/lib/libclangFrontend/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/llvm/lib/libclangSema/Makefile
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/llvm/lib/libclangStaticAnalyzerCore/Makefile
cvs rdiff -u -r0 -r1.1 src/tools/llvm-lib/libLLVMLinker/Makefile

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/llvm/Makefile.inc
diff -u src/external/bsd/llvm/Makefile.inc:1.23 src/external/bsd/llvm/Makefile.inc:1.24
--- src/external/bsd/llvm/Makefile.inc:1.23	Tue Oct 11 13:53:57 2011
+++ src/external/bsd/llvm/Makefile.inc	Thu Nov  3 17:52:53 2011
@@ -1,19 +1,20 @@
-#	$NetBSD: Makefile.inc,v 1.23 2011/10/11 13:53:57 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.24 2011/11/03 17:52:53 joerg Exp $
 
 .if !defined(LLVM_TOPLEVEL_MK)
 LLVM_TOPLEVEL_MK=
 
 .include bsd.own.mk
 
-LLVM_REVISION=	141658
-CLANG_REVISION=	141658 
+LLVM_REVISION=	143571
+CLANG_REVISION=	143571
 
 LLVM_SRCDIR:=	${.PARSEDIR}/dist/llvm
 CLANG_SRCDIR:=	${.PARSEDIR}/dist/clang
 LLVM_TOPLEVEL:=	${.PARSEDIR}
 
 CPPFLAGS+=	-I. -I${LLVM_SRCDIR}/include -I${CLANG_SRCDIR}/include \
-		-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
+		-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS \
+		-D__STDC_FORMAT_MACROS
 
 .if defined(HOSTLIB) || defined(HOSTPROG)
 LLVM_INCLUDE_CONFIG=	${LLVM_TOOLCONF_OBJDIR}/config/include

Index: src/external/bsd/llvm/bin/clang/Makefile
diff -u src/external/bsd/llvm/bin/clang/Makefile:1.15 src/external/bsd/llvm/bin/clang/Makefile:1.16
--- src/external/bsd/llvm/bin/clang/Makefile:1.15	Tue Aug  9 12:30:47 2011
+++ src/external/bsd/llvm/bin/clang/Makefile	Thu Nov  3 17:52:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2011/08/09 12:30:47 joerg Exp $
+#	$NetBSD: Makefile,v 1.16 2011/11/03 17:52:53 joerg Exp $
 
 PROG_CXX=	clang
 NOMAN=		yes
@@ -73,6 +73,7 @@ LLVM_LIBS+= \
 	MCDisassembler \
 	MCParser \
 	MC \
+	Linker \
 	TransformsUtils \
 	ipa \
 	Core \

Index: src/external/bsd/llvm/config/llvm/Config/config.h
diff -u src/external/bsd/llvm/config/llvm/Config/config.h:1.4 src/external/bsd/llvm/config/llvm/Config/config.h:1.5
--- src/external/bsd/llvm/config/llvm/Config/config.h:1.4	Mon Jul 25 16:32:43 2011
+++ src/external/bsd/llvm/config/llvm/Config/config.h	Thu Nov  3 17:52:53 2011
@@ -539,19 +539,22 @@
 #define LLVM_BINDIR /usr/bin
 
 /* Time at which LLVM was configured */
-#define LLVM_CONFIGTIME Mon Jul 25 15:20:40 CEST 2011
+#define LLVM_CONFIGTIME Thu Nov  3 00:22:51 CET 2011
 
 /* Installation directory for data files */
 #define LLVM_DATADIR /usr/share/llvm
 
+/* Target triple LLVM will generate code for by default */
+#define LLVM_DEFAULT_TARGET_TRIPLE x86_64--netbsd
+
 /* Installation directory for documentation */
 #define 

CVS commit: [netbsd-5] src

2011-11-03 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Nov  3 17:54:03 UTC 2011

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

Log Message:
Back out ticket #1681 - needs to be rethought, causing build problems.


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.6 -r1.71.2.7 src/distrib/sets/sets.subr
cvs rdiff -u -r1.1.2.107 -r1.1.2.108 src/doc/CHANGES-5.2
cvs rdiff -u -r1.115.4.1 -r1.115.4.2 src/sys/conf/osrelease.sh

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

Modified files:

Index: src/distrib/sets/sets.subr
diff -u src/distrib/sets/sets.subr:1.71.2.6 src/distrib/sets/sets.subr:1.71.2.7
--- src/distrib/sets/sets.subr:1.71.2.6	Wed Nov  2 20:23:05 2011
+++ src/distrib/sets/sets.subr	Thu Nov  3 17:54:03 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.71.2.6 2011/11/02 20:23:05 riz Exp $
+#	$NetBSD: sets.subr,v 1.71.2.7 2011/11/03 17:54:03 riz Exp $
 #
 
 #
@@ -215,11 +215,7 @@ if [ ${MACHINE_ARCH} = m68000 ]; the
 	shlib=no			# Turn off shlibs for some ports.
 fi
 
-OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n`
-# for release branches, use X.Y version, for -current use X.Y.Z
-if [ ! ${OSRELEASE%.99} = ${OSRELEASE} ]; then
-	OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
-fi
+OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
 MODULEDIR=stand/${MACHINE}/${OSRELEASE}/modules
 SUBST=s#@MODULEDIR@#${MODULEDIR}#g
 SUBST=${SUBST};s#@OSRELEASE@#${OSRELEASE}#g
@@ -232,7 +228,7 @@ SUBST=${SUBST};s#@MACHINE@#${MACHINE}#g
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.71.2.6 2011/11/02 20:23:05 riz Exp $
+# 	# $NetBSD: sets.subr,v 1.71.2.7 2011/11/03 17:54:03 riz Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root

Index: src/doc/CHANGES-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.107 src/doc/CHANGES-5.2:1.1.2.108
--- src/doc/CHANGES-5.2:1.1.2.107	Wed Nov  2 20:42:34 2011
+++ src/doc/CHANGES-5.2	Thu Nov  3 17:54:02 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.107 2011/11/02 20:42:34 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.108 2011/11/03 17:54:02 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5724,12 +5724,6 @@ gnu/usr.bin/binutils/gas/Makefile		patch
 	Fix build on arm with USE_SSP set.
 	[mrg, ticket #1680]
 
-distrib/sets/sets.subr1.133
-sys/conf/osrelease.sh1.116-1.117
-
-	Fix module path logic for release branches.
-	[jmcneill, ticket #1681]
-
 sys/arch/xen/xen/xbdback_xenbus.c		1.45 via patch
 
 	Guard against spurious xbdback_backend_changed() calls which

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



CVS commit: [netbsd-5-1] src

2011-11-03 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Nov  3 17:55:16 UTC 2011

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

Log Message:
Back out ticket #1681 - needs to be rethought, was causing build failures.


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.5.6.1 -r1.71.2.5.6.2 src/distrib/sets/sets.subr
cvs rdiff -u -r1.1.2.37 -r1.1.2.38 src/doc/CHANGES-5.1.1
cvs rdiff -u -r1.115.14.1 -r1.115.14.2 src/sys/conf/osrelease.sh

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

Modified files:

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

Index: src/doc/CHANGES-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.37 src/doc/CHANGES-5.1.1:1.1.2.38
--- src/doc/CHANGES-5.1.1:1.1.2.37	Wed Nov  2 20:31:52 2011
+++ src/doc/CHANGES-5.1.1	Thu Nov  3 17:55:15 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.37 2011/11/02 20:31:52 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.38 2011/11/03 17:55:15 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2540,12 +2540,6 @@ share/zoneinfo/zone.tab			patch
 	Update to tzdata2011n.
 	[apb, ticket #1684]
 
-distrib/sets/sets.subr1.133
-sys/conf/osrelease.sh1.116-1.117
-
-	Fix module path logic for release branches.
-	[jmcneill, ticket #1681]
-
 sys/arch/xen/xen/xbdback_xenbus.c		1.45 via patch
 
 	Guard against spurious xbdback_backend_changed() calls which

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



CVS commit: [netbsd-5-0] src

2011-11-03 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Nov  3 17:56:27 UTC 2011

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

Log Message:
Back out ticket #1681 - needs to be rethought, was causing build failures.


To generate a diff of this commit:
cvs rdiff -u -r1.71.2.5.2.1 -r1.71.2.5.2.2 src/distrib/sets/sets.subr
cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-5.0.3
cvs rdiff -u -r1.115.10.1 -r1.115.10.2 src/sys/conf/osrelease.sh

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

Modified files:

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

Index: src/doc/CHANGES-5.0.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.51 src/doc/CHANGES-5.0.3:1.1.2.52
--- src/doc/CHANGES-5.0.3:1.1.2.51	Wed Nov  2 20:31:31 2011
+++ src/doc/CHANGES-5.0.3	Thu Nov  3 17:56:27 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.51 2011/11/02 20:31:31 riz Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.52 2011/11/03 17:56:27 riz Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2844,12 +2844,6 @@ share/zoneinfo/zone.tab			patch
 	Update to tzdata2011n.
 	[apb, ticket #1684]
 
-distrib/sets/sets.subr1.133
-sys/conf/osrelease.sh1.116-1.117
-
-	Fix module path logic for release branches.
-	[jmcneill, ticket #1681]
-
 sys/arch/xen/xen/xbdback_xenbus.c		1.45 via patch
 
 	Guard against spurious xbdback_backend_changed() calls which

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



CVS commit: src/sys/arch/mips/mips

2011-11-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov  3 18:27:08 UTC 2011

Modified Files:
src/sys/arch/mips/mips: mipsX_subr.S

Log Message:
Fix brain fart.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/mips/mips/mipsX_subr.S

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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.54 src/sys/arch/mips/mips/mipsX_subr.S:1.55
--- src/sys/arch/mips/mips/mipsX_subr.S:1.54	Sat Aug 27 13:23:52 2011
+++ src/sys/arch/mips/mips/mipsX_subr.S	Thu Nov  3 18:27:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.54 2011/08/27 13:23:52 bouyer Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.55 2011/11/03 18:27:07 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -2050,7 +2050,7 @@ LEAF_NOPROFILE(MIPSX(tlb_invalidate_asid
 	bne	t1, t2, 1b
 	 nop
 
-	_MFC0	t0, MIPS_COP_0_TLB_HI		# restore PID.
+	_MTC0	t0, MIPS_COP_0_TLB_HI		# restore PID.
 	mtc0	t3, MIPS_COP_0_TLB_PG_MASK	# restore pgMask
 	COP0_SYNC
 



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips

2011-11-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Thu Nov  3 18:29:27 UTC 2011

Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
Fix brain fart


To generate a diff of this commit:
cvs rdiff -u -r1.26.36.1.2.46 -r1.26.36.1.2.47 \
src/sys/arch/mips/mips/mipsX_subr.S

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/mips/mips/mipsX_subr.S
diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.46 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.47
--- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.46	Fri Jul  1 02:04:15 2011
+++ src/sys/arch/mips/mips/mipsX_subr.S	Thu Nov  3 18:29:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.46 2011/07/01 02:04:15 matt Exp $	*/
+/*	$NetBSD: mipsX_subr.S,v 1.26.36.1.2.47 2011/11/03 18:29:27 matt Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -2043,7 +2043,7 @@ LEAF_NOPROFILE(MIPSX(tlb_invalidate_asid
 	bne	t1, t2, 1b
 	 nop
 
-	_MFC0	t0, MIPS_COP_0_TLB_HI		# restore PID.
+	_MTC0	t0, MIPS_COP_0_TLB_HI		# restore PID.
 	mtc0	t3, MIPS_COP_0_TLB_PG_MASK	# restore pgMask
 	COP0_SYNC
 	mtc0	v1, MIPS_COP_0_STATUS		# restore status register



CVS commit: src/tools/compat

2011-11-03 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Nov  3 19:30:05 UTC 2011

Modified Files:
src/tools/compat: Makefile

Log Message:
Add getline.c here too.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/tools/compat/Makefile

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

Modified files:

Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.54 src/tools/compat/Makefile:1.55
--- src/tools/compat/Makefile:1.54	Wed Feb  3 15:34:44 2010
+++ src/tools/compat/Makefile	Thu Nov  3 19:30:05 2011
@@ -1,9 +1,10 @@
-#	$NetBSD: Makefile,v 1.54 2010/02/03 15:34:44 roy Exp $
+#	$NetBSD: Makefile,v 1.55 2011/11/03 19:30:05 joerg Exp $
 
 HOSTLIB=	nbcompat
 
 SRCS=		atoll.c basename.c dirname.c fgetln.c flock.c fparseln.c \
-		fpurge.c getmode.c getopt_long.c gettemp.c heapsort.c \
+		fpurge.c getline.c getmode.c getopt_long.c gettemp.c \
+		heapsort.c \
 		issetugid.c lchflags.c lchmod.c lchown.c libyywrap.c \
 		md2.c md2hl.c md4c.c md4hl.c md5c.c md5hl.c \
 		mi_vector_hash.c mkdtemp.c \



CVS commit: src/usr.sbin/installboot

2011-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov  3 20:09:18 UTC 2011

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

Log Message:
Minor nits in the sparc64 example


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/usr.sbin/installboot/installboot.8

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

Modified files:

Index: src/usr.sbin/installboot/installboot.8
diff -u src/usr.sbin/installboot/installboot.8:1.78 src/usr.sbin/installboot/installboot.8:1.79
--- src/usr.sbin/installboot/installboot.8:1.78	Mon Aug 29 14:09:01 2011
+++ src/usr.sbin/installboot/installboot.8	Thu Nov  3 20:09:18 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: installboot.8,v 1.78 2011/08/29 14:09:01 alnsn Exp $
+.\	$NetBSD: installboot.8,v 1.79 2011/11/03 20:09:18 martin Exp $
 .\
 .\ Copyright (c) 2002-2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -747,8 +747,8 @@ already present:
 .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot
 .
 .Ss Nx Ns Tn /sparc64
-Install the Berkeley Fast File System primary bootstrap on to disk
-.Sq wd0 :
+Install the primary bootstrap on to disk
+.Sq sd0 :
 .Dl Ic installboot /dev/rsd0c /usr/mdec/bootblk
 .Pp
 The secondary



CVS commit: src/usr.sbin/installboot

2011-11-03 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov  3 20:46:41 UTC 2011

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

Log Message:
Minor usage tweaks for SMALLPROG


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/installboot/installboot.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/installboot/installboot.c
diff -u src/usr.sbin/installboot/installboot.c:1.35 src/usr.sbin/installboot/installboot.c:1.36
--- src/usr.sbin/installboot/installboot.c:1.35	Wed Aug 31 13:32:37 2011
+++ src/usr.sbin/installboot/installboot.c	Thu Nov  3 20:46:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.35 2011/08/31 13:32:37 joerg Exp $	*/
+/*	$NetBSD: installboot.c,v 1.36 2011/11/03 20:46:41 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #if !defined(__lint)
-__RCSID($NetBSD: installboot.c,v 1.35 2011/08/31 13:32:37 joerg Exp $);
+__RCSID($NetBSD: installboot.c,v 1.36 2011/11/03 20:46:41 martin Exp $);
 #endif	/* !__lint */
 
 #include sys/ioctl.h
@@ -488,7 +488,7 @@ machine_usage(void)
 #ifdef TIOCGWINSZ
 	struct winsize win;
 
-	if (ioctl(fileno(stderr), TIOCGWINSZ, win) == 0)
+	if (ioctl(fileno(stderr), TIOCGWINSZ, win) == 0  win.ws_col  0)
 		wincol = win.ws_col;
 #endif
 
@@ -533,6 +533,7 @@ getfstype(ib_params *param, const char *
 static void
 fstype_usage(void)
 {
+#ifndef NO_STAGE2
 	const char *prefix;
 	int	i;
 
@@ -546,6 +547,7 @@ fstype_usage(void)
 		prefix=, ;
 	}
 	fputs(\n, stderr);
+#endif
 }
 
 static void



CVS commit: src/bin/pax

2011-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Nov  3 21:59:46 UTC 2011

Modified Files:
src/bin/pax: tar.c

Log Message:
Accept -X -


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/bin/pax/tar.c

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

Modified files:

Index: src/bin/pax/tar.c
diff -u src/bin/pax/tar.c:1.67 src/bin/pax/tar.c:1.68
--- src/bin/pax/tar.c:1.67	Sat Feb 14 03:10:06 2009
+++ src/bin/pax/tar.c	Thu Nov  3 17:59:45 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tar.c,v 1.67 2009/02/14 08:10:06 lukem Exp $	*/
+/*	$NetBSD: tar.c,v 1.68 2011/11/03 21:59:45 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = @(#)tar.c	8.2 (Berkeley) 4/18/94;
 #else
-__RCSID($NetBSD: tar.c,v 1.67 2009/02/14 08:10:06 lukem Exp $);
+__RCSID($NetBSD: tar.c,v 1.68 2011/11/03 21:59:45 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -1386,11 +1386,15 @@ tar_gnutar_X_compat(path)
 	int lineno = 0;
 	size_t len;
 
-	fp = fopen(path, r);
-	if (fp == NULL) {
-		tty_warn(1, cannot open %s: %s, path,
-		strerror(errno));
-		return -1;
+	if (path[0] == '-'  path[1] == '\0')
+		fp = stdin;
+	else {
+		fp = fopen(path, r);
+		if (fp == NULL) {
+			tty_warn(1, cannot open %s: %s, path,
+			strerror(errno));
+			return -1;
+		}
 	}
 
 	while ((line = fgetln(fp, len))) {
@@ -1400,7 +1404,9 @@ tar_gnutar_X_compat(path)
 			lineno, path);
 		}
 		if (tar_gnutar_exclude_one(line, len))
-			return (-1);
+			return -1;
 	}
-	return (0);
+	if (fp != stdin)
+		fclose(fp);
+	return 0;
 }



CVS commit: src/sys/netinet6

2011-11-03 Thread Zoltan Arnold NAGY
Module Name:src
Committed By:   zoltan
Date:   Fri Nov  4 00:22:34 UTC 2011

Modified Files:
src/sys/netinet6: frag6.c ip6_var.h

Log Message:
Change the IPv6 reassembly mechanism to use mutex(9).
Also add ip6_reass_packet() to be used by NPF.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/netinet6/frag6.c
cvs rdiff -u -r1.55 -r1.56 src/sys/netinet6/ip6_var.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/netinet6/frag6.c
diff -u src/sys/netinet6/frag6.c:1.49 src/sys/netinet6/frag6.c:1.50
--- src/sys/netinet6/frag6.c:1.49	Tue May  3 17:44:30 2011
+++ src/sys/netinet6/frag6.c	Fri Nov  4 00:22:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: frag6.c,v 1.49 2011/05/03 17:44:30 dyoung Exp $	*/
+/*	$NetBSD: frag6.c,v 1.50 2011/11/04 00:22:33 zoltan Exp $	*/
 /*	$KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: frag6.c,v 1.49 2011/05/03 17:44:30 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: frag6.c,v 1.50 2011/11/04 00:22:33 zoltan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -64,66 +64,13 @@ static void frag6_insque(struct ip6q *, 
 static void frag6_remque(struct ip6q *);
 static void frag6_freef(struct ip6q *);
 
-static int ip6q_locked;
 static int frag6_drainwanted;
 
 u_int frag6_nfragpackets;
 u_int frag6_nfrags;
 struct	ip6q ip6q;	/* ip6 reassemble queue */
 
-static inline int ip6q_lock_try(void);
-static inline void ip6q_unlock(void);
-
-static inline int
-ip6q_lock_try(void)
-{
-	int s;
-
-	/*
-	 * Use splvm() -- we're bloking things that would cause
-	 * mbuf allocation.
-	 */
-	s = splvm();
-	if (ip6q_locked) {
-		splx(s);
-		return (0);
-	}
-	ip6q_locked = 1;
-	splx(s);
-	return (1);
-}
-
-static inline void
-ip6q_unlock(void)
-{
-	int s;
-
-	s = splvm();
-	ip6q_locked = 0;
-	splx(s);
-}
-
-#ifdef DIAGNOSTIC
-#define	IP6Q_LOCK()			\
-do {	\
-	if (ip6q_lock_try() == 0) {	\
-		printf(%s:%d: ip6q already locked\n, __FILE__, __LINE__); \
-		panic(ip6q_lock);	\
-	}\
-} while (/*CONSTCOND*/ 0)
-#define	IP6Q_LOCK_CHECK()		\
-do {	\
-	if (ip6q_locked == 0) {		\
-		printf(%s:%d: ip6q lock not held\n, __FILE__, __LINE__); \
-		panic(ip6q lock check);\
-	}\
-} while (/*CONSTCOND*/ 0)
-#else
-#define	IP6Q_LOCK()		(void) ip6q_lock_try()
-#define	IP6Q_LOCK_CHECK()	/* nothing */
-#endif
-
-#define	IP6Q_UNLOCK()		ip6q_unlock()
+static kmutex_t	frag6_lock;
 
 #ifndef offsetof		/* XXX */
 #define	offsetof(type, member)	((size_t)(((type *)0)-member))
@@ -137,6 +84,7 @@ frag6_init(void)
 {
 
 	ip6q.ip6q_next = ip6q.ip6q_prev = ip6q;
+	mutex_init(frag6_lock, MUTEX_DEFAULT, IPL_NET);
 }
 
 /*
@@ -171,8 +119,8 @@ frag6_init(void)
 /*
  * Fragment input
  */
-int
-frag6_input(struct mbuf **mp, int *offp, int proto)
+static int
+frag6_in(struct mbuf **mp, int *offp)
 {
 	struct rtentry *rt;
 	struct mbuf *m = *mp, *t;
@@ -193,7 +141,7 @@ frag6_input(struct mbuf **mp, int *offp,
 	ip6 = mtod(m, struct ip6_hdr *);
 	IP6_EXTHDR_GET(ip6f, struct ip6_frag *, m, offset, sizeof(*ip6f));
 	if (ip6f == NULL)
-		return IPPROTO_DONE;
+		return -1;
 
 	dstifp = NULL;
 	/* find the destination interface of the packet. */
@@ -205,7 +153,7 @@ frag6_input(struct mbuf **mp, int *offp,
 	if (ip6-ip6_plen == 0) {
 		icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset);
 		in6_ifstat_inc(dstifp, ifs6_reass_fail);
-		return IPPROTO_DONE;
+		return -1;
 	}
 
 	/*
@@ -219,7 +167,7 @@ frag6_input(struct mbuf **mp, int *offp,
 		icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
 		offsetof(struct ip6_hdr, ip6_plen));
 		in6_ifstat_inc(dstifp, ifs6_reass_fail);
-		return IPPROTO_DONE;
+		return -1;
 	}
 
 	IP6_STATINC(IP6_STAT_FRAGMENTS);
@@ -228,7 +176,7 @@ frag6_input(struct mbuf **mp, int *offp,
 	/* offset now points to data portion */
 	offset += sizeof(struct ip6_frag);
 
-	IP6Q_LOCK();
+	mutex_enter(frag6_lock);
 
 	/*
 	 * Enforce upper bound on number of fragments.
@@ -269,7 +217,6 @@ frag6_input(struct mbuf **mp, int *offp,
 		if (q6 == NULL)
 			goto dropfrag;
 		memset(q6, 0, sizeof(*q6));
-
 		frag6_insque(q6, ip6q);
 
 		/* ip6q_nxt will be filled afterwards, from 1st fragment */
@@ -307,18 +254,18 @@ frag6_input(struct mbuf **mp, int *offp,
 	if (q6-ip6q_unfrglen = 0) {
 		/* The 1st fragment has already arrived. */
 		if (q6-ip6q_unfrglen + fragoff + frgpartlen  IPV6_MAXPACKET) {
+			mutex_exit(frag6_lock);
 			icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
 			offset - sizeof(struct ip6_frag) +
 			offsetof(struct ip6_frag, ip6f_offlg));
-			IP6Q_UNLOCK();
-			return (IPPROTO_DONE);
+			return -1;
 		}
 	} else if (fragoff + frgpartlen  IPV6_MAXPACKET) {
+		mutex_exit(frag6_lock);
 		icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
 			offset - sizeof(struct ip6_frag) +
 offsetof(struct 

CVS commit: src/sys/kern

2011-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  4 02:13:09 UTC 2011

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

Log Message:
Fix error I introduced in previous commit that caused asymmetric connects
when SOCK_NONBLOCK or SOCK_CLOEXEC was specified. Factor out common code
and simplify error return.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/sys/kern/uipc_syscalls.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/uipc_syscalls.c
diff -u src/sys/kern/uipc_syscalls.c:1.147 src/sys/kern/uipc_syscalls.c:1.148
--- src/sys/kern/uipc_syscalls.c:1.147	Wed Sep 21 14:10:25 2011
+++ src/sys/kern/uipc_syscalls.c	Thu Nov  3 22:13:08 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_syscalls.c,v 1.147 2011/09/21 18:10:25 christos Exp $	*/
+/*	$NetBSD: uipc_syscalls.c,v 1.148 2011/11/04 02:13:08 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.147 2011/09/21 18:10:25 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_syscalls.c,v 1.148 2011/11/04 02:13:08 christos Exp $);
 
 #include opt_pipe.h
 
@@ -400,8 +400,32 @@ do_sys_connect(struct lwp *l, int fd, st
 	return (error);
 }
 
+static int
+makesocket(struct lwp *l, file_t **fp, int *fd, int flags, int type,
+int domain, int proto, struct socket *soo)
+{
+	int error;
+	struct socket *so;
+	int fnonblock = (flags  SOCK_NONBLOCK) ? FNONBLOCK : 0; 
+
+	if ((error = socreate(domain, so, type, proto, l, soo)) != 0)
+		return error;
+
+	if ((error = fd_allocfile(fp, fd)) != 0) {
+		soclose(so);
+		return error;
+	}
+	fd_set_exclose(l, *fd, (flags  SOCK_CLOEXEC) != 0);
+	(*fp)-f_flag = FREAD|FWRITE|fnonblock;
+	(*fp)-f_type = DTYPE_SOCKET;
+	(*fp)-f_ops = socketops;
+	(*fp)-f_data = so;
+	return 0;
+}
+
 int
-sys_socketpair(struct lwp *l, const struct sys_socketpair_args *uap, register_t *retval)
+sys_socketpair(struct lwp *l, const struct sys_socketpair_args *uap,
+register_t *retval)
 {
 	/* {
 		syscallarg(int)		domain;
@@ -415,57 +439,46 @@ sys_socketpair(struct lwp *l, const stru
 	proc_t		*p;
 	int		flags = SCARG(uap, type)  SOCK_FLAGS_MASK;
 	int		type = SCARG(uap, type)  ~SOCK_FLAGS_MASK;
-	int		fnonblock = (flags  SOCK_NONBLOCK) ? FNONBLOCK : 0; 
+	int		domain = SCARG(uap, domain);
+	int		proto = SCARG(uap, protocol);
 
 	p = curproc;
-	error = socreate(SCARG(uap, domain), so1, type,
-	SCARG(uap, protocol), l, NULL);
-	if (error)
-		return (error);
-	error = socreate(SCARG(uap, domain), so2, type,
-	SCARG(uap, protocol), l, so1);
+
+	error = makesocket(l, fp1, fd, flags, type, domain, proto, NULL);
 	if (error)
-		goto free1;
-	if ((error = fd_allocfile(fp1, fd)) != 0)
-		goto free2;
-	fd_set_exclose(l, fd, (flags  SOCK_CLOEXEC) != 0);
+		return error;
+	so1 = fp1-f_data;
 	sv[0] = fd;
-	fp1-f_flag = FREAD|FWRITE|fnonblock;
-	fp1-f_type = DTYPE_SOCKET;
-	fp1-f_ops = socketops;
-	fp1-f_data = so1;
-	if ((error = fd_allocfile(fp2, fd)) != 0)
-		goto free3;
-	fd_set_exclose(l, fd, (flags  SOCK_CLOEXEC) != 0);
-	fp2-f_flag = FREAD|FWRITE|fnonblock;
-	fp2-f_type = DTYPE_SOCKET;
-	fp2-f_ops = socketops;
-	fp2-f_data = so2;
+
+	error = makesocket(l, fp2, fd, flags, type, domain, proto, so1);
+	if (error)
+		goto out;
+	so2 = fp2-f_data;
 	sv[1] = fd;
+
 	solock(so1);
 	error = soconnect2(so1, so2);
-	if (error == 0  SCARG(uap, type) == SOCK_DGRAM) {
+	if (error == 0  type == SOCK_DGRAM) {
 		/*
 		 * Datagram socket connection is asymmetric.
 		 */
 		error = soconnect2(so2, so1);
 	}
 	sounlock(so1);
+
 	if (error == 0)
-		error = copyout(sv, SCARG(uap, rsv), 2 * sizeof(int));
+		error = copyout(sv, SCARG(uap, rsv), sizeof(sv));
 	if (error == 0) {
 		fd_affix(p, fp2, sv[1]);
 		fd_affix(p, fp1, sv[0]);
-		return (0);
+		return 0;
 	}
 	fd_abort(p, fp2, sv[1]);
- free3:
-	fd_abort(p, fp1, sv[0]);
- free2:
 	(void)soclose(so2);
- free1:
+out:
+	fd_abort(p, fp1, sv[0]);
 	(void)soclose(so1);
-	return (error);
+	return error;
 }
 
 int



CVS commit: src/tests/net/sys

2011-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  4 02:23:40 UTC 2011

Modified Files:
src/tests/net/sys: Makefile
Added Files:
src/tests/net/sys: t_socketpair.c

Log Message:
socketpair test.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/net/sys/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/net/sys/t_socketpair.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/Makefile
diff -u src/tests/net/sys/Makefile:1.3 src/tests/net/sys/Makefile:1.4
--- src/tests/net/sys/Makefile:1.3	Sat Sep 24 14:34:18 2011
+++ src/tests/net/sys/Makefile	Thu Nov  3 22:23:39 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2011/09/24 18:34:18 christos Exp $
+# $NetBSD: Makefile,v 1.4 2011/11/04 02:23:39 christos Exp $
 
 .include bsd.own.mk
 
@@ -7,5 +7,6 @@ TESTSDIR=	${TESTSBASE}/net/sys
 TESTS_C=	t_connect
 TESTS_C+=	t_listen
 TESTS_C+=	t_rfc6056
+TESTS_C+=	t_socketpair
 
 .include bsd.test.mk

Added files:

Index: src/tests/net/sys/t_socketpair.c
diff -u /dev/null src/tests/net/sys/t_socketpair.c:1.1
--- /dev/null	Thu Nov  3 22:23:40 2011
+++ src/tests/net/sys/t_socketpair.c	Thu Nov  3 22:23:39 2011
@@ -0,0 +1,137 @@
+/* $NetBSD: t_socketpair.c,v 1.1 2011/11/04 02:23:39 christos Exp $ */
+
+/*-
+ * Copyright (c) 2011 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ *This product includes software developed by the NetBSD
+ *Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *contributors may be used to endorse or promote products derived
+ *from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include sys/cdefs.h
+__RCSID($NetBSD: t_socketpair.c,v 1.1 2011/11/04 02:23:39 christos Exp $);
+
+#include atf-c.h
+#include fcntl.h
+#include unistd.h
+#include stdlib.h
+#include sys/socket.h
+#include sys/un.h
+#include errno.h
+
+static void
+connected(int fd)
+{
+	struct sockaddr_un addr;
+	socklen_t len = (socklen_t)sizeof(addr);
+	ATF_REQUIRE(getpeername(fd, (struct sockaddr*)(void *)addr,
+	len) == 0);
+}
+
+static void
+run(int flags)
+{
+	int fd[2], i;
+
+	while ((i = open(/, O_RDONLY))  3)
+		ATF_REQUIRE(i != -1);
+
+	ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
+
+	ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0);
+
+	ATF_REQUIRE(fd[0] == 3);
+	ATF_REQUIRE(fd[1] == 4);
+
+	connected(fd[0]);
+	connected(fd[1]);
+
+	if (flags  SOCK_CLOEXEC) {
+		ATF_REQUIRE((fcntl(fd[0], F_GETFD)  FD_CLOEXEC) != 0);
+		ATF_REQUIRE((fcntl(fd[1], F_GETFD)  FD_CLOEXEC) != 0);
+	} else {
+		ATF_REQUIRE((fcntl(fd[0], F_GETFD)  FD_CLOEXEC) == 0);
+		ATF_REQUIRE((fcntl(fd[1], F_GETFD)  FD_CLOEXEC) == 0);
+	}
+
+	if (flags  SOCK_NONBLOCK) {
+		ATF_REQUIRE((fcntl(fd[0], F_GETFL)  O_NONBLOCK) != 0);
+		ATF_REQUIRE((fcntl(fd[1], F_GETFL)  O_NONBLOCK) != 0);
+	} else {
+		ATF_REQUIRE((fcntl(fd[0], F_GETFL)  O_NONBLOCK) == 0);
+		ATF_REQUIRE((fcntl(fd[1], F_GETFL)  O_NONBLOCK) == 0);
+	}
+
+	ATF_REQUIRE(close(fd[0]) != -1);
+	ATF_REQUIRE(close(fd[1]) != -1);
+}
+
+ATF_TC(socketpair_basic);
+ATF_TC_HEAD(socketpair_basic, tc)
+{
+	atf_tc_set_md_var(tc, descr, A basic test of socketpair(2));
+}
+
+ATF_TC_BODY(socketpair_basic, tc)
+{
+	run(0);
+}
+
+ATF_TC(socketpair_nonblock);
+ATF_TC_HEAD(socketpair_nonblock, tc)
+{
+	atf_tc_set_md_var(tc, descr, A 

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

2011-11-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov  4 02:25:32 UTC 2011

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

Log Message:
add t_socketpair


To generate a diff of this commit:
cvs rdiff -u -r1.413 -r1.414 src/distrib/sets/lists/tests/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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.413 src/distrib/sets/lists/tests/mi:1.414
--- src/distrib/sets/lists/tests/mi:1.413	Tue Nov  1 18:37:42 2011
+++ src/distrib/sets/lists/tests/mi	Thu Nov  3 22:25:31 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.413 2011/11/01 22:37:42 pgoyette Exp $
+# $NetBSD: mi,v 1.414 2011/11/04 02:25:31 christos Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -679,6 +679,7 @@
 ./usr/libdata/debug/usr/tests/net/sys/t_connect.debug			tests-net-debug		debug,atf
 ./usr/libdata/debug/usr/tests/net/sys/t_listen.debug			tests-net-debug		debug,atf
 ./usr/libdata/debug/usr/tests/net/sys/t_rfc6056.debug			tests-net-debug		debug,atf
+./usr/libdata/debug/usr/tests/net/sys/t_socketpair.debug		tests-net-debug		debug,atf
 ./usr/libdata/debug/usr/tests/rump	tests-syscall-debug
 ./usr/libdata/debug/usr/tests/rump/modautoloadtests-syscall-debug
 ./usr/libdata/debug/usr/tests/rump/modautoload/t_modautoload.debug	tests-syscall-debug	debug,atf
@@ -2479,6 +2480,7 @@
 ./usr/tests/net/sys/t_connect			tests-net-tests		atf
 ./usr/tests/net/sys/t_listen			tests-net-tests		atf
 ./usr/tests/net/sys/t_rfc6056			tests-net-tests		atf
+./usr/tests/net/sys/t_socketpair		tests-net-tests		atf
 ./usr/tests/rumptests-rump-tests
 ./usr/tests/rump/Atffile			tests-rump-tests	atf
 ./usr/tests/rump/modautoload			tests-rump-tests



CVS commit: src/sys/net/npf

2011-11-03 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Nov  4 02:57:28 UTC 2011

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

Log Message:
Use uint8_t instead of npf_netmask_t, as npf_netmask_t is a uint_fast8_t,
which is in many places is actually a uint32_t and thus incompatible with
prop_dictionary_get_uint8().  The correct type is noted in a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/net/npf/npf_ctl.c

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

Modified files:

Index: src/sys/net/npf/npf_ctl.c
diff -u src/sys/net/npf/npf_ctl.c:1.7 src/sys/net/npf/npf_ctl.c:1.8
--- src/sys/net/npf/npf_ctl.c:1.7	Fri Nov  4 01:00:27 2011
+++ src/sys/net/npf/npf_ctl.c	Fri Nov  4 02:57:28 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_ctl.c,v 1.7 2011/11/04 01:00:27 zoltan Exp $	*/
+/*	$NetBSD: npf_ctl.c,v 1.8 2011/11/04 02:57:28 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2009-2011 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.7 2011/11/04 01:00:27 zoltan Exp $);
+__KERNEL_RCSID(0, $NetBSD: npf_ctl.c,v 1.8 2011/11/04 02:57:28 jakllsch Exp $);
 
 #include sys/param.h
 #include sys/conf.h
@@ -121,7 +121,7 @@ npf_mk_tables(npf_tableset_t *tblset, pr
 		eit = prop_array_iterator(entries);
 		while ((ent = prop_object_iterator_next(eit)) != NULL) {
 			const npf_addr_t *addr;
-			npf_netmask_t mask;
+			uint8_t mask; /* XXX should be npf_netmask_t */
 
 			/* Get address and mask.  Add a table entry. */
 			addr = (const npf_addr_t *)prop_data_data_nocopy(prop_dictionary_get(ent, addr));



CVS commit: [matt-nb5-mips64] src/sys/arch/mips/include

2011-11-03 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Nov  4 04:29:33 UTC 2011

Modified Files:
src/sys/arch/mips/include [matt-nb5-mips64]: cpuregs.h

Log Message:
Add RMI XLP ids


To generate a diff of this commit:
cvs rdiff -u -r1.74.28.21 -r1.74.28.22 src/sys/arch/mips/include/cpuregs.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/mips/include/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.74.28.21 src/sys/arch/mips/include/cpuregs.h:1.74.28.22
--- src/sys/arch/mips/include/cpuregs.h:1.74.28.21	Thu May 26 19:21:55 2011
+++ src/sys/arch/mips/include/cpuregs.h	Fri Nov  4 04:29:32 2011
@@ -908,6 +908,13 @@
 /*
  * CPU processor IDs for company ID == 12 (RMI)
  */
+#define	MIPS_XLP832	0x10	/* RMI XLP832	 		ISA 64  Rel 2 */
+#define	MIPS_XLP816	0x14	/* RMI XLP816	 		ISA 64  Rel 2 */
+#define	MIPS_XLP432	0x90	/* RMI XLP432	 		ISA 64  Rel 2 */
+#define	MIPS_XLP416	0x94	/* RMI XLP416	 		ISA 64  Rel 2 */
+#define	MIPS_XLP316	0xd4	/* RMI XLP316	 		ISA 64  Rel 2 */
+#define	MIPS_XLP308	0xd5	/* RMI XLP308	 		ISA 64  Rel 2 */
+#define	MIPS_XLP304	0xd7	/* RMI XLP304	 		ISA 64  Rel 2 */
 #define	MIPS_XLR308B	0x06	/* RMI XLR308-B	 		ISA 64  */
 #define	MIPS_XLR508B	0x07	/* RMI XLR508-B	 		ISA 64  */
 #define	MIPS_XLR516B	0x08	/* RMI XLR516-B	 		ISA 64  */