CVS commit: src/distrib/notes/common

2009-09-19 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Sep 19 06:18:02 UTC 2009

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

Log Message:
Update core group membership.


To generate a diff of this commit:
cvs rdiff -u -r1.449 -r1.450 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.449 src/distrib/notes/common/main:1.450
--- src/distrib/notes/common/main:1.449	Wed Jun 24 12:15:43 2009
+++ src/distrib/notes/common/main	Sat Sep 19 06:18:01 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.449 2009/06/24 12:15:43 mbalmer Exp $
+.\	$NetBSD: main,v 1.450 2009/09/19 06:18:01 snj Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1025,7 +1025,7 @@
 .It Em The NetBSD core group:
 .It Ta Ta
 .It Ta Alistair Crooks Ta Mt a...@netbsd.org
-.It Ta Quentin Garnier Ta Mt c...@netbsd.org
+.It Ta Mattew Green Ta Mt m...@netbsd.org
 .It Ta Matt Thomas Ta Mt m...@netbsd.org
 .It Ta YAMAMOTO Takashi Ta Mt y...@netbsd.org
 .It Ta Christos Zoulas Ta Mt chris...@netbsd.org



CVS commit: src/share/man/man7

2009-09-19 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Sep 19 07:06:55 UTC 2009

Modified Files:
src/share/man/man7: release.7

Log Message:
Sync with reality.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man7/release.7

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/man7/release.7
diff -u src/share/man/man7/release.7:1.30 src/share/man/man7/release.7:1.31
--- src/share/man/man7/release.7:1.30	Tue Sep 15 01:20:42 2009
+++ src/share/man/man7/release.7	Sat Sep 19 07:06:55 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: release.7,v 1.30 2009/09/15 01:20:42 jnemeth Exp $
+.\	$NetBSD: release.7,v 1.31 2009/09/19 07:06:55 snj Exp $
 .\
 .\ Copyright (c) 1997, 2000, 2005 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -27,7 +27,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd September 14, 2009
+.Dd September 19, 2009
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -45,7 +45,7 @@
 .It Aq Em machine
 The platform for which the release was built, corresponding to the
 .Em hw.machine
-sysctl variable, e.g.
+sysctl variable, e.g.,
 .Em i386
 or
 .Em amiga .
@@ -53,12 +53,12 @@
 The architecture for which a particular installation set was built,
 corresponding to the
 .Em hw.machine_arch
-sysctl variable, e.g.
+sysctl variable, e.g.,
 .Em i386
 or
 .Em m68k .
 .It Aq Em rel
-The target release.
+The release version number.
 .El
 .Pp
 All
@@ -70,42 +70,25 @@
 .Sy README
 file at the top-level,
 describing who built the snapshot and under what circumstances
-.Po e.g. whether it's an official
+.Po e.g., whether it's an official
 .Nx
 snapshot, or not
 .Pc .
 .Pp
 All
-.Sy BSDSUM
-files are historic
-.Bx
-checksums for the various files in that directory,
-in the format produced by the command:
-.Sy cksum -o 1 Aq Sy file .
-.Pp
-All
-.Sy CKSUM
-files are POSIX checksums for the various files in that directory, in the
-format produced by the command:
-.Sy cksum Aq Sy file .
-.Pp
-All
 .Sy MD5
 files are MD5 digests for the various files in that directory, in the
 format produced by the command:
 .Sy cksum -m Aq Sy file .
 .Pp
 All
-.Sy SYSVSUM
-files are historic
-.At V
-checksums for the various files in
-that directory, in the format produced by the command:
-.Sy cksum -o 2 Aq Sy file .
-.Pp
-The MD5 digest is the safest checksum, followed by the POSIX checksum.
-The other two checksums are provided only to ensure that the widest possible
-range of system can check the integrity of the release files.
+.Sy SHA512
+files are SHA512 digests for the various files in that directory, in the
+format produced by the command:
+.Sy cksum -a SHA512 Aq Sy file .
+.Pp
+The SHA512 digest is safer, but MD5 checksums are provided so that a wider
+range of operating systems can check the integrity of the release files.
 .Pp
 Files that end in
 .Sy .tgz
@@ -125,9 +108,6 @@
 include the leading
 .Dq / .
 .Pp
-All compression of release files is to be performed with the command:
-.Sy gzip -9 .
-.Pp
 The root of the release hierarchy may be the root directory of a
 CD-ROM, but in all other cases it should be
 .Sm off
@@ -142,12 +122,6 @@
 files and subdirectories:
 .Pp
 .Bl -tag -width \*[Lt]machine\*[Gt]
-.It Sy SOURCE_DATE
-A file containing the date, in UTC, of the source code from which the
-release or snapshot was built, in the default format produced by the
-command:
-.Sy date -u .
-.
 .It Sy iso/
 CDROM images in ISO 9660 format, usually created with
 .Dq ./build.sh ... iso-image ...
@@ -172,9 +146,9 @@
 .Sy /installation/cdrom/
 .Xc
 .Sm on
-directory, should contain file systems that
+directory, contain file systems that
 have an internal layout that corresponds to
-a complete release for one or more machine types.
+a complete release for a given machine type.
 If built with
 .Dq iso-image-source ,
 then it will also contain a
@@ -182,12 +156,9 @@
 directory.
 These images are usually bootable.
 .Bl -tag -width \*[Lt]machine_arch\*[Gt]cd.iso
-.It Sy BSDSUM
-.It Sy CKSUM
 .It Sy MD5
-.It Sy README
-.It Sy SYSVSUM
-.It Ao Em machine_arch Ac Ns Sy cd.iso
+.It Sy SHA512
+.It Ao Em machine Ac Ns Sy cd.iso
 .El
 .
 .It Sy shared/
@@ -219,55 +190,26 @@
 .El
 .
 .It Sy source/
-Source codes of the operating system and patches for it
-should be put into
+Source code of the operating system should be put into
 .Sy .../NetBSD- Ns Ao Em rel Ac Ns Sy /source/
 using the following layout:
 .Pp
-.Bl -tag -width patches/
-.It Sy patches/
-This directory contains various patch files appropriate for
-.Xr patch 1 .
-Other patches may exist for fixing critical problems.
-.Bl -tag -width sharesrc.tgz
-.It Sy BSDSUM
-.It Sy CKSUM
-.It Sy MD5
-.It Sy README
-.It Sy SYSVSUM
-.It Sy diff- Ns Ao Em lastrel Ac Ns Sy - Ns Ao Em rel Ac Ns Sy .gz
-Diff against the last release, usually generated by
-.Ic cvs rdiff .
-For patch releases, diffs against the last 

CVS commit: src/sys/dev/sun

2009-09-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Sep 19 07:07:43 UTC 2009

Modified Files:
src/sys/dev/sun: bwtwo.c cgsix.c cgthree.c

