CVS commit: [nick-hppapmap] src/sys/arch/hppa/hppa

2009-04-10 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Apr 10 09:18:36 UTC 2009

Modified Files:
src/sys/arch/hppa/hppa [nick-hppapmap]: pmap.c

Log Message:
Remove PMAPDEBUG define that crept in.


To generate a diff of this commit:
cvs rdiff -u -r1.43.8.44 -r1.43.8.45 src/sys/arch/hppa/hppa/pmap.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/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.43.8.44 src/sys/arch/hppa/hppa/pmap.c:1.43.8.45
--- src/sys/arch/hppa/hppa/pmap.c:1.43.8.44	Fri Apr  3 14:07:26 2009
+++ src/sys/arch/hppa/hppa/pmap.c	Fri Apr 10 09:18:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.43.8.44 2009/04/03 14:07:26 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.43.8.45 2009/04/10 09:18:36 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.44 2009/04/03 14:07:26 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.43.8.45 2009/04/10 09:18:36 skrll Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -89,8 +89,6 @@
 #include ddb/db_output.h
 #endif
 
-#define PMAPDEBUG
-
 #ifdef PMAPDEBUG
 
 #define	static	/**/



CVS commit: src/distrib/notes/common

2009-04-10 Thread Arnaud Ysmal
Module Name:src
Committed By:   stacktic
Date:   Fri Apr 10 10:26:24 UTC 2009

Modified Files:
src/distrib/notes/common: main

Log Message:
Added myself to the list of developers


To generate a diff of this commit:
cvs rdiff -u -r1.440 -r1.441 src/distrib/notes/common/main

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

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.440 src/distrib/notes/common/main:1.441
--- src/distrib/notes/common/main:1.440	Tue Apr  7 19:52:04 2009
+++ src/distrib/notes/common/main	Fri Apr 10 10:26:24 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.440 2009/04/07 19:52:04 tez Exp $
+.\	$NetBSD: main,v 1.441 2009/04/10 10:26:24 stacktic Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1647,6 +1647,7 @@
 .It Ta YAMAMOTO Takashi Ta Mt y...@netbsd.org
 .It Ta Yuji Yamano Ta Mt yyam...@netbsd.org
 .It Ta David Young Ta Mt dyo...@netbsd.org
+.It Ta Arnaud Ysmal Ta Mt stack...@netbsd.org
 .It Ta Reinoud Zandijk Ta Mt rein...@netbsd.org
 .It Ta S.P.Zeidler Ta Mt s...@netbsd.org
 .It Ta Maria Zevenhoven Ta Mt mar...@netbsd.org



CVS commit: src/external/gpl2/xcvs

2009-04-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 10 11:20:30 UTC 2009

Modified Files:
src/external/gpl2/xcvs/dist: ABOUT-NLS INSTALL aclocal.m4 config.h.in
configure configure.in
src/external/gpl2/xcvs/dist/build-aux: compile config.guess config.sub
depcomp install-sh mdate-sh missing texinfo.tex ylwrap
src/external/gpl2/xcvs/dist/contrib: Makefile.in
src/external/gpl2/xcvs/dist/contrib/pam: Makefile.in
src/external/gpl2/xcvs/dist/diff: Makefile.in
src/external/gpl2/xcvs/dist/doc: Makefile.in
src/external/gpl2/xcvs/dist/doc/i18n: Makefile.in
src/external/gpl2/xcvs/dist/doc/i18n/pt_BR: Makefile.in
src/external/gpl2/xcvs/dist/lib: Makefile.in
src/external/gpl2/xcvs/dist/m4: lib-link.m4 lib-prefix.m4 size_max.m4
src/external/gpl2/xcvs/dist/maint-aux: Makefile.in
src/external/gpl2/xcvs/dist/man: Makefile.in
src/external/gpl2/xcvs/dist/src: Makefile.in add.c admin.c annotate.c
checkout.c commit.c cvs.h diff.c edit.c history.c import.c log.c
ls.c main.c mkmodules.c modules.c patch.c release.c remove.c
server.c status.c tag.c update.c watch.c
src/external/gpl2/xcvs/include: config.h
src/external/gpl2/xcvs/lib/libcvs: Makefile

Log Message:
- fix bug with cvs group auth
- use our own getopt
- add config tests for optreset


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/ABOUT-NLS \
src/external/gpl2/xcvs/dist/INSTALL \
src/external/gpl2/xcvs/dist/aclocal.m4 \
src/external/gpl2/xcvs/dist/config.h.in \
src/external/gpl2/xcvs/dist/configure.in
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/configure
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/build-aux/compile \
src/external/gpl2/xcvs/dist/build-aux/config.guess \
src/external/gpl2/xcvs/dist/build-aux/config.sub \
src/external/gpl2/xcvs/dist/build-aux/depcomp \
src/external/gpl2/xcvs/dist/build-aux/install-sh \
src/external/gpl2/xcvs/dist/build-aux/mdate-sh \
src/external/gpl2/xcvs/dist/build-aux/missing \
src/external/gpl2/xcvs/dist/build-aux/texinfo.tex \
src/external/gpl2/xcvs/dist/build-aux/ylwrap
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/contrib/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl2/xcvs/dist/contrib/pam/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/diff/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/doc/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/doc/i18n/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl2/xcvs/dist/doc/i18n/pt_BR/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/lib/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/m4/lib-link.m4 \
src/external/gpl2/xcvs/dist/m4/lib-prefix.m4 \
src/external/gpl2/xcvs/dist/m4/size_max.m4
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/gpl2/xcvs/dist/maint-aux/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/man/Makefile.in
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/xcvs/dist/src/Makefile.in \
src/external/gpl2/xcvs/dist/src/add.c \
src/external/gpl2/xcvs/dist/src/annotate.c \
src/external/gpl2/xcvs/dist/src/diff.c \
src/external/gpl2/xcvs/dist/src/edit.c \
src/external/gpl2/xcvs/dist/src/import.c \
src/external/gpl2/xcvs/dist/src/log.c \
src/external/gpl2/xcvs/dist/src/ls.c \
src/external/gpl2/xcvs/dist/src/release.c \
src/external/gpl2/xcvs/dist/src/remove.c \
src/external/gpl2/xcvs/dist/src/status.c \
src/external/gpl2/xcvs/dist/src/tag.c \
src/external/gpl2/xcvs/dist/src/watch.c
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/admin.c \
src/external/gpl2/xcvs/dist/src/checkout.c \
src/external/gpl2/xcvs/dist/src/commit.c \
src/external/gpl2/xcvs/dist/src/cvs.h \
src/external/gpl2/xcvs/dist/src/history.c \
src/external/gpl2/xcvs/dist/src/main.c \
src/external/gpl2/xcvs/dist/src/mkmodules.c \
src/external/gpl2/xcvs/dist/src/modules.c \
src/external/gpl2/xcvs/dist/src/patch.c \
src/external/gpl2/xcvs/dist/src/server.c \
src/external/gpl2/xcvs/dist/src/update.c
cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/include/config.h
cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/lib/libcvs/Makefile

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

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/arch/newsmips/include

2009-04-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Apr 10 13:29:30 UTC 2009

Modified Files:
src/sys/arch/newsmips/include: intr.h

Log Message:
Include sys/evcnt.h instead of sys/device.h for struct evcnt
to avoid recursive dependency.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/newsmips/include/intr.h

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

Modified files:

Index: src/sys/arch/newsmips/include/intr.h
diff -u src/sys/arch/newsmips/include/intr.h:1.23 src/sys/arch/newsmips/include/intr.h:1.24
--- src/sys/arch/newsmips/include/intr.h:1.23	Mon Apr 28 20:23:30 2008
+++ src/sys/arch/newsmips/include/intr.h	Fri Apr 10 13:29:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.23 2008/04/28 20:23:30 martin Exp $	*/
+/*	$NetBSD: intr.h,v 1.24 2009/04/10 13:29:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
 #ifdef _KERNEL
 #ifndef _LOCORE
 
-#include sys/device.h
+#include sys/evcnt.h
 #include mips/locore.h
 
 extern const uint32_t ipl_sr_bits[_IPL_N];



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

2009-04-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Apr 10 13:40:38 UTC 2009

Modified Files:
src/sys/arch/vax/vax: subr.S

Log Message:
Apply patch from mhitch@:
Make copyin(9) and copyout(9) work with 64KB or larger data blocks.
Fixes broken pipe(2) problem mentioned in PR port-vax/41139. Ok'ed by ra...@.

Should be pulled up to netbsd-5.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/vax/vax/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/vax/vax/subr.S
diff -u src/sys/arch/vax/vax/subr.S:1.25 src/sys/arch/vax/vax/subr.S:1.26
--- src/sys/arch/vax/vax/subr.S:1.25	Fri Aug 29 18:25:02 2008
+++ src/sys/arch/vax/vax/subr.S	Fri Apr 10 13:40:38 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr.S,v 1.25 2008/08/29 18:25:02 matt Exp $	   */
+/*	$NetBSD: subr.S,v 1.26 2009/04/10 13:40:38 tsutsui Exp $	   */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -440,7 +440,7 @@
 #
 
 ENTRY(copyout, 0)
-	movl	8(%ap),%r2
+	movl	8(%ap),%r3
 	blss	3f		# kernel space
 	movl	4(%ap),%r1
 	brb	2f
@@ -448,13 +448,18 @@
 ENTRY(copyin, 0)
 	movl	4(%ap),%r1
 	blss	3f		# kernel space
-	movl	8(%ap),%r2
-2:	mfpr	$PR_ESP,%r3
-	movab	1f,(%r3)
-	movc3	12(%ap),(%r1),(%r2)
-1:	mfpr	$PR_ESP,%r3
-	clrl	(%r3)
+	movl	8(%ap),%r3
+2:	mfpr	$PR_ESP,%r2
+	movab	1f,(%r2)
+4:	tstw	14(%ap)		# check if = 64K
+	bneq	5f
+	movc3	12(%ap),(%r1),(%r3)
+1:	mfpr	$PR_ESP,%r2
+	clrl	(%r2)
 	ret
+5:	movc3	$0xfffc,(%r1),(%r3)
+	subl2	$0xfffc,12(%ap)
+	brb	4b
 
 3:	mnegl	$1,%r0
 	ret



CVS commit: src/sbin/newfs_sysvbfs

2009-04-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Apr 10 13:47:31 UTC 2009

Modified Files:
src/sbin/newfs_sysvbfs: newfs_sysvbfs.8

Log Message:
Sort option descriptions.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/newfs_sysvbfs/newfs_sysvbfs.8

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

Modified files:

Index: src/sbin/newfs_sysvbfs/newfs_sysvbfs.8
diff -u src/sbin/newfs_sysvbfs/newfs_sysvbfs.8:1.4 src/sbin/newfs_sysvbfs/newfs_sysvbfs.8:1.5
--- src/sbin/newfs_sysvbfs/newfs_sysvbfs.8:1.4	Thu Apr  9 10:37:55 2009
+++ src/sbin/newfs_sysvbfs/newfs_sysvbfs.8	Fri Apr 10 13:47:31 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: newfs_sysvbfs.8,v 1.4 2009/04/09 10:37:55 pooka Exp $
+.\	$NetBSD: newfs_sysvbfs.8,v 1.5 2009/04/10 13:47:31 wiz Exp $
 .\
 .\ Copyright (c) 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -56,10 +56,10 @@
 .Bl -tag -width Fl
 .It Fl F
 Create file system to a regular file.
-.It Fl Z
-Fill file with zeroes instead of creating a sparse file.
 .It Fl s Ar sectors
 Create file system with specified number of disk sectors.
+.It Fl Z
+Fill file with zeroes instead of creating a sparse file.
 .El
 .Sh SEE ALSO
 .Xr disklabel 5 ,



CVS commit: src/share/man/man5

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 14:57:28 UTC 2009

Modified Files:
src/share/man/man5: ld.so.conf.5

Log Message:
Use shorter variable names to fit tty width. Use .Bd for samples.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/share/man/man5/ld.so.conf.5

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/man5/ld.so.conf.5
diff -u src/share/man/man5/ld.so.conf.5:1.18 src/share/man/man5/ld.so.conf.5:1.19
--- src/share/man/man5/ld.so.conf.5:1.18	Thu May 29 14:51:25 2008
+++ src/share/man/man5/ld.so.conf.5	Fri Apr 10 14:57:28 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: ld.so.conf.5,v 1.18 2008/05/29 14:51:25 mrg Exp $
+.\	$NetBSD: ld.so.conf.5,v 1.19 2009/04/10 14:57:28 joerg Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -64,20 +64,18 @@
 .Xr elf 5
 lines that do not begin with a '/' are parsed as hardware dependent per
 library directives:
-.sp
-.nf
-\*[Lt]library_name\*[Gt] \*[Lt]sysctl_variable\*[Gt] \*[Lt]variable_value\*[Gt][,...]:\*[Lt]library_name\*[Gt][,...] ...
-.fi
-.sp
+.Bd -literal
+library sysctl variable[,...]:library[,...] ...
+.Ed
+.Pp
 If there is no match, the standard action is taken.
 .Sh FILES
 .Pa /etc/ld.so.conf
 .Sh EXAMPLES
-.sp
-.nf
+.Bd -literal
 libm.so.0	machdep.fpu_present	1:libm387.so.0,libm.so.0
-.fi
-.sp
+.Ed
+.Pp
 The above line loads both libm387 and libm when the
 .Xr sysctl 3
 variable fpu_present has the value 1.



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:05:06 UTC 2009

Modified Files:
src/share/man/man4: ahc.4 ahd.4

Log Message:
Don't use conditional macros to comment out parts of the FreeBSD man
page, just use comments. Use proper table markup. Improve spacing.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/ahc.4
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/ahd.4

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

Modified files:

Index: src/share/man/man4/ahc.4
diff -u src/share/man/man4/ahc.4:1.31 src/share/man/man4/ahc.4:1.32
--- src/share/man/man4/ahc.4:1.31	Mon Jul 16 14:06:07 2007
+++ src/share/man/man4/ahc.4	Fri Apr 10 15:05:06 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: ahc.4,v 1.31 2007/07/16 14:06:07 gdt Exp $
+.\	$NetBSD: ahc.4,v 1.32 2009/04/10 15:05:06 joerg Exp $
 .\
 .\ Copyright (c) 1995, 1996, 1997, 1998, 2000
 .\ 	Justin T. Gibbs.  All rights reserved.
@@ -35,27 +35,23 @@
 .Nm ahc
 .Nd Adaptec VL/EISA/PCI/CardBus SCSI host adapter driver
 .Sh SYNOPSIS