Log Message:
Include ioconf.h instead of extern struct cfdriver foo_cd decls.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/sun/bwtwo.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/sun/cgsix.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/sun/cgthree.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/sun/bwtwo.c
diff -u src/sys/dev/sun/bwtwo.c:1.27 src/sys/dev/sun/bwtwo.c:1.28
--- src/sys/dev/sun/bwtwo.c:1.27	Sat Sep 19 04:52:44 2009
+++ src/sys/dev/sun/bwtwo.c	Sat Sep 19 07:07:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bwtwo.c,v 1.27 2009/09/19 04:52:44 tsutsui Exp $ */
+/*	$NetBSD: bwtwo.c,v 1.28 2009/09/19 07:07:42 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bwtwo.c,v 1.27 2009/09/19 04:52:44 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: bwtwo.c,v 1.28 2009/09/19 07:07:42 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -109,7 +109,7 @@
 #include opt_wsemul.h
 #endif
 
-extern struct cfdriver bwtwo_cd;
+#include ioconf.h
 
 dev_type_open(bwtwoopen);
 dev_type_ioctl(bwtwoioctl);

Index: src/sys/dev/sun/cgsix.c
diff -u src/sys/dev/sun/cgsix.c:1.45 src/sys/dev/sun/cgsix.c:1.46
--- src/sys/dev/sun/cgsix.c:1.45	Thu Aug 20 02:49:30 2009
+++ src/sys/dev/sun/cgsix.c	Sat Sep 19 07:07:43 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgsix.c,v 1.45 2009/08/20 02:49:30 macallan Exp $ */
+/*	$NetBSD: cgsix.c,v 1.46 2009/09/19 07:07:43 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.45 2009/08/20 02:49:30 macallan Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgsix.c,v 1.46 2009/09/19 07:07:43 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -116,11 +116,11 @@
 #include dev/sun/cgsixreg.h
 #include dev/sun/cgsixvar.h
 
+#include ioconf.h
+
 static void	cg6_unblank(device_t);
 static void	cg6_blank(struct cgsix_softc *, int);
 
-extern struct cfdriver cgsix_cd;
-
 dev_type_open(cgsixopen);
 dev_type_close(cgsixclose);
 dev_type_ioctl(cgsixioctl);

Index: src/sys/dev/sun/cgthree.c
diff -u src/sys/dev/sun/cgthree.c:1.24 src/sys/dev/sun/cgthree.c:1.25
--- src/sys/dev/sun/cgthree.c:1.24	Fri Sep 18 16:43:19 2009
+++ src/sys/dev/sun/cgthree.c	Sat Sep 19 07:07:43 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cgthree.c,v 1.24 2009/09/18 16:43:19 tsutsui Exp $ */
+/*	$NetBSD: cgthree.c,v 1.25 2009/09/19 07:07:43 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cgthree.c,v 1.24 2009/09/18 16:43:19 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: cgthree.c,v 1.25 2009/09/19 07:07:43 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -69,13 +69,13 @@
 #include opt_wsemul.h
 #endif
 
+#include ioconf.h
+
 static void	cgthreeunblank(device_t);
 static void	cgthreeloadcmap(struct cgthree_softc *, int, int);
 static void	cgthree_set_video(struct cgthree_softc *, int);
 static int	cgthree_get_video(struct cgthree_softc *);
 
-extern struct cfdriver cgthree_cd;
-
 dev_type_open(cgthreeopen);
 dev_type_ioctl(cgthreeioctl);
 dev_type_mmap(cgthreemmap);



CVS commit: src/distrib

2009-09-19 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Sep 19 07:09:54 UTC 2009

Modified Files:
src/distrib/cdrom: hide-hfs.lst
src/distrib/mac68k/stand: Makefile
src/distrib/notes/common: main
src/distrib/sets: Makefile makesrctars makesums

Log Message:
Only generate SHA512 and MD5 checksums for releases.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/cdrom/hide-hfs.lst
cvs rdiff -u -r1.5 -r1.6 src/distrib/mac68k/stand/Makefile
cvs rdiff -u -r1.450 -r1.451 src/distrib/notes/common/main
cvs rdiff -u -r1.69 -r1.70 src/distrib/sets/Makefile
cvs rdiff -u -r1.36 -r1.37 src/distrib/sets/makesrctars
cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/makesums

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

Modified files:

Index: src/distrib/cdrom/hide-hfs.lst
diff -u src/distrib/cdrom/hide-hfs.lst:1.4 src/distrib/cdrom/hide-hfs.lst:1.5
--- src/distrib/cdrom/hide-hfs.lst:1.4	Thu Nov 30 05:14:01 2000
+++ src/distrib/cdrom/hide-hfs.lst	Sat Sep 19 07:09:53 2009
@@ -1,7 +1,5 @@
-BSDSUM
-CKSUM
 MD5
-SYSVSUM
+SHA512
 TRANS.TBL
 INSTALL.more
 ./boot

Index: src/distrib/mac68k/stand/Makefile
diff -u src/distrib/mac68k/stand/Makefile:1.5 src/distrib/mac68k/stand/Makefile:1.6
--- src/distrib/mac68k/stand/Makefile:1.5	Mon Jun 23 02:16:53 2008
+++ src/distrib/mac68k/stand/Makefile	Sat Sep 19 07:09:53 2009
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.5 2008/06/23 02:16:53 matt Exp $
+#   $NetBSD: Makefile,v 1.6 2009/09/19 07:09:53 snj Exp $
 #
 
 .include bsd.own.mk
@@ -18,7 +18,7 @@
 	${RELEASE_INSTALL} ${DISTRIBDIR}/mac68k/stand/extensions.map \
 	  ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc
 	rm -f \
-	  ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/{BSDSUM,CKSUM,MD5,SYSVSUM}
+	  ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/{MD5,SHA512}
 	for i in BSD_Mac68k_Booter.bin Mkfs.sea.hqx Booter-HTML-manual-12.tar \
 	  Mkfs_1.47.sea.bin Mkfs_1.47.sea.hqx Booter2.0.0.sea \
 	  BooterManual.stxt.bin NetBSD_ROM.sit.hqx Installer.sea.hqx \
@@ -31,31 +31,22 @@
 	do \
 	  ${RELEASE_INSTALL} $$i ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
 	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
-	${TOOL_CKSUM} -o1 `basename $$i`  BSDSUM) ; \
-	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
-	${TOOL_CKSUM} `basename $$i`  CKSUM) ; \
-	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
 	${TOOL_CKSUM} -a MD5 `basename $$i`  MD5) ; \
 	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc ; \
-	${TOOL_CKSUM} -o2 `basename $$i`  SYSVSUM) ; \
+	${TOOL_CKSUM} -a SHA512 `basename $$i`  SHA512) ; \
 	done
 	${INSTALL} -d ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src
 	rm -f \
-	  ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/{BSDSUM,CKSUM,MD5}
-	rm -f ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/SYSVSUM
+	  ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src/{MD5,SHA512}
 	for i in Booter2.0.0-src.sea Mkfs_1.47src.sea.hqx \
 	  Installer_1.1g.src.sea.hqx Installer_1.1h.src.sea.hqx ; \
 	do \
 	  ${RELEASE_INSTALL} $$i \
 	${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
 	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
-	${TOOL_CKSUM} -o1 `basename $$i`  BSDSUM) ; \
-	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
-	${TOOL_CKSUM} `basename $$i`  CKSUM) ; \
-	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
 	${TOOL_CKSUM} -a MD5 `basename $$i`  MD5) ; \
 	  (cd ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc/src ; \
-	${TOOL_CKSUM} -o2 `basename $$i`  SYSVSUM) ; \
+	${TOOL_CKSUM} -a SHA512 `basename $$i`  SHA512) ; \
 	done
 
 .include bsd.files.mk

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.450 src/distrib/notes/common/main:1.451
--- src/distrib/notes/common/main:1.450	Sat Sep 19 06:18:01 2009
+++ src/distrib/notes/common/main	Sat Sep 19 07:09:53 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.450 2009/09/19 06:18:01 snj Exp $
+.\	$NetBSD: main,v 1.451 2009/09/19 07:09:53 snj Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -600,46 +600,21 @@
 .Pp
 In each of the source distribution set directories, there are
 files which contain the checksums of the files in the directory:
-.(tag SYSVSUM -offset indent
-.It Li BSDSUM
-Historic
-.Bx
-checksums for the various files
-in that directory, in the format produced by the command:
-.br
-.Ic cksum -o 1 Ar file .
-.It Li CKSUM
-.Tn POSIX
-checksums for the various files in that
-directory, in the format produced by the command:
-.br
-.Ic cksum Ar file .
+.(tag SHA512 -offset indent
 .It Li MD5
 .Tn MD5
-digests for the various files in that
-directory, in the format produced by the command:
+digests in the format produced by the command:
 .br
 .Ic cksum -a MD5 

CVS commit: src/distrib/notes/common

2009-09-19 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Sep 19 08:05:24 UTC 2009

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

Log Message:
Fix typo in name.


To generate a diff of this commit:
cvs rdiff -u -r1.451 -r1.452 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.451 src/distrib/notes/common/main:1.452
--- src/distrib/notes/common/main:1.451	Sat Sep 19 07:09:53 2009
+++ src/distrib/notes/common/main	Sat Sep 19 08:05:24 2009
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.451 2009/09/19 07:09:53 snj Exp $
+.\	$NetBSD: main,v 1.452 2009/09/19 08:05:24 tron Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -1000,7 +1000,7 @@
 .It Em The NetBSD core group:
 .It Ta Ta
 .It Ta Alistair Crooks Ta Mt a...@netbsd.org
-.It Ta Mattew Green Ta Mt m...@netbsd.org
+.It Ta Matthew Green Ta Mt m...@netbsd.org
 .It Ta Matt Thomas Ta Mt m...@netbsd.org
 .It Ta YAMAMOTO Takashi Ta Mt y...@netbsd.org
 .It Ta Christos Zoulas Ta Mt chris...@netbsd.org



CVS commit: src/share/mk

2009-09-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 19 09:00:58 UTC 2009

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

Log Message:
Switch sparc and sparc64 to binutils 2.19.

Thanks to martin@ for testing.


To generate a diff of this commit:
cvs rdiff -u -r1.576 -r1.577 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.576 src/share/mk/bsd.own.mk:1.577
--- src/share/mk/bsd.own.mk:1.576	Thu Sep 17 18:21:38 2009
+++ src/share/mk/bsd.own.mk	Sat Sep 19 09:00:58 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.576 2009/09/17 18:21:38 skrll Exp $
+#	$NetBSD: bsd.own.mk,v 1.577 2009/09/19 09:00:58 skrll Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -52,7 +52,9 @@
 .if \
 ${MACHINE_ARCH} == alpha || \
 ${MACHINE_ARCH} == hppa || \
-${MACHINE_ARCH} == i386
+${MACHINE_ARCH} == i386 || \
+${MACHINE_ARCH} == sparc || \
+${MACHINE_ARCH} == sparc64
 HAVE_BINUTILS?=	219
 .else
 HAVE_BINUTILS?=	216



CVS commit: src/sys/net

2009-09-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 19 11:02:07 UTC 2009

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

Log Message:
Initialise index_gen_mtx before use.


To generate a diff of this commit:
cvs rdiff -u -r1.237 -r1.238 src/sys/net/if.c

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

Modified files:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.237 src/sys/net/if.c:1.238
--- src/sys/net/if.c:1.237	Wed Sep 16 15:23:04 2009
+++ src/sys/net/if.c	Sat Sep 19 11:02:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.237 2009/09/16 15:23:04 pooka Exp $	*/
+/*	$NetBSD: if.c,v 1.238 2009/09/19 11:02:07 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.237 2009/09/16 15:23:04 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.238 2009/09/19 11:02:07 skrll Exp $);
 
 #include opt_inet.h
 
@@ -193,7 +193,6 @@
 			 IPV6CTL_IFQ, ip6intrq);}
 #endif /* INET6 */
 
-	mutex_init(index_gen_mtx, MUTEX_DEFAULT, IPL_NONE);
 	callout_init(if_slowtimo_ch, 0);
 	if_slowtimo(NULL);
 }
@@ -206,6 +205,8 @@
 ifinit1(void)
 {
 
+	mutex_init(index_gen_mtx, MUTEX_DEFAULT, IPL_NONE);
+
 #ifdef PFIL_HOOKS
 	if_pfil.ph_type = PFIL_TYPE_IFNET;
 	if_pfil.ph_ifnet = NULL;



CVS commit: src/sys/fs/puffs

2009-09-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Sep 19 11:44:19 UTC 2009

Modified Files:
src/sys/fs/puffs: puffs_vnops.c

Log Message:
Set SAVENAME for rmdir and remove.

Addresses an easy part of PR kern/38188


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/fs/puffs/puffs_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/puffs/puffs_vnops.c
diff -u src/sys/fs/puffs/puffs_vnops.c:1.132 src/sys/fs/puffs/puffs_vnops.c:1.133
--- src/sys/fs/puffs/puffs_vnops.c:1.132	Sat Sep 12 18:17:55 2009
+++ src/sys/fs/puffs/puffs_vnops.c	Sat Sep 19 11:44:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs_vnops.c,v 1.132 2009/09/12 18:17:55 tsutsui Exp $	*/
+/*	$NetBSD: puffs_vnops.c,v 1.133 2009/09/19 11:44:19 pooka Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.132 2009/09/12 18:17:55 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.133 2009/09/19 11:44:19 pooka Exp $);
 
 #include sys/param.h
 #include sys/buf.h
@@ -581,6 +581,13 @@
 		cnp-cn_consume = MIN(lookup_msg-pvnr_cn.pkcn_consume,
 		strlen(cnp-cn_nameptr) - cnp-cn_namelen);
 
+	/*
+	 * We need the name in remove and rmdir (well, rename too, but
+	 * SAVESTART takes care of that)
+	 */
+	if (cnp-cn_nameiop == DELETE)
+		cnp-cn_flags |= SAVENAME;
+
  out:
 	if (cnp-cn_flags  ISDOTDOT)
 		vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY);
@@ -1439,6 +1446,8 @@
 	RELEPN_AND_VP(vp, pn);
 
 	error = checkerr(pmp, error, __func__);
+	if (error || (cnp-cn_flags  SAVESTART) == 0)
+		PNBUF_PUT(cnp-cn_pnbuf);
 	return error;
 }
 
@@ -1544,6 +1553,9 @@
 	RELEPN_AND_VP(dvp, dpn);
 	RELEPN_AND_VP(vp, pn);
 
+	if (error || (cnp-cn_flags  SAVESTART) == 0)
+		PNBUF_PUT(cnp-cn_pnbuf);
+
 	return error;
 }
 



CVS commit: src/sys/dev/sbus

2009-09-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Sep 19 11:55:10 UTC 2009

Modified Files:
src/sys/dev/sbus: zx.c zxvar.h

Log Message:
u_intNN_t - uintNN_t


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/sbus/zx.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sbus/zxvar.h

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

Modified files:

Index: src/sys/dev/sbus/zx.c
diff -u src/sys/dev/sbus/zx.c:1.32 src/sys/dev/sbus/zx.c:1.33
--- src/sys/dev/sbus/zx.c:1.32	Thu Sep 17 16:39:48 2009
+++ src/sys/dev/sbus/zx.c	Sat Sep 19 11:55:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: zx.c,v 1.32 2009/09/17 16:39:48 tsutsui Exp $	*/
+/*	$NetBSD: zx.c,v 1.33 2009/09/19 11:55:09 tsutsui Exp $	*/
 
 /*
  *  Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: zx.c,v 1.32 2009/09/17 16:39:48 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: zx.c,v 1.33 2009/09/19 11:55:09 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -235,7 +235,7 @@
 		return;
 	}
 	fb-fb_pixels = (void *)bus_space_vaddr(bt, bh);
-	sc-sc_pixels = (u_int32_t *)fb-fb_pixels;
+	sc-sc_pixels = (uint32_t *)fb-fb_pixels;
 
 	if (sbus_bus_map(bt, sa-sa_slot, sa-sa_offset + ZX_OFF_LC_SS0_USR,
 	PAGE_SIZE, BUS_SPACE_MAP_LINEAR, bh) != 0) {
@@ -766,7 +766,7 @@
 static void
 zx_cursor_color(struct zx_softc *sc)
 {
-	u_int8_t tmp;
+	uint8_t tmp;
 
 	bus_space_write_4(sc-sc_bt, sc-sc_bhzcu, zcu_type, 0x50);
 
@@ -991,8 +991,8 @@
 	struct vcons_screen *scr = ri-ri_hw;
 	struct zx_softc *sc = scr-scr_cookie;
 	struct wsdisplay_font *font;
-	volatile u_int32_t *dp;
-	u_int8_t *fb;
+	volatile uint32_t *dp;
+	uint8_t *fb;
 	int fs, i, ul;
 	uint32_t fg, bg;
 	
@@ -1011,10 +1011,10 @@
 
 	font = ri-ri_font;
 
-	dp = (volatile u_int32_t *)sc-sc_pixels +
+	dp = (volatile uint32_t *)sc-sc_pixels +
 	((row * font-fontheight + ri-ri_yorigin)  11) +
 	(col * font-fontwidth + ri-ri_xorigin);
-	fb = (u_int8_t *)font-data + (uc - font-firstchar) *
+	fb = (uint8_t *)font-data + (uc - font-firstchar) *
 	ri-ri_fontscale;
 	fs = font-stride;
 
@@ -1035,7 +1035,7 @@
 		}
 	} else {
 		for (i = font-fontheight; i != 0; i--, dp += 2048) {
-			*dp = *((u_int16_t *)fb)  16;
+			*dp = *((uint16_t *)fb)  16;
 			fb += fs;
 		}
 	}

Index: src/sys/dev/sbus/zxvar.h
diff -u src/sys/dev/sbus/zxvar.h:1.5 src/sys/dev/sbus/zxvar.h:1.6
--- src/sys/dev/sbus/zxvar.h:1.5	Thu Sep 17 16:28:13 2009
+++ src/sys/dev/sbus/zxvar.h	Sat Sep 19 11:55:09 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: zxvar.h,v 1.5 2009/09/17 16:28:13 tsutsui Exp $	*/
+/*	$NetBSD: zxvar.h,v 1.6 2009/09/19 11:55:09 tsutsui Exp $	*/
 
 /*
  *  Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -90,8 +90,8 @@
 	bus_space_handle_t sc_bhzcu;
 
 	int		sc_flags;
-	u_int8_t	*sc_cmap;
-	u_int32_t	*sc_pixels;
+	uint8_t		*sc_cmap;
+	uint32_t	*sc_pixels;
 	bus_addr_t	sc_paddr;
 	int		sc_shiftx;
 	int		sc_shifty;
@@ -99,8 +99,8 @@
 	struct fbcurpos	sc_curpos;
 	struct fbcurpos	sc_curhot;
 	struct fbcurpos sc_cursize;
-	u_int8_t	sc_curcmap[8];
-	u_int32_t	sc_curbits[2][32];
+	uint8_t		sc_curcmap[8];
+	uint32_t	sc_curbits[2][32];
 
 #if NWSDISPLAY  0	
 	uint32_t sc_width;



CVS commit: src/sys/dev/sbus

2009-09-19 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Sep 19 11:58:06 UTC 2009

Modified Files:
src/sys/dev/sbus: p9100.c spif.c stp4020.c

Log Message:
u_intNN_t - uintNN_t


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/sbus/p9100.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/sbus/spif.c
cvs rdiff -u -r1.63 -r1.64 src/sys/dev/sbus/stp4020.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/sbus/p9100.c
diff -u src/sys/dev/sbus/p9100.c:1.49 src/sys/dev/sbus/p9100.c:1.50
--- src/sys/dev/sbus/p9100.c:1.49	Thu Sep 17 16:39:48 2009
+++ src/sys/dev/sbus/p9100.c	Sat Sep 19 11:58:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: p9100.c,v 1.49 2009/09/17 16:39:48 tsutsui Exp $ */
+/*	$NetBSD: p9100.c,v 1.50 2009/09/19 11:58:06 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: p9100.c,v 1.49 2009/09/17 16:39:48 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: p9100.c,v 1.50 2009/09/19 11:58:06 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -904,7 +904,7 @@
 static void
 p9100_set_video(struct p9100_softc *sc, int enable)
 {
-	u_int32_t v = p9100_ctl_read_4(sc, SCRN_RPNT_CTL_1);
+	uint32_t v = p9100_ctl_read_4(sc, SCRN_RPNT_CTL_1);
 
 	if (enable)
 		v |= VIDEO_ENABLED;

Index: src/sys/dev/sbus/spif.c
diff -u src/sys/dev/sbus/spif.c:1.24 src/sys/dev/sbus/spif.c:1.25
--- src/sys/dev/sbus/spif.c:1.24	Thu Sep 17 16:39:48 2009
+++ src/sys/dev/sbus/spif.c	Sat Sep 19 11:58:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: spif.c,v 1.24 2009/09/17 16:39:48 tsutsui Exp $	*/
+/*	$NetBSD: spif.c,v 1.25 2009/09/19 11:58:06 tsutsui Exp $	*/
 /*	$OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $	*/
 
 /*
@@ -41,7 +41,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: spif.c,v 1.24 2009/09/17 16:39:48 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: spif.c,v 1.25 2009/09/19 11:58:06 tsutsui Exp $);
 
 #include spif.h
 #if NSPIF  0
@@ -539,7 +539,7 @@
 		  SPIF_CARD(tp-t_dev));
 	struct stty_port *sp = st-sc_port[SPIF_PORT(tp-t_dev)];
 	struct spif_softc *sc = sp-sp_sc;
-	u_int8_t rbprl, rbprh, tbprl, tbprh;
+	uint8_t rbprl, rbprh, tbprl, tbprh;
 	int s, opt;
 
 	if (t-c_ospeed 
@@ -714,7 +714,7 @@
 spif_stcintr_rxexception(struct spif_softc *sc, int *needsoftp)
 {
 	struct stty_port *sp;
-	u_int8_t channel, *ptr;
+	uint8_t channel, *ptr;
 
 	channel = CD180_GSCR_CHANNEL(STC_READ(sc, STC_GSCR1));
 	sp = sc-sc_ttys-sc_port[channel];
@@ -739,7 +739,7 @@
 spif_stcintr_rx(struct spif_softc *sc, int *needsoftp)
 {
 	struct stty_port *sp;
-	u_int8_t channel, *ptr, cnt, rcsr;
+	uint8_t channel, *ptr, cnt, rcsr;
 	int i;
 
 	channel = CD180_GSCR_CHANNEL(STC_READ(sc, STC_GSCR1));
@@ -772,7 +772,7 @@
 spif_stcintr_tx(struct spif_softc *sc, int *needsoftp)
 {
 	struct stty_port *sp;
-	u_int8_t channel, ch;
+	uint8_t channel, ch;
 	int cnt = 0;
 
 	channel = CD180_GSCR_CHANNEL(STC_READ(sc, STC_GSCR1));
@@ -823,7 +823,7 @@
 spif_stcintr_mx(struct spif_softc *sc, int *needsoftp)
 {
 	struct stty_port *sp;
-	u_int8_t channel, mcr;
+	uint8_t channel, mcr;
 
 	channel = CD180_GSCR_CHANNEL(STC_READ(sc, STC_GSCR1));
 	sp = sc-sc_ttys-sc_port[channel];
@@ -842,7 +842,7 @@
 {
 	struct spif_softc *sc = (struct spif_softc *)vsc;
 	int needsoft = 0, r = 0, i;
-	u_int8_t ar;
+	uint8_t ar;
 
 	for (i = 0; i  8; i++) {
 		ar = ISTC_READ(sc, STC_RRAR)  CD180_GSVR_IMASK;
@@ -875,7 +875,7 @@
 	struct spif_softc *sc = (struct spif_softc *)vsc;
 	struct stty_softc *stc = sc-sc_ttys;
 	int r = 0, i, data, s, flags;
-	u_int8_t stat, msvr;
+	uint8_t stat, msvr;
 	struct stty_port *sp;
 	struct tty *tp;
 
@@ -940,7 +940,7 @@
 }
 
 void
-stty_write_ccr(struct spif_softc *sc, u_int8_t val)
+stty_write_ccr(struct spif_softc *sc, uint8_t val)
 {
 	int tries = 10;
 
@@ -952,9 +952,9 @@
 }
 
 int
-stty_compute_baud(speed_t speed, int clock, u_int8_t *bprlp, u_int8_t *bprhp)
+stty_compute_baud(speed_t speed, int clock, uint8_t *bprlp, uint8_t *bprhp)
 {
-	u_int32_t rate;
+	uint32_t rate;
 
 	rate = (2 * clock) / (16 * speed);
 	if (rate  1)

Index: src/sys/dev/sbus/stp4020.c
diff -u src/sys/dev/sbus/stp4020.c:1.63 src/sys/dev/sbus/stp4020.c:1.64
--- src/sys/dev/sbus/stp4020.c:1.63	Fri Sep 18 12:23:16 2009
+++ src/sys/dev/sbus/stp4020.c	Sat Sep 19 11:58:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: stp4020.c,v 1.63 2009/09/18 12:23:16 tsutsui Exp $ */
+/*	$NetBSD: stp4020.c,v 1.64 2009/09/19 11:58:06 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: stp4020.c,v 1.63 2009/09/18 12:23:16 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: stp4020.c,v 1.64 2009/09/19 11:58:06 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -241,62 +241,62 @@
 
 #ifndef SUN4U	/* XXX - move to SBUS machdep function? */
 
-static	u_int16_t 

CVS commit: src/sys/netinet6

2009-09-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 19 13:11:02 UTC 2009

Modified Files:
src/sys/netinet6: in6.c in6_ifattach.c in6_ifattach.h

Log Message:
backout the changes that establish a workqueue to synchronize the addresses
for arg and gre because they cause a race condition by calling ioctl() during
interface initialization. To make this work correctly we would need to
synchronize all interface init routines.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/sys/netinet6/in6.c
cvs rdiff -u -r1.84 -r1.85 src/sys/netinet6/in6_ifattach.c
cvs rdiff -u -r1.12 -r1.13 src/sys/netinet6/in6_ifattach.h

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

Modified files:

Index: src/sys/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.153 src/sys/netinet6/in6.c:1.154
--- src/sys/netinet6/in6.c:1.153	Fri Sep 11 18:06:29 2009
+++ src/sys/netinet6/in6.c	Sat Sep 19 09:11:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.153 2009/09/11 22:06:29 dyoung Exp $	*/
+/*	$NetBSD: in6.c,v 1.154 2009/09/19 13:11:02 christos Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.153 2009/09/11 22:06:29 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.154 2009/09/19 13:11:02 christos Exp $);
 
 #include opt_inet.h
 #include opt_pfil_hooks.h
@@ -76,7 +76,6 @@
 #include sys/socketvar.h
 #include sys/sockio.h
 #include sys/systm.h
-#include sys/once.h
 #include sys/proc.h
 #include sys/time.h
 #include sys/kernel.h
@@ -2239,11 +2238,8 @@
 void *
 in6_domifattach(struct ifnet *ifp)
 {
-	static ONCE_DECL(ifwqest);
 	struct in6_ifextra *ext;
 
-	RUN_ONCE(ifwqest, in6_ifaddrs_wq_establish);
-
 	ext = malloc(sizeof(*ext), M_IFADDR, M_WAITOK|M_ZERO);
 
 	ext-in6_ifstat = malloc(sizeof(struct in6_ifstat),

Index: src/sys/netinet6/in6_ifattach.c
diff -u src/sys/netinet6/in6_ifattach.c:1.84 src/sys/netinet6/in6_ifattach.c:1.85
--- src/sys/netinet6/in6_ifattach.c:1.84	Thu Aug 13 05:04:03 2009
+++ src/sys/netinet6/in6_ifattach.c	Sat Sep 19 09:11:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_ifattach.c,v 1.84 2009/08/13 09:04:03 cegger Exp $	*/
+/*	$NetBSD: in6_ifattach.c,v 1.85 2009/09/19 13:11:02 christos Exp $	*/
 /*	$KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.84 2009/08/13 09:04:03 cegger Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6_ifattach.c,v 1.85 2009/09/19 13:11:02 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -43,7 +43,6 @@
 #include sys/syslog.h
 #include sys/md5.h
 #include sys/socketvar.h
-#include sys/workqueue.h
 
 #include net/if.h
 #include net/if_dl.h
@@ -62,41 +61,12 @@
 
 #include net/net_osdep.h
 
-/* Record of an interface to add a link-local and possibly a loopback
- * IPv6 address to, processed on a workqueue(9) by in6_ifaddrs_worker.
- */
-struct in6_ifaddr_work {
-	struct work	iw_work;
-	struct ifindexgen {
-		int	ig_idx;		/* Interface index */
-		int	ig_gen;		/* Interface index generation */
-	}		iw_idxgen,	/* Identify of the interface
-	 * to receive a link-local and
-	 * possibly a loopback address.
-	 */
-			iw_alt_idxgen;	/* Optional identity of a second
-	 * interface. If iw_alt_present
-	 * is true, this field
-	 * identifies a second interface
-	 * whose EUI64 we use to derive
-	 * the link-local address for
-	 * the interface indicated by
-	 * iw_idxgen.
-	 */
-	bool		iw_alt_present;	/* iff true, iw_alt_idxgen is valid. */ 
-};
-
 unsigned long in6_maxmtu = 0;
 
 int ip6_auto_linklocal = 1;	/* enable by default */
 
 callout_t in6_tmpaddrtimer_ch;
 
-static struct workqueue *in6_ifaddrs_wq = NULL;
-
-static void in6_ifaddrs_schedule(struct ifnet *, struct ifnet *);
-static void in6_ifaddrs_init(struct ifnet *, struct ifnet *);
-static void in6_ifaddrs_worker(struct work *, void *);
 
 #if 0
 static int get_hostid_ifid(struct ifnet *, struct in6_addr *);
@@ -782,6 +752,8 @@
 void
 in6_ifattach(struct ifnet *ifp, struct ifnet *altifp)
 {
+	struct in6_ifaddr *ia;
+	struct in6_addr in6;
 
 	/* some of the interfaces are inherently not IPv6 capable */
 	switch (ifp-if_type) {
@@ -840,26 +812,6 @@
 		return;
 	}
 
-	/* Assign addresses to ifp in another thread in order to
-	 * avoid re-entering ifp-if_ioctl().
-	 */
-	in6_ifaddrs_schedule(ifp, altifp);
-}
-
-/* in6_ifaddrs_init
- *
- * Add a link-local address to ifp, and if ifp is a loopback address,
- * add a loopback address to it, too.
- *
- * If altifp is not NULL, derive the link-local address of ifp from the
- * EUI64 of altifp.
- */
-void
-in6_ifaddrs_init(struct ifnet *ifp, struct ifnet *altifp)
-{
-	struct in6_addr in6;
-	struct in6_ifaddr *ia;
-
 	/*
 	 * assign loopback address for loopback interface.
 	 * XXX multiple loopback interface case.
@@ -884,95 +836,6 @@
 	

CVS commit: src/distrib/utils/sysinst

2009-09-19 Thread David Brownlee
Module Name:src
Committed By:   abs
Date:   Sat Sep 19 13:33:17 UTC 2009

Modified Files:
src/distrib/utils/sysinst: Makefile

Log Message:
Add cobalt hp700 hpcarm landisk  ofppc to ALL_MACHINES list


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/distrib/utils/sysinst/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/utils/sysinst/Makefile
diff -u src/distrib/utils/sysinst/Makefile:1.12 src/distrib/utils/sysinst/Makefile:1.13
--- src/distrib/utils/sysinst/Makefile:1.12	Fri Nov 21 15:39:29 2008
+++ src/distrib/utils/sysinst/Makefile	Sat Sep 19 13:33:17 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2008/11/21 15:39:29 ad Exp $
+#	$NetBSD: Makefile,v 1.13 2009/09/19 13:33:17 abs Exp $
 #
 # sysinst is usually built when the crunched install binary is built,
 # but can be built here as a normal program for testing.
@@ -6,6 +6,7 @@
 SUBDIR = arch/${MACHINE}
 
 .if ALL_MACHINES
+
 SUBDIR  = arch/acorn26
 SUBDIR += arch/acorn32
 SUBDIR += arch/alpha
@@ -15,19 +16,24 @@
 SUBDIR += arch/atari
 SUBDIR += arch/bebox
 SUBDIR += arch/cats
+SUBDIR += arch/cobalt
 SUBDIR += arch/evbarm
 SUBDIR += arch/evbmips
 SUBDIR += arch/evbppc
 SUBDIR += arch/ews4800mips
 SUBDIR += arch/hp300
+SUBDIR += arch/hp700
+SUBDIR += arch/hpcarm
 SUBDIR += arch/hpcmips
 SUBDIR += arch/i386
+SUBDIR += arch/landisk
 SUBDIR += arch/mac68k
 SUBDIR += arch/macppc
 SUBDIR += arch/mipsco
 SUBDIR += arch/mvme68k
 SUBDIR += arch/news68k
 SUBDIR += arch/newsmips
+SUBDIR += arch/ofppc
 SUBDIR += arch/playstation2
 SUBDIR += arch/pmax
 SUBDIR += arch/prep
@@ -39,6 +45,7 @@
 SUBDIR += arch/vax
 SUBDIR += arch/x68k
 SUBDIR += arch/zaurus
+
 # XXX notyet SUBDIR += arch/iyonix
 .endif
 



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

2009-09-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Sep 19 14:18:01 UTC 2009

Modified Files:
src/sys/rump/librump/rumpkern: intr.c

Log Message:
arrr, implement softint_disestablish().  this code be needin' an enema, matey.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/rump/librump/rumpkern/intr.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/rump/librump/rumpkern/intr.c
diff -u src/sys/rump/librump/rumpkern/intr.c:1.17 src/sys/rump/librump/rumpkern/intr.c:1.18
--- src/sys/rump/librump/rumpkern/intr.c:1.17	Sun Apr 26 20:44:50 2009
+++ src/sys/rump/librump/rumpkern/intr.c	Sat Sep 19 14:18:01 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.17 2009/04/26 20:44:50 pooka Exp $	*/
+/*	$NetBSD: intr.c,v 1.18 2009/09/19 14:18:01 pooka Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.17 2009/04/26 20:44:50 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.18 2009/09/19 14:18:01 pooka Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -44,11 +44,13 @@
 
 time_t time_uptime = 0;
 
+#define SI_MPSAFE 0x01
+#define SI_ONLIST 0x02
+#define SI_KILLME 0x04
 struct softint {
 	void (*si_func)(void *);
 	void *si_arg;
-	bool si_onlist;
-	bool si_mpsafe;
+	int si_flags;
 
 	LIST_ENTRY(softint) si_entries;
 };
@@ -174,10 +176,12 @@
 			si = LIST_FIRST(si_pending);
 			func = si-si_func;
 			funarg = si-si_arg;
-			mpsafe = si-si_mpsafe;
+			mpsafe = si-si_flags  SI_MPSAFE;
 
-			si-si_onlist = false;
+			si-si_flags = ~SI_ONLIST;
 			LIST_REMOVE(si, si_entries);
+			if (si-si_flags  SI_KILLME)
+softint_disestablish(si);
 		} else {
 			cv_wait(si_cv, si_mtx);
 			continue;
@@ -246,8 +250,7 @@
 	si = kmem_alloc(sizeof(*si), KM_SLEEP);
 	si-si_func = func;
 	si-si_arg = arg;
-	si-si_onlist = false;
-	si-si_mpsafe = flags  SOFTINT_MPSAFE;
+	si-si_flags = flags  SOFTINT_MPSAFE ? SI_MPSAFE : 0;
 
 	return si;
 }
@@ -261,15 +264,28 @@
 		si-si_func(si-si_arg);
 	} else {
 		mutex_enter(si_mtx);
-		if (!si-si_onlist) {
+		if (!(si-si_flags  SI_ONLIST)) {
 			LIST_INSERT_HEAD(si_pending, si, si_entries);
-			si-si_onlist = true;
+			si-si_flags |= SI_ONLIST;
 		}
 		cv_signal(si_cv);
 		mutex_exit(si_mtx);
 	}
 }
 
+/* flimsy disestablish: should wait for softints to finish */
+void
+softint_disestablish(void *cook)
+{
+	struct softint *si = cook;
+
+	if (si-si_flags  SI_ONLIST) {
+		si-si_flags |= SI_KILLME;
+		return;
+	}
+	kmem_free(si, sizeof(*si));
+}
+
 bool
 cpu_intr_p(void)
 {



CVS commit: src/share/mk

2009-09-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 19 14:53:13 UTC 2009

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

Log Message:
Switch vax to binutils 2.19.


To generate a diff of this commit:
cvs rdiff -u -r1.577 -r1.578 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.577 src/share/mk/bsd.own.mk:1.578
--- src/share/mk/bsd.own.mk:1.577	Sat Sep 19 09:00:58 2009
+++ src/share/mk/bsd.own.mk	Sat Sep 19 14:53:12 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.577 2009/09/19 09:00:58 skrll Exp $
+#	$NetBSD: bsd.own.mk,v 1.578 2009/09/19 14:53:12 skrll Exp $
 
 .if !defined(_BSD_OWN_MK_)
 _BSD_OWN_MK_=1
@@ -54,7 +54,8 @@
 ${MACHINE_ARCH} == hppa || \
 ${MACHINE_ARCH} == i386 || \
 ${MACHINE_ARCH} == sparc || \
-${MACHINE_ARCH} == sparc64
+${MACHINE_ARCH} == sparc64 || \
+${MACHINE_ARCH} == vax
 HAVE_BINUTILS?=	219
 .else
 HAVE_BINUTILS?=	216



CVS commit: src/libexec/ld.elf_so/arch/vax

2009-09-19 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Sep 19 14:54:17 UTC 2009

Modified Files:
src/libexec/ld.elf_so/arch/vax: Makefile.inc

Log Message:
Fix start symbol. I have no idea how this worked before.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/libexec/ld.elf_so/arch/vax/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/libexec/ld.elf_so/arch/vax/Makefile.inc
diff -u src/libexec/ld.elf_so/arch/vax/Makefile.inc:1.10 src/libexec/ld.elf_so/arch/vax/Makefile.inc:1.11
--- src/libexec/ld.elf_so/arch/vax/Makefile.inc:1.10	Sat Jun  4 16:17:17 2005
+++ src/libexec/ld.elf_so/arch/vax/Makefile.inc	Sat Sep 19 14:54:17 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.10 2005/06/04 16:17:17 lukem Exp $
+#	$NetBSD: Makefile.inc,v 1.11 2009/09/19 14:54:17 skrll Exp $
 
 SRCS+=		rtld_start.S mdreloc.c
 
@@ -7,4 +7,4 @@
 
 CPPFLAGS+=	-DELFSIZE=32
 
-LDFLAGS+=	-Wl,-Bsymbolic -Wl,-e,.rtld_start
+LDFLAGS+=	-Wl,-Bsymbolic -Wl,-e,_rtld_start



CVS commit: src/usr.bin/sort

2009-09-19 Thread David Laight
Module Name:src
Committed By:   dsl
Date:   Sat Sep 19 16:18:01 UTC 2009

Modified Files:
src/usr.bin/sort: radix_sort.c

Log Message:
Fix sort -u, PR/42094


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/sort/radix_sort.c

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

Modified files:

Index: src/usr.bin/sort/radix_sort.c
diff -u src/usr.bin/sort/radix_sort.c:1.3 src/usr.bin/sort/radix_sort.c:1.4
--- src/usr.bin/sort/radix_sort.c:1.3	Thu Sep 10 22:02:40 2009
+++ src/usr.bin/sort/radix_sort.c	Sat Sep 19 16:18:00 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: radix_sort.c,v 1.3 2009/09/10 22:02:40 dsl Exp $	*/
+/*	$NetBSD: radix_sort.c,v 1.4 2009/09/19 16:18:00 dsl Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = @(#)radixsort.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: radix_sort.c,v 1.3 2009/09/10 22:02:40 dsl Exp $);
+__RCSID($NetBSD: radix_sort.c,v 1.4 2009/09/19 16:18:00 dsl Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -184,27 +184,29 @@
 		s_len = akh-keylen;
 		for (ai = ak; ;) {
 			ai--;
-			t = (*ai)-data;
 			t_len = (*ai)-keylen;
-			for (i = data_index; ; i++) {
-if (i = s_len || i = t_len) {
-	r = s_len - t_len;
-	break;
+			if (t_len != -1) {
+t = (*ai)-data;
+for (i = data_index; ; i++) {
+	if (i = s_len || i = t_len) {
+		r = s_len - t_len;
+		break;
+	}
+	r =  s[i]  - t[i];
+	if (r != 0)
+		break;
 }
-r =  s[i]  - t[i];
-if (r != 0)
+if (r = 0) {
+	if (r == 0  UNIQUE) {
+		/* Put record below existing */
+		ai[1] = ai[0];
+		/* Mark as duplicate - ignore */
+		akh-keylen = -1;
+	} else {
+		ai++;
+	}
 	break;
-			}
-			if (r = 0) {
-if (r == 0  UNIQUE) {
-	/* Put record below existing */
-	ai[1] = ai[0];
-	/* Mark so ignored by output() */
-	akh-keylen = -1;
-} else {
-	ai++;
 }
-break;
 			}
 			ai[1] = ai[0];
 			if (ai == a)