-.ie 0 \{
-For one or more VL/EISA cards:
-.Cd device eisa
-.Cd device ahc
-\}
-\{For VL cards:
+.\ For one or more VL/EISA cards:
+.\ .Cd device eisa
+.\ .Cd device ahc
+For VL cards:
 .Cd ahc0 at isa? port ? irq ?
 .Pp
 For EISA cards:
-.Cd ahc* at eisa? slot ?\}
+.Cd ahc* at eisa? slot ?
 .Pp
-.ie 0 \{
-For one or more PCI cards:
-.Cd device pci
-.Cd device ahc
-\}
-\{For PCI cards:
+.\ For one or more PCI cards:
+.\ .Cd device pci
+.\ .Cd device ahc
+For PCI cards:
 .Cd ahc* at pci? dev ? function ?
 .Pp
 For CardBus cards:
-.Cd ahc* at cardbus? function ?\}
+.Cd ahc* at cardbus? function ?
 .Pp
 To allow PCI adapters to use memory mapped I/O if enabled:
 .Cd options AHC_ALLOW_MEMIO
@@ -66,76 +62,70 @@
 Change the default SCSI id for cards without a SEEPROM (default 7):
 .Cd options AHC_CARDBUS_DEFAULT_SCSI_ID=integer
 .Pp
-.if 0 \{
-To configure one or more controllers to assume the target role:
-.Cd options AHC_TMODE_ENABLE \*[Lt]bitmask of units\*[Gt]
-.Pp
-\}
-.ie 0 \{
-For one or more SCSI buses:
-.Cd device scbus0 at ahc0
-\}
-\{For
+.\ To configure one or more controllers to assume the target role:
+.\ .Cd options AHC_TMODE_ENABLE \*[Lt]bitmask of units\*[Gt]
+.\ .Pp
+.\ For one or more SCSI buses:
+.\ .Cd device scbus0 at ahc0
+For
 .Tn SCSI
 buses:
-.Cd scsibus* at ahc?\}
+.Cd scsibus* at ahc?
 .Sh DESCRIPTION
-.ie 0 \{
-This driver provides access to the
-.Tn SCSI
-bus(es) connected to Adaptec
-.Tn AIC7770 ,
-.Tn AIC7850 ,
-.Tn AIC7860 ,
-.Tn AIC7870 ,
-.Tn AIC7880 ,
-.Tn AIC7890 ,
-.Tn AIC7891 ,
-.Tn AIC7892 ,
-.Tn AIC7895 ,
-.Tn AIC7896 ,
-.Tn AIC7897
-and
-.Tn AIC7899
-host adapter chips.
-These chips are found on many motherboards as well as the following
-Adaptec SCSI controller cards:
-.Tn 274X(W) ,
-.Tn 274X(T) ,
-.Tn 284X ,
-.Tn 2910 ,
-.Tn 2915 ,
-.Tn 2920C ,
-.Tn 2930C ,
-.Tn 2930U2 ,
-.Tn 2940 ,
-.Tn 2940U ,
-.Tn 2940AU ,
-.Tn 2940UW ,
-.Tn 2940UW Dual ,
-.Tn 2940UW Pro ,
-.Tn 2940U2W ,
-.Tn 2940U2B ,
-.Tn 2950U2W ,
-.Tn 2950U2B ,
-.Tn 19160B ,
-.Tn 29160 ,
-.Tn 29160B ,
-.Tn 29160N ,
-.Tn 3940 ,
-.Tn 3940U ,
-.Tn 3940AU ,
-.Tn 3940UW ,
-.Tn 3940AUW ,
-.Tn 3940U2W ,
-.Tn 3950U2 ,
-.Tn 3960 ,
-.Tn 39160 ,
-.Tn 3985 ,
-and
-.Tn 4944UW .
-\}
-\{The
+.\ This driver provides access to the
+.\ .Tn SCSI
+.\ bus(es) connected to Adaptec
+.\ .Tn AIC7770 ,
+.\ .Tn AIC7850 ,
+.\ .Tn AIC7860 ,
+.\ .Tn AIC7870 ,
+.\ .Tn AIC7880 ,
+.\ .Tn AIC7890 ,
+.\ .Tn AIC7891 ,
+.\ .Tn AIC7892 ,
+.\ .Tn AIC7895 ,
+.\ .Tn AIC7896 ,
+.\ .Tn AIC7897
+.\ and
+.\ .Tn AIC7899
+.\ host adapter chips.
+.\ These chips are found on many motherboards as well as the following
+.\ Adaptec SCSI controller cards:
+.\ .Tn 274X(W) ,
+.\ .Tn 274X(T) ,
+.\ .Tn 284X ,
+.\ .Tn 2910 ,
+.\ .Tn 2915 ,
+.\ .Tn 2920C ,
+.\ .Tn 2930C ,
+.\ .Tn 2930U2 ,
+.\ .Tn 2940 ,
+.\ .Tn 2940U ,
+.\ .Tn 2940AU ,
+.\ .Tn 2940UW ,
+.\ .Tn 2940UW Dual ,
+.\ .Tn 2940UW Pro ,
+.\ .Tn 2940U2W ,
+.\ .Tn 2940U2B ,
+.\ .Tn 2950U2W ,
+.\ .Tn 2950U2B ,
+.\ .Tn 19160B ,
+.\ .Tn 29160 ,
+.\ .Tn 29160B ,
+.\ .Tn 29160N ,
+.\ .Tn 3940 ,
+.\ .Tn 3940U ,
+.\ .Tn 3940AU ,
+.\ .Tn 3940UW ,
+.\ .Tn 3940AUW ,
+.\ .Tn 3940U2W ,
+.\ .Tn 3950U2 ,
+.\ .Tn 3960 ,
+.\ .Tn 39160 ,
+.\ .Tn 3985 ,
+.\ and
+.\ .Tn 4944UW .
+The
 .Nm
 device driver supports
 .Tn SCSI
@@ -148,15 +138,12 @@
 host adapter chips found on many motherboards as well as
 .Tn Adaptec
 .Tn SCSI
-controller cards.\}
+controller cards.
 .Pp
 Driver features include support for twin and wide buses,
 fast, ultra or ultra2 synchronous transfers depending on controller type,
-.ie 0 \{
-tagged queuing, SCB paging, and target mode.
-\}
-\{
-tagged queuing and SCB paging.\}
+.\ tagged queuing, SCB paging, and target mode.
+tagged queuing and SCB paging.
 .Pp
 Memory mapped I/O can be enabled for PCI devices with the
 .Dq Dv AHC_ALLOW_MEMIO
@@ -172,15 +159,13 @@
 Most modern motherboards perform the initialization correctly and work 

CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:09:08 UTC 2009

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

Log Message:
Remove redundant, misspelled .Pp. Terminate .Rs.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/slhci.4

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

Modified files:

Index: src/share/man/man4/slhci.4
diff -u src/share/man/man4/slhci.4:1.5 src/share/man/man4/slhci.4:1.6
--- src/share/man/man4/slhci.4:1.5	Wed Aug 15 03:53:09 2007
+++ src/share/man/man4/slhci.4	Fri Apr 10 15:09:08 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: slhci.4,v 1.5 2007/08/15 03:53:09 kiyohara Exp $
+.\ $NetBSD: slhci.4,v 1.6 2009/04/10 15:09:08 joerg Exp $
 .\
 .\ Not (c) 2007 Matthew Orgass
 .\ This file is public domain, meaning anyone can make any use of part or all 
@@ -87,7 +87,6 @@
 Hardware supported by the
 .Nm
 driver includes:
-.pP
 .Bl -item -offset indent
 .It
 .Tn Ratoc
@@ -104,6 +103,7 @@
 .Rs
 .%T Cypress SL811HS datasheet, errata, and application note
 .%O http://www.cypress.com
+.Re
 .Sh HISTORY
 The
 .Nm



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:14:07 UTC 2009

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

Log Message:
No offset, no -offset.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/bluetooth.4

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

Modified files:

Index: src/share/man/man4/bluetooth.4
diff -u src/share/man/man4/bluetooth.4:1.11 src/share/man/man4/bluetooth.4:1.12
--- src/share/man/man4/bluetooth.4:1.11	Wed Aug  6 07:08:31 2008
+++ src/share/man/man4/bluetooth.4	Fri Apr 10 15:14:06 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: bluetooth.4,v 1.11 2008/08/06 07:08:31 skrll Exp $
+.\	$NetBSD: bluetooth.4,v 1.12 2009/04/10 15:14:06 joerg Exp $
 .\
 .\ Copyright (c) 2006 Itronix Inc.
 .\ All rights reserved.
@@ -288,7 +288,7 @@
 specified, use the
 .Ar btr_name
 field to identify the device.