CVS commit: src/sys/kern

2009-09-19 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sat Sep 19 16:20:41 UTC 2009

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

Log Message:
If vfs_mountroot fails, print a list of supported file systems. If no
file systems are supported by the kernel, print a big fat warning instead.


To generate a diff of this commit:
cvs rdiff -u -r1.383 -r1.384 src/sys/kern/vfs_subr.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/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.383 src/sys/kern/vfs_subr.c:1.384
--- src/sys/kern/vfs_subr.c:1.383	Fri Jun 26 18:58:14 2009
+++ src/sys/kern/vfs_subr.c	Sat Sep 19 16:20:41 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.383 2009/06/26 18:58:14 dyoung Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.384 2009/09/19 16:20:41 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.383 2009/06/26 18:58:14 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: vfs_subr.c,v 1.384 2009/09/19 16:20:41 jmcneill Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -2411,6 +2411,34 @@
 }
 
 /*
+ * Print a list of supported file system types (used by vfs_mountroot)
+ */
+static void
+vfs_print_fstypes(void)
+{
+	struct vfsops *v;
+	int cnt = 0;
+
+	mutex_enter(vfs_list_lock);
+	LIST_FOREACH(v, vfs_list, vfs_list)
+		++cnt;
+	mutex_exit(vfs_list_lock);
+
+	if (cnt == 0) {
+		printf(WARNING: No file system modules have been loaded.\n);
+		return;
+	}
+
+	printf(Supported file systems:);
+	mutex_enter(vfs_list_lock);
+	LIST_FOREACH(v, vfs_list, vfs_list) {
+		printf( %s, v-vfs_name);
+	}
+	mutex_exit(vfs_list_lock);
+	printf(\n);
+}
+
+/*
  * Mount the root file system.  If the operator didn't specify a
  * file system to use, try all possible file systems until one
  * succeeds.
@@ -2492,6 +2520,7 @@
 	mutex_exit(vfs_list_lock);
 
 	if (v == NULL) {
+		vfs_print_fstypes();
 		printf(no file system for %s, device_xname(root_device));
 		if (device_class(root_device) == DV_DISK)
 			printf( (dev 0x%llx), (unsigned long long)rootdev);



CVS commit: src/sys/sys

2009-09-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sat Sep 19 16:34:07 UTC 2009

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

Log Message:
Parameter name in prototype, begone ye scurvy seadog!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/sys/bus_proto.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/bus_proto.h
diff -u src/sys/sys/bus_proto.h:1.2 src/sys/sys/bus_proto.h:1.3
--- src/sys/sys/bus_proto.h:1.2	Mon Apr 28 20:24:10 2008
+++ src/sys/sys/bus_proto.h	Sat Sep 19 16:34:07 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_proto.h,v 1.2 2008/04/28 20:24:10 martin Exp $	*/
+/*	$NetBSD: bus_proto.h,v 1.3 2009/09/19 16:34:07 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001, 2007 The NetBSD Foundation, Inc.
@@ -313,7 +313,7 @@
 void	bus_dmamem_free(bus_dma_tag_t, bus_dma_segment_t *, int);
 int	bus_dmamem_map(bus_dma_tag_t, bus_dma_segment_t *, int,
 		   size_t, void **, int);
-void	bus_dmamem_unmap(bus_dma_tag_t, void *kva, size_t);
+void	bus_dmamem_unmap(bus_dma_tag_t, void *, size_t);
 paddr_t	bus_dmamem_mmap(bus_dma_tag_t, bus_dma_segment_t *, int,
 			off_t, int, int);
 



CVS commit: src/etc/defaults

2009-09-19 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Sep 19 19:47:48 UTC 2009

Modified Files:
src/etc/defaults: rc.conf

Log Message:
Make rtsold_flags default to -a as per PR 39657.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/etc/defaults/rc.conf

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

Modified files:

Index: src/etc/defaults/rc.conf
diff -u src/etc/defaults/rc.conf:1.106 src/etc/defaults/rc.conf:1.107
--- src/etc/defaults/rc.conf:1.106	Mon Sep 14 12:05:12 2009
+++ src/etc/defaults/rc.conf	Sat Sep 19 19:47:48 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.106 2009/09/14 12:05:12 apb Exp $
+#	$NetBSD: rc.conf,v 1.107 2009/09/19 19:47:48 dholland Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -251,7 +251,7 @@
 gated=NO
 mrouted=NO		mrouted_flags=
 route6d=NO		route6d_flags=
-rtsold=NO		rtsold_flags=		# for ip6mode=autohost only
+rtsold=NO		rtsold_flags=-a	# for ip6mode=autohost only
 
 # Daemons used to boot other hosts over a network.
 #



CVS commit: src/tests/util/mtree

2009-09-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Sep 19 20:37:05 UTC 2009

Modified Files:
src/tests/util/mtree: Makefile t_mtree.sh
Added Files:
src/tests/util/mtree: d_merge.in d_merge_C_M.out d_merge_C_M_S.out

Log Message:
Add tests for the mtree -M issue reported in PR 42031 from Geoff Wing.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/util/mtree/Makefile \
src/tests/util/mtree/t_mtree.sh
cvs rdiff -u -r0 -r1.1 src/tests/util/mtree/d_merge.in \
src/tests/util/mtree/d_merge_C_M.out \
src/tests/util/mtree/d_merge_C_M_S.out

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

Modified files:

Index: src/tests/util/mtree/Makefile
diff -u src/tests/util/mtree/Makefile:1.3 src/tests/util/mtree/Makefile:1.4
--- src/tests/util/mtree/Makefile:1.3	Wed Apr  8 19:06:30 2009
+++ src/tests/util/mtree/Makefile	Sat Sep 19 20:37:05 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2009/04/08 19:06:30 apb Exp $
+# $NetBSD: Makefile,v 1.4 2009/09/19 20:37:05 apb Exp $
 
 NOMAN=		# defined
 
@@ -15,5 +15,9 @@
 FILES+=		d_convert_D.out
 FILES+=		d_convert_D_S.out
 FILES+=		d_create.out
+FILES+=		d_merge.1.in
+FILES+=		d_merge.1.out
+FILES+=		d_merge.2.in
+FILES+=		d_merge.2.out
 
 .include bsd.test.mk
Index: src/tests/util/mtree/t_mtree.sh
diff -u src/tests/util/mtree/t_mtree.sh:1.3 src/tests/util/mtree/t_mtree.sh:1.4
--- src/tests/util/mtree/t_mtree.sh:1.3	Wed Apr  8 19:06:30 2009
+++ src/tests/util/mtree/t_mtree.sh	Sat Sep 19 20:37:05 2009
@@ -1,4 +1,4 @@
-# $NetBSD: t_mtree.sh,v 1.3 2009/04/08 19:06:30 apb Exp $
+# $NetBSD: t_mtree.sh,v 1.4 2009/09/19 20:37:05 apb Exp $
 #
 # Copyright (c) 2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -143,6 +143,20 @@
 	h_check $(atf_get_srcdir)/d_convert_D_S.out output
 }
 
+atf_test_case merge
+merge_head()
+{
+	atf_set descr Merge records of different type
+}
+merge_body()
+{
+	mtree -C -M -K all $(atf_get_srcdir)/d_merge.in output
+	h_check $(atf_get_srcdir)/d_merge_C_M.out output
+	# same again, with sorting
+	mtree -C -M -S -K all $(atf_get_srcdir)/d_merge.in output
+	h_check $(atf_get_srcdir)/d_merge_C_M_S.out output
+}
+
 atf_init_test_cases()
 {
 	atf_add_test_case create
@@ -151,4 +165,5 @@
 	atf_add_test_case convert_C_S
 	atf_add_test_case convert_D
 	atf_add_test_case convert_D_S
+	atf_add_test_case merge
 }

Added files:

Index: src/tests/util/mtree/d_merge.in
diff -u /dev/null src/tests/util/mtree/d_merge.in:1.1
--- /dev/null	Sat Sep 19 20:37:05 2009
+++ src/tests/util/mtree/d_merge.in	Sat Sep 19 20:37:05 2009
@@ -0,0 +1,27 @@
+# The last entry for any duplicate node should take precedence.
+
+.   type=dir
+
+# directory a with only one entry, changing from dir to link
+./a type=dir
+./a/change-dir-to-link  type=dir  mode=0755
+./a/change-dir-to-link  type=link  mode=0755
+
+# directory b with only one entry, changing from link to dir
+./b type=dir
+./b/change-link-to-dir  type=link  mode=0755
+./b/change-link-to-dir  type=dir  mode=0755
+
+# directory c with multiple entries, one changing from dir to link
+./c type=dir
+./c/aaa type=file
+./c/zzz type=file
+./c/change-dir-to-link  type=dir  mode=0755
+./c/change-dir-to-link  type=link  mode=0755
+
+# directory d with multiple entries, one changing from link to dir
+./d type=dir
+./d/aaa type=file
+./d/zzz type=file
+./d/change-link-to-dir  type=link  mode=0755
+./d/change-link-to-dir  type=dir  mode=0755
Index: src/tests/util/mtree/d_merge_C_M.out
diff -u /dev/null src/tests/util/mtree/d_merge_C_M.out:1.1
--- /dev/null	Sat Sep 19 20:37:05 2009
+++ src/tests/util/mtree/d_merge_C_M.out	Sat Sep 19 20:37:05 2009
@@ -0,0 +1,13 @@
+. type=dir 
+./a type=dir 
+./a/change-dir-to-link type=link mode=0755 
+./b type=dir 
+./b/change-link-to-dir type=dir mode=0755 
+./c type=dir 
+./c/aaa type=file 
+./c/zzz type=file 
+./c/change-dir-to-link type=link mode=0755 
+./d type=dir 
+./d/aaa type=file 
+./d/zzz type=file 
+./d/change-link-to-dir type=dir mode=0755 
Index: src/tests/util/mtree/d_merge_C_M_S.out
diff -u /dev/null src/tests/util/mtree/d_merge_C_M_S.out:1.1
--- /dev/null	Sat Sep 19 20:37:05 2009
+++ src/tests/util/mtree/d_merge_C_M_S.out	Sat Sep 19 20:37:05 2009
@@ -0,0 +1,13 @@
+. type=dir 
+./a type=dir 
+./a/change-dir-to-link type=link mode=0755 
+./b type=dir 
+./b/change-link-to-dir type=dir mode=0755 
+./c type=dir 
+./c/aaa type=file 
+./c/change-dir-to-link type=link mode=0755 
+./c/zzz type=file 
+./d type=dir 
+./d/aaa type=file 
+./d/zzz type=file 
+./d/change-link-to-dir type=dir mode=0755 



CVS commit: src/usr.sbin/mtree

2009-09-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Sep 19 20:42:07 UTC 2009

Modified Files:
src/usr.sbin/mtree: spec.c

Log Message:
Fix the mtree -M problem reported in PR 42031 by Geoff Wing.
The cause of the problem was that part of the code assumed that
nodecmp() on two nodes with the same name would return 0, but in
fact nodecmp() would return -1 or +1 if one of the nodes was a
directory and the other was not.  The fix is to separate the notion
of whether or not a duplicte name was found frmo the notion of
where the new node should appear in the list.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/usr.sbin/mtree/spec.c

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

Modified files:

Index: src/usr.sbin/mtree/spec.c
diff -u src/usr.sbin/mtree/spec.c:1.75 src/usr.sbin/mtree/spec.c:1.76
--- src/usr.sbin/mtree/spec.c:1.75	Sat Apr 11 14:32:51 2009
+++ src/usr.sbin/mtree/spec.c	Sat Sep 19 20:42:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: spec.c,v 1.75 2009/04/11 14:32:51 apb Exp $	*/
+/*	$NetBSD: spec.c,v 1.76 2009/09/19 20:42:06 apb Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -67,13 +67,14 @@
 #if 0
 static char sccsid[] = @(#)spec.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: spec.c,v 1.75 2009/04/11 14:32:51 apb Exp $);
+__RCSID($NetBSD: spec.c,v 1.76 2009/09/19 20:42:06 apb Exp $);
 #endif
 #endif /* not lint */
 
 #include sys/param.h
 #include sys/stat.h
 