-.Bd -literal -offset
+.Bd -literal
 struct btreq {
 char btr_name[HCI_DEVNAME_SIZE];	/* device name */
 



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:16:06 UTC 2009

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

Log Message:
Use .It  instead of .br, they are different logical lines.
Don't use .Xo/.Xc to work around ancient macro argument limit.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/share/man/man4/ddb.4

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

Modified files:

Index: src/share/man/man4/ddb.4
diff -u src/share/man/man4/ddb.4:1.124 src/share/man/man4/ddb.4:1.125
--- src/share/man/man4/ddb.4:1.124	Sat Mar  7 22:08:08 2009
+++ src/share/man/man4/ddb.4	Fri Apr 10 15:16:06 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: ddb.4,v 1.124 2009/03/07 22:08:08 ad Exp $
+.\	$NetBSD: ddb.4,v 1.125 2009/04/10 15:16:06 joerg Exp $
 .\
 .\ Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -111,7 +111,7 @@
 \*[Lt]Ctrl\*[Gt]-\*[Lt]Alt\*[Gt]-\*[Lt]Esc\*[Gt] on PC style keyboards.
 .It amd64
 \*[Lt]Ctrl\*[Gt]-\*[Lt]Alt\*[Gt]-\*[Lt]Esc\*[Gt]
-.br
+.It 
 \*[Lt]Break\*[Gt] on serial console.
 .It amiga
 \*[Lt]LAlt\*[Gt]-\*[Lt]LAmiga\*[Gt]-\*[Lt]F10\*[Gt]
@@ -122,7 +122,7 @@
 .It hp700
 +
 (five plus signs)
-.br
+.It 
 \*[Lt]Break\*[Gt] on serial console.
 .It hpcarm
 \*[Lt]Ctrl\*[Gt]-\*[Lt]Alt\*[Gt]-\*[Lt]Esc\*[Gt]
@@ -132,7 +132,7 @@
 \*[Lt]Ctrl\*[Gt]-\*[Lt]Alt\*[Gt]-\*[Lt]Esc\*[Gt]
 .It i386
 \*[Lt]Ctrl\*[Gt]-\*[Lt]Alt\*[Gt]-\*[Lt]Esc\*[Gt]
-.br
+.It 
 \*[Lt]Break\*[Gt] on serial console.
 .It mac68k
 \*[Lt]Command\*[Gt]-\*[Lt]Power\*[Gt], or the Interrupt switch.
@@ -145,25 +145,25 @@
 \*[Lt]Do\*[Gt] on
 .Tn LK-201
 rcons console.
-.br
+.It 
 \*[Lt]Break\*[Gt] on serial console.
 .It sparc
 \*[Lt]L1\*[Gt]-A, or \*[Lt]Stop\*[Gt]-A on a
 .Tn Sun
 keyboard.
-.br
+.It 
 \*[Lt]Break\*[Gt] on serial console.
 .It sparc64
 \*[Lt]L1\*[Gt]-A, or \*[Lt]Stop\*[Gt]-A on a
 .Tn Sun
 keyboard.
-.br
+.It 
 \*[Lt]Break\*[Gt] on serial console.
 .It sun3
 \*[Lt]L1\*[Gt]-A, or \*[Lt]Stop\*[Gt]-A on a
 .Tn Sun
 keyboard.
-.br
+.It 
 \*[Lt]Break\*[Gt] on serial console.
 .It vax
 \*[Lt]Esc\*[Gt]-\*[Lt]Shift\*[Gt]-D on serial console.
@@ -288,23 +288,10 @@
 .Nm
 supports the following commands:
 .Bl -tag -width 5n
-.It Xo
-.Sm off
-.Ic \!
-.Ar address
-.Oo
-.Cm ( Ar expression
-.Op Ar ,...
-.Cm )
-.Oc
-.Sm on
-.Xc
+.It Ic \! Ns Ar address Ns Oo Cm ( Ar expression Ns Oo Ar ,... Oc Ns Cm ) Oc
 A synonym for
 .Ic call .
-.It Xo
-.Ic break Ns Op Cm /u
-.Ar address Ns Op Cm , Ns Ar count
-.Xc
+.It Ic break Ns Oo Cm /u Oc Ar address Ns Op Cm , Ns Ar count
 Set a breakpoint at
 .Ar address .
 If
@@ -335,44 +322,16 @@
 user-space breakpoints may not work correctly.
 Setting a breakpoint at the low-level code paths may also cause
 strange behavior.
-.It Xo
-.Ic bt Ns Op Cm /ul
-.Sm off
-.Op Ar frame-address
-.Op Cm , Ar count
-.Sm on
-.Xc
+.It Ic bt Ns Oo Cm /ul Oc Oo Ar frame-address Oc Ns Oo Cm , Ns Ar count Oc
 A synonym for
 .Ic trace .
-.It Xo
-.Ic bt/t Ns Op Cm /ul
-.Sm off
-.Op Ar pid
-.Op Cm , Ar count
-.Sm on
-.Xc
+.It Ic bt/t Ns Oo Cm /ul Oc Oo Ar pid Oc Ns Oo Cm , Ns Ar count Oc
 A synonym for
 .Ic trace/t .
-.It Xo
-.Ic bt/a Ns Op Cm /ul
-.Sm off
-.Op Ar lwpaddr
-.Op Cm , Ar count
-.Sm on
-.Xc
+.It Ic bt/a Ns Oo Cm /ul Oc Oo Ar lwpaddr Oc Ns Oo Cm , Ns Ar count Oc
 A synonym for
 .Ic trace/a .
-.It Xo
-.Ic call
-.Sm off
-.Ar address
-.Oo
-.Cm ( Ar expression
-.Op Ar ,...
-.Cm )
-.Oc
-.Sm on
-.Xc
+.It Ic call Ar address Ns Oo Cm ( Ns Ar expression Ns Oo Ar ,... Oc Ns Cm ) Oc
 Call the function specified by
 .Ar address
 with the argument(s) listed in parentheses.
@@ -389,11 +348,7 @@
 single-stepping.
 This means that single-stepping on low-level may cause strange
 behavior.
-.It Xo
-.Ic delete
-.Ar address |
-.Cm # Ns Ar number
-.Xc
+.It Ic delete Ar address | Cm # Ns Ar number
 Delete a breakpoint.
 The target breakpoint may be specified by
 .Ar address ,
@@ -403,28 +358,20 @@
 .Ic break
 if it's prefixed with
 .Sq Cm \# .
-.It Xo
-.Ic dmesg Op Ar count
-.Xc
+.It Ic dmesg Op Ar count
 Prints the contents of the kernel message buffer.
 The optional
 .Ar count
 argument will limit printing to at most the last
 .Ar count
 bytes of the message buffer.
-.It Xo
-.Ic dwatch
-.Ar address
-.Xc
+.It Ic dwatch Ar address
 Delete the watchpoint at
 .Ar address
 that was previously set with
 .Ic watch
 command.
-.It Xo
-.Ic examine Ns Op Cm / Ns Ar modifier
-.Ar address Ns Op Cm , Ns Ar count
-.Xc
+.It Ic examine Ns Oo Cm / Ns Ar modifier Oc Ar address Ns Op Cm , Ns Ar count
 Display the address locations according to the format in
 .Ar modifier .
 Multiple modifier formats display multiple locations.
@@ -489,10 +436,7 @@
 don't assume that each external label is a procedure entry mask
 .El
 .El
-.It Xo
-.Ic kill
-.Ar pid Ns Op Cm , Ns Ar signal_number
-.Xc
+.It Ic kill Ar pid Ns Op Cm , Ns Ar signal_number
 Send a signal to the process specified by the
 .Ar pid .
 Note that
@@ -513,10 +457,7 @@
 is 

CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:21:10 UTC 2009

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

Log Message:
Don't force line breaks, .It already does that.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/dpt.4

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

Modified files:

Index: src/share/man/man4/dpt.4
diff -u src/share/man/man4/dpt.4:1.23 src/share/man/man4/dpt.4:1.24
--- src/share/man/man4/dpt.4:1.23	Mon Nov 13 16:33:57 2006
+++ src/share/man/man4/dpt.4	Fri Apr 10 15:21:09 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: dpt.4,v 1.23 2006/11/13 16:33:57 ad Exp $
+.\	$NetBSD: dpt.4,v 1.24 2009/04/10 15:21:09 joerg Exp $
 .\
 .\ Copyright (c) 1999, 2000, 2002 Andrew Doran a...@netbsd.org
 .\ All rights reserved.
@@ -75,17 +75,12 @@
 .Pp
 .Bl -tag -width indent
 .It dpt%d: readcfg failed - see dpt(4)
-.br
 The EATA configuration data did not appear upon request.  This may be caused
 by older firmware.  Generally the solution is to power-cycle the affected
 machine.
-.br
 .It dpt%d: spurious intr
-.br
 A spurious interrupt was received from the HBA.
-.br
 .It dpt%d: bogus status (returned CCB id )
-.br
 A corrupt or incomplete status packet was received from the HBA.
 .El
 .Sh SEE ALSO



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:23:02 UTC 2009

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

Log Message:
Improve markup.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/share/man/man4/esp.4

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

Modified files:

Index: src/share/man/man4/esp.4
diff -u src/share/man/man4/esp.4:1.11 src/share/man/man4/esp.4:1.12
--- src/share/man/man4/esp.4:1.11	Mon Jun 20 13:25:24 2005
+++ src/share/man/man4/esp.4	Fri Apr 10 15:23:02 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: esp.4,v 1.11 2005/06/20 13:25:24 peter Exp $
+.\	$NetBSD: esp.4,v 1.12 2009/04/10 15:23:02 joerg Exp $
 .\
 .\ Copyright (c) 1997 Eric S. Hvozda hvo...@netcom.com
 .\ All rights reserved.
@@ -28,7 +28,7 @@
 .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
-.\	$NetBSD: esp.4,v 1.11 2005/06/20 13:25:24 peter Exp $
+.\	$NetBSD: esp.4,v 1.12 2009/04/10 15:23:02 joerg Exp $
 .\
 .Dd December 3, 2001
 .Dt ESP 4
@@ -144,9 +144,12 @@
 .Xr st 4 ,
 .Xr uk 4
 .Pp
-.Pa http://www.qlc.com/
-.br
-.Pa http://www.sun.com/
+.Bl -item -compact
+.It
+http://www.qlc.com/
+.It
+http://www.sun.com/
+.El
 .\ .Sh BUGS
 .\ Neither
 .\ .Tn DMA



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:23:31 UTC 2009

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

Log Message:
Fix missing quote.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/hcide.4

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

Modified files:

Index: src/share/man/man4/hcide.4
diff -u src/share/man/man4/hcide.4:1.6 src/share/man/man4/hcide.4:1.7
--- src/share/man/man4/hcide.4:1.6	Mon Mar  9 19:24:28 2009
+++ src/share/man/man4/hcide.4	Fri Apr 10 15:23:31 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: hcide.4,v 1.6 2009/03/09 19:24:28 joerg Exp $
+.\ $NetBSD: hcide.4,v 1.7 2009/04/10 15:23:31 joerg Exp $
 .\
 .\ Copyright (c) 2000 Ben Harris
 .\ All rights reserved.
@@ -33,7 +33,7 @@
 .Nd HCCS IDE interface driver
 .Sh SYNOPSIS
 .Cd hcide* at podulebus0 slot ?
-.Cd ata* at hcide? channel ?
+.Cd ata* at hcide? channel ?
 .Sh DESCRIPTION
 The
 .Nm



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 15:26:14 UTC 2009

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

Log Message:
Fix missing quote.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/ioat.4

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

Modified files:

Index: src/share/man/man4/ioat.4
diff -u src/share/man/man4/ioat.4:1.5 src/share/man/man4/ioat.4:1.6
--- src/share/man/man4/ioat.4:1.5	Thu Aug  7 10:31:02 2003
+++ src/share/man/man4/ioat.4	Fri Apr 10 15:26:14 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: ioat.4,v 1.5 2003/08/07 10:31:02 agc Exp $
+.\	$NetBSD: ioat.4,v 1.6 2009/04/10 15:26:14 joerg Exp $
 .\
 .\ Copyright (c) 1990, 1991 The Regents of the University of California.
 .\ All rights reserved.
@@ -44,7 +44,7 @@
 .Sh SYNOPSIS
 For 6-port BOCA IOAT66 board:
 .Pp
-.Cd ioat0   at isa? port 0x220 irq 5
+.Cd ioat0   at isa? port 0x220 irq 5
 .Cd com2at ioat? slave ?
 .Cd com3at ioat? slave ?
 .Cd com4at ioat? slave ?



CVS commit: src/share/mk

2009-04-10 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Apr 10 16:14:55 UTC 2009

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

Log Message:
Revert accidental switch of alpha to Xorg. We don't have the XdecNetBSD
and XalphaNetBSD drivers in xorg yet.
Fixes release build for alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.560 -r1.561 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.560 src/share/mk/bsd.own.mk:1.561
--- src/share/mk/bsd.own.mk:1.560	Fri Mar 27 19:36:55 2009
+++ src/share/mk/bsd.own.mk	Fri Apr 10 16:14:54 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.560 2009/03/27 19:36:55 drochner Exp $
+#	$NetBSD: bsd.own.mk,v 1.561 2009/04/10 16:14:54 bouyer Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -683,15 +683,14 @@
 #
 # Do we default to XFree86 or Xorg for this platform?
 #
-.if ${MACHINE} == acorn32 || ${MACHINE} == amiga || \
-${MACHINE} == cats || ${MACHINE} == dreamcast || \
-${MACHINE} == ews4800mips || ${MACHINE} == hpcarm || \
-${MACHINE} == hpcmips || ${MACHINE} == hpcsh || \
-${MACHINE} == mac68k || ${MACHINE} == netwinder || \
-${MACHINE} == newsmips || ${MACHINE} == ofppc || \
-${MACHINE} == pmax || \
-${MACHINE} == sparc || ${MACHINE} == sun3 || \
-${MACHINE} == x68k 
+.if ${MACHINE} == alpha || ${MACHINE} == acorn32 || \
+	${MACHINE} == amiga || ${MACHINE} == cats || \
+	${MACHINE} == dreamcast || ${MACHINE} == ews4800mips || \
+	${MACHINE} == hpcarm || ${MACHINE} == hpcmips || \
+	${MACHINE} == hpcsh || ${MACHINE} == mac68k || \
+	${MACHINE} == netwinder || ${MACHINE} == newsmips || \
+	${MACHINE} == ofppc || ${MACHINE} == pmax || \
+	${MACHINE} == sparc || ${MACHINE} == sun3 || ${MACHINE} == x68k
 X11FLAVOUR?=	XFree86
 .else
 X11FLAVOUR?=	Xorg



CVS commit: src

2009-04-10 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Fri Apr 10 16:16:12 UTC 2009

Modified Files:
src/distrib/common: parselist.awk
src/share/dict: Makefile
src/share/mk: bsd.README bsd.hostprog.mk bsd.kmodule.mk bsd.lib.mk
bsd.links.mk bsd.man.mk bsd.prog.mk
src/share/zoneinfo: Makefile

Log Message:
Add LINKSOWN, LINKSGRP, and LINKSMODE variables for use by bsd.links.mk
when installing hard links.  They have no effect except when using a
metalog, in which case the information is added to the metalog.  In
the future, these variables may be replaced by a method for explicitly
recording hard links in a metadata log.

Also change a few things that called ${INSTALL_LINK} without going
through bsd.links.mk.

Reviewed by perry and joerg.  This should fix PR 24457 and PR 41155.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/common/parselist.awk
cvs rdiff -u -r1.16 -r1.17 src/share/dict/Makefile
cvs rdiff -u -r1.248 -r1.249 src/share/mk/bsd.README
cvs rdiff -u -r1.54 -r1.55 src/share/mk/bsd.hostprog.mk
cvs rdiff -u -r1.18 -r1.19 src/share/mk/bsd.kmodule.mk
cvs rdiff -u -r1.297 -r1.298 src/share/mk/bsd.lib.mk
cvs rdiff -u -r1.33 -r1.34 src/share/mk/bsd.links.mk
cvs rdiff -u -r1.99 -r1.100 src/share/mk/bsd.man.mk
cvs rdiff -u -r1.240 -r1.241 src/share/mk/bsd.prog.mk
cvs rdiff -u -r1.42 -r1.43 src/share/zoneinfo/Makefile

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

Modified files:

Index: src/distrib/common/parselist.awk
diff -u src/distrib/common/parselist.awk:1.15 src/distrib/common/parselist.awk:1.16
--- src/distrib/common/parselist.awk:1.15	Wed Apr 30 13:10:48 2008
+++ src/distrib/common/parselist.awk	Fri Apr 10 16:16:12 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: parselist.awk,v 1.15 2008/04/30 13:10:48 martin Exp $
+#	$NetBSD: parselist.awk,v 1.16 2009/04/10 16:16:12 apb Exp $
 #
 # Copyright (c) 2002 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -225,7 +225,7 @@
 crunchprog, 555);
 continue;
 			}
-			link(crunchprog, $i);
+			link(crunchprog, $i, 555);
 		}
 	}
 	next;
@@ -248,7 +248,7 @@
 		err(Usage: LINK prog link [...]);
 	if (mode == install || mode == mtree || mode == populate) {
 		for (i = 3; i = NF; i++)
-			link($2, $i);
+			link($2, $i, 444);
 	}
 	next;
 }