+#include assert.h
 #include ctype.h
 #include errno.h
 #include grp.h
@@ -670,9 +671,18 @@
 static void
 addchild(NODE *pathparent, NODE *centry)
 {
-	NODE *cur, *insertpos;
+	NODE *samename;  /* node with the same name as centry */
+	NODE *replacepos;/* if non-NULL, centry should replace this node */
+	NODE *insertpos; /* if non-NULL, centry should be inserted
+			  * after this node */
+	NODE *cur;   /* for stepping through the list */
+	NODE *last;  /* the last node in the list */
 	int cmp;
 
+	samename = NULL;
+	replacepos = NULL;
+	insertpos = NULL;
+	last = NULL;
 	cur = pathparent-child;
 	if (cur == NULL) {
 		/* centry is pathparent's first and only child node so far */
@@ -684,44 +694,91 @@
 	 * pathparent already has at least one other child, so add the
 	 * centry node to the list.
 	 *
-	 * To keep the list sorted, the new centry node will be
-	 * inserted just after the existing insertpos node, if any;
-	 * otherwise it will be inserted at the start of the list.
+	 * We first scan through the list looking for an existing node
+	 * with the same name (setting samename), and also looking
+	 * for the correct position to replace or insert the new node
+	 * (setting replacepos and/or insertpos).
 	 */
-	insertpos = NULL;
-	for (; cur != NULL; cur = cur-next) {
-		cmp = nodecmp(centry, cur);
-		if (cmp == 0) {
-			/* existing entry; replace */
-			replacenode(cur, centry);
-			break;
-		} else if (cmp  0) {
-			/* centry appears after cur in sort order */
-			insertpos = cur;
+	for (; cur != NULL; last = cur, cur = cur-next) {
+		if (strcmp(centry-name, cur-name) == 0) {
+			samename = cur;
+		}
+		if (mtree_Sflag) {
+			cmp = nodecmp(centry, cur);
+			if (cmp == 0) {
+replacepos = cur;
+			} else if (cmp  0) {
+insertpos = cur;
+			}
+		}
+	}
+	if (! mtree_Sflag) {
+		if (samename != NULL) {
+			/* replace node with same name */
+			replacepos = samename;
+		} else {
+			/* add new node at end of list */
+			insertpos = last;
+		}
+	}
+
+	if (samename != NULL) {
+		/*
+		 * We found a node with the same name above.  Call
+		 * replacenode(), which will either exit with an error,
+		 * or replace the information in the samename node and
+		 * free the information in the centry node.
+		 */
+		replacenode(samename, centry);
+		if (samename == replacepos) {
+			/* The just-replaced node was in the correct position */
+			return;
 		}
-		if ((mtree_Sflag  cmp  0) || cur-next == NULL) {
+		if (samename == insertpos || samename-prev == insertpos) {
 			/*
-			 * centry appears before cur in sort order,
-			 * or we reached the end of the list; insert
-			 * centry either just after insertpos, or at the
-			 * beginning of the list.  If we are not sorting,
-			 * then always append to the list.
+			 * We thought the new node should be just before
+			 * or just after the replaced node, but that would
+			 * be equivalent to just retaining the replaced node.
 			 */
-			if (!mtree_Sflag)
-insertpos = cur;
-			if (insertpos) {
-centry-next = insertpos-next;
-insertpos-next = centry;
-centry-prev = insertpos;
-if (centry-next)
-	centry-next-prev = centry;
-			} else {
-pathparent-child-prev = centry;
-centry-next = pathparent-child;
-pathparent-child = centry;
-			}
-			break;
+			return;
 		}
+
+		/*
+		 * The just-replaced node is in the wrong position in
+		 * the list.  This can happen if sort order depends on
+		 * criteria other than the node name.
+		 *
+		 * 

CVS commit: src/usr.sbin/mtree

2009-09-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Sep 19 21:41:43 UTC 2009

Modified Files:
src/usr.sbin/mtree: spec.c

Log Message:
Do not print a trailing space on each line with mtree -C.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/usr.sbin/mtree/spec.c

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

Modified files:

Index: src/usr.sbin/mtree/spec.c
diff -u src/usr.sbin/mtree/spec.c:1.76 src/usr.sbin/mtree/spec.c:1.77
--- src/usr.sbin/mtree/spec.c:1.76	Sat Sep 19 20:42:06 2009
+++ src/usr.sbin/mtree/spec.c	Sat Sep 19 21:41:43 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: spec.c,v 1.76 2009/09/19 20:42:06 apb Exp $	*/
+/*	$NetBSD: spec.c,v 1.77 2009/09/19 21:41:43 apb Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = @(#)spec.c	8.2 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: spec.c,v 1.76 2009/09/19 20:42:06 apb Exp $);
+__RCSID($NetBSD: spec.c,v 1.77 2009/09/19 21:41:43 apb Exp $);
 #endif
 #endif /* not lint */
 
@@ -79,6 +79,7 @@
 #include errno.h
 #include grp.h
 #include pwd.h
+#include stdarg.h
 #include stdio.h
 #include stdlib.h
 #include string.h
@@ -100,6 +101,7 @@
 static	void	unset(char *, NODE *);
 static	void	addchild(NODE *, NODE *);
 static	int	nodecmp(const NODE *, const NODE *);
+static	int	appendfield(int, const char *, ...);
 
 #define REPLACEPTR(x,v)	do { if ((x)) free((x)); (x) = (v); } while (0)
 
@@ -280,6 +282,27 @@
 }
 
 /*
+ * appendfield --
+ *	Like printf(), but output a space either before or after
+ *	the regular output, according to the pathlast flag.
+ */
+static int
+appendfield(int pathlast, const char *fmt, ...)
+{
+	va_list ap;
+	int result;
+
+	va_start(ap, fmt);
+	if (!pathlast)
+		printf( );
+	result = vprintf(fmt, ap);
+	if (pathlast)
+		printf( );
+	va_end(ap);
+	return result;
+}
+
+/*
  * dump_nodes --
  *	dump the NODEs from `cur', based in the directory `dir'.
  *	if pathlast is none zero, print the path last, otherwise print
@@ -304,57 +327,57 @@
 			mtree_err(Pathname too long.);
 
 		if (!pathlast)
-			printf(%s , vispath(path));
+			printf(%s, vispath(path));
 
 #define MATCHFLAG(f)	((keys  (f))  (cur-flags  (f)))
 		if (MATCHFLAG(F_TYPE))
-			printf(type=%s , nodetype(cur-type));
+			appendfield(pathlast, type=%s, nodetype(cur-type));
 		if (MATCHFLAG(F_UID | F_UNAME)) {
 			if (keys  F_UNAME 
 			(name = user_from_uid(cur-st_uid, 1)) != NULL)
-printf(uname=%s , name);
+appendfield(pathlast, uname=%s, name);
 			else
-printf(uid=%u , cur-st_uid);
+appendfield(pathlast, uid=%u, cur-st_uid);
 		}
 		if (MATCHFLAG(F_GID | F_GNAME)) {
 			if (keys  F_GNAME 
 			(name = group_from_gid(cur-st_gid, 1)) != NULL)
-printf(gname=%s , name);
+appendfield(pathlast, gname=%s, name);
 			else
-printf(gid=%u , cur-st_gid);
+appendfield(pathlast, gid=%u, cur-st_gid);
 		}
 		if (MATCHFLAG(F_MODE))
-			printf(mode=%#o , cur-st_mode);
+			appendfield(pathlast, mode=%#o, cur-st_mode);
 		if (MATCHFLAG(F_DEV) 
 		(cur-type == F_BLOCK || cur-type == F_CHAR))
-			printf(device=%#llx , (long long)cur-st_rdev);
+			appendfield(pathlast, device=%#llx, (long long)cur-st_rdev);
 		if (MATCHFLAG(F_NLINK))
-			printf(nlink=%d , cur-st_nlink);
+			appendfield(pathlast, nlink=%d, cur-st_nlink);
 		if (MATCHFLAG(F_SLINK))
-			printf(link=%s , vispath(cur-slink));
+			appendfield(pathlast, link=%s, vispath(cur-slink));
 		if (MATCHFLAG(F_SIZE))
-			printf(size=%lld , (long long)cur-st_size);
+			appendfield(pathlast, size=%lld, (long long)cur-st_size);
 		if (MATCHFLAG(F_TIME))
-			printf(time=%lld.%ld ,
+			appendfield(pathlast, time=%lld.%ld ,
 			(long long)cur-st_mtimespec.tv_sec,
 			cur-st_mtimespec.tv_nsec);
 		if (MATCHFLAG(F_CKSUM))
-			printf(cksum=%lu , cur-cksum);
+			appendfield(pathlast, cksum=%lu, cur-cksum);
 		if (MATCHFLAG(F_MD5))
-			printf(md5=%s , cur-md5digest);
+			appendfield(pathlast, md5=%s, cur-md5digest);
 		if (MATCHFLAG(F_RMD160))
-			printf(rmd160=%s , cur-rmd160digest);
+			appendfield(pathlast, rmd160=%s, cur-rmd160digest);
 		if (MATCHFLAG(F_SHA1))
-			printf(sha1=%s , cur-sha1digest);
+			appendfield(pathlast, sha1=%s, cur-sha1digest);
 		if (MATCHFLAG(F_SHA256))
-			printf(sha256=%s , cur-sha256digest);
+			appendfield(pathlast, sha256=%s, cur-sha256digest);
 		if (MATCHFLAG(F_SHA384))
-			printf(sha384=%s , cur-sha384digest);
+			appendfield(pathlast, sha384=%s, cur-sha384digest);
 		if (MATCHFLAG(F_SHA512))
-			printf(sha512=%s , cur-sha512digest);
+			appendfield(pathlast, sha512=%s, cur-sha512digest);
 		if (MATCHFLAG(F_FLAGS)) {
 			str = flags_to_string(cur-st_flags, none);
-			printf(flags=%s , str);
+			appendfield(pathlast, flags=%s, str);
 			free(str);
 		}
 		if (MATCHFLAG(F_IGN))
@@ -369,7 +392,7 @@
 			q = p + strlen(p);
 			while(q  p  q[-1] == ',')
 q--;
-			printf(tags=%.*s , (int)(q - p), p);
+			appendfield(pathlast, tags=%.*s, (int)(q - 

CVS commit: src/tests/util/mtree

2009-09-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Sep 19 21:42:26 UTC 2009

Modified Files:
src/tests/util/mtree: d_convert_C.out d_convert_C_S.out d_merge_C_M.out
d_merge_C_M_S.out

Log Message:
Adjust tests to no longer expect a trailing space in each line
of output from mtree -C.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/util/mtree/d_convert_C.out
cvs rdiff -u -r1.1 -r1.2 src/tests/util/mtree/d_convert_C_S.out \
src/tests/util/mtree/d_merge_C_M.out \
src/tests/util/mtree/d_merge_C_M_S.out

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

Modified files:

Index: src/tests/util/mtree/d_convert_C.out
diff -u src/tests/util/mtree/d_convert_C.out:1.2 src/tests/util/mtree/d_convert_C.out:1.3
--- src/tests/util/mtree/d_convert_C.out:1.2	Wed Apr  8 19:06:30 2009
+++ src/tests/util/mtree/d_convert_C.out	Sat Sep 19 21:42:26 2009
@@ -1,14 +1,14 @@
-. type=dir 
-./a.symlink.1 type=link link=a.file.1 
-./top.dangling type=link link=nonexistent 
-./top.symlink.b type=link link=b 
-./b type=dir 
-./b/b.file.2 type=file 
-./b/b.file.1 type=file 
-./top.file.1 type=file 
-./a type=dir 
-./a/a.file.2 type=file 
-./a/1 type=dir 
-./a/1/a1.file.1 type=file 
-./a/a.file.1 type=file 
-./a/2 type=dir 
+. type=dir
+./a.symlink.1 type=link link=a.file.1
+./top.dangling type=link link=nonexistent
+./top.symlink.b type=link link=b
+./b type=dir
+./b/b.file.2 type=file
+./b/b.file.1 type=file
+./top.file.1 type=file
+./a type=dir
+./a/a.file.2 type=file
+./a/1 type=dir
+./a/1/a1.file.1 type=file
+./a/a.file.1 type=file
+./a/2 type=dir

Index: src/tests/util/mtree/d_convert_C_S.out
diff -u src/tests/util/mtree/d_convert_C_S.out:1.1 src/tests/util/mtree/d_convert_C_S.out:1.2
--- src/tests/util/mtree/d_convert_C_S.out:1.1	Wed Apr  8 19:06:30 2009
+++ src/tests/util/mtree/d_convert_C_S.out	Sat Sep 19 21:42:26 2009
@@ -1,14 +1,14 @@
-. type=dir 
-./a.symlink.1 type=link link=a.file.1 
-./top.dangling type=link link=nonexistent 
-./top.file.1 type=file 
-./top.symlink.b type=link link=b 
-./a type=dir 
-./a/a.file.1 type=file 
-./a/a.file.2 type=file 
-./a/1 type=dir 
-./a/1/a1.file.1 type=file 
-./a/2 type=dir 
-./b type=dir 
-./b/b.file.1 type=file 
-./b/b.file.2 type=file 
+. type=dir
+./a.symlink.1 type=link link=a.file.1
+./top.dangling type=link link=nonexistent
+./top.file.1 type=file
+./top.symlink.b type=link link=b
+./a type=dir
+./a/a.file.1 type=file
+./a/a.file.2 type=file
+./a/1 type=dir
+./a/1/a1.file.1 type=file
+./a/2 type=dir
+./b type=dir
+./b/b.file.1 type=file
+./b/b.file.2 type=file
Index: src/tests/util/mtree/d_merge_C_M.out
diff -u src/tests/util/mtree/d_merge_C_M.out:1.1 src/tests/util/mtree/d_merge_C_M.out:1.2
--- src/tests/util/mtree/d_merge_C_M.out:1.1	Sat Sep 19 20:37:05 2009
+++ src/tests/util/mtree/d_merge_C_M.out	Sat Sep 19 21:42:26 2009
@@ -1,13 +1,13 @@
-. type=dir 
-./a type=dir 
-./a/change-dir-to-link type=link mode=0755 
-./b type=dir 
-./b/change-link-to-dir type=dir mode=0755 
-./c type=dir 
-./c/aaa type=file 
-./c/zzz type=file 
-./c/change-dir-to-link type=link mode=0755 
-./d type=dir 
-./d/aaa type=file 
-./d/zzz type=file 
-./d/change-link-to-dir type=dir mode=0755 
+. type=dir
+./a type=dir
+./a/change-dir-to-link type=link mode=0755
+./b type=dir
+./b/change-link-to-dir type=dir mode=0755
+./c type=dir
+./c/aaa type=file
+./c/zzz type=file
+./c/change-dir-to-link type=link mode=0755
+./d type=dir
+./d/aaa type=file
+./d/zzz type=file
+./d/change-link-to-dir type=dir mode=0755
Index: src/tests/util/mtree/d_merge_C_M_S.out
diff -u src/tests/util/mtree/d_merge_C_M_S.out:1.1 src/tests/util/mtree/d_merge_C_M_S.out:1.2
--- src/tests/util/mtree/d_merge_C_M_S.out:1.1	Sat Sep 19 20:37:05 2009
+++ src/tests/util/mtree/d_merge_C_M_S.out	Sat Sep 19 21:42:26 2009
@@ -1,13 +1,13 @@
-. type=dir 
-./a type=dir 
-./a/change-dir-to-link type=link mode=0755 
-./b type=dir 
-./b/change-link-to-dir type=dir mode=0755 
-./c type=dir 
-./c/aaa type=file 
-./c/change-dir-to-link type=link mode=0755 
-./c/zzz type=file 
-./d type=dir 
-./d/aaa type=file 
-./d/zzz type=file 
-./d/change-link-to-dir type=dir mode=0755 
+. type=dir
+./a type=dir
+./a/change-dir-to-link type=link mode=0755
+./b type=dir
+./b/change-link-to-dir type=dir mode=0755
+./c type=dir
+./c/aaa type=file
+./c/change-dir-to-link type=link mode=0755
+./c/zzz type=file
+./d type=dir
+./d/aaa type=file
+./d/zzz type=file
+./d/change-link-to-dir type=dir mode=0755



CVS commit: src/tests/util/mtree

2009-09-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Sep 19 21:49:50 UTC 2009

Modified Files:
src/tests/util/mtree: Makefile

Log Message:
Correct list of d_merge* files.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/util/mtree/Makefile

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

Modified files:

Index: src/tests/util/mtree/Makefile
diff -u src/tests/util/mtree/Makefile:1.4 src/tests/util/mtree/Makefile:1.5
--- src/tests/util/mtree/Makefile:1.4	Sat Sep 19 20:37:05 2009
+++ src/tests/util/mtree/Makefile	Sat Sep 19 21:49:50 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2009/09/19 20:37:05 apb Exp $
+# $NetBSD: Makefile,v 1.5 2009/09/19 21:49:50 apb Exp $
 
 NOMAN=		# defined
 
@@ -15,9 +15,8 @@
 FILES+=		d_convert_D.out
 FILES+=		d_convert_D_S.out
 FILES+=		d_create.out
-FILES+=		d_merge.1.in
-FILES+=		d_merge.1.out
-FILES+=		d_merge.2.in
-FILES+=		d_merge.2.out
+FILES+=		d_merge.in
+FILES+=		d_merge_C_M.out
+FILES+=		d_merge_C_M_S.out
 
 .include bsd.test.mk



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

2009-09-19 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Sep 19 21:51:47 UTC 2009

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

Log Message:
Add new mtree tests


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.48 src/distrib/sets/lists/tests/mi:1.49
--- src/distrib/sets/lists/tests/mi:1.48	Tue Sep  8 20:37:46 2009
+++ src/distrib/sets/lists/tests/mi	Sat Sep 19 21:51:47 2009
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.48 2009/09/08 20:37:46 pooka Exp $
+# $NetBSD: mi,v 1.49 2009/09/19 21:51:47 apb Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -1024,6 +1024,9 @@
 ./usr/tests/util/mtree/d_convert_D.out		tests-util-tests
 ./usr/tests/util/mtree/d_convert_D_S.out	tests-util-tests
 ./usr/tests/util/mtree/d_create.out		tests-util-tests
+./usr/tests/util/mtree/d_merge.in		tests-util-tests
+./usr/tests/util/mtree/d_merge_C_M.out		tests-util-tests
+./usr/tests/util/mtree/d_merge_C_M_S.out	tests-util-tests
 ./usr/tests/util/mtree/t_mtree			tests-util-tests
 ./usr/tests/util/pstests-util-tests
 ./usr/tests/util/ps/Atffile			tests-util-tests



CVS commit: src/sys/dev/pci

2009-09-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 20 01:09:24 UTC 2009

Modified Files:
src/sys/dev/pci: files.pci pcidevs

Log Message:
PR/42100: Dave J. Barnes: Support for old toshiba PICCOLO IDE controllers.


To generate a diff of this commit:
cvs rdiff -u -r1.319 -r1.320 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.995 -r1.996 src/sys/dev/pci/pcidevs

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/pci/files.pci
diff -u src/sys/dev/pci/files.pci:1.319 src/sys/dev/pci/files.pci:1.320
--- src/sys/dev/pci/files.pci:1.319	Sun Sep  6 13:25:56 2009
+++ src/sys/dev/pci/files.pci	Sat Sep 19 21:09:24 2009
@@ -1,4 +1,4 @@
-#	$NetBSD: files.pci,v 1.319 2009/09/06 17:25:56 sborrill Exp $
+#	$NetBSD: files.pci,v 1.320 2009/09/20 01:09:24 christos Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -337,6 +337,11 @@
 attach	ixpide at pci
 file	dev/pci/ixpide.c	ixpide
 
+# Toshiba PICCOLO IDE controllers
+device	toshide: ata, ata_dma, pciide_common, wdc_common
+attach	toshide at pci
+file	dev/pci/toshide.c	toshide
+
 # PCI-PCI bridge chips
 device	ppb: pcibus
 attach	ppb at pci

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.995 src/sys/dev/pci/pcidevs:1.996
--- src/sys/dev/pci/pcidevs:1.995	Sat Aug  1 17:34:21 2009
+++ src/sys/dev/pci/pcidevs	Sat Sep 19 21:09:24 2009
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.995 2009/08/01 21:34:21 matt Exp $
+$NetBSD: pcidevs,v 1.996 2009/09/20 01:09:24 christos Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3961,11 +3961,16 @@
 
 /* Toshiba products */
 product TOSHIBA2 PORTEGE	0x0001	Portege Notebook
+product TOSHIBA2 PICCOLO	0x0101	Piccolo IDE Controller
+product TOSHIBA2 PICCOLO2	0x0102	Piccolo 2 IDE Controller
+product TOSHIBA2 PICCOLO3	0x0103	Piccolo 3 IDE Controller
+product TOSHIBA2 PICCOLO5	0x0105	Piccolo 5 IDE Controller
 product TOSHIBA2 HOST		0x0601	Host Bridge/Controller
 product TOSHIBA2 ISA		0x0602	PCI-ISA Bridge
 product TOSHIBA2 ToPIC95	0x0603	ToPIC95 PCI-CardBus Bridge
 product TOSHIBA2 ToPIC95B	0x060a	ToPIC95B PCI-CardBus Bridge
 product TOSHIBA2 ToPIC97	0x060f	ToPIC97 PCI-CardBus Bridge
+product TOSHIBA2 SANREMO	0x0618	SanRemo? Triangle Host Bridge
 product TOSHIBA2 SMCARD		0x0804	Smart Media Controller
 product TOSHIBA2 SDCARD		0x0805	Secure Digital Card Controller Type-A
 product TOSHIBA2 ToPIC100	0x0617	ToPIC100 PCI-CardBus Bridge



CVS commit: src/sys/dev/pci

2009-09-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 20 01:10:12 UTC 2009

Added Files:
src/sys/dev/pci: pciide_piccolo_reg.h toshide.c

Log Message:
PR/42100: Dave J. Barnes: Support for old toshiba PICCOLO IDE controllers.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/pciide_piccolo_reg.h \
src/sys/dev/pci/toshide.c

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

Added files:

Index: src/sys/dev/pci/pciide_piccolo_reg.h
diff -u /dev/null src/sys/dev/pci/pciide_piccolo_reg.h:1.1
--- /dev/null	Sat Sep 19 21:10:12 2009
+++ src/sys/dev/pci/pciide_piccolo_reg.h	Sat Sep 19 21:10:12 2009
@@ -0,0 +1,82 @@
+/*	$NetBSD: pciide_piccolo.h_reg.h,v 1.0 2008/04/28 00:00:00 djb  	*/
+
+/*
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Register definitions for the Toshiba PICCOLO, by SWAG!
+ */
+
+#define PICCOLO_PIO_TIMING 0x50
+#define PICCOLO_DMA_TIMING 0x5c
+
+#define PICCOLO_PIO_MASK 0xe088
+#define PICCOLO_DMA_MASK 0xe088
+#define PICCOLO_UDMA_MASK 0x78ffe088
+
+/* TIMING SWAG!!! */
+
+/* 
+ * first digit is command active, next two are front porch and back porch 
+ * command active = minimum for mode 
+ * front porch + back porch + command active = cycle time for mode
+ * values below may need adjustment 
+ */
+static const u_int32_t piccolo_pio_times[]
+__unused = {
+/*programmed   actual   */
+	0x0566, 
+	0x0433,
+	0x0311,
+	0x0201,
+	0x0200,		/* PIO 4, 150ns cycle (120ns is spec), 90ns command active (70ns is spec), 30ns setup and hold */
+	0x0100
+	   
+};
+
+static const u_int32_t piccolo_sw_dma_times[]
+__unused = {
+/*programmed   actual   */
+	0x0f77		
+};
+
+static const u_int32_t piccolo_mw_dma_times[]
+ __unused = {
+/*programmed   actual   */
+	0x0655,
+	0x0200,
+	0x0200,
+	0x0100 
+};
+
+/* XXX Is MSB UDMA enable? Can't set it. Seems to work without being set. */
+static const u_int32_t piccolo_udma_times[]
+__unused = {
+/*programmed   actual   */
+	0x84000222,
+	0x83000111,
+	0x8200	/* UDMA 2, 120ns cycle (117ns is spec), 60ns command active (55ns is spec), 30ns setup and hold */  
+};
Index: src/sys/dev/pci/toshide.c
diff -u /dev/null src/sys/dev/pci/toshide.c:1.1
--- /dev/null	Sat Sep 19 21:10:12 2009
+++ src/sys/dev/pci/toshide.c	Sat Sep 19 21:10:12 2009
@@ -0,0 +1,271 @@
+/*	$NetBSD: toshide.c,v 1.1 2009/09/20 01:10:12 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * 

CVS commit: src/sys/dev/pci

2009-09-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 20 01:12:30 UTC 2009

Modified Files:
src/sys/dev/pci: toshide.c

Log Message:
remove dup decl.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/toshide.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/pci/toshide.c
diff -u src/sys/dev/pci/toshide.c:1.1 src/sys/dev/pci/toshide.c:1.2
--- src/sys/dev/pci/toshide.c:1.1	Sat Sep 19 21:10:12 2009
+++ src/sys/dev/pci/toshide.c	Sat Sep 19 21:12:30 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: toshide.c,v 1.1 2009/09/20 01:10:12 christos Exp $	*/
+/*	$NetBSD: toshide.c,v 1.2 2009/09/20 01:12:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: toshide.c,v 1.1 2009/09/20 01:10:12 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: toshide.c,v 1.2 2009/09/20 01:12:30 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -170,7 +170,7 @@
 	struct pciide_softc *sc = CHAN_TO_PCIIDE(chp);
 	u_int32_t idedma_ctl;
 	int drive, s;
-	pcireg_t pxdx, pxdx_prime;
+	pcireg_t pxdx;
 #ifdef TOSHIDE_DEBUG
 	pcireg_t pxdx_prime;
 #endif



CVS commit: src/sys/arch

2009-09-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 20 01:14:31 UTC 2009

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

Log Message:
add toshide


To generate a diff of this commit:
cvs rdiff -u -r1.252 -r1.253 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.944 -r1.945 src/sys/arch/i386/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.252 src/sys/arch/amd64/conf/GENERIC:1.253
--- src/sys/arch/amd64/conf/GENERIC:1.252	Mon Sep  7 18:59:47 2009
+++ src/sys/arch/amd64/conf/GENERIC	Sat Sep 19 21:14:31 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.252 2009/09/07 22:59:47 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.253 2009/09/20 01:14:31 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.252 $
+#ident 		GENERIC-$Revision: 1.253 $
 
 maxusers	64		# estimated number of users
 
@@ -563,6 +563,7 @@
 siside* at pci? dev ? function ?	# SiS IDE controllers
 slide*  at pci? dev ? function ?	# Symphony Labs IDE controllers
 svwsata* at pci? dev ? function ?	# ServerWorks SATA controllers
+toshide* at pci? dev ? function ?	# TOSHIBA PICCOLO controllers
 viaide* at pci? dev ? function ?	# VIA/AMD/Nvidia IDE controllers
 
 # PCMCIA IDE controllers
@@ -933,7 +934,7 @@
 auixp*	at pci? dev ? function ?	# ATI IXP AC'97 Audio
 autri*	at pci? dev ? function ?	# Trident 4DWAVE based AC'97 Audio
 auvia*	at pci? dev ? function ?	# VIA AC'97 audio
-azalia*	at pci? dev ? function ?	# High Definition Audio
+#azalia*	at pci? dev ? function ?	# High Definition Audio
 clcs*	at pci? dev ? function ?	# Cirrus Logic CS4280
 clct*	at pci? dev ? function ?	# Cirrus Logic CS4281
 cmpci*	at pci? dev ? function ?	# C-Media CMI8338/8738

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.944 src/sys/arch/i386/conf/GENERIC:1.945
--- src/sys/arch/i386/conf/GENERIC:1.944	Mon Sep  7 18:59:09 2009
+++ src/sys/arch/i386/conf/GENERIC	Sat Sep 19 21:14:31 2009
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.944 2009/09/07 22:59:09 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.945 2009/09/20 01:14:31 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.944 $
+#ident 		GENERIC-$Revision: 1.945 $
 
 maxusers	64		# estimated number of users
 
@@ -819,6 +819,7 @@
 slide*  	at pci? dev ? function ?	# Symphony Labs IDE controllers
 svwsata* 	at pci? dev ? function ?	# ServerWorks SATA controllers
 stpcide*	at pci? dev ? function ?	# STMicro STPC IDE controllers
+toshide*	at pci? dev ? function ?	# TOSHIBA PICCOLO controllers
 viaide* 	at pci? dev ? function ?	# VIA/AMD/Nvidia IDE controllers
 
 # ISA Plug-and-Play IDE controllers



CVS commit: [netbsd-5] src/distrib/sets/lists/xetc

2009-09-19 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 20 03:42:07 UTC 2009

Modified Files:
src/distrib/sets/lists/xetc [netbsd-5]: mi

Log Message:
Mark /etc/X11/lbxproxy/AtomControl as xorg,obsolete, not obsolete for
all.  This unbreaks XFree86-using ports and should have been part of
ticket 958.  Hi mrg!


To generate a diff of this commit:
cvs rdiff -u -r1.10.2.4 -r1.10.2.5 src/distrib/sets/lists/xetc/mi

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

Modified files:

Index: src/distrib/sets/lists/xetc/mi
diff -u src/distrib/sets/lists/xetc/mi:1.10.2.4 src/distrib/sets/lists/xetc/mi:1.10.2.5
--- src/distrib/sets/lists/xetc/mi:1.10.2.4	Thu Sep 17 04:24:27 2009
+++ src/distrib/sets/lists/xetc/mi	Sun Sep 20 03:42:07 2009
@@ -1,11 +1,11 @@
-# $NetBSD: mi,v 1.10.2.4 2009/09/17 04:24:27 snj Exp $
+# $NetBSD: mi,v 1.10.2.5 2009/09/20 03:42:07 snj Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
 ./etc/X11/fs/config	-unknown-	x11
 ./etc/X11/fs/config	-unknown-	xorg
 ./etc/X11/lbxproxy/AtomControl-unknown-	x11
-./etc/X11/lbxproxy/AtomControl-unknown-	obsolete
+./etc/X11/lbxproxy/AtomControl-obsolete-	xorg,obsolete
 ./etc/X11/proxymngr/pmconfig-unknown-	x11
 ./etc/X11/proxymngr/pmconfig-unknown-	xorg
 ./etc/X11/rstart/commands/@List-unknown-	x11