@@ -305,7 +305,8 @@
 	if (perm == )
 		perm = 444;
 	if (mode == install) {
-		printf(\t${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m %s %s %s/%s\n,
+		printf(\t${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} \
+		 -m %s %s %s/%s\n,
 		perm, src, ENVIRON[TARGETDIR], dest)
 	} else if (mode == mtree) {
 		printf(./%s mode=%s\n, dest, perm);
@@ -316,13 +317,14 @@
 	}
 }
 
-function link (src, dest) \
+function link (src, dest, perm) \
 {
 	if (mode == install) {
-		printf(\t${INSTALL_LINK} %s/%s %s/%s\n,
-		ENVIRON[TARGETDIR], src, ENVIRON[TARGETDIR], dest)
+		printf(\t${INSTALL_LINK} -o ${BINOWN} -g ${BINGRP} \
+		 -m %s %s/%s %s/%s\n,
+		perm, ENVIRON[TARGETDIR], src, ENVIRON[TARGETDIR], dest)
 	} else if (mode == mtree) {
-		printf(./%s\n, dest);
+		printf(./%s mode=%s\n, dest, perm);
 	} else {
 		printf(rm -rf %s/%s\n, ENVIRON[TARGETDIR], dest);
 		printf((cd %s; ln %s %s) || exit 1\n,

Index: src/share/dict/Makefile
diff -u src/share/dict/Makefile:1.16 src/share/dict/Makefile:1.17
--- src/share/dict/Makefile:1.16	Wed Sep 18 08:12:29 2002
+++ src/share/dict/Makefile	Fri Apr 10 16:16:12 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2002/09/18 08:12:29 lukem Exp $
+#	$NetBSD: Makefile,v 1.17 2009/04/10 16:16:12 apb Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/5/93
 
 # Missing: connectives, words
@@ -8,5 +8,6 @@
 FILES=	README propernames web2 web2a
 FILESDIR=${BINDIR}/dict
 LINKS=	${FILESDIR}/web2 ${FILESDIR}/words
+LINKSMODE= ${FILESMODE}
 
 .include bsd.prog.mk

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.248 src/share/mk/bsd.README:1.249
--- src/share/mk/bsd.README:1.248	Fri Mar 13 16:23:31 2009
+++ src/share/mk/bsd.README	Fri Apr 10 16:16:12 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.248 2009/03/13 16:23:31 perry Exp $
+#	$NetBSD: bsd.README,v 1.249 2009/04/10 16:16:12 apb Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make include files for the NetBSD
@@ -1024,6 +1024,11 @@
 The include file bsd.links.mk handles the LINKS and SYMLINKS variables
 and is included from from bsd.lib.mk and bsd.prog.mk.
 
+LINKSOWN, LINKSGRP, and LINKSMODE, are relevant only if a metadata log
+is used. The defaults may be modified by other bsd.*.mk files which
+include bsd.links.mk.  In the future, these variables may be replaced
+by a method for explicitly recording hard links in a metadata log.
+
 LINKS		The list of hard links, consisting of pairs of paths:
 			source-file target-file
 		${DESTDIR} is prepended to both paths before linking.
@@ -1045,6 +1050,18 @@
 		are installed by the `configinstall' target,
 		not the `install' 

CVS commit: src

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 16:18:04 UTC 2009

Modified Files:
src/etc: rc
src/etc/defaults: rc.conf
src/share/man/man5: rc.conf.5

Log Message:
Add rc_directories to specify where to look for rc scripts.
For the moment all scripts must be in /root and non-existent directories
are skipped.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/etc/rc
cvs rdiff -u -r1.101 -r1.102 src/etc/defaults/rc.conf
cvs rdiff -u -r1.128 -r1.129 src/share/man/man5/rc.conf.5

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

Modified files:

Index: src/etc/rc
diff -u src/etc/rc:1.162 src/etc/rc:1.163
--- src/etc/rc:1.162	Sat Jan  4 15:27:43 2003
+++ src/etc/rc	Fri Apr 10 16:18:04 2009
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: rc,v 1.162 2003/01/04 15:27:43 lukem Exp $
+# $NetBSD: rc,v 1.163 2009/04/10 16:18:04 joerg Exp $
 #
 # rc --
 #	Run the scripts in /etc/rc.d with rcorder.
@@ -37,7 +37,10 @@
 
 date
 
-files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*)
+scripts=$(for rcd in ${rc_directories:-/etc/rc.d}; do
+	test -d ${rcd}  echo ${rcd}/*;
+done)
+files=$(rcorder -s nostart ${rc_rcorder_flags} ${scripts})
 
 for _rc_elem in $files; do
 	run_rc_script $_rc_elem start

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.101 src/etc/defaults/rc.conf:1.102
--- src/etc/defaults/rc.conf:1.101	Mon Mar 23 18:52:02 2009
+++ src/etc/defaults/rc.conf	Fri Apr 10 16:18:04 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.101 2009/03/23 18:52:02 hannken Exp $
+#	$NetBSD: rc.conf,v 1.102 2009/04/10 16:18:04 joerg Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -30,6 +30,10 @@
 #
 rc_rcorder_flags=
 
+# The directories searched for rc scripts.
+# These directories must be part of the root filesystem.
+rc_directories=/etc/rc.d 
+
 # If this is set to NO, shutdown(8) will not run /etc/rc.shutdown.
 #
 do_rcshutdown=YES

Index: src/share/man/man5/rc.conf.5
diff -u src/share/man/man5/rc.conf.5:1.128 src/share/man/man5/rc.conf.5:1.129
--- src/share/man/man5/rc.conf.5:1.128	Fri Mar 27 09:11:36 2009
+++ src/share/man/man5/rc.conf.5	Fri Apr 10 16:18:04 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: rc.conf.5,v 1.128 2009/03/27 09:11:36 hannken Exp $
+.\	$NetBSD: rc.conf.5,v 1.129 2009/04/10 16:18:04 joerg Exp $
 .\
 .\ Copyright (c) 1996 Matthew R. Green
 .\ All rights reserved.
@@ -55,7 +55,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd March 27, 2009
+.Dd April 5, 2009
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -184,6 +184,15 @@
 .Xr rcorder 8
 run by
 .Pa /etc/rc .
+.It Sy rc_directories
+A string.
+Space separated list of directories searched for rc scripts.
+The default is
+.Pa /etc/rc.d .
+All directories in
+.Ev rc_directories
+must be located in the root filesystem, otherwise they will be silently
+skipped.
 .El
 .Ss Basic network configuration
 .Bl -tag -width net_interfaces



CVS commit: src

2009-04-10 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Apr 10 17:00:45 UTC 2009

Modified Files:
src/distrib/sets/lists/xserver: md.alpha
src/external/mit/xorg/server/drivers: Makefile

Log Message:
fix Xorg build on alpha:
- don't build/install drivers that are x86-specific
- add extra files to sets lists.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/xserver/md.alpha
cvs rdiff -u -r1.26 -r1.27 src/external/mit/xorg/server/drivers/Makefile

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/xserver/md.alpha
diff -u src/distrib/sets/lists/xserver/md.alpha:1.15 src/distrib/sets/lists/xserver/md.alpha:1.16
--- src/distrib/sets/lists/xserver/md.alpha:1.15	Sat Feb 14 11:23:13 2009
+++ src/distrib/sets/lists/xserver/md.alpha	Fri Apr 10 17:00:44 2009
@@ -1,4 +1,4 @@
-# $NetBSD: md.alpha,v 1.15 2009/02/14 11:23:13 abs Exp $
+# $NetBSD: md.alpha,v 1.16 2009/04/10 17:00:44 bouyer Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XalphaNetBSD-unknown-	x11
 ./usr/X11R6/bin/XdecNetBSD-unknown-	x11
@@ -9,11 +9,14 @@
 ./usr/X11R7/bin/pcitweak-unknown-	xorg
 ./usr/X11R7/bin/scanpci	-unknown-	xorg
 ./usr/X11R7/bin/xorgconfig-unknown-	xorg
+./usr/X11R7/lib/X11/Cards-unknown-	xorg
 ./usr/X11R7/lib/X11/doc/README.DRI			-unknown-	xorg
 ./usr/X11R7/lib/X11/doc/README.fonts			-unknown-	xorg
 ./usr/X11R7/lib/X11/doc/README.rapidaccess		-unknown-	xorg
 ./usr/X11R7/lib/modules/dri/mach64_dri.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/dri/mach64_dri.so.0		-unknown-	xorg
+./usr/X11R7/lib/modules/dri/mesa_dri.so			-unknown-	xorg
+./usr/X11R7/lib/modules/dri/mesa_dri.so.0		-unknown-	xorg
 ./usr/X11R7/lib/modules/dri/mga_dri.so			-unknown-	xorg
 ./usr/X11R7/lib/modules/dri/mga_dri.so.0		-unknown-	xorg
 ./usr/X11R7/lib/modules/dri/r128_dri.so			-unknown-	xorg

Index: src/external/mit/xorg/server/drivers/Makefile
diff -u src/external/mit/xorg/server/drivers/Makefile:1.26 src/external/mit/xorg/server/drivers/Makefile:1.27
--- src/external/mit/xorg/server/drivers/Makefile:1.26	Sat Feb 14 20:29:09 2009
+++ src/external/mit/xorg/server/drivers/Makefile	Fri Apr 10 17:00:45 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2009/02/14 20:29:09 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.27 2009/04/10 17:00:45 bouyer Exp $
 
 SUBDIR= \
 	xf86-input-keyboard \
@@ -50,9 +50,38 @@
 	xf86-video-crime \
 	xf86-video-wsfb \
 	xf86-video-newport
-.elif ${MACHINE_ARCH} == alpha || ${MACHINE_ARCH} == i386 || \
-  ${MACHINE_ARCH} == x86_64
-
+.elif ${MACHINE} == alpha
+SUBDIR+= \
+	xf86-video-apm \
+	xf86-video-ark \
+	xf86-video-ast \
+	xf86-video-ati \
+	xf86-video-chips \
+	xf86-video-cirrus \
+	xf86-video-cirrus_alpine \
+	xf86-video-cirrus_laguna \
+	xf86-video-glint \
+	xf86-video-i128 \
+	xf86-video-i740 \
+	xf86-video-imstt \
+	xf86-video-mach64 \
+	xf86-video-mga \
+	xf86-video-nv \
+	xf86-video-r128 \
+	xf86-video-radeon \
+	xf86-video-radeonhd \
+	xf86-video-s3 \
+	xf86-video-s3virge \
+	xf86-video-savage \
+	xf86-video-siliconmotion \
+	xf86-video-sis \
+	xf86-video-tdfx \
+	xf86-video-tga \
+	xf86-video-trident \
+	xf86-video-tseng \
+	xf86-video-vga \
+	xf86-video-wsfb
+.elif ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64
 SUBDIR+= \
 	xf86-video-apm \
 	xf86-video-ark \



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 17:08:32 UTC 2009

Modified Files:
src/share/man/man4: irframe.4 midi.4

Log Message:
Use .Pp in SEE ALSO instead of .br.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/irframe.4
cvs rdiff -u -r1.28 -r1.29 src/share/man/man4/midi.4

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

Modified files:

Index: src/share/man/man4/irframe.4
diff -u src/share/man/man4/irframe.4:1.12 src/share/man/man4/irframe.4:1.13
--- src/share/man/man4/irframe.4:1.12	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/irframe.4	Fri Apr 10 17:08:32 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: irframe.4,v 1.12 2008/04/30 13:10:54 martin Exp $
+.\ $NetBSD: irframe.4,v 1.13 2009/04/10 17:08:32 joerg Exp $
 .\
 .\ Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -80,7 +80,7 @@
 .\ .Xr smccir 4 ,
 .\ .Xr ircomm 8 ,
 .\ .Xr irobex 8
-.br
+.Pp
 comms/birda package
 .Sh HISTORY
 The

Index: src/share/man/man4/midi.4
diff -u src/share/man/man4/midi.4:1.28 src/share/man/man4/midi.4:1.29
--- src/share/man/man4/midi.4:1.28	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/midi.4	Fri Apr 10 17:08:32 2009
@@ -1,4 +1,4 @@
-.\ $NetBSD: midi.4,v 1.28 2008/04/30 13:10:54 martin Exp $
+.\ $NetBSD: midi.4,v 1.29 2009/04/10 17:08:32 joerg Exp $
 .\
 .\ Copyright (c) 1999-2006 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -599,12 +599,12 @@
 .Xr mpu 4 ,
 .Xr opl 4 ,
 .Xr umidi 4
-.br
+.Pp
 For ports using the ISA bus:
 .Xr cms 4 ,
 .Xr pcppi 4 ,
 .Xr sb 4
-.br
+.Pp
 For ports using the PCI bus:
 .Xr autri 4 ,
 .Xr clcs 4 ,



CVS commit: src/share/man/man4

2009-04-10 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Apr 10 17:14:08 UTC 2009

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

Log Message:
Remove manual spacing.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/mk48txx.4

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

Modified files:

Index: src/share/man/man4/mk48txx.4
diff -u src/share/man/man4/mk48txx.4:1.15 src/share/man/man4/mk48txx.4:1.16
--- src/share/man/man4/mk48txx.4:1.15	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/mk48txx.4	Fri Apr 10 17:14:07 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: mk48txx.4,v 1.15 2008/04/30 13:10:54 martin Exp $
+.\	$NetBSD: mk48txx.4,v 1.16 2009/04/10 17:14:07 joerg Exp $
 .\
 .\ Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -56,7 +56,6 @@
 .Fn mk48txx_attach
 function and the mk48txx_softc structure defined as follows:
 .Pp
-.nr nS 1
 .Ft void
 .Fn mk48txx_attach struct mk48txx_softc *
 .Pp



CVS commit: [netbsd-5] src/lib/libc/rpc

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 18:09:10 UTC 2009

Modified Files:
src/lib/libc/rpc [netbsd-5]: rpc_clnt_create.3

Log Message:
Pull up following revision(s) (requested by joerg in ticket #682):
lib/libc/rpc/rpc_clnt_create.3: revision 1.10
Fix markup


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.38.1 src/lib/libc/rpc/rpc_clnt_create.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/rpc/rpc_clnt_create.3
diff -u src/lib/libc/rpc/rpc_clnt_create.3:1.9 src/lib/libc/rpc/rpc_clnt_create.3:1.9.38.1
--- src/lib/libc/rpc/rpc_clnt_create.3:1.9	Wed Apr 16 13:34:43 2003
+++ src/lib/libc/rpc/rpc_clnt_create.3	Fri Apr 10 18:09:10 2009
@@ -2,7 +2,7 @@
 .\ Copyright 1989 ATT
 .\ @(#)rpc_clnt_create 1.5 89/07/24 SMI;
 .\ Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
-.\	$NetBSD: rpc_clnt_create.3,v 1.9 2003/04/16 13:34:43 wiz Exp $
+.\	$NetBSD: rpc_clnt_create.3,v 1.9.38.1 2009/04/10 18:09:10 snj Exp $
 .Dd May 7, 1993
 .Dt RPC_CLNT_CREATE 3
 .Os
@@ -287,7 +287,6 @@
 on each call.
 .Pp
 .It Fn clnt_raw_create
-.IP
 This routine creates an RPC
 client handle for the remote program
 .Fa prognum
@@ -328,7 +327,7 @@
 For connectionless transports, if
 .Fa svcaddr
 is
-..Dv NULL ,
+.Dv NULL ,
 .Dv RPC_UNKNOWNADDR
 error is set.
 .Fa fildes



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

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 18:10:46 UTC 2009

Modified Files:
src/sys/arch/i386/i386 [netbsd-5]: kvm86.c

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #683):
sys/arch/i386/i386/kvm86.c: revision 1.18
Add missing cpu.h include required by last commit.


To generate a diff of this commit:
cvs rdiff -u -r1.15.12.1 -r1.15.12.2 src/sys/arch/i386/i386/kvm86.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/i386/i386/kvm86.c
diff -u src/sys/arch/i386/i386/kvm86.c:1.15.12.1 src/sys/arch/i386/i386/kvm86.c:1.15.12.2
--- src/sys/arch/i386/i386/kvm86.c:1.15.12.1	Sat Apr  4 17:39:09 2009
+++ src/sys/arch/i386/i386/kvm86.c	Fri Apr 10 18:10:46 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm86.c,v 1.15.12.1 2009/04/04 17:39:09 snj Exp $ */
+/* $NetBSD: kvm86.c,v 1.15.12.2 2009/04/10 18:10:46 snj Exp $ */
 
 /*
  * Copyright (c) 2002
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kvm86.c,v 1.15.12.1 2009/04/04 17:39:09 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: kvm86.c,v 1.15.12.2 2009/04/10 18:10:46 snj Exp $);
 
 #include opt_multiprocessor.h
 
@@ -37,6 +37,7 @@
 #include sys/user.h
 #include sys/malloc.h
 #include sys/mutex.h
+#include sys/cpu.h
 
 #include uvm/uvm.h
 



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

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 18:12:53 UTC 2009

Modified Files:
src/sys/dev/ir [netbsd-5]: irframe_tty.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #684):
sys/dev/ir/irframe_tty.c: revision 1.56
Avoid crash under LOCKDEBUG by destroying a mutex correctly.
Also: move mutex init/destroy into attach/detach functions and
handle case where line discipline is closed before the irframe
device. Fixes PR kern/40271.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.54.8.1 src/sys/dev/ir/irframe_tty.c

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

Modified files:

Index: src/sys/dev/ir/irframe_tty.c
diff -u src/sys/dev/ir/irframe_tty.c:1.54 src/sys/dev/ir/irframe_tty.c:1.54.8.1
--- src/sys/dev/ir/irframe_tty.c:1.54	Sun May 25 19:22:21 2008
+++ src/sys/dev/ir/irframe_tty.c	Fri Apr 10 18:12:53 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: irframe_tty.c,v 1.54 2008/05/25 19:22:21 ad Exp $	*/
+/*	$NetBSD: irframe_tty.c,v 1.54.8.1 2009/04/10 18:12:53 snj Exp $	*/
 
 /*
  * TODO
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: irframe_tty.c,v 1.54 2008/05/25 19:22:21 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: irframe_tty.c,v 1.54.8.1 2009/04/10 18:12:53 snj Exp $);
 
 #include sys/param.h
 #include sys/proc.h
@@ -148,6 +148,7 @@
 static void	irt_setspeed(struct tty *, u_int);
 static void	irt_setline(struct tty *, u_int);
 static void	irt_delay(struct tty *, u_int);
+static void	irt_buffer(struct irframet_softc *, u_int);
 
 static const struct irframe_methods irframet_methods = {
 	irframet_open, irframet_close, irframet_read, irframet_write,
@@ -218,9 +219,16 @@
 static void
 irframet_attach(device_t parent, device_t self, void *aux)
 {
+	struct irframet_softc *sc = device_private(self);
 
 	/* pseudo-device attachment does not print name */
 	aprint_normal(%s, device_xname(self));
+
+	callout_init(sc-sc_timeout, 0);
+	mutex_init(sc-sc_wr_lk, MUTEX_DEFAULT, IPL_NONE);
+	selinit(sc-sc_rsel);
+	selinit(sc-sc_wsel);
+	
 #if 0 /* XXX can't do it yet because pseudo-devices don't get aux */
 	struct ir_attach_args ia;
 
@@ -234,8 +242,19 @@
 static int
 irframet_detach(struct device *dev, int flags)
 {
+	struct irframet_softc *sc = device_private(dev);
+	int rc;
+
+	callout_stop(sc-sc_timeout);
+
+	rc = irframe_detach(dev, flags);
 
-	return (irframe_detach(dev, flags));
+	callout_destroy(sc-sc_timeout);
+	mutex_destroy(sc-sc_wr_lk);
+	seldestroy(sc-sc_wsel);
+	seldestroy(sc-sc_rsel);
+
+	return rc;
 }
 
 /*
@@ -326,8 +345,8 @@
 	ttyflush(tp, FREAD | FWRITE);
 	mutex_spin_exit(tty_lock);	 /* XXX */
 	ttyldisc_release(tp-t_linesw);
-	tp-t_linesw = ttyldisc_default();
-	if (sc != NULL) {
+	tp-t_linesw = ttyldisc_default(); if (sc != NULL) {
+		irt_buffer(sc, 0);
 		tp-t_sc = NULL;
 		aprint_normal(%s detached from tty%02d\n,
 		device_xname(sc-sc_irp.sc_dev), minor(tp-t_dev));
@@ -402,6 +421,35 @@
 	return (0);
 }
 
+static void
+irt_buffer(struct irframet_softc *sc, u_int maxsize)
+{
+	int i;
+
+	DPRINTF((%s: sc=%p, maxsize=%u\n, __func__, sc, maxsize));
+
+	if (sc-sc_params.maxsize != maxsize) {
+		sc-sc_params.maxsize = maxsize;
+		if (sc-sc_inbuf != NULL)
+			free(sc-sc_inbuf, M_DEVBUF);
+		for (i = 0; i  MAXFRAMES; i++)
+			if (sc-sc_frames[i].buf != NULL)
+free(sc-sc_frames[i].buf, M_DEVBUF);
+		if (sc-sc_params.maxsize != 0) {
+			sc-sc_inbuf = malloc(sc-sc_params.maxsize+2,
+	  M_DEVBUF, M_WAITOK);
+			for (i = 0; i  MAXFRAMES; i++)
+sc-sc_frames[i].buf =
+	malloc(sc-sc_params.maxsize,
+	   M_DEVBUF, M_WAITOK);
+		} else {
+			sc-sc_inbuf = NULL;
+			for (i = 0; i  MAXFRAMES; i++)
+sc-sc_frames[i].buf = NULL;
+		}
+	}
+}
+
 void
 irt_frame(struct irframet_softc *sc, u_char *tbuf, u_int len)
 {
@@ -529,7 +577,6 @@
 {
 	struct tty *tp = h;
 	struct irframet_softc *sc = (struct irframet_softc *)tp-t_sc;
-	static bool again;
 
 	DPRINTF((%s: tp=%p\n, __func__, tp));
 
@@ -541,15 +588,6 @@
 	sc-sc_framei = 0;
 	sc-sc_frameo = 0;
 
-	/* XXX */
-	if (!again) {
-		again = true;
-		callout_init(sc-sc_timeout, 0);
-		mutex_init(sc-sc_wr_lk, MUTEX_DEFAULT, IPL_NONE);
-		selinit(sc-sc_rsel);
-		selinit(sc-sc_wsel);
-	}
-
 	return (0);
 }
 
@@ -559,22 +597,17 @@
 {
 	struct tty *tp = h;
 	struct irframet_softc *sc = (struct irframet_softc *)tp-t_sc;
-	int i, s;
+	int s;
 
 	DPRINTF((%s: tp=%p\n, __func__, tp));
 
+	/* line discipline was closed */
+	if (sc == NULL)
+		return (0);
+
 	callout_stop(sc-sc_timeout);
 	s = splir();
-	if (sc-sc_inbuf != NULL) {
-		free(sc-sc_inbuf, M_DEVBUF);
-		sc-sc_inbuf = NULL;
-	}
-	for (i = 0; i  MAXFRAMES; i++) {
-		if (sc-sc_frames[i].buf != NULL) {
-			free(sc-sc_frames[i].buf, M_DEVBUF);
-			sc-sc_frames[i].buf = NULL;
-		}
-	}
+	irt_buffer(sc, 0);
 	splx(s);
 
 	return (0);
@@ -830,7 +863,6 @@
 {
 	struct tty *tp = h;
 	struct irframet_softc *sc = (struct irframet_softc *)tp-t_sc;
-	int 

CVS commit: [netbsd-5] src/doc

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 18:13:57 UTC 2009

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

Log Message:
Tickets 682-684.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.130 -r1.1.2.131 src/doc/CHANGES-5.0

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

Modified files:

Index: src/doc/CHANGES-5.0
diff -u src/doc/CHANGES-5.0:1.1.2.130 src/doc/CHANGES-5.0:1.1.2.131
--- src/doc/CHANGES-5.0:1.1.2.130	Wed Apr  8 23:13:05 2009
+++ src/doc/CHANGES-5.0	Fri Apr 10 18:13:57 2009
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0,v 1.1.2.130 2009/04/08 23:13:05 snj Exp $
+# $NetBSD: CHANGES-5.0,v 1.1.2.131 2009/04/10 18:13:57 snj Exp $
 
 A complete list of changes from the initial NetBSD 5.0 branch on October 2008
 until the 5.0 release:
@@ -5948,3 +5948,21 @@
 	in ticket #661.
 	[ad, ticket #681]
 
+lib/libc/rpc/rpc_clnt_create.3			1.10
+
+	Fix markup
+	[joerg, ticket #682]
+
+sys/arch/i386/i386/kvm86.c			1.18
+
+	Add missing cpu.h include.
+	[sborrill, ticket #683]
+
+sys/dev/ir/irframe_tty.c			1.56
+
+	Avoid crash under LOCKDEBUG by destroying a mutex correctly.
+	Also: move mutex init/destroy into attach/detach functions and
+	handle case where line discipline is closed before the irframe
+	device. Fixes PR kern/40271.
+	[mlelstv, ticket #684]
+



CVS commit: src/sys/nfs

2009-04-10 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Fri Apr 10 18:58:51 UTC 2009

Modified Files:
src/sys/nfs: nfs_serv.c nfsm_subs.h

Log Message:
PR kern/41158: nfs_rename() locking against myself
nfsrv_rename() can exit without calling genfs_renamelock_exit() because
the nfsm_reply() can do return (0) on error.
Change nfsm_reply to use 'error = 0; goto nfsmout' instead.
Fix a few place so it's safe to goto nfsmout from nfsm_reply, or other
macros calling it.
As a side effect it could fix a missing vrele(dirp) in various place where
nfsm_reply could return(0).


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.50 -r1.51 src/sys/nfs/nfsm_subs.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/nfs/nfs_serv.c
diff -u src/sys/nfs/nfs_serv.c:1.143 src/sys/nfs/nfs_serv.c:1.144
--- src/sys/nfs/nfs_serv.c:1.143	Sat Mar 14 15:36:24 2009
+++ src/sys/nfs/nfs_serv.c	Fri Apr 10 18:58:50 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_serv.c,v 1.143 2009/03/14 15:36:24 dsl Exp $	*/
+/*	$NetBSD: nfs_serv.c,v 1.144 2009/04/10 18:58:50 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_serv.c,v 1.143 2009/03/14 15:36:24 dsl Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_serv.c,v 1.144 2009/04/10 18:58:50 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1392,7 +1392,7 @@
 	int32_t t1;
 	char *bpos;
 	int error = 0, cache = 0, len, tsize, dirfor_ret = 1, diraft_ret = 1;
-	int rdev = 0;
+	int rdev = 0, abort = 0;
 	int v3 = (nfsd-nd_flag  ND_NFSV3), how, exclusive_flag = 0;
 	char *cp2;
 	struct mbuf *mb, *mreq;
@@ -1419,6 +1419,7 @@
 			vrele(dirp);
 		return (0);
 	}
+	abort = 1;
 	VATTR_NULL(va);
 	if (v3) {
 		va.va_mode = 0;
@@ -1494,6 +1495,7 @@
 			KAUTH_SYSTEM_MKNOD, 0, NULL, NULL, NULL))) {
 VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
 vput(nd.ni_dvp);
+abort = 0;
 nfsm_reply(0);
 return (error);
 			} else
@@ -1509,12 +1511,14 @@
 vrele(nd.ni_dvp);
 VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
 error = EINVAL;
+abort = 0;
 nfsm_reply(0);
 			}
 		} else {
 			VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
 			vput(nd.ni_dvp);
 			error = ENXIO;
+			abort = 0;
 		}
 		vp = nd.ni_vp;
 	} else {
@@ -1524,6 +1528,7 @@
 			vrele(nd.ni_dvp);
 		else
 			vput(nd.ni_dvp);
+		abort = 0;
 		if (!error  va.va_size != -1) {
 			error = nfsrv_access(vp, VWRITE, cred,
 			(nd.ni_cnd.cn_flags  RDONLY), lwp, 0);
@@ -1561,7 +1566,9 @@
 	}
 	if (dirp) {
 		vrele(dirp);
+		dirp = NULL;
 	}
+	abort = 0;
 	nfsm_reply(NFSX_SRVFH(nsfh, v3) + NFSX_FATTR(v3) + NFSX_WCCDATA(v3));
 	if (v3) {
 		if (!error) {
@@ -1578,13 +1585,15 @@
 nfsmout:
 	if (dirp)
 		vrele(dirp);
-	VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
-	if (nd.ni_dvp == nd.ni_vp)
-		vrele(nd.ni_dvp);
-	else
-		vput(nd.ni_dvp);
-	if (nd.ni_vp)
-		vput(nd.ni_vp);
+	if (abort) {
+		VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
+		if (nd.ni_dvp == nd.ni_vp)
+			vrele(nd.ni_dvp);
+		else
+			vput(nd.ni_dvp);
+		if (nd.ni_vp)
+			vput(nd.ni_vp);
+	}
 	return (error);
 }
 
@@ -1604,6 +1613,7 @@
 	int32_t t1;
 	char *bpos;
 	int error = 0, cache = 0, len, dirfor_ret = 1, diraft_ret = 1;
+	int abort = 0;
 	u_int32_t major, minor;
 	enum vtype vtyp;
 	char *cp2;
@@ -1629,6 +1639,7 @@
 			vrele(dirp);
 		return (0);
 	}
+	abort = 1;
 	nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED);
 	vtyp = nfsv3tov_type(*tl);
 	if (vtyp != VCHR  vtyp != VBLK  vtyp != VSOCK  vtyp != VFIFO) {
@@ -1700,7 +1711,9 @@
 	if (dirp) {
 		diraft_ret = VOP_GETATTR(dirp, diraft, cred);
 		vrele(dirp);
+		dirp = NULL;
 	}
+	abort = 0;
 	nfsm_reply(NFSX_SRVFH(nsfh, true) + NFSX_POSTOPATTR(1) +
 	NFSX_WCCDATA(1));
 	if (!error) {
@@ -1710,13 +1723,15 @@
 	nfsm_srvwcc_data(dirfor_ret, dirfor, diraft_ret, diraft);
 	return (0);
 nfsmout:
-	VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
-	if (nd.ni_dvp == nd.ni_vp)
-		vrele(nd.ni_dvp);
-	else
-		vput(nd.ni_dvp);
-	if (nd.ni_vp)
-		vput(nd.ni_vp);
+	if (abort) {
+		VOP_ABORTOP(nd.ni_dvp, nd.ni_cnd);
+		if (nd.ni_dvp == nd.ni_vp)
+			vrele(nd.ni_dvp);
+		else
+			vput(nd.ni_dvp);
+		if (nd.ni_vp)
+			vput(nd.ni_vp);
+	}
 	if (dirp)
 		vrele(dirp);
 	return (error);
@@ -2006,21 +2021,26 @@
 	}
 	vrele(tond.ni_startdir);
 	PNBUF_PUT(tond.ni_cnd.cn_pnbuf);
+	tond.ni_cnd.cn_nameiop = 0;
 out1:
 	if (fdirp) {
 		if (v3) {
 			fdiraft_ret = VOP_GETATTR(fdirp, fdiraft, cred);
 		}
 		vrele(fdirp);
+		fdirp = NULL;
 	}
 	if (tdirp) {
 		if (v3) {
 			tdiraft_ret = VOP_GETATTR(tdirp, tdiraft, cred);
 		}
 		vrele(tdirp);
+		tdirp = NULL;
 	}
 	vrele(fromnd.ni_startdir);
 	PNBUF_PUT(fromnd.ni_cnd.cn_pnbuf);
+	fromnd.ni_cnd.cn_nameiop = 0;
+	localfs = NULL;
 	nfsm_reply(2 * NFSX_WCCDATA(v3));
 	if (v3) {
 		nfsm_srvwcc_data(fdirfor_ret, fdirfor, fdiraft_ret, fdiraft);
@@ -2159,7 +2179,7 @@
 	char *bpos, *pathcp = NULL, *cp2;
 	struct uio io;
 	struct iovec 

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

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 20:20:45 UTC 2009

Modified Files:
src/sys/kern [netbsd-4]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by drochner in ticket #1299):
sys/kern/kern_sig.c: revision 1.296 via patch
In sigput(), save the siginfo no matter whether SA_SIGINFO is set or not.
There are also sigtimedwait(2) et al. to catch signals without invoking
a signal handler. Fixes PR kern/41076 by Matteo Beccati (the first
test case, where the signal is sent before sigwaitinfo(2) gets called).


To generate a diff of this commit:
cvs rdiff -u -r1.240.2.2 -r1.240.2.3 src/sys/kern/kern_sig.c

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

Modified files:

Index: src/sys/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.240.2.2 src/sys/kern/kern_sig.c:1.240.2.3
--- src/sys/kern/kern_sig.c:1.240.2.2	Sun Oct  7 14:21:11 2007
+++ src/sys/kern/kern_sig.c	Fri Apr 10 20:20:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.240.2.2 2007/10/07 14:21:11 xtraeme Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.240.2.3 2009/04/10 20:20:45 snj Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_sig.c,v 1.240.2.2 2007/10/07 14:21:11 xtraeme Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_sig.c,v 1.240.2.3 2009/04/10 20:20:45 snj Exp $);
 
 #include opt_coredump.h
 #include opt_ktrace.h
@@ -180,21 +180,17 @@
 }
 
 /*
- * Append a new ksiginfo element to the list of pending ksiginfo's, if
- * we need to (SA_SIGINFO was requested). We replace non RT signals if
- * they already existed in the queue and we add new entries for RT signals,
- * or for non RT signals with non-existing entries.
+ * Append a new ksiginfo element to the list of pending ksiginfo's.
+ * We replace non RT signals if they already existed in the queue
+ * and we add new entries for RT signals, or for non RT signals
+ * with non-existing entries.
  */
 static void
 ksiginfo_queue(struct proc *p, const ksiginfo_t *ksi, ksiginfo_t **newkp)
 {
 	ksiginfo_t *kp;
-	struct sigaction *sa = SIGACTION_PS(p-p_sigacts, ksi-ksi_signo);
 	int s;
 
-	if ((sa-sa_flags  SA_SIGINFO) == 0)
-		return;
-
 	/*
 	 * If there's no info, don't save it.
 	 */



CVS commit: [netbsd-4] src/lib/libpthread

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 20:27:45 UTC 2009

Modified Files:
src/lib/libpthread [netbsd-4]: pthread_sig.c

Log Message:
Apply patch (requested by dholland in ticket #1301):
In the pthreads wrapper for __sigaction14, return -1 and set errno
rather than returning an error number directly like many pthreads
functions do. Fixes a problem where sigaction(-1, ...) returns
EINVAL instead of failing with EINVAL, reported by Matteo Beccati
in PR lib/41085.


To generate a diff of this commit:
cvs rdiff -u -r1.47.2.2 -r1.47.2.3 src/lib/libpthread/pthread_sig.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/libpthread/pthread_sig.c
diff -u src/lib/libpthread/pthread_sig.c:1.47.2.2 src/lib/libpthread/pthread_sig.c:1.47.2.3
--- src/lib/libpthread/pthread_sig.c:1.47.2.2	Tue Sep 16 18:49:33 2008
+++ src/lib/libpthread/pthread_sig.c	Fri Apr 10 20:27:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_sig.c,v 1.47.2.2 2008/09/16 18:49:33 bouyer Exp $	*/
+/*	$NetBSD: pthread_sig.c,v 1.47.2.3 2009/04/10 20:27:45 snj Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: pthread_sig.c,v 1.47.2.2 2008/09/16 18:49:33 bouyer Exp $);
+__RCSID($NetBSD: pthread_sig.c,v 1.47.2.3 2009/04/10 20:27:45 snj Exp $);
 
 /* We're interposing a specific version of the signal interface. */
 #define	__LIBC12_SOURCE__
@@ -220,8 +220,10 @@
 	pthread_t self;
 	int retval;
 
-	if ((sig = 0) || (sig = _NSIG))
-		return EINVAL;
+	if ((sig = 0) || (sig = _NSIG)) {
+		errno = EINVAL;
+		return -1;
+	}
 
 	self = pthread__self();
 	pthread_spinlock(self, pt_sigacts_lock);



CVS commit: [netbsd-4] src/sys

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 20:32:04 UTC 2009

Modified Files:
src/sys/kern [netbsd-4]: uipc_usrreq.c
src/sys/sys [netbsd-4]: file.h

Log Message:
Apply patch (requested by mlelstv in ticket #1303):
Avoid deep recursion and file descriptor exhaustion.

1. unp_detach: go not call unp_gc directly for descriptors
   that are unixdomain sockets themselves. Instead mark them
   for cleanup during garbage collection.

2. unp_gc: handle detach of descriptors that were marked earlier.

3. prohibit transfer of descriptors within SCM_RIGHTS messages if
   (num_files_in_transit  maxfiles / unp_rights_ratio)


To generate a diff of this commit:
cvs rdiff -u -r1.94.2.2 -r1.94.2.3 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.56 -r1.56.12.1 src/sys/sys/file.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/kern/uipc_usrreq.c
diff -u src/sys/kern/uipc_usrreq.c:1.94.2.2 src/sys/kern/uipc_usrreq.c:1.94.2.3
--- src/sys/kern/uipc_usrreq.c:1.94.2.2	Sun May 25 19:04:43 2008
+++ src/sys/kern/uipc_usrreq.c	Fri Apr 10 20:32:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq.c,v 1.94.2.2 2008/05/25 19:04:43 bouyer Exp $	*/
+/*	$NetBSD: uipc_usrreq.c,v 1.94.2.3 2009/04/10 20:32:04 snj Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2004 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.94.2.2 2008/05/25 19:04:43 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.94.2.3 2009/04/10 20:32:04 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -538,6 +538,7 @@
 u_long	unpdg_recvspace = 4*1024;
 
 int	unp_rights;			/* file descriptors in flight */
+int	unp_rights_ratio = 2;		/* limit, fraction of maxfiles */
 
 int
 unp_attach(struct socket *so)
@@ -976,6 +977,7 @@
 	int i, fd, *fdp;
 	int nfds;
 	u_int neededspace;
+	u_int maxmsg;
 
 	/* Sanity check the control message header */
 	if (cm-cmsg_type != SCM_RIGHTS || cm-cmsg_level != SOL_SOCKET ||
@@ -984,6 +986,11 @@
 
 	/* Verify that the file descriptors are valid */
 	nfds = (cm-cmsg_len - CMSG_ALIGN(sizeof(*cm))) / sizeof(int);
+
+	maxmsg = maxfiles / unp_rights_ratio;
+	if (unp_rights + nfds  maxmsg)
+		return (EAGAIN);
+
 	fdp = (int *)CMSG_DATA(cm);
 	for (i = 0; i  nfds; i++) {
 		fd = *fdp++;
@@ -1167,6 +1174,8 @@
 if (fp-f_count == fp-f_msgcount)
 	continue;
 			}
+			if (fp-f_iflags  FIF_DISCARDED)
+continue;
 			fp-f_flag |= FMARK;
 
 			if (fp-f_type != DTYPE_SOCKET ||
@@ -1272,6 +1281,14 @@
 	for (i = nunref, fpp = extra_ref; --i = 0; ++fpp) {
 		fp = *fpp;
 		simple_lock(fp-f_slock);
+		if (fp-f_iflags  FIF_DISCARDED) {
+			fp-f_usecount++;
+			fp-f_msgcount--;
+			simple_unlock(fp-f_slock);
+			unp_rights--;
+			(void) closef(fp, (struct lwp *)0);
+			simple_lock(fp-f_slock);
+		}
 		FILE_USE(fp);
 		(void) closef(fp, (struct lwp *)0);
 	}
@@ -1356,7 +1373,24 @@
 {
 	if (fp == NULL)
 		return;
+
 	simple_lock(fp-f_slock);
+	/*
+	 * closing unix domain sockets may cause a deep
+	 * recursion, so leave them open and mark them
+	 * for the garbage collector to discard them safely.
+	 */
+	if (fp-f_type == DTYPE_SOCKET  fp-f_count == 1) {
+		struct socket *so;
+
+		so = (struct socket *)fp-f_data;
+		if (so  so-so_proto-pr_domain == unixdomain 
+		(so-so_proto-pr_flagsPR_RIGHTS) != 0) {
+			fp-f_iflags |= FIF_DISCARDED;
+			simple_unlock(fp-f_slock);
+			return;
+		}
+	}
 	fp-f_usecount++;	/* i.e. FILE_USE(fp) sans locking */
 	fp-f_msgcount--;
 	simple_unlock(fp-f_slock);

Index: src/sys/sys/file.h
diff -u src/sys/sys/file.h:1.56 src/sys/sys/file.h:1.56.12.1
--- src/sys/sys/file.h:1.56	Sun May 14 21:38:18 2006
+++ src/sys/sys/file.h	Fri Apr 10 20:32:04 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: file.h,v 1.56 2006/05/14 21:38:18 elad Exp $	*/
+/*	$NetBSD: file.h,v 1.56.12.1 2009/04/10 20:32:04 snj Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -96,9 +96,10 @@
 
 #define	FIF_WANTCLOSE		0x01	/* a close is waiting for usecount */
 #define	FIF_LARVAL		0x02	/* not fully constructed; don't use */
+#define	FIF_DISCARDED		0x04	/* file is discarded, pending close */
 
 #define	FILE_IS_USABLE(fp)	(((fp)-f_iflags 			\
-  (FIF_WANTCLOSE|FIF_LARVAL)) == 0)
+			(FIF_WANTCLOSE|FIF_LARVAL|FIF_DISCARDED)) == 0)
 
 #define	FILE_SET_MATURE(fp)		\
 do {	\



CVS commit: [netbsd-4] src/doc

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 20:34:17 UTC 2009

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

Log Message:
Tickets 1299, 1301, and 1303.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.141 -r1.1.2.142 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.141 src/doc/CHANGES-4.1:1.1.2.142
--- src/doc/CHANGES-4.1:1.1.2.141	Tue Mar 31 21:15:06 2009
+++ src/doc/CHANGES-4.1	Fri Apr 10 20:34:17 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.1,v 1.1.2.141 2009/03/31 21:15:06 bouyer Exp $
+#	$NetBSD: CHANGES-4.1,v 1.1.2.142 2009/04/10 20:34:17 snj Exp $
 
 A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1
 release:
@@ -2955,3 +2955,32 @@
 	internalize bad xml file with non-existing data type e.g. number.
 	[haad, ticket #1296]
 
+sys/kern/kern_sig.c1.296
+
+	In sigput(), save the siginfo no matter whether SA_SIGINFO is
+	set or not.  There are also sigtimedwait(2) et al. to catch
+	signals without invoking a signal handler. Addresses the first
+	test case in PR kern/41076.
+	[drochner, ticket #1299]
+
+lib/libpthread/pthread_sig.c			patch
+
+	In the pthreads wrapper for __sigaction14, return -1 and set errno
+	rather than returning an error number directly like many pthreads
+	functions do. Fixes a problem where sigaction(-1, ...) returns
+	EINVAL instead of failing with EINVAL, reported by Matteo Beccati
+	in PR lib/41085.
+	[dholland, ticket #1301]
+
+sys/sys/file.h	patch
+sys/kern/uipc_usrreq.cpatch
+
+	Avoid deep recursion and file descriptor exhaustion.
+	1. unp_detach: go not call unp_gc directly for descriptors
+	that are unixdomain sockets themselves. Instead mark them
+	for cleanup during garbage collection.
+	2. unp_gc: handle detach of descriptors that were marked earlier.
+	3. prohibit transfer of descriptors within SCM_RIGHTS messages if
+	(num_files_in_transit  maxfiles / unp_rights_ratio)
+	[mlelstv, ticket #1303]
+



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

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 20:35:24 UTC 2009

Modified Files:
src/sys/kern [netbsd-4-0]: uipc_usrreq.c
src/sys/sys [netbsd-4-0]: file.h

Log Message:
Apply patch (requested by mlelstv in ticket #1303):
Avoid deep recursion and file descriptor exhaustion.
1. unp_detach: go not call unp_gc directly for descriptors
  that are unixdomain sockets themselves. Instead mark them
  for cleanup during garbage collection.
2. unp_gc: handle detach of descriptors that were marked earlier.
3. prohibit transfer of descriptors within SCM_RIGHTS messages if
  (num_files_in_transit  maxfiles / unp_rights_ratio)


To generate a diff of this commit:
cvs rdiff -u -r1.94.2.1 -r1.94.2.1.4.1 src/sys/kern/uipc_usrreq.c
cvs rdiff -u -r1.56 -r1.56.30.1 src/sys/sys/file.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/kern/uipc_usrreq.c
diff -u src/sys/kern/uipc_usrreq.c:1.94.2.1 src/sys/kern/uipc_usrreq.c:1.94.2.1.4.1
--- src/sys/kern/uipc_usrreq.c:1.94.2.1	Tue Aug 21 19:33:57 2007
+++ src/sys/kern/uipc_usrreq.c	Fri Apr 10 20:35:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq.c,v 1.94.2.1 2007/08/21 19:33:57 liamjfoy Exp $	*/
+/*	$NetBSD: uipc_usrreq.c,v 1.94.2.1.4.1 2009/04/10 20:35:24 snj Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2004 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.94.2.1 2007/08/21 19:33:57 liamjfoy Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_usrreq.c,v 1.94.2.1.4.1 2009/04/10 20:35:24 snj Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -538,6 +538,7 @@
 u_long	unpdg_recvspace = 4*1024;
 
 int	unp_rights;			/* file descriptors in flight */
+int	unp_rights_ratio = 2;		/* limit, fraction of maxfiles */
 
 int
 unp_attach(struct socket *so)
@@ -976,6 +977,7 @@
 	int i, fd, *fdp;
 	int nfds;
 	u_int neededspace;
+	u_int maxmsg;
 
 	/* Sanity check the control message header */
 	if (cm-cmsg_type != SCM_RIGHTS || cm-cmsg_level != SOL_SOCKET ||
@@ -984,6 +986,11 @@
 
 	/* Verify that the file descriptors are valid */
 	nfds = (cm-cmsg_len - CMSG_ALIGN(sizeof(*cm))) / sizeof(int);
+
+	maxmsg = maxfiles / unp_rights_ratio;
+	if (unp_rights + nfds  maxmsg)
+		return (EAGAIN);
+
 	fdp = (int *)CMSG_DATA(cm);
 	for (i = 0; i  nfds; i++) {
 		fd = *fdp++;
@@ -1167,6 +1174,8 @@
 if (fp-f_count == fp-f_msgcount)
 	continue;
 			}
+			if (fp-f_iflags  FIF_DISCARDED)
+continue;
 			fp-f_flag |= FMARK;
 
 			if (fp-f_type != DTYPE_SOCKET ||
@@ -1272,6 +1281,14 @@
 	for (i = nunref, fpp = extra_ref; --i = 0; ++fpp) {
 		fp = *fpp;
 		simple_lock(fp-f_slock);
+		if (fp-f_iflags  FIF_DISCARDED) {
+			fp-f_usecount++;
+			fp-f_msgcount--;
+			simple_unlock(fp-f_slock);
+			unp_rights--;
+			(void) closef(fp, (struct lwp *)0);
+			simple_lock(fp-f_slock);
+		}
 		FILE_USE(fp);
 		(void) closef(fp, (struct lwp *)0);
 	}
@@ -1356,7 +1373,24 @@
 {
 	if (fp == NULL)
 		return;
+
 	simple_lock(fp-f_slock);
+	/*
+	 * closing unix domain sockets may cause a deep
+	 * recursion, so leave them open and mark them
+	 * for the garbage collector to discard them safely.
+	 */
+	if (fp-f_type == DTYPE_SOCKET  fp-f_count == 1) {
+		struct socket *so;
+
+		so = (struct socket *)fp-f_data;
+		if (so  so-so_proto-pr_domain == unixdomain 
+		(so-so_proto-pr_flagsPR_RIGHTS) != 0) {
+			fp-f_iflags |= FIF_DISCARDED;
+			simple_unlock(fp-f_slock);
+			return;
+		}
+	}
 	fp-f_usecount++;	/* i.e. FILE_USE(fp) sans locking */
 	fp-f_msgcount--;
 	simple_unlock(fp-f_slock);

Index: src/sys/sys/file.h
diff -u src/sys/sys/file.h:1.56 src/sys/sys/file.h:1.56.30.1
--- src/sys/sys/file.h:1.56	Sun May 14 21:38:18 2006
+++ src/sys/sys/file.h	Fri Apr 10 20:35:24 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: file.h,v 1.56 2006/05/14 21:38:18 elad Exp $	*/
+/*	$NetBSD: file.h,v 1.56.30.1 2009/04/10 20:35:24 snj Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -96,9 +96,10 @@
 
 #define	FIF_WANTCLOSE		0x01	/* a close is waiting for usecount */
 #define	FIF_LARVAL		0x02	/* not fully constructed; don't use */
+#define	FIF_DISCARDED		0x04	/* file is discarded, pending close */
 
 #define	FILE_IS_USABLE(fp)	(((fp)-f_iflags 			\
-  (FIF_WANTCLOSE|FIF_LARVAL)) == 0)
+			(FIF_WANTCLOSE|FIF_LARVAL|FIF_DISCARDED)) == 0)
 
 #define	FILE_SET_MATURE(fp)		\
 do {	\



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

2009-04-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Apr 10 20:35:58 UTC 2009

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

Log Message:
Ticket 1303.


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

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

Modified files:

Index: src/doc/CHANGES-4.0.2
diff -u src/doc/CHANGES-4.0.2:1.1.2.22 src/doc/CHANGES-4.0.2:1.1.2.23
--- src/doc/CHANGES-4.0.2:1.1.2.22	Tue Mar 31 21:15:07 2009
+++ src/doc/CHANGES-4.0.2	Fri Apr 10 20:35:58 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: CHANGES-4.0.2,v 1.1.2.22 2009/03/31 21:15:07 bouyer Exp $
+#	$NetBSD: CHANGES-4.0.2,v 1.1.2.23 2009/04/10 20:35:58 snj Exp $
 
 A complete list of changes from the NetBSD 4.0.1 release to the NetBSD 4.0.2
 release:
@@ -183,3 +183,15 @@
 	internalize bad xml file with non-existing data type e.g. number.
 	[haad, ticket #1296]
 
+sys/sys/file.h  patch
+sys/kern/uipc_usrreq.c  patch
+
+Avoid deep recursion and file descriptor exhaustion.
+1. unp_detach: go not call unp_gc directly for descriptors
+that are unixdomain sockets themselves. Instead mark them
+for cleanup during garbage collection.
+2. unp_gc: handle detach of descriptors that were marked earlier.
+3. prohibit transfer of descriptors within SCM_RIGHTS messages if
+(num_files_in_transit  maxfiles / unp_rights_ratio)
+[mlelstv, ticket #1303]
+



CVS commit: src/share/man/man8/man8.i386

2009-04-10 Thread Perry E. Metzger
Module Name:src
Committed By:   perry
Date:   Fri Apr 10 21:11:28 UTC 2009

Modified Files:
src/share/man/man8/man8.i386: pxeboot.8

Log Message:
Make this reflect reality more -- next-server is necessary, there is
now this boot.cfg thing, etc. Also add a reasonable hint on how to set
up dhcp for booting install kernels via tftp.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/share/man/man8/man8.i386/pxeboot.8

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/man8/man8.i386/pxeboot.8
diff -u src/share/man/man8/man8.i386/pxeboot.8:1.13 src/share/man/man8/man8.i386/pxeboot.8:1.14
--- src/share/man/man8/man8.i386/pxeboot.8:1.13	Wed Mar 11 19:26:09 2009
+++ src/share/man/man8/man8.i386/pxeboot.8	Fri Apr 10 21:11:28 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: pxeboot.8,v 1.13 2009/03/11 19:26:09 joerg Exp $
+.\	$NetBSD: pxeboot.8,v 1.14 2009/04/10 21:11:28 perry Exp $
 .\
 .\ Copyright (c) 2003
 .\ 	Matthias Drochner.  All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd October 13, 2008
+.Dd April 10, 2008
 .Dt PXEBOOT 8 i386
 .Os
 .Sh NAME
@@ -66,16 +66,33 @@
 .Nx
 .Nm
 program takes control.
-An interactive mode is entered if the
-user presses a key within five seconds.
-After this time or after the user's
+It immediately issues another
+.Tn DHCP
+request to get the name of a
+.Xr boot.cfg 5
+file to load, using
+.Dq boot.cfg
+by default.
+If the boot config file is not found, or if the supplied file appears
+not to be a boot configuration file, the file is skipped.
+Otherwise it is loaded and obeyed as described in 
+.Xr boot.cfg 5 .
+.\ XXX Now, if the boot.cfg is loaded, is DHCP still used to get the
+.\ XXX file name for the kernel? If only the person who had made the
+.\ XXX changes had documented them.
+If a boot configuration is not loaded, the user has the option to
+enter a limited version of the standard interactive boot mode by
+pressing a key within five seconds.
+After this time, or after the user's
 .Ic boot
 command, another
 .Tn DHCP
-request is issued and the kernel
-is loaded as specified in the
+request is issued and the kernel filename returned by the
 .Tn DHCP
-reply.
+reply, using
+.Dq netbsd
+by default,
+is loaded.
 To read the kernel file, the
 .Tn NFS
 .Pq version 2
@@ -92,11 +109,14 @@
 program has the following special parameters:
 .Bl -tag -width 
 .It Bootfile name
-is set to the
+is set to
+.Dq boot.cfg
+during the first request, and then to
+the
 .Va filename
 argument on the
 .Ic boot
-command line typed in by the user (can be empty), or to
+command line typed in by the user (can be empty), using
 .Dq netbsd
 in the non-interactive case.
 .It DHCP Vendor class identifier tag
@@ -106,15 +126,18 @@
 .Pp
 The
 .Tn DHCP
-server can use these fields to distinguish between
-the various originators of requests (first and second
-.Tn PXE
+server can use these fields (i.e. the
+.Tn DHCP
+vendor class identifier tag and the requested file name, possibly
+supplied by the user's command line input to the
+.Nm
+program) to distinguish between the various originators of requests
+(PXE BIOS, first and second
+.Nm
 stage,
 .Nx
-kernel), and to control conditional behaviour depending on the
-user's command line input to the
-.Nm
-program, e.g. to support alternative
+kernel), and to alter its behaviour. 
+For example, this can be used to support alternative
 .Nx
 installations on one machine.
 .Pp
@@ -125,14 +148,15 @@
 .Bl -tag -width 
 .It Bootfile name
 specifies the protocol to be used, and the filename of the
+boot config or
 .Nx
 kernel to be booted, separated by a colon.
 Available protocols are
 .Dq nfs
 and
 .Dq tftp .
-The kernel filename part is interpreted relatively to the NFS root directory
-(see the
+The boot config or kernel filename part is interpreted relatively to
+the NFS root directory (see the
 .Em Root path
 reply field below) or the TFTP server's root directory (which might be a
 subdirectory within the TFTP server's filesystem, depending on the
@@ -152,6 +176,8 @@
 If no protocol was specified,
 .Dq nfs
 is assumed.
+.It Next server
+is used as the location of the tftp server.
 .It Swap server
 can be used to override the
 .Dq server IP address
@@ -221,7 +247,9 @@
 .Sh EXAMPLES
 The first
 .Pa /etc/dhcpd.conf
-example shows a simple configuration which just loads a file
+example shows a simple configuration which just loads
+.Dq boot.cfg
+and
 .Dq netbsd
 from the client's NFS root directory, using the defaults for
 protocol and kernel filename.
@@ -240,6 +268,36 @@
 .Pp
 The following
 .Pa /etc/dhcpd.conf
+entry sets loads the boot config and kernel over tftp.
+This can be used, for example, for installing machines by using
+an install kernel.
+.Pp
+.Bd -literal
+host myhost {
+hardware ethernet 00:00:00:00:00:00;
+fixed-address 

CVS commit: src/sys/sys

2009-04-10 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Apr 10 21:14:14 UTC 2009

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

Log Message:
Remove ref to WAPBL_DEBUG_SERIALIZE.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/sys/wapbl.h

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

Modified files:

Index: src/sys/sys/wapbl.h
diff -u src/sys/sys/wapbl.h:1.9 src/sys/sys/wapbl.h:1.10
--- src/sys/sys/wapbl.h:1.9	Mon Nov 24 16:05:21 2008
+++ src/sys/sys/wapbl.h	Fri Apr 10 21:14:14 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: wapbl.h,v 1.9 2008/11/24 16:05:21 joerg Exp $	*/
+/*	$NetBSD: wapbl.h,v 1.10 2009/04/10 21:14:14 ad Exp $	*/
 
 /*-
  * Copyright (c) 2003,2008 The NetBSD Foundation, Inc.
@@ -51,7 +51,6 @@
 
 #if 0
 #define	WAPBL_DEBUG_BUFBYTES
-#define	WAPBL_DEBUG_SERIALIZE
 #endif
 
 #endif



CVS commit: src/share/man/man4

2009-04-10 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Apr 10 21:30:24 UTC 2009

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

Log Message:
Sync with reality and be a bit less literal.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/wapbl.4

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

Modified files:

Index: src/share/man/man4/wapbl.4
diff -u src/share/man/man4/wapbl.4:1.8 src/share/man/man4/wapbl.4:1.9
--- src/share/man/man4/wapbl.4:1.8	Thu Feb 26 07:21:06 2009
+++ src/share/man/man4/wapbl.4	Fri Apr 10 21:30:24 2009
@@ -1,6 +1,6 @@
-.\ $NetBSD: wapbl.4,v 1.8 2009/02/26 07:21:06 wiz Exp $
+.\ $NetBSD: wapbl.4,v 1.9 2009/04/10 21:30:24 ad Exp $
 .\
-.\ Copyright (c) 2008 The NetBSD Foundation, Inc.
+.\ Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
 .\ All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd February 25, 2009
+.Dd April 10, 2009
 .Dt WAPBL 4
 .Os
 .Sh NAME
@@ -33,7 +33,6 @@
 .Sh SYNOPSIS
 .Cd options WAPBL
 .Cd options WAPBL_DEBUG
-.Cd options WAPBL_DEBUG_SERIALIZE
 .Sh DESCRIPTION
 The
 .Nm
@@ -134,17 +133,9 @@
 can still be used to force a consistency check of the file system
 should that be desired.
 .Pp
-.Nm
-has a number of debugging options.
-The option
+For kernel developers, the compile time option
 .Dv WAPBL_DEBUG
-turns on general debugging.
-The option
-.Dv WAPBL_DEBUG_SERIALIZE
-forces the serialization of all IO.
-This is currently be used to help alleviate a performance issue
-seen on multi-core machines, where multiple simultaneous extractions
-of tar-files can cause degenerate performance.
+turns on debugging.
 .Sh SEE ALSO
 .Xr config 1 ,
 .Xr fsck 8 ,
@@ -170,18 +161,17 @@
 first appeared in
 .Nx 5.0 .
 .Sh CAVEATS
-An unreplayed
-.Nm
-journal (eg after a crash or power failure) may cause problems if the
-file system is then used with an older kernel or userland what isn't
+Older releases of the system, and other systems that support the
+.Dv UFS
+format should only access
 .Nm
-aware.
-.Pp
-An older
+file systems in read-only mode.
+Additionally, the
 .Xr fsck 8
-that isn't
+command from such systems should not be run against
 .Nm
-aware will not be able to deal with an in-filesystem log.
+file systems.
+Failure to observe these guidelines may damage the file system.
 .Pp
 .Nm
 requires the super block to be in the UFS2 format.
@@ -196,8 +186,8 @@
 .Xr fsck_ffs 8 .
 .Pp
 .Xr fsync 2
-causes the journal to be committed to disk, resulting in
-non-negligible performance issues.
+causes all outstanding metadata transactions to be committed to disk,
+introducing additional latency.
 This can have an impact on database software and other software
 that calls
 .Xr fsync 2
@@ -205,16 +195,9 @@
 .Pp
 File system snapshots
 .Pq Xr fss 4
-currently do not work with
+and quotas do not yet work with
 .Nm .
 .Pp
-There are some pending issues with high metadata-rate workloads (like
-multiple simultaneous tar-file extractions) resulting in degenerate file
-system performance.
-The current work-around is to use the
-.Dv WAPBL_DEBUG_SERIALIZE
-option, as mentioned above.
-.Pp
 In-file system log allocation should be done on a relatively quiet
 file system.
 The error path for log allocation failures could result in a
@@ -222,5 +205,3 @@
 issue, requiring an
 .Xr fsck 8
 to fix.
-.Pp
-If the file system is full or close to full then making a journal can fail.



CVS commit: src/lib/libc/sys

2009-04-10 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Apr 10 22:26:55 UTC 2009

Modified Files:
src/lib/libc/sys: mount.2

Log Message:
softdep is gone


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/sys/mount.2

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/sys/mount.2
diff -u src/lib/libc/sys/mount.2:1.42 src/lib/libc/sys/mount.2:1.43
--- src/lib/libc/sys/mount.2:1.42	Sun Mar 15 08:04:12 2009
+++ src/lib/libc/sys/mount.2	Fri Apr 10 22:26:55 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: mount.2,v 1.42 2009/03/15 08:04:12 joerg Exp $
+.\	$NetBSD: mount.2,v 1.43 2009/04/10 22:26:55 ad Exp $
 .\
 .\ Copyright (c) 1980, 1989, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)mount.2	8.3 (Berkeley) 5/24/95
 .\
-.Dd July 14, 2007
+.Dd April 10, 2009
 .Dt MOUNT 2
 .Os
 .Sh NAME
@@ -112,20 +112,8 @@
 but at a cost of making the filesystem likely to be
 completely unrecoverable should the system crash while
 unwritten data is pending in kernel buffers.
-.It Dv MNT_SOFTDEP
-Use soft dependencies.
-This enhanced system performance in many cases compared
-to a default mount, i.e. one neither
-.Dv MNT_ASYNC
-nor
-.Dv MNT_SYNCHRONOUS ,
-by carefully sequencing meta-data writes to achieve the
-effect achieved by a default mount causing many meta-data
-writes to be synchronous.
 .It Dv MNT_LOG
 Use a filesystem journal.
-This is incompatible with, and overrides,
-.Dv MNT_SOFTDEP .
 .Dv MNT_LOG
 causes a journal (or log) to be created in the
 filesystem, creating a record of meta-data writes to be



CVS commit: src/sys/ddb

2009-04-10 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Apr 10 22:29:30 UTC 2009

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

Log Message:
add boilerplate missed in initial commit


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/ddb/ddb.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/ddb/ddb.h
diff -u src/sys/ddb/ddb.h:1.1 src/sys/ddb/ddb.h:1.2
--- src/sys/ddb/ddb.h:1.1	Sat Mar  7 22:02:17 2009
+++ src/sys/ddb/ddb.h	Fri Apr 10 22:29:30 2009
@@ -1,3 +1,37 @@
+/*	$NetBSD: ddb.h,v 1.2 2009/04/10 22:29:30 ad Exp $	*/
+
+/*-
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Andrew Doran.
+ *
+ * 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.
+ */
+
+#ifndef _DDB_DDB_H_
+#define	_DDB_DDB_H_
+
 #include machine/db_machdep.h		/* type definitions */
 
 #include ddb/db_user.h
@@ -15,3 +49,5 @@
 #include ddb/db_access.h
 #include ddb/db_proc.h
 #include ddb/db_cpu.h
+
+#endif	/* _DDB_DDB_H_ */



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

2009-04-10 Thread Perry E. Metzger
Module Name:src
Committed By:   perry
Date:   Fri Apr 10 23:01:47 UTC 2009

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

Log Message:
add (commented out) options LOCKDEBUG


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/sys/arch/amd64/conf/GENERIC

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

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.239 src/sys/arch/amd64/conf/GENERIC:1.240
--- src/sys/arch/amd64/conf/GENERIC:1.239	Fri Mar  6 09:58:14 2009
+++ src/sys/arch/amd64/conf/GENERIC	Fri Apr 10 23:01:46 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.239 2009/03/06 09:58:14 cegger Exp $
+# $NetBSD: GENERIC,v 1.240 2009/04/10 23:01:46 perry Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.239 $
+#ident 		GENERIC-$Revision: 1.240 $
 
 maxusers	64		# estimated number of users
 
@@ -89,6 +89,7 @@
 # Diagnostic/debugging support options
 #options 	DIAGNOSTIC	# expensive kernel consistency checks
 #options 	DEBUG		# expensive debugging checks/support
+#options 	LOCKDEBUG	# expensive locking checks/support
 #options 	KMEMSTATS	# kernel memory statistics (vmstat -m)
 
 #



CVS commit: src/lib/libc/string

2009-04-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 10 23:13:38 UTC 2009

Modified Files:
src/lib/libc/string: Makefile.inc memchr.3
Added Files:
src/lib/libc/string: memrchr.c

Log Message:
add memrchr


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/lib/libc/string/Makefile.inc
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/string/memchr.3
cvs rdiff -u -r0 -r1.1 src/lib/libc/string/memrchr.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/string/Makefile.inc
diff -u src/lib/libc/string/Makefile.inc:1.69 src/lib/libc/string/Makefile.inc:1.70
--- src/lib/libc/string/Makefile.inc:1.69	Sat Jan 10 21:46:30 2009
+++ src/lib/libc/string/Makefile.inc	Fri Apr 10 19:13:38 2009
@@ -1,5 +1,5 @@
 #	from: @(#)Makefile.inc	8.1 (Berkeley) 6/4/93
-#	$NetBSD: Makefile.inc,v 1.69 2009/01/11 02:46:30 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.70 2009/04/10 23:13:38 christos Exp $
 
 # string sources
 .PATH: ${ARCHDIR}/string ${.CURDIR}/string
@@ -7,7 +7,7 @@
 SRCS+=	bm.c strcasecmp.c strncasecmp.c strcasestr.c strcoll.c strdup.c \
 	strerror.c strlcat.c strlcpy.c strmode.c strsignal.c strtok.c \
 	strtok_r.c strxfrm.c __strsignal.c strerror_r.c strndup.c \
-	stresep.c
+	stresep.c memrchr.c
 
 # wide char
 SRCS+=	wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c \
@@ -69,6 +69,7 @@
 MLINKS+=strcpy.3 strncpy.3
 MLINKS+=strlcpy.3 strlcat.3
 MLINKS+=strstr.3 strcasestr.3
+MLINKS+=memchr.3 memrchr.3
 MLINKS+=strtok.3 strtok_r.3
 MLINKS+=strerror.3 strerror_r.3 strerror.3 perror.3 \
 	strerror.3 sys_errlist.3 strerror.3 sys_nerr.3

Index: src/lib/libc/string/memchr.3
diff -u src/lib/libc/string/memchr.3:1.9 src/lib/libc/string/memchr.3:1.10
--- src/lib/libc/string/memchr.3:1.9	Mon Oct 16 04:48:45 2006
+++ src/lib/libc/string/memchr.3	Fri Apr 10 19:13:38 2009
@@ -30,13 +30,13 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)memchr.3	8.1 (Berkeley) 6/4/93
-.\	$NetBSD: memchr.3,v 1.9 2006/10/16 08:48:45 wiz Exp $
+.\	$NetBSD: memchr.3,v 1.10 2009/04/10 23:13:38 christos Exp $
 .\
-.Dd June 4, 1993
+.Dd April 10, 2009
 .Dt MEMCHR 3
 .Os
 .Sh NAME
-.Nm memchr
+.Nm memchr, memrchr
 .Nd locate byte in byte string
 .Sh LIBRARY
 .Lb libc
@@ -44,6 +44,8 @@
 .In string.h
 .Ft void *
 .Fn memchr const void *b int c size_t len
+.Ft void *
+.Fn memrchr const void *b int c size_t len
 .Sh DESCRIPTION
 The
 .Fn memchr
@@ -53,11 +55,21 @@
 (converted to an unsigned char)
 in string
 .Fa b .
+The
+.Fn memrchr
+function
+locates the last occurrence of
+.Fa c
+(converted to an unsigned char)
+in string
+.Fa b .
 .Sh RETURN VALUES
 The
 .Fn memchr
-function
-returns a pointer to the byte located, or
+and
+.Fn memrchr
+functions
+return a pointer to the byte located, or
 .Dv NULL
 if no such byte exists within
 .Fa len

Added files:

Index: src/lib/libc/string/memrchr.c
diff -u /dev/null src/lib/libc/string/memrchr.c:1.1
--- /dev/null	Fri Apr 10 19:13:38 2009
+++ src/lib/libc/string/memrchr.c	Fri Apr 10 19:13:38 2009
@@ -0,0 +1,61 @@
+/*	$NetBSD: memrchr.c,v 1.1 2009/04/10 23:13:38 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2008 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 

CVS commit: src/lib/libc/sys

2009-04-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 10 23:14:58 UTC 2009

Modified Files:
src/lib/libc/sys: Makefile.inc
Added Files:
src/lib/libc/sys: Lint___sigaction14.c

Log Message:
Add a special lint stub for __sigaction14 which broke when we switched
to sigaction_sigtramp.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/lib/libc/sys/Lint___sigaction14.c
cvs rdiff -u -r1.200 -r1.201 src/lib/libc/sys/Makefile.inc

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/sys/Makefile.inc
diff -u src/lib/libc/sys/Makefile.inc:1.200 src/lib/libc/sys/Makefile.inc:1.201
--- src/lib/libc/sys/Makefile.inc:1.200	Thu Jan 29 03:47:43 2009
+++ src/lib/libc/sys/Makefile.inc	Fri Apr 10 19:14:58 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.200 2009/01/29 08:47:43 martin Exp $
+#	$NetBSD: Makefile.inc,v 1.201 2009/04/10 23:14:58 christos Exp $
 #	@(#)Makefile.inc	8.3 (Berkeley) 10/24/94
 
 # sys sources
@@ -14,9 +14,8 @@
 SRCS+=	cpuset.c
 
 _LSRC+=	Lint___clone.c Lint___vfork14.c Lint_brk.c Lint_clone.c \
-	Lint_getcontext.c \
-	Lint_exect.c Lint_pipe.c Lint_ptrace.c Lint_sbrk.c \
-	Lint_syscall.c Lint___syscall.c \
+	Lint_getcontext.c Lint_exect.c Lint_pipe.c Lint_ptrace.c \
+	Lint_sbrk.c Lint___sigaction14.c Lint_syscall.c Lint___syscall.c \
 	LintSysNormal.c LintSysNoerr.c LintSysPseudoNoerr.c
 
 .if ${MKLINT} != no

Added files:

Index: src/lib/libc/sys/Lint___sigaction14.c
diff -u /dev/null src/lib/libc/sys/Lint___sigaction14.c:1.1
--- /dev/null	Fri Apr 10 19:14:58 2009
+++ src/lib/libc/sys/Lint___sigaction14.c	Fri Apr 10 19:14:58 2009
@@ -0,0 +1,10 @@
+/* $NetBSD: Lint___sigaction14.c,v 1.1 2009/04/10 23:14:58 christos Exp $ */
+
+#include signal.h
+
+/*ARGSUSED*/
+int
+__sigaction14(int sig, const struct sigaction *nact, struct sigaction *oact)
+{
+	return 0;
+}



CVS commit: src/share/man/man8/man8.i386

2009-04-10 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Apr 10 23:22:30 UTC 2009

Modified Files:
src/share/man/man8/man8.i386: pxeboot.8

Log Message:
Drop trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/share/man/man8/man8.i386/pxeboot.8

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/man8/man8.i386/pxeboot.8
diff -u src/share/man/man8/man8.i386/pxeboot.8:1.14 src/share/man/man8/man8.i386/pxeboot.8:1.15
--- src/share/man/man8/man8.i386/pxeboot.8:1.14	Fri Apr 10 21:11:28 2009
+++ src/share/man/man8/man8.i386/pxeboot.8	Fri Apr 10 23:22:30 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: pxeboot.8,v 1.14 2009/04/10 21:11:28 perry Exp $
+.\	$NetBSD: pxeboot.8,v 1.15 2009/04/10 23:22:30 wiz Exp $
 .\
 .\ Copyright (c) 2003
 .\ 	Matthias Drochner.  All rights reserved.
@@ -75,7 +75,7 @@
 by default.
 If the boot config file is not found, or if the supplied file appears
 not to be a boot configuration file, the file is skipped.
-Otherwise it is loaded and obeyed as described in 
+Otherwise it is loaded and obeyed as described in
 .Xr boot.cfg 5 .
 .\ XXX Now, if the boot.cfg is loaded, is DHCP still used to get the
 .\ XXX file name for the kernel? If only the person who had made the
@@ -136,7 +136,7 @@
 .Nm
 stage,
 .Nx
-kernel), and to alter its behaviour. 
+kernel), and to alter its behaviour.
 For example, this can be used to support alternative
 .Nx
 installations on one machine.



CVS commit: src/share/man/man9

2009-04-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Apr 10 23:30:58 UTC 2009

Modified Files:
src/share/man/man9: byteorder.9

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/byteorder.9

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/man9/byteorder.9
diff -u src/share/man/man9/byteorder.9:1.2 src/share/man/man9/byteorder.9:1.3
--- src/share/man/man9/byteorder.9:1.2	Wed Apr  1 08:55:45 2009
+++ src/share/man/man9/byteorder.9	Fri Apr 10 23:30:57 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: byteorder.9,v 1.2 2009/04/01 08:55:45 wiz Exp $
+.\	$NetBSD: byteorder.9,v 1.3 2009/04/10 23:30:57 tsutsui Exp $
 .\
 .\ Copyright (c) 2002 Mike Barcroft m...@freebsd.org
 .\ All rights reserved.
@@ -26,7 +26,7 @@
 .\
 .\ $FreeBSD: src/share/man/man9/byteorder.9,v 1.6 2003/05/21 17:32:55 ru Exp $
 .\
-.Dd March 31, 2009
+.Dd April 10, 2009
 .Dt BYTEORDER 9
 .Os
 .Sh NAME
@@ -182,7 +182,7 @@
 The
 .Fn hto*
 and
-.Fn toh*
+.Fn *toh
 functions first appeared in
 .Nx 1.5 .
 These functions were introduced to handle PCI bus master devices which assumed



CVS commit: src/sys/fs/tmpfs

2009-04-10 Thread Perry E. Metzger
Module Name:src
Committed By:   perry
Date:   Sat Apr 11 00:21:57 UTC 2009

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

Log Message:
SAVENAME was not set for rename and delete as required

Patch from christos, fixes pr 41183


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 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.56 src/sys/fs/tmpfs/tmpfs_vnops.c:1.57
--- src/sys/fs/tmpfs/tmpfs_vnops.c:1.56	Sun Apr  5 15:10:41 2009
+++ src/sys/fs/tmpfs/tmpfs_vnops.c	Sat Apr 11 00:21:57 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_vnops.c,v 1.56 2009/04/05 15:10:41 pooka Exp $	*/
+/*	$NetBSD: tmpfs_vnops.c,v 1.57 2009/04/11 00:21:57 perry Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.56 2009/04/05 15:10:41 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.57 2009/04/11 00:21:57 perry Exp $);
 
 #include sys/param.h
 #include sys/dirent.h
@@ -219,6 +219,7 @@
 error = VOP_ACCESS(dvp, VWRITE, cnp-cn_cred);
 if (error != 0)
 	goto out;
+cnp-cn_flags |= SAVENAME;
 			} else
 de = NULL;