CVS commit: src/sys/kern

2011-08-08 Thread enami tsugutomo
Module Name:src
Committed By:   enami
Date:   Mon Aug  8 06:30:43 UTC 2011

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

Log Message:
Bounds process's stack size with max_stack_size so that 32bit
binary works regardless of stack size limit setting.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/kern/exec_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/exec_subr.c
diff -u src/sys/kern/exec_subr.c:1.69 src/sys/kern/exec_subr.c:1.70
--- src/sys/kern/exec_subr.c:1.69	Thu Jun 23 23:42:44 2011
+++ src/sys/kern/exec_subr.c	Mon Aug  8 06:30:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_subr.c,v 1.69 2011/06/23 23:42:44 matt Exp $	*/
+/*	$NetBSD: exec_subr.c,v 1.70 2011/08/08 06:30:43 enami Exp $	*/
 
 /*
  * Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: exec_subr.c,v 1.69 2011/06/23 23:42:44 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: exec_subr.c,v 1.70 2011/08/08 06:30:43 enami Exp $);
 
 #include opt_pax.h
 
@@ -404,7 +404,8 @@
 	(unsigned long long)epp-ep_minsaddr,
 	(unsigned long long)max_stack_size));
 
-	epp-ep_ssize = l-l_proc-p_rlimit[RLIMIT_STACK].rlim_cur;
+	epp-ep_ssize = MIN(l-l_proc-p_rlimit[RLIMIT_STACK].rlim_cur,
+	max_stack_size);
 
 #ifdef PAX_ASLR
 	pax_aslr_stack(l, epp, max_stack_size);



CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl

2011-08-08 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Mon Aug  8 06:53:00 UTC 2011

Added Files:
othersrc/external/bsd/iscsi/sbin/iscsictl: iscsictl.8

Log Message:
Add a first pass at a manual page, iscsictl(8).


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8

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

Added files:

Index: othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8
diff -u /dev/null othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.1
--- /dev/null	Mon Aug  8 06:53:00 2011
+++ othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8	Mon Aug  8 06:52:59 2011
@@ -0,0 +1,219 @@
+.\ $NetBSD: iscsictl.8,v 1.1 2011/08/08 06:52:59 agc Exp $
+.\
+.\ Copyright (c) 2011 Alistair Crooks a...@netbsd.org
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. Redistributions in binary form must reproduce the above copyright
+.\notice, this list of conditions and the following disclaimer in the
+.\documentation and/or other materials provided with the distribution.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\ IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\
+.Dd August 5, 2011
+.Dt ISCSICTL 8
+.Os
+.Sh NAME
+.Nm iscsictl
+.Nd program to manage iSCSI instances
+.Sh SYNOPSIS
+.Nm
+.Op Fl v
+.Op Fl d Ar directory
+command
+.Op Ar arguments...
+.Sh DESCRIPTION
+The
+.Nm
+utility manages iSCSI instances on the local computer.
+It talks to the
+.Xr iscsid 8
+program to perform this management.
+.Pp
+iSCSI is a method for transferring SCSI commands across a TCP
+connection.
+The client which issues the SCSI command is called the initiator,
+and the device which receives the command and takes action
+is called the target; this mirrors SCSI devices, although instead
+of being physically attached to a host, the SCSI commands and
+responses take place over a TCP connection.
+iSCSI communication is done in sessions.
+The iSCSI initiator logs in to a terget across the network,
+possible authenticating itself; this creates an iSCSI session between initiator
+and target.
+The initiator can then issue commands
+and read responses from the target.
+.Pp
+Firstly, a TCP connection
+the iSCSI initiator on the local machine must be made
+aware of the network location of the target.
+The
+.Dv add_send_target
+is used in
+.Nm
+to do this.
+The targets can be listed using the
+.Dv list_targets
+command.
+To login from the initiator to the target, the
+.Dv login
+command is used; this creates a session between the initiator and target.
+The sessions can be listed by using
+the
+.Dv list_sessions
+command.
+.Pp
+The
+.Nm
+command argument is taken from one of the following options:
+.Bl -tag -width XCXremove_send_targetXX
+.It version
+return the version number of the
+.Nm
+utility
+.It add_target
+.It add_portal
+.It remove_target
+.It slp_find_targets
+.It refresh_targets
+this command causes the iSCSI initiator to refresh its view of the
+iSCSI targets to which it is connected.
+If this command completes successfully, an
+.Dq OK
+value is printed.
+For more context on the exact usage of this
+command, please ee the worked example below.
+.It list_targets
+.It add_send_target
+this coomand allows the iSCSI initiator to connect to an iSCSI
+target. The subsequent
+.Fl a
+target provides the address of the target.
+This can be provided as a numerical IP address,
+or as a textual FQDN.
+For more context on the exact usage of this
+command, please ee the worked example below.
+.It remove_send_target
+.It list_send_targets
+.It add_isns_server
+.It remove_isns_server
+.It find_isns_servers
+.It list_isns_servers
+.It refresh_isns
+.It login
+To be able to communicate with the iSCSI target, the initiator
+must login. This command allows this login to take place.
+The subsequent
+.Fl P session
+argument provides the session which should be used to
+perform the login.
+On successful completion of this command, the
+session which has been created will be displayed, along 

CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl

2011-08-08 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Mon Aug  8 06:54:41 UTC 2011

Modified Files:
othersrc/external/bsd/iscsi/sbin/iscsictl: Makefile

Log Message:
Also make the man page for iscsictl(8)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/iscsi/sbin/iscsictl/Makefile

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

Modified files:

Index: othersrc/external/bsd/iscsi/sbin/iscsictl/Makefile
diff -u othersrc/external/bsd/iscsi/sbin/iscsictl/Makefile:1.2 othersrc/external/bsd/iscsi/sbin/iscsictl/Makefile:1.3
--- othersrc/external/bsd/iscsi/sbin/iscsictl/Makefile:1.2	Mon Aug  8 02:25:32 2011
+++ othersrc/external/bsd/iscsi/sbin/iscsictl/Makefile	Mon Aug  8 06:54:41 2011
@@ -1,6 +1,5 @@
 #	$wasabi: Makefile,v 1.2 2006/05/03 22:45:02 wrstuden Exp $
 
-MKMAN=	no
 PROG=	iscsictl
 BINDIR=	/sbin
 
@@ -9,8 +8,13 @@
 
 CPPFLAGS+= -I${DESTDIR}/usr/include/dev/iscsi
 
+CPPFLAGS+=	-I${.CURDIR}/../../sys/dev/iscsi
+CPPFLAGS+=	-I${.CURDIR}/../../sys
+CPPFLAGS+=	-I${.CURDIR}/../iscsid
 WARNS=	4
 
+MAN=	iscsictl.8
+
 # CPPFLAGS+= -DISCSI_TEST_MODE -DISCSI_DEBUG
 
 .include bsd.prog.mk



CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl

2011-08-08 Thread Alistair G. Crooks
Module Name:othersrc
Committed By:   agc
Date:   Mon Aug  8 06:55:38 UTC 2011

Modified Files:
othersrc/external/bsd/iscsi/sbin/iscsictl: TODO

Log Message:
i've created the initial draft of the man page - take this off the list of
things to do.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/iscsi/sbin/iscsictl/TODO

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

Modified files:

Index: othersrc/external/bsd/iscsi/sbin/iscsictl/TODO
diff -u othersrc/external/bsd/iscsi/sbin/iscsictl/TODO:1.2 othersrc/external/bsd/iscsi/sbin/iscsictl/TODO:1.3
--- othersrc/external/bsd/iscsi/sbin/iscsictl/TODO:1.2	Mon Aug  8 02:24:33 2011
+++ othersrc/external/bsd/iscsi/sbin/iscsictl/TODO	Mon Aug  8 06:55:37 2011
@@ -1,6 +1,5 @@
 To Do
 =
-man page
 global buf - make local
 
 Done
@@ -14,3 +13,4 @@
 u_int
 u_char
 mktemp()
+man page



CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl

2011-08-08 Thread David A. Holland
Module Name:othersrc
Committed By:   dholland
Date:   Mon Aug  8 07:22:13 UTC 2011

Modified Files:
othersrc/external/bsd/iscsi/sbin/iscsictl: iscsictl.8

Log Message:
Minor edits (I don't know enough about how thi works to help that much)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8

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

Modified files:

Index: othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8
diff -u othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.1 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.2
--- othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.1	Mon Aug  8 06:52:59 2011
+++ othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8	Mon Aug  8 07:22:12 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: iscsictl.8,v 1.1 2011/08/08 06:52:59 agc Exp $
+.\ $NetBSD: iscsictl.8,v 1.2 2011/08/08 07:22:12 dholland Exp $
 .\
 .\ Copyright (c) 2011 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -49,14 +49,15 @@
 and the device which receives the command and takes action
 is called the target; this mirrors SCSI devices, although instead
 of being physically attached to a host, the SCSI commands and
-responses take place over a TCP connection.
+responses take place over a network.
 iSCSI communication is done in sessions.
-The iSCSI initiator logs in to a terget across the network,
-possible authenticating itself; this creates an iSCSI session between initiator
+The iSCSI initiator logs in to a target across the network,
+possibly authenticating itself; this creates an iSCSI session between initiator
 and target.
-The initiator can then issue commands
+The initiator can then issue commands to
 and read responses from the target.
 .Pp
+.\ XXX what does this mean?
 Firstly, a TCP connection
 the iSCSI initiator on the local machine must be made
 aware of the network location of the target.
@@ -98,14 +99,14 @@
 command, please ee the worked example below.
 .It list_targets
 .It add_send_target
-this coomand allows the iSCSI initiator to connect to an iSCSI
+this command allows the iSCSI initiator to connect to an iSCSI
 target. The subsequent
 .Fl a
 target provides the address of the target.
 This can be provided as a numerical IP address,
 or as a textual FQDN.
 For more context on the exact usage of this
-command, please ee the worked example below.
+command, please see the worked example below.
 .It remove_send_target
 .It list_send_targets
 .It add_isns_server
@@ -124,7 +125,7 @@
 session which has been created will be displayed, along with the connection
 number.
 For more context on the exact usage of this
-command, please ee the worked example below.
+command, please see the worked example below.
 .It logout
 .It add_connection
 .It remove_connection
@@ -140,16 +141,15 @@
 To list the session information, this command is used.
 The session number and target information for each of the targets are displayed.
 For more context on the exact usage of this
-command, please ee the worked example below.
+command, please see the worked example below.
 .It set_node_name
 .El
-.Pp
+.Sh EXAMPLES
 .Nm
 is intended to be used as follows:
-.Sh EXAMPLES
 .Pp
-The initiator itself can be loaded as an lkm, and works successfully
-on 2.0 (the burner host), running against the NetBSD target on a 5.99 host.
+The initiator itself can be loaded as a kernel module, and works successfully
+on 2.0 (the host called burner), running against the NetBSD target on a 5.99 host.
 .Pp
 .Bd -literal
 burner# modload -v -s -p /usr/lkm/iscsi_post.sh /usr/lkm/iscsidrv.o



CVS commit: src/sys/arch/x86/x86

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  8 11:18:34 UTC 2011

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
If the USE_PLATFORM_CLOCK flag is set in the FADT, it indicates that OSPM
should use a platform provided timer (either HPET or the PM timer). A
platform may set this flag if internal processor clock(s) cannot provide
consistent monotonically non-decreasing counters. Set TSC quality to -100
if this flag is set.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/x86/x86/tsc.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/x86/x86/tsc.c
diff -u src/sys/arch/x86/x86/tsc.c:1.28 src/sys/arch/x86/x86/tsc.c:1.29
--- src/sys/arch/x86/x86/tsc.c:1.28	Wed Feb  2 12:26:42 2011
+++ src/sys/arch/x86/x86/tsc.c	Mon Aug  8 11:18:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tsc.c,v 1.28 2011/02/02 12:26:42 bouyer Exp $	*/
+/*	$NetBSD: tsc.c,v 1.29 2011/08/08 11:18:34 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tsc.c,v 1.28 2011/02/02 12:26:42 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: tsc.c,v 1.29 2011/08/08 11:18:34 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -45,6 +45,11 @@
 #include machine/cputypes.h
 
 #include tsc.h
+#include acpica.h
+
+#if NACPICA  0
+#include dev/acpi/acpivar.h
+#endif
 
 u_int	tsc_get_timecount(struct timecounter *);
 
@@ -143,6 +148,21 @@
 		safe = false;
 	}
 
+#if NACPICA  0
+	/*
+	 * If the USE_PLATFORM_CLOCK flag is set in the FADT, it indicates
+	 * that OSPM should use a platform provided timer (either HPET or
+	 * the PM timer). A platform may set this flag if internal
+	 * processor clock(s) cannot provide consistent monotonically
+	 * non-decreasing counters.
+	 */
+	if (acpi_active  (AcpiGbl_FADT.Flags  ACPI_FADT_PLATFORM_CLOCK)) {
+		aprint_debug(TSC: ACPI requested platform-provided timer\n);
+		tsc_timecounter.tc_quality = -100;
+		safe = false;
+	}
+#endif
+
 	if (tsc_freq != 0) {
 		tsc_timecounter.tc_frequency = tsc_freq;
 		tc_init(tsc_timecounter);



CVS commit: src/sys/dev/acpi

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  8 11:27:44 UTC 2011

Modified Files:
src/sys/dev/acpi: acpi_timer.c

Log Message:
The absence of USE_PLATFORM_CLOCK does not imply that the PM Timer is
unreliable; in fact, the PM Timer has to be reliable by definition! Remove
the incorrect warning message that was added in r1.19


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/acpi/acpi_timer.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/acpi/acpi_timer.c
diff -u src/sys/dev/acpi/acpi_timer.c:1.20 src/sys/dev/acpi/acpi_timer.c:1.21
--- src/sys/dev/acpi/acpi_timer.c:1.20	Tue Jan  4 04:28:48 2011
+++ src/sys/dev/acpi/acpi_timer.c	Mon Aug  8 11:27:44 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_timer.c,v 1.20 2011/01/04 04:28:48 jruoho Exp $ */
+/* $NetBSD: acpi_timer.c,v 1.21 2011/08/08 11:27:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2006 Matthias Drochner droch...@netbsd.org
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_timer.c,v 1.20 2011/01/04 04:28:48 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_timer.c,v 1.21 2011/08/08 11:27:44 jmcneill Exp $);
 
 #include sys/types.h
 #include sys/systm.h
@@ -55,7 +55,6 @@
 int
 acpitimer_init(struct acpi_softc *sc)
 {
-	const uint32_t flags = AcpiGbl_FADT.Flags;
 	ACPI_STATUS rv;
 	uint32_t bits;
 	int i, j;
@@ -82,10 +81,6 @@
 	aprint_debug_dev(sc-sc_dev, %s %d-bit timer\n,
 	acpi_timecounter.tc_name, bits);
 
-	if ((flags  ACPI_FADT_PLATFORM_CLOCK) == 0)
-		aprint_debug_dev(sc-sc_dev,
-		warning: timer may be unreliable\n);
-
 	return 0;
 }
 



CVS commit: src/sys/fs/v7fs

2011-08-08 Thread UCHIYAMA Yasushi
Module Name:src
Committed By:   uch
Date:   Mon Aug  8 11:42:30 UTC 2011

Modified Files:
src/sys/fs/v7fs: v7fs_io_user.c

Log Message:
Remove suspicious warning message.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/fs/v7fs/v7fs_io_user.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/v7fs/v7fs_io_user.c
diff -u src/sys/fs/v7fs/v7fs_io_user.c:1.3 src/sys/fs/v7fs/v7fs_io_user.c:1.4
--- src/sys/fs/v7fs/v7fs_io_user.c:1.3	Wed Aug  3 16:21:52 2011
+++ src/sys/fs/v7fs/v7fs_io_user.c	Mon Aug  8 11:42:30 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: v7fs_io_user.c,v 1.3 2011/08/03 16:21:52 dholland Exp $	*/
+/*	$NetBSD: v7fs_io_user.c,v 1.4 2011/08/08 11:42:30 uch Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: v7fs_io_user.c,v 1.3 2011/08/03 16:21:52 dholland Exp $);
+__RCSID($NetBSD: v7fs_io_user.c,v 1.4 2011/08/08 11:42:30 uch Exp $);
 #endif /* not lint */
 
 #include stdio.h
@@ -88,7 +88,6 @@
 	local.addr = mmap(NULL, local.size, PROT_READ | PROT_WRITE | PROT_NONE,
 	MAP_FILE | MAP_SHARED/*writeback*/, local.fd,  0);
 	if (local.addr == MAP_FAILED) {
-		warn(mmap failed. use direct I/O.);
 		local.addr = 0;
 		p-io.read = read_sector;
 		p-io.write = write_sector;



CVS commit: src

2011-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Aug  8 12:08:54 UTC 2011

Modified Files:
src/distrib/sets/lists/comp: mi
src/include: unistd.h
src/lib/libc/sys: Makefile.inc link.2
src/sys/kern: kern_exec.c syscalls.master vfs_syscalls.c
src/sys/sys: fcntl.h stat.h

Log Message:
First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.


To generate a diff of this commit:
cvs rdiff -u -r1.1658 -r1.1659 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.126 -r1.127 src/include/unistd.h
cvs rdiff -u -r1.207 -r1.208 src/lib/libc/sys/Makefile.inc
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/link.2
cvs rdiff -u -r1.316 -r1.317 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.250 -r1.251 src/sys/kern/syscalls.master
cvs rdiff -u -r1.432 -r1.433 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/fcntl.h
cvs rdiff -u -r1.60 -r1.61 src/sys/sys/stat.h

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.1658 src/distrib/sets/lists/comp/mi:1.1659
--- src/distrib/sets/lists/comp/mi:1.1658	Sun Aug  7 13:33:02 2011
+++ src/distrib/sets/lists/comp/mi	Mon Aug  8 12:08:52 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1658 2011/08/07 13:33:02 rmind Exp $
+#	$NetBSD: mi,v 1.1659 2011/08/08 12:08:52 manu Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -4708,6 +4708,7 @@
 ./usr/share/man/cat2/lfs_segclean.0		comp-c-catman		.cat
 ./usr/share/man/cat2/lfs_segwait.0		comp-c-catman		.cat
 ./usr/share/man/cat2/link.0			comp-c-catman		.cat
+./usr/share/man/cat2/linkat.0			comp-c-catman		.cat
 ./usr/share/man/cat2/listen.0			comp-c-catman		.cat
 ./usr/share/man/cat2/lseek.0			comp-c-catman		.cat
 ./usr/share/man/cat2/lstat.0			comp-c-catman		.cat
@@ -10887,6 +10888,7 @@
 ./usr/share/man/html2/lfs_segclean.html		comp-c-htmlman		html
 ./usr/share/man/html2/lfs_segwait.html		comp-c-htmlman		html
 ./usr/share/man/html2/link.html			comp-c-htmlman		html
+./usr/share/man/html2/linkat.html		comp-c-htmlman		html
 ./usr/share/man/html2/listen.html		comp-c-htmlman		html
 ./usr/share/man/html2/lseek.html		comp-c-htmlman		html
 ./usr/share/man/html2/lstat.html		comp-c-htmlman		html
@@ -16846,6 +16848,7 @@
 ./usr/share/man/man2/lfs_segclean.2		comp-c-man		.man
 ./usr/share/man/man2/lfs_segwait.2		comp-c-man		.man
 ./usr/share/man/man2/link.2			comp-c-man		.man
+./usr/share/man/man2/linkat.2			comp-c-man		.man
 ./usr/share/man/man2/listen.2			comp-c-man		.man
 ./usr/share/man/man2/lseek.2			comp-c-man		.man
 ./usr/share/man/man2/lstat.2			comp-c-man		.man

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.126 src/include/unistd.h:1.127
--- src/include/unistd.h:1.126	Sun Jun 26 16:42:40 2011
+++ src/include/unistd.h	Mon Aug  8 12:08:53 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.126 2011/06/26 16:42:40 christos Exp $	*/
+/*	$NetBSD: unistd.h,v 1.127 2011/08/08 12:08:53 manu Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -291,6 +291,24 @@
 ssize_t	 pwrite(int, const void *, size_t, off_t);
 #endif
 
+/*
+ * X/Open Extended API set 2 (a.k.a. C063)
+ */
+#if defined(_INCOMPLETE_XOPEN_C063)
+int	linkat(int, const char *, int, const char *, int);
+int	renameat(int, const char *, int, const char *);
+int	mkfifoat(int, const char *, mode_t);
+int	mknodat(int, const char *, mode_t, uint32_t);
+int	mkdirat(int, const char *, mode_t);
+int	faccessat(int, const char *, int, int);
+int	fchmodat(int, const char *, mode_t, int);
+int	fchownat(int, const char *, uid_t, gid_t, int);
+int	fexecve(int, char * const *, char * const *);
+int	readlinkat(int, const char *, char *, size_t);
+int	symlinkat(const char *, int, const char *);
+int	unlinkat(int, const char *, int);
+#endif
+
 
 /*
  * Implementation-defined extensions

Index: src/lib/libc/sys/Makefile.inc
diff -u src/lib/libc/sys/Makefile.inc:1.207 src/lib/libc/sys/Makefile.inc:1.208
--- src/lib/libc/sys/Makefile.inc:1.207	Mon Jun 27 16:39:44 2011
+++ src/lib/libc/sys/Makefile.inc	Mon Aug  8 12:08:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.207 2011/06/27 16:39:44 manu Exp $
+#	$NetBSD: Makefile.inc,v 1.208 2011/08/08 12:08:53 manu Exp $
 #	@(#)Makefile.inc	8.3 (Berkeley) 10/24/94
 
 # sys sources
@@ -87,9 +87,10 @@
 	setxattr.S getxattr.S listxattr.S removexattr.S \
 		lsetxattr.S lgetxattr.S llistxattr.S lremovexattr.S \
 		fsetxattr.S fgetxattr.S flistxattr.S fremovexattr.S \
-	fchdir.S fchflags.S fchmod.S fchown.S fchroot.S \
-		__fhopen40.S __fhstat50.S __fhstatvfs140.S fktrace.S \
-		

CVS commit: src/sys

2011-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Mon Aug  8 12:17:29 UTC 2011

Modified Files:
src/sys/kern: init_sysent.c syscalls.c
src/sys/rump/include/rump: rump_syscalls.h rumpvnode_if.h
src/sys/rump/librump/rumpkern: rump_syscalls.c
src/sys/rump/librump/rumpvfs: rumpvnode_if.c
src/sys/sys: syscall.h syscallargs.h vnode_if.h

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.256 -r1.257 src/sys/kern/init_sysent.c
cvs rdiff -u -r1.247 -r1.248 src/sys/kern/syscalls.c
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/include/rump/rump_syscalls.h
cvs rdiff -u -r1.11 -r1.12 src/sys/rump/include/rump/rumpvnode_if.h
cvs rdiff -u -r1.73 -r1.74 src/sys/rump/librump/rumpkern/rump_syscalls.c
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpvfs/rumpvnode_if.c
cvs rdiff -u -r1.243 -r1.244 src/sys/sys/syscall.h
cvs rdiff -u -r1.226 -r1.227 src/sys/sys/syscallargs.h
cvs rdiff -u -r1.82 -r1.83 src/sys/sys/vnode_if.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/init_sysent.c
diff -u src/sys/kern/init_sysent.c:1.256 src/sys/kern/init_sysent.c:1.257
--- src/sys/kern/init_sysent.c:1.256	Mon Jul 18 11:43:53 2011
+++ src/sys/kern/init_sysent.c	Mon Aug  8 12:17:27 2011
@@ -1,14 +1,14 @@
-/* $NetBSD: init_sysent.c,v 1.256 2011/07/18 11:43:53 drochner Exp $ */
+/* $NetBSD: init_sysent.c,v 1.257 2011/08/08 12:17:27 manu Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.250 2011/07/18 11:28:24 drochner Exp
+ * created from	NetBSD: syscalls.master,v 1.251 2011/08/08 12:08:53 manu Exp
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.256 2011/07/18 11:43:53 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_sysent.c,v 1.257 2011/08/08 12:17:27 manu Exp $);
 
 #include opt_modular.h
 #include opt_ntp.h
@@ -1106,36 +1106,36 @@
 	(sy_call_t *)sys_kqueue1 },		/* 455 = kqueue1 */
 	{ ns(struct sys_paccept_args), 0,
 	(sy_call_t *)sys_paccept },		/* 456 = paccept */
-	{ 0, 0, 0,
-	sys_nosys },			/* 457 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 458 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 459 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 460 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 461 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 462 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 463 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 464 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 465 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 466 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 467 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 468 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 469 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 470 = filler */
-	{ 0, 0, 0,
-	sys_nosys },			/* 471 = filler */
+	{ ns(struct sys_linkat_args), 0,
+	(sy_call_t *)sys_linkat },		/* 457 = linkat */
+	{ ns(struct sys_renameat_args), 0,
+	(sy_call_t *)sys_renameat },	/* 458 = renameat */
+	{ ns(struct sys_mkfifoat_args), 0,
+	(sy_call_t *)sys_mkfifoat },	/* 459 = mkfifoat */
+	{ ns(struct sys_mknodat_args), 0,
+	(sy_call_t *)sys_mknodat },		/* 460 = mknodat */
+	{ ns(struct sys_mkdirat_args), 0,
+	(sy_call_t *)sys_mkdirat },		/* 461 = mkdirat */
+	{ ns(struct sys_faccessat_args), 0,
+	(sy_call_t *)sys_faccessat },	/* 462 = faccessat */
+	{ ns(struct sys_fchmodat_args), 0,
+	(sy_call_t *)sys_fchmodat },	/* 463 = fchmodat */
+	{ ns(struct sys_fchownat_args), 0,
+	(sy_call_t *)sys_fchownat },	/* 464 = fchownat */
+	{ ns(struct sys_fexecve_args), 0,
+	(sy_call_t *)sys_fexecve },		/* 465 = fexecve */
+	{ ns(struct sys_fstatat_args), 0,
+	(sy_call_t *)sys_fstatat },		/* 466 = fstatat */
+	{ ns(struct sys_utimensat_args), 0,
+	(sy_call_t *)sys_utimensat },	/* 467 = utimensat */
+	{ ns(struct sys_openat_args), 0,
+	(sy_call_t *)sys_openat },		/* 468 = openat */
+	{ ns(struct sys_readlinkat_args), 0,
+	(sy_call_t *)sys_readlinkat },	/* 469 = readlinkat */
+	{ ns(struct sys_symlinkat_args), 0,
+	(sy_call_t *)sys_symlinkat },	/* 470 = symlinkat */
+	{ ns(struct sys_unlinkat_args), 0,
+	(sy_call_t *)sys_unlinkat },	/* 471 = unlinkat */
 	{ 0, 0, 0,
 	sys_nosys },			/* 472 = filler */
 	{ 0, 0, 0,

Index: src/sys/kern/syscalls.c
diff -u src/sys/kern/syscalls.c:1.247 src/sys/kern/syscalls.c:1.248
--- src/sys/kern/syscalls.c:1.247	Mon Jul 18 11:43:53 2011
+++ src/sys/kern/syscalls.c	Mon Aug  8 12:17:28 2011
@@ -1,14 +1,14 @@
-/* $NetBSD: syscalls.c,v 1.247 2011/07/18 11:43:53 drochner Exp $ */
+/* $NetBSD: syscalls.c,v 1.248 2011/08/08 12:17:28 manu Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.250 2011/07/18 11:28:24 drochner Exp
+ * created from	NetBSD: 

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

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 14:49:06 UTC 2011

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

Log Message:
inline - static inline
For successful gcc 4.5 builds.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sparc64/dev/fdc.c

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

Modified files:

Index: src/sys/arch/sparc64/dev/fdc.c
diff -u src/sys/arch/sparc64/dev/fdc.c:1.35 src/sys/arch/sparc64/dev/fdc.c:1.36
--- src/sys/arch/sparc64/dev/fdc.c:1.35	Fri Jun  3 02:48:33 2011
+++ src/sys/arch/sparc64/dev/fdc.c	Mon Aug  8 14:49:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdc.c,v 1.35 2011/06/03 02:48:33 christos Exp $	*/
+/*	$NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.35 2011/06/03 02:48:33 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $);
 
 #include opt_ddb.h
 #include opt_md.h
@@ -257,7 +257,7 @@
 fdcmatch_ebus, fdcattach_ebus, NULL, NULL);
 #endif
 
-inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
+static inline struct fd_type *fd_dev_to_type(struct fd_softc *, dev_t);
 
 /*
  * Floppies come in various flavors, e.g., 1.2MB vs 1.44MB; here is how
@@ -993,7 +993,7 @@
 }
 
 
-inline struct fd_type *
+static inline struct fd_type *
 fd_dev_to_type(struct fd_softc *fd, dev_t dev)
 {
 	int type = FDTYPE(dev);



CVS commit: src/sys/nfs

2011-08-08 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Mon Aug  8 16:04:07 UTC 2011

Modified Files:
src/sys/nfs: nfs_serv.c nfs_srvsubs.c

Log Message:
nfs_namei() should not return a non-null path buffer except on success,
even though the callers are apparently prepared to cope.

Fixes last tidyup part of PR 44625.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.10 -r1.11 src/sys/nfs/nfs_srvsubs.c

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

Modified files:

Index: src/sys/nfs/nfs_serv.c
diff -u src/sys/nfs/nfs_serv.c:1.159 src/sys/nfs/nfs_serv.c:1.160
--- src/sys/nfs/nfs_serv.c:1.159	Mon Apr 18 00:38:33 2011
+++ src/sys/nfs/nfs_serv.c	Mon Aug  8 16:04:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_serv.c,v 1.159 2011/04/18 00:38:33 dholland Exp $	*/
+/*	$NetBSD: nfs_serv.c,v 1.160 2011/08/08 16:04:07 dholland Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: nfs_serv.c,v 1.159 2011/04/18 00:38:33 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: nfs_serv.c,v 1.160 2011/08/08 16:04:07 dholland Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1911,7 +1911,9 @@
 		nfsm_srvwcc_data(tdirfor_ret, tdirfor, tdiraft_ret, tdiraft);
 		if (fdirp)
 			vrele(fdirp);
-		pathbuf_destroy(fromnd.ni_pathbuf);
+		if (fromnd.ni_pathbuf != NULL) {
+			pathbuf_destroy(fromnd.ni_pathbuf);
+		}
 		return (0);
 	}
 	if (fromnd.ni_dvp != fromnd.ni_vp) {
@@ -2060,7 +2062,10 @@
 		if (error == -1)
 			error = 0;
 	}
-	pathbuf_destroy(tond.ni_pathbuf);
+	if (tond.ni_pathbuf != NULL) {
+		pathbuf_destroy(tond.ni_pathbuf);
+		tond.ni_pathbuf = NULL;
+	}
 	tond.ni_cnd.cn_nameiop = 0;
 out1:
 	if (fdirp) {
@@ -2078,6 +2083,7 @@
 		tdirp = NULL;
 	}
 	pathbuf_destroy(fromnd.ni_pathbuf);
+	fromnd.ni_pathbuf = NULL;
 	fromnd.ni_cnd.cn_nameiop = 0;
 	localfs = NULL;
 	nfsm_reply(2 * NFSX_WCCDATA(v3));
@@ -2095,14 +2101,20 @@
 		vrele(tdirp);
 #endif
 	if (tond.ni_cnd.cn_nameiop) {
-		pathbuf_destroy(tond.ni_pathbuf);
+		if (tond.ni_pathbuf != NULL) {
+			pathbuf_destroy(tond.ni_pathbuf);
+			tond.ni_pathbuf = NULL;
+		}
 	}
 	if (localfs) {
 		VFS_RENAMELOCK_EXIT(localfs);
 	}
 	if (fromnd.ni_cnd.cn_nameiop) {
 		VOP_ABORTOP(fromnd.ni_dvp, fromnd.ni_cnd);
-		pathbuf_destroy(fromnd.ni_pathbuf);
+		if (fromnd.ni_pathbuf != NULL) {
+			pathbuf_destroy(fromnd.ni_pathbuf);
+			fromnd.ni_pathbuf = NULL;
+		}
 		vrele(fromnd.ni_dvp);
 		vrele(fvp);
 	}
@@ -2189,7 +2201,10 @@
 		vrele(dirp);
 	}
 	vrele(vp);
-	pathbuf_destroy(nd.ni_pathbuf);
+	if (nd.ni_pathbuf != NULL) {
+		pathbuf_destroy(nd.ni_pathbuf);
+		nd.ni_pathbuf = NULL;
+	}
 	nfsm_reply(NFSX_POSTOPATTR(v3) + NFSX_WCCDATA(v3));
 	if (v3) {
 		nfsm_srvpostop_attr(getret, at);
@@ -2305,7 +2320,10 @@
 		vrele(dirp);
 		dirp = NULL;
 	}
-	pathbuf_destroy(nd.ni_pathbuf);
+	if (nd.ni_pathbuf != NULL) {
+		pathbuf_destroy(nd.ni_pathbuf);
+		nd.ni_pathbuf = NULL;
+	}
 	abort = 0;
 	nfsm_reply(NFSX_SRVFH(nsfh, v3) + NFSX_POSTOPATTR(v3) +
 	NFSX_WCCDATA(v3));
@@ -2326,7 +2344,10 @@
 			vput(nd.ni_dvp);
 		if (nd.ni_vp)
 			vrele(nd.ni_vp);
-		pathbuf_destroy(nd.ni_pathbuf);
+		if (nd.ni_pathbuf != NULL) {
+			pathbuf_destroy(nd.ni_pathbuf);
+			nd.ni_pathbuf = NULL;
+		}
 	}
 	if (dirp)
 		vrele(dirp);
@@ -2374,6 +2395,7 @@
 	if (error) {
 		if (nd.ni_pathbuf != NULL) {
 			pathbuf_destroy(nd.ni_pathbuf);
+			nd.ni_pathbuf = NULL;
 		}
 		nfsm_reply(NFSX_WCCDATA(v3));
 		nfsm_srvwcc_data(dirfor_ret, dirfor, diraft_ret, diraft);
@@ -2419,7 +2441,10 @@
 		vrele(dirp);
 		dirp = NULL;
 	}
-	pathbuf_destroy(nd.ni_pathbuf);
+	if (nd.ni_pathbuf != NULL) {
+		pathbuf_destroy(nd.ni_pathbuf);
+		nd.ni_pathbuf = NULL;
+	}
 	abort = 0;
 	nfsm_reply(NFSX_SRVFH(nsfh, v3) + NFSX_POSTOPATTR(v3) +
 	NFSX_WCCDATA(v3));
@@ -2444,7 +2469,10 @@
 			vput(nd.ni_dvp);
 		if (nd.ni_vp)
 			vrele(nd.ni_vp);
-		pathbuf_destroy(nd.ni_pathbuf);
+		if (nd.ni_pathbuf != NULL) {
+			pathbuf_destroy(nd.ni_pathbuf);
+			nd.ni_pathbuf = NULL;
+		}
 	}
 	if (dirp)
 		vrele(dirp);
@@ -2487,6 +2515,7 @@
 	if (error) {
 		if (nd.ni_pathbuf != NULL) {
 			pathbuf_destroy(nd.ni_pathbuf);
+			nd.ni_pathbuf = NULL;
 		}
 		nfsm_reply(NFSX_WCCDATA(v3));
 		nfsm_srvwcc_data(dirfor_ret, dirfor, diraft_ret, diraft);
@@ -2524,7 +2553,10 @@
 			vput(nd.ni_dvp);
 		vput(vp);
 	}
-	pathbuf_destroy(nd.ni_pathbuf);
+	if (nd.ni_pathbuf != NULL) {
+		pathbuf_destroy(nd.ni_pathbuf);
+		nd.ni_pathbuf = NULL;
+	}
 	if (dirp) {
 		if (v3) {
 			diraft_ret = VOP_GETATTR(dirp, diraft, cred);

Index: src/sys/nfs/nfs_srvsubs.c
diff -u src/sys/nfs/nfs_srvsubs.c:1.10 src/sys/nfs/nfs_srvsubs.c:1.11
--- src/sys/nfs/nfs_srvsubs.c:1.10	Mon Apr 11 01:33:05 2011
+++ src/sys/nfs/nfs_srvsubs.c	Mon Aug  8 16:04:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_srvsubs.c,v 1.10 2011/04/11 01:33:05 dholland Exp $	*/
+/*	$NetBSD: nfs_srvsubs.c,v 1.11 2011/08/08 

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

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 16:13:42 UTC 2011

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

Log Message:
Finish reverting premature modularization of amd64 kernels.


To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amd64/conf/INSTALL

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.328 src/sys/arch/amd64/conf/GENERIC:1.329
--- src/sys/arch/amd64/conf/GENERIC:1.328	Sat Jul 30 18:41:34 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Aug  8 16:13:42 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.328 2011/07/30 18:41:34 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.329 2011/08/08 16:13:42 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,15 +22,10 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.328 $
+#ident 		GENERIC-$Revision: 1.329 $
 
 maxusers	64		# estimated number of users
 
-# Common binary formats are statically compiled in by default.
-options 	EXEC_ELF32	# exec ELF 32-bits binaries
-#no options 	EXEC_ELF64	# exec ELF 64-bits binaries
-#no options 	EXEC_SCRIPT	# exec #! scripts
-
 # delay between rebooting ... message and hardware reset, in milliseconds
 #options 	CPURESET_DELAY=2000
 
@@ -70,8 +65,6 @@
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
 #options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
-no options	AIO		# POSIX asynchronous I/O, built as a module(7)
-no options	MQUEUE		# POSIX messsage queues, built as a module(7)
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support
@@ -124,8 +117,9 @@
 
 options 	COMPAT_OSSAUDIO
 options 	COMPAT_NETBSD32
-#options 	COMPAT_LINUX
-#options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
+options 	COMPAT_LINUX
+options 	COMPAT_LINUX32	# req. COMPAT_LINUX and COMPAT_NETBSD32
+options 	EXEC_ELF32
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
 # Wedge support
@@ -139,23 +133,22 @@
 file-system	MFS		# memory file system
 file-system 	NFS		# Network File System client
 file-system	TMPFS		# Efficient memory file-system
-# File systems, built as module(7)s by default
-#file-system	EXT2FS		# second extended file system (linux)
-#file-system	LFS		# log-structured file system
-#file-system	NTFS		# Windows/NT file system (experimental)
-#file-system	CD9660		# ISO 9660 + Rock Ridge file system
-#file-system	MSDOSFS		# MS-DOS file system
-#file-system	FDESC		# /dev/fd
-#file-system	KERNFS		# /kern
-#file-system	NULLFS		# loopback file system
-#file-system	OVERLAY		# overlay file system
-#file-system	PROCFS		# /proc
-#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
-#file-system	UMAPFS		# NULLFS + uid and gid remapping
-#file-system	UNION		# union file system
-#file-system	CODA		# Coda File System; also needs vcoda (below)
-#file-system	PTYFS		# /dev/ptm support
+file-system	EXT2FS		# second extended file system (linux)
+file-system	LFS		# log-structured file system
+file-system	NTFS		# Windows/NT file system (experimental)
+file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+file-system	FDESC		# /dev/fd
+file-system	KERNFS		# /kern
+file-system	NULLFS		# loopback file system
+file-system	OVERLAY		# overlay file system
+file-system	PROCFS		# /proc
+file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
+file-system	UMAPFS		# NULLFS + uid and gid remapping
+file-system	UNION		# union file system
+file-system	CODA		# Coda File System; also needs vcoda (below)
+file-system	PTYFS		# /dev/ptm support
 #file-system	UDF		# experimental - OSTA UDF CD/DVD file-system
 #file-system	HFS		# experimental - Apple HFS+ (read-only)
 #file-system	NILFS		# experimental - NTT's NiLFS(2)
@@ -1157,9 +1150,9 @@
 pseudo-device	agr			# IEEE 802.3ad link aggregation
 
 #
-# accept filters, built as module(7)s by default
-#pseudo-device   accf_data		# dataready accept filter
-#pseudo-device   accf_http		# httpready accept filter
+# accept filters
+pseudo-device   accf_data		# dataready accept filter
+pseudo-device   accf_http		# httpready accept filter
 
 # miscellaneous pseudo-devices
 pseudo-device	pty			# pseudo-terminals
@@ -1176,7 +1169,7 @@
 pseudo-device	btuart			# Bluetooth HCI UART (H4)
 
 # a pseudo device needed for Coda	# also needs CODA (above)
-#pseudo-device	vcoda		4	# coda minicache - venus comm.
+pseudo-device	vcoda		4	# coda minicache - venus comm.
 
 # a pseudo device needed for SMBFS
 pseudo-device	nsmb			# experimental - SMB requester

Index: src/sys/arch/amd64/conf/INSTALL
diff -u 

CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl

2011-08-08 Thread Jeff Rizzo
Module Name:othersrc
Committed By:   riz
Date:   Mon Aug  8 16:23:43 UTC 2011

Modified Files:
othersrc/external/bsd/iscsi/sbin/iscsictl: iscsic_globals.h

Log Message:
Fix bigendian build of iscsictl.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_globals.h

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

Modified files:

Index: othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_globals.h
diff -u othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_globals.h:1.2 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_globals.h:1.3
--- othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_globals.h:1.2	Mon Aug  8 02:24:33 2011
+++ othersrc/external/bsd/iscsi/sbin/iscsictl/iscsic_globals.h	Mon Aug  8 16:23:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsic_globals.h,v 1.2 2011/08/08 02:24:33 agc Exp $	*/
+/*	$NetBSD: iscsic_globals.h,v 1.3 2011/08/08 16:23:43 riz Exp $	*/
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -114,7 +114,7 @@
 	*d++ = *s--;
 	*d = *s;
 #else
-	memcpy(d, x[2], 6);
+	memcpy(d, ((uint8_t *)x)[2], 6);
 #endif
 }
 



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

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 16:27:07 UTC 2011

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

Log Message:
Finish reverting modularization of i386 GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.1042 -r1.1043 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/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1042 src/sys/arch/i386/conf/GENERIC:1.1043
--- src/sys/arch/i386/conf/GENERIC:1.1042	Sun Aug  7 10:04:41 2011
+++ src/sys/arch/i386/conf/GENERIC	Mon Aug  8 16:27:07 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1042 2011/08/07 10:04:41 tron Exp $
+# $NetBSD: GENERIC,v 1.1043 2011/08/08 16:27:07 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,16 +22,10 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1042 $
+#ident 		GENERIC-$Revision: 1.1043 $
 
 maxusers	64		# estimated number of users
 
-# For GENERIC, we build the exec formats as module(7)s by default.
-no options 	EXEC_AOUT	# exec a.out binaries
-no options 	EXEC_ELF32	# exec ELF binaries
-no options 	EXEC_SCRIPT	# exec #! scripts
-no options 	COREDUMP
-
 # CPU-related options.
 options 	VM86		# virtual 8086 emulation
 options 	USER_LDT	# user-settable LDT; used by WINE
@@ -90,9 +84,7 @@
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
-#options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
-no options 	AIO		# POSIX asynchronous I/O, built as a module(7)
-no options 	MQUEUE		# POSIX messsage queues, built as a module(7)
+options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
 options 	MODULAR		# new style module(7) framework
 
@@ -129,7 +121,7 @@
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
 
-# Compatibility options, built as module(7)s by default
+# Compatibility options
 options 	COMPAT_NOMID	# NetBSD 0.8, 386BSD, and BSDI
 options 	COMPAT_09	# NetBSD 0.9
 options 	COMPAT_10	# NetBSD 1.0
@@ -147,11 +139,11 @@
 #options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 #options 	TCP_COMPAT_42	# 4.2BSD TCP/IP bug compat. Not recommended.
 
-#options 	COMPAT_OSSAUDIO	# OSS (Voxware) audio driver compatibility
-#options 	COMPAT_SVR4	# binary compatibility with SVR4
-#options 	COMPAT_IBCS2	# binary compatibility with SCO and ISC
-#options 	COMPAT_LINUX	# binary compatibility with Linux
-#options 	COMPAT_FREEBSD	# binary compatibility with FreeBSD
+options 	COMPAT_OSSAUDIO	# OSS (Voxware) audio driver compatibility
+options 	COMPAT_SVR4	# binary compatibility with SVR4
+options 	COMPAT_IBCS2	# binary compatibility with SCO and ISC
+options 	COMPAT_LINUX	# binary compatibility with Linux
+options 	COMPAT_FREEBSD	# binary compatibility with FreeBSD
 #options 	COMPAT_NDIS	# NDIS network driver
 options 	COMPAT_BSDPTY	# /dev/[pt]ty?? ptys.
 
@@ -164,37 +156,36 @@
 
 file-system	FFS		# UFS
 file-system	NFS		# Network File System client
-# File systems, built as module(7)s by default
-#file-system	EXT2FS		# second extended file system (linux)
-#file-system	LFS		# log-structured file system
-#file-system	MFS		# memory file system
-#file-system	NTFS		# Windows/NT file system (experimental)
-#file-system	CD9660		# ISO 9660 + Rock Ridge file system
-#file-system	MSDOSFS		# MS-DOS file system
-#file-system	FDESC		# /dev/fd
-#file-system	KERNFS		# /kern
-#file-system	NULLFS		# loopback file system
-#file-system	OVERLAY		# overlay file system
-#file-system	PROCFS		# /proc
-#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-#file-system	UMAPFS		# NULLFS + uid and gid remapping
-#file-system	UNION		# union file system
-#file-system	CODA		# Coda File System; also needs vcoda (below)
-#file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
-#file-system	PTYFS		# /dev/ptm support
-#file-system	TMPFS		# Efficient memory file-system
+file-system	EXT2FS		# second extended file system (linux)
+file-system	LFS		# log-structured file system
+file-system	MFS		# memory file system
+file-system	NTFS		# Windows/NT file system (experimental)
+file-system	CD9660		# ISO 9660 + Rock Ridge file system
+file-system	MSDOSFS		# MS-DOS file system
+file-system	FDESC		# /dev/fd
+file-system	KERNFS		# /kern
+file-system	NULLFS		# loopback file system
+file-system	OVERLAY		# overlay file system
+file-system	PROCFS		# /proc
+file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+file-system	UMAPFS		# NULLFS + uid and gid remapping
+file-system	UNION		# union file system
+file-system	CODA		# Coda File System; also needs vcoda (below)
+file-system	SMBFS		# experimental - CIFS; also needs nsmb (below)
+file-system	PTYFS		# /dev/ptm support
+file-system	TMPFS		# Efficient memory file-system
 #file-system	UDF		# 

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

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 16:27:46 UTC 2011

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

Log Message:
Add P1003_1B_SEMAPHORE to match i386.


To generate a diff of this commit:
cvs rdiff -u -r1.329 -r1.330 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.329 src/sys/arch/amd64/conf/GENERIC:1.330
--- src/sys/arch/amd64/conf/GENERIC:1.329	Mon Aug  8 16:13:42 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Aug  8 16:27:46 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.329 2011/08/08 16:13:42 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.330 2011/08/08 16:27:46 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.329 $
+#ident 		GENERIC-$Revision: 1.330 $
 
 maxusers	64		# estimated number of users
 
@@ -64,7 +64,7 @@
 options 	SYSVMSG		# System V-like message queues
 options 	SYSVSEM		# System V-like semaphores
 options 	SYSVSHM		# System V-like memory sharing
-#options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
+options 	P1003_1B_SEMAPHORE	# p1003.1b semaphore support
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support



CVS commit: src/sys/arch/x86/x86

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  8 17:00:23 UTC 2011

Modified Files:
src/sys/arch/x86/x86: tsc.c

Log Message:
revert previous


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/x86/tsc.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/x86/x86/tsc.c
diff -u src/sys/arch/x86/x86/tsc.c:1.29 src/sys/arch/x86/x86/tsc.c:1.30
--- src/sys/arch/x86/x86/tsc.c:1.29	Mon Aug  8 11:18:34 2011
+++ src/sys/arch/x86/x86/tsc.c	Mon Aug  8 17:00:23 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tsc.c,v 1.29 2011/08/08 11:18:34 jmcneill Exp $	*/
+/*	$NetBSD: tsc.c,v 1.30 2011/08/08 17:00:23 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tsc.c,v 1.29 2011/08/08 11:18:34 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: tsc.c,v 1.30 2011/08/08 17:00:23 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -45,11 +45,6 @@
 #include machine/cputypes.h
 
 #include tsc.h
-#include acpica.h
-
-#if NACPICA  0
-#include dev/acpi/acpivar.h
-#endif
 
 u_int	tsc_get_timecount(struct timecounter *);
 
@@ -148,21 +143,6 @@
 		safe = false;
 	}
 
-#if NACPICA  0
-	/*
-	 * If the USE_PLATFORM_CLOCK flag is set in the FADT, it indicates
-	 * that OSPM should use a platform provided timer (either HPET or
-	 * the PM timer). A platform may set this flag if internal
-	 * processor clock(s) cannot provide consistent monotonically
-	 * non-decreasing counters.
-	 */
-	if (acpi_active  (AcpiGbl_FADT.Flags  ACPI_FADT_PLATFORM_CLOCK)) {
-		aprint_debug(TSC: ACPI requested platform-provided timer\n);
-		tsc_timecounter.tc_quality = -100;
-		safe = false;
-	}
-#endif
-
 	if (tsc_freq != 0) {
 		tsc_timecounter.tc_frequency = tsc_freq;
 		tc_init(tsc_timecounter);



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

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 17:02:32 UTC 2011

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

Log Message:
We have PUFFS, we need putter.


To generate a diff of this commit:
cvs rdiff -u -r1.1043 -r1.1044 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/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1043 src/sys/arch/i386/conf/GENERIC:1.1044
--- src/sys/arch/i386/conf/GENERIC:1.1043	Mon Aug  8 16:27:07 2011
+++ src/sys/arch/i386/conf/GENERIC	Mon Aug  8 17:02:31 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1043 2011/08/08 16:27:07 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.1044 2011/08/08 17:02:31 jakllsch Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1043 $
+#ident 		GENERIC-$Revision: 1.1044 $
 
 maxusers	64		# estimated number of users
 
@@ -1548,6 +1548,7 @@
 #options 	RF_INCLUDE_PARITY_DECLUSTERING=1
 #options 	RF_INCLUDE_PARITY_DECLUSTERING_DS=1
 pseudo-device	fss			# file system snapshot device
+pseudo-device	putter			# for puffs and pud
 
 pseudo-device	md			# memory disk device (ramdisk)
 options 	MEMORY_DISK_HOOKS	# enable root ramdisk



CVS commit: src/sys/arch/hpcmips/tx

2011-08-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  8 17:45:13 UTC 2011

Modified Files:
src/sys/arch/hpcmips/tx: tx39clock.c

Log Message:
Global inlines are not allowed.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/hpcmips/tx/tx39clock.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/hpcmips/tx/tx39clock.c
diff -u src/sys/arch/hpcmips/tx/tx39clock.c:1.25 src/sys/arch/hpcmips/tx/tx39clock.c:1.26
--- src/sys/arch/hpcmips/tx/tx39clock.c:1.25	Wed Mar 16 14:43:37 2011
+++ src/sys/arch/hpcmips/tx/tx39clock.c	Mon Aug  8 17:45:13 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39clock.c,v 1.25 2011/03/16 14:43:37 tsutsui Exp $ */
+/*	$NetBSD: tx39clock.c,v 1.26 2011/08/08 17:45:13 matt Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tx39clock.c,v 1.25 2011/03/16 14:43:37 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: tx39clock.c,v 1.26 2011/08/08 17:45:13 matt Exp $);
 
 #include opt_tx39clock_debug.h
 
@@ -92,8 +92,8 @@
 
 void	__tx39timer_rtcfreeze(tx_chipset_tag_t);
 void	__tx39timer_rtcreset(tx_chipset_tag_t);
-inline void	__tx39timer_rtcget(struct txtime *);
-inline time_t __tx39timer_rtc2sec(struct txtime *);
+void	__tx39timer_rtcget(struct txtime *);
+time_t __tx39timer_rtc2sec(struct txtime *);
 uint32_t tx39_timecount(struct timecounter *);
 
 CFATTACH_DECL(tx39clock, sizeof(struct tx39clock_softc),
@@ -190,7 +190,7 @@
 	tx_conf_write(tc, TX39_TIMERCONTROL_REG, reg);
 }
 
-inline void
+void
 __tx39timer_rtcget(struct txtime *t)
 {
 	tx_chipset_tag_t tc;	



CVS commit: src/sys/sys

2011-08-08 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Aug  8 17:53:29 UTC 2011

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

Log Message:
#include sys/sched.h since it's a dependency


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/sys/kcpuset.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/kcpuset.h
diff -u src/sys/sys/kcpuset.h:1.2 src/sys/sys/kcpuset.h:1.3
--- src/sys/sys/kcpuset.h:1.2	Sun Aug  7 21:38:32 2011
+++ src/sys/sys/kcpuset.h	Mon Aug  8 17:53:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kcpuset.h,v 1.2 2011/08/07 21:38:32 rmind Exp $	*/
+/*	$NetBSD: kcpuset.h,v 1.3 2011/08/08 17:53:29 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2011 The NetBSD Foundation, Inc.
@@ -37,6 +37,8 @@
 
 #ifdef _KERNEL
 
+#include sys/sched.h
+
 void		kcpuset_sysinit(void);
 
 void		kcpuset_create(kcpuset_t **, bool);



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

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  8 18:57:59 UTC 2011

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

Log Message:
remove dtv (available as a module)


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 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.330 src/sys/arch/amd64/conf/GENERIC:1.331
--- src/sys/arch/amd64/conf/GENERIC:1.330	Mon Aug  8 16:27:46 2011
+++ src/sys/arch/amd64/conf/GENERIC	Mon Aug  8 18:57:58 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.330 2011/08/08 16:27:46 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.331 2011/08/08 18:57:58 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.330 $
+#ident 		GENERIC-$Revision: 1.331 $
 
 maxusers	64		# estimated number of users
 
@@ -1025,7 +1025,7 @@
 pseye* at uhub?		# Sony PLAYSTATION(R) Eye webcam
 uvideo* at uhub?	# USB Video Class capture devices
 video* at videobus?
-dtv* at dtvbus?
+#dtv* at dtvbus?
 
 
 # TV cards
@@ -1035,7 +1035,7 @@
 radio* at bktr?
 
 # Conexant CX2388[0-3]-based DTV cards
-cxdtv* at pci? dev ? function ?
+#cxdtv* at pci? dev ? function ?
 #iic* at cxdtv?
 
 



CVS commit: src/sys

2011-08-08 Thread David Young
Module Name:src
Committed By:   dyoung
Date:   Mon Aug  8 19:10:33 UTC 2011

Modified Files:
src/sys/kern: uipc_mbuf.c uipc_mbuf2.c
src/sys/sys: mbuf.h

Log Message:
Miscellaneous mbuf changes:

1 Add some protection against double-freeing mbufs in DIAGNOSTIC kernels.

2 Add a m_defrag() that's derived from
  sys/dev/pci/if_vge.c:vge_m_defrag().  This one copies the packet
  header.

3 Constify m_tag_find().


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.28 -r1.29 src/sys/kern/uipc_mbuf2.c
cvs rdiff -u -r1.144 -r1.145 src/sys/sys/mbuf.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_mbuf.c
diff -u src/sys/kern/uipc_mbuf.c:1.141 src/sys/kern/uipc_mbuf.c:1.142
--- src/sys/kern/uipc_mbuf.c:1.141	Wed Jul 27 14:35:34 2011
+++ src/sys/kern/uipc_mbuf.c	Mon Aug  8 19:10:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf.c,v 1.141 2011/07/27 14:35:34 uebayasi Exp $	*/
+/*	$NetBSD: uipc_mbuf.c,v 1.142 2011/08/08 19:10:33 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.141 2011/07/27 14:35:34 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf.c,v 1.142 2011/08/08 19:10:33 dyoung Exp $);
 
 #include opt_mbuftrace.h
 #include opt_nmbclusters.h
@@ -494,6 +494,8 @@
 {
 	struct mbuf *m;
 
+	KASSERT(type != MT_FREE);
+
 	m = pool_cache_get(mb_cache,
 	nowait == M_WAIT ? PR_WAITOK|PR_LIMITFAIL : 0);
 	if (m == NULL)
@@ -1249,6 +1251,62 @@
 	return error;
 }
 
+/*
+ * Copy the mbuf chain to a new mbuf chain that is as short as possible.
+ * Return the new mbuf chain on success, NULL on failure.  On success,
+ * free the old mbuf chain.
+ */
+struct mbuf *
+m_defrag(struct mbuf *mold, int flags)
+{
+	struct mbuf *m0, *mn, *n;
+	size_t sz = mold-m_pkthdr.len;
+
+#ifdef DIAGNOSTIC
+	if ((mold-m_flags  M_PKTHDR) == 0)
+		panic(m_defrag: not a mbuf chain header);
+#endif
+
+	MGETHDR(m0, flags, MT_DATA);
+	if (m0 == NULL)
+		return NULL;
+	M_COPY_PKTHDR(m0, mold);
+	mn = m0;
+
+	do {
+		if (sz  MHLEN) {
+			MCLGET(mn, M_DONTWAIT);
+			if ((mn-m_flags  M_EXT) == 0) {
+m_freem(m0);
+return NULL;
+			}
+		}
+
+		mn-m_len = MIN(sz, MCLBYTES);
+
+		m_copydata(mold, mold-m_pkthdr.len - sz, mn-m_len,
+		 mtod(mn, void *));
+
+		sz -= mn-m_len;
+
+		if (sz  0) {
+			/* need more mbufs */
+			MGET(n, M_NOWAIT, MT_DATA);
+			if (n == NULL) {
+m_freem(m0);
+return NULL;
+			}
+
+			mn-m_next = n;
+			mn = n;
+		}
+	} while (sz  0);
+
+	m_freem(mold);
+
+	return m0;
+}
+
 int
 m_copyback0(struct mbuf **mp0, int off, int len, const void *vp, int flags,
 int how)

Index: src/sys/kern/uipc_mbuf2.c
diff -u src/sys/kern/uipc_mbuf2.c:1.28 src/sys/kern/uipc_mbuf2.c:1.29
--- src/sys/kern/uipc_mbuf2.c:1.28	Sat Apr 18 14:58:04 2009
+++ src/sys/kern/uipc_mbuf2.c	Mon Aug  8 19:10:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_mbuf2.c,v 1.28 2009/04/18 14:58:04 tsutsui Exp $	*/
+/*	$NetBSD: uipc_mbuf2.c,v 1.29 2011/08/08 19:10:33 dyoung Exp $	*/
 /*	$KAME: uipc_mbuf2.c,v 1.29 2001/02/14 13:42:10 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_mbuf2.c,v 1.28 2009/04/18 14:58:04 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_mbuf2.c,v 1.29 2011/08/08 19:10:33 dyoung Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -335,7 +335,7 @@
 
 /* Find a tag, starting from a given position. */
 struct m_tag *
-m_tag_find(struct mbuf *m, int type, struct m_tag *t)
+m_tag_find(const struct mbuf *m, int type, struct m_tag *t)
 {
 	struct m_tag *p;
 

Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.144 src/sys/sys/mbuf.h:1.145
--- src/sys/sys/mbuf.h:1.144	Fri Oct 24 22:31:40 2008
+++ src/sys/sys/mbuf.h	Mon Aug  8 19:10:33 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbuf.h,v 1.144 2008/10/24 22:31:40 dyoung Exp $	*/
+/*	$NetBSD: mbuf.h,v 1.145 2011/08/08 19:10:33 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -551,6 +551,8 @@
 	if ((m)-m_flags  M_EXT) {	\
 		m_ext_free(m);		\
 	} else {			\
+		KASSERT(m-m_type != MT_FREE);\
+		m-m_type = MT_FREE;	\
 		pool_cache_put(mb_cache, (m));\
 	}\
 
@@ -667,6 +669,7 @@
 /* change mbuf to new type */
 #define MCHTYPE(m, t)			\
 do {	\
+	KASSERT((t) != MT_FREE);	\
 	mbstat_type_add((m)-m_type, -1);\
 	mbstat_type_add(t, 1);		\
 	(m)-m_type = t;		\
@@ -823,6 +826,7 @@
 struct	mbuf *m_split(struct mbuf *,int, int);
 struct	mbuf *m_getptr(struct mbuf *, int, int *);
 void	m_adj(struct mbuf *, int);
+struct	mbuf *m_defrag(struct mbuf *, int);
 int	m_apply(struct mbuf *, int, int,
 		int (*)(void *, void *, unsigned int), void *);
 void	m_cat(struct mbuf *,struct mbuf *);
@@ -854,7 +858,7 @@
 void	m_tag_delete(struct mbuf *, 

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

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:33:34 UTC 2011

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

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1643):
sys/net/if.c: revision 1.243
Prevent if_detach() from crashing while it walks the routing table
to find and unlink routes that reference the detached ifnet: make
if_rt_walktree() return ERESTART whenever it has deleted a route.
Whenever rt_walktree() returns ERESTART, if_detach() restarts it.
I believe that this fix resembles one by Jonathan Kollasch or by someone
else, which has languished in a PR for too long.  Sorry!
Tested by me and by Jeff Rizzo.
XXX It's supposed to be safe for rn_walktree() to apply to the routing
XXX table a routine that may delete routes.  Why isn't it safe in
XXX practice?


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

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

Modified files:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.230.4.4 src/sys/net/if.c:1.230.4.5
--- src/sys/net/if.c:1.230.4.4	Wed Feb 16 20:37:47 2011
+++ src/sys/net/if.c	Mon Aug  8 19:33:34 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.230.4.4 2011/02/16 20:37:47 bouyer Exp $	*/
+/*	$NetBSD: if.c,v 1.230.4.5 2011/08/08 19:33:34 riz Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.4 2011/02/16 20:37:47 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.5 2011/08/08 19:33:34 riz Exp $);
 
 #include opt_inet.h
 
@@ -726,8 +726,10 @@
 	if_free_sadl(ifp);
 
 	/* Walk the routing table looking for stragglers. */
-	for (i = 0; i = AF_MAX; i++)
-		(void)rt_walktree(i, if_rt_walktree, ifp);
+	for (i = 0; i = AF_MAX; i++) {
+		while (rt_walktree(i, if_rt_walktree, ifp) == ERESTART)
+			;
+	}
 
 	DOMAIN_FOREACH(dp) {
 		if (dp-dom_ifdetach != NULL  ifp-if_afdata[dp-dom_family])
@@ -838,7 +840,7 @@
 	if (error != 0)
 		printf(%s: warning: unable to delete rtentry @ %p, 
 		error = %d\n, ifp-if_xname, rt, error);
-	return 0;
+	return ERESTART;
 }
 
 /*



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

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:35:16 UTC 2011

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

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1643):
sys/net/if.c: revision 1.243
Prevent if_detach() from crashing while it walks the routing table
to find and unlink routes that reference the detached ifnet: make
if_rt_walktree() return ERESTART whenever it has deleted a route.
Whenever rt_walktree() returns ERESTART, if_detach() restarts it.
I believe that this fix resembles one by Jonathan Kollasch or by someone
else, which has languished in a PR for too long.  Sorry!
Tested by me and by Jeff Rizzo.
XXX It's supposed to be safe for rn_walktree() to apply to the routing
XXX table a routine that may delete routes.  Why isn't it safe in
XXX practice?


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

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

Modified files:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.230.4.3 src/sys/net/if.c:1.230.4.3.2.1
--- src/sys/net/if.c:1.230.4.3	Sat Jun 12 16:37:55 2010
+++ src/sys/net/if.c	Mon Aug  8 19:35:15 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.230.4.3 2010/06/12 16:37:55 riz Exp $	*/
+/*	$NetBSD: if.c,v 1.230.4.3.2.1 2011/08/08 19:35:15 riz Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.3 2010/06/12 16:37:55 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.3.2.1 2011/08/08 19:35:15 riz Exp $);
 
 #include opt_inet.h
 
@@ -726,8 +726,10 @@
 	if_free_sadl(ifp);
 
 	/* Walk the routing table looking for stragglers. */
-	for (i = 0; i = AF_MAX; i++)
-		(void)rt_walktree(i, if_rt_walktree, ifp);
+	for (i = 0; i = AF_MAX; i++) {
+		while (rt_walktree(i, if_rt_walktree, ifp) == ERESTART)
+			;
+	}
 
 	DOMAIN_FOREACH(dp) {
 		if (dp-dom_ifdetach != NULL  ifp-if_afdata[dp-dom_family])
@@ -838,7 +840,7 @@
 	if (error != 0)
 		printf(%s: warning: unable to delete rtentry @ %p, 
 		error = %d\n, ifp-if_xname, rt, error);
-	return 0;
+	return ERESTART;
 }
 
 /*



CVS commit: [netbsd-5-1] src/doc

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:35:42 UTC 2011

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

Log Message:
Ticket 1643


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-5.1.1

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

Modified files:

Index: src/doc/CHANGES-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.29 src/doc/CHANGES-5.1.1:1.1.2.30
--- src/doc/CHANGES-5.1.1:1.1.2.29	Fri Jul  8 21:06:16 2011
+++ src/doc/CHANGES-5.1.1	Mon Aug  8 19:35:41 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.29 2011/07/08 21:06:16 sborrill Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.30 2011/08/08 19:35:41 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2488,3 +2488,8 @@
 	Update bind to 9.7.3-P3 fixing CVE-2011-2464
 	[spz, ticket #1647]
 
+sys/net/if.c	1.243
+
+	Prevent crash when using 'ifconfig destroy'.
+	[sborrill, ticket #1643]
+



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

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:36:02 UTC 2011

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

Log Message:
Pull up following revision(s) (requested by sborrill in ticket #1643):
sys/net/if.c: revision 1.243
Prevent if_detach() from crashing while it walks the routing table
to find and unlink routes that reference the detached ifnet: make
if_rt_walktree() return ERESTART whenever it has deleted a route.
Whenever rt_walktree() returns ERESTART, if_detach() restarts it.
I believe that this fix resembles one by Jonathan Kollasch or by someone
else, which has languished in a PR for too long.  Sorry!
Tested by me and by Jeff Rizzo.
XXX It's supposed to be safe for rn_walktree() to apply to the routing
XXX table a routine that may delete routes.  Why isn't it safe in
XXX practice?


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

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

Modified files:

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.230.4.1 src/sys/net/if.c:1.230.4.1.2.1
--- src/sys/net/if.c:1.230.4.1	Tue Feb 24 02:26:42 2009
+++ src/sys/net/if.c	Mon Aug  8 19:36:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.230.4.1 2009/02/24 02:26:42 snj Exp $	*/
+/*	$NetBSD: if.c,v 1.230.4.1.2.1 2011/08/08 19:36:02 riz Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.1 2009/02/24 02:26:42 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: if.c,v 1.230.4.1.2.1 2011/08/08 19:36:02 riz Exp $);
 
 #include opt_inet.h
 
@@ -726,8 +726,10 @@
 	if_free_sadl(ifp);
 
 	/* Walk the routing table looking for stragglers. */
-	for (i = 0; i = AF_MAX; i++)
-		(void)rt_walktree(i, if_rt_walktree, ifp);
+	for (i = 0; i = AF_MAX; i++) {
+		while (rt_walktree(i, if_rt_walktree, ifp) == ERESTART)
+			;
+	}
 
 	DOMAIN_FOREACH(dp) {
 		if (dp-dom_ifdetach != NULL  ifp-if_afdata[dp-dom_family])
@@ -838,7 +840,7 @@
 	if (error != 0)
 		printf(%s: warning: unable to delete rtentry @ %p, 
 		error = %d\n, ifp-if_xname, rt, error);
-	return 0;
+	return ERESTART;
 }
 
 /*



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

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:36:22 UTC 2011

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

Log Message:
Ticket 1643.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/doc/CHANGES-5.0.3

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.3
diff -u src/doc/CHANGES-5.0.3:1.1.2.44 src/doc/CHANGES-5.0.3:1.1.2.45
--- src/doc/CHANGES-5.0.3:1.1.2.44	Thu Jul  7 20:35:27 2011
+++ src/doc/CHANGES-5.0.3	Mon Aug  8 19:36:22 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.0.3,v 1.1.2.44 2011/07/07 20:35:27 sborrill Exp $
+# $NetBSD: CHANGES-5.0.3,v 1.1.2.45 2011/08/08 19:36:22 riz Exp $
 
 A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3
 release:
@@ -2799,3 +2799,8 @@
 	Update bind to 9.7.3-P3 fixing CVE-2011-2464
 	[spz, ticket #1647]
 
+sys/net/if.c	1.243
+
+	Prevent crash when using 'ifconfig destroy'.
+	[sborrill, ticket #1643]
+



CVS commit: [netbsd-5] src/sys

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:45:57 UTC 2011

Modified Files:
src/sys/kern [netbsd-5]: init_main.c uipc_socket.c
src/sys/sys [netbsd-5]: socketvar.h

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1644):
sys/sys/socketvar.h: revision 1.126
sys/kern/init_main.c: revision 1.433
sys/kern/uipc_socket.c: revision 1.205
Fix kern/45093 as discussed on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html
The cause of the problem is that the so_pendfree is processed with
the softnet_lock held at one point, and processing the list
calls sodoloanfree() which may kpause(). As the thread sleeps with
softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
thread for details).
Although it should be possible to call sodopendfree() after releasing
the socket lock, it's not so easy to know where he socket lock is held and
where it's not, so we may hit the issue again later.
Add a kernel thread to handle the so_pendfree list, and wake up this
thread when adding mbufs to this list. Get rid of the various sodopendfree()
calls, hopefully fixing definitively the problem.


To generate a diff of this commit:
cvs rdiff -u -r1.371.2.5 -r1.371.2.6 src/sys/kern/init_main.c
cvs rdiff -u -r1.177.4.3 -r1.177.4.4 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.116.4.2 -r1.116.4.3 src/sys/sys/socketvar.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/init_main.c
diff -u src/sys/kern/init_main.c:1.371.2.5 src/sys/kern/init_main.c:1.371.2.6
--- src/sys/kern/init_main.c:1.371.2.5	Tue Dec 21 22:21:42 2010
+++ src/sys/kern/init_main.c	Mon Aug  8 19:45:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.371.2.5 2010/12/21 22:21:42 riz Exp $	*/
+/*	$NetBSD: init_main.c,v 1.371.2.6 2011/08/08 19:45:57 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.371.2.5 2010/12/21 22:21:42 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.371.2.6 2011/08/08 19:45:57 riz Exp $);
 
 #include opt_ddb.h
 #include opt_ipsec.h
@@ -463,6 +463,10 @@
 	/* Initialize interfaces. */
 	ifinit1();
 
+	/* Initialize sockets thread(s) */
+	soinit1();
+
+
 	/* Configure the system hardware.  This will enable interrupts. */
 	configure();
 

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.177.4.3 src/sys/kern/uipc_socket.c:1.177.4.4
--- src/sys/kern/uipc_socket.c:1.177.4.3	Sun May  3 13:18:55 2009
+++ src/sys/kern/uipc_socket.c	Mon Aug  8 19:45:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.177.4.3 2009/05/03 13:18:55 bouyer Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.177.4.4 2011/08/08 19:45:57 riz Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.177.4.3 2009/05/03 13:18:55 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.177.4.4 2011/08/08 19:45:57 riz Exp $);
 
 #include opt_sock_counters.h
 #include opt_sosend_loan.h
@@ -91,6 +91,7 @@
 #include sys/kauth.h
 #include sys/mutex.h
 #include sys/condvar.h
+#include sys/kthread.h
 
 #include uvm/uvm.h
 
@@ -136,7 +137,7 @@
 #endif
 
 static kmutex_t so_pendfree_lock;
-static struct mbuf *so_pendfree;
+static struct mbuf *so_pendfree = NULL;
 
 #ifndef SOMAXKVA
 #define	SOMAXKVA (16 * 1024 * 1024)
@@ -147,8 +148,9 @@
 
 #define	SOCK_LOAN_CHUNK		65536
 
-static size_t sodopendfree(void);
-static size_t sodopendfreel(void);
+static void sopendfree_thread(void *);
+static kcondvar_t pendfree_thread_cv;
+static lwp_t *sopendfree_lwp;
 
 static vsize_t
 sokvareserve(struct socket *so, vsize_t len)
@@ -157,21 +159,6 @@
 
 	mutex_enter(so_pendfree_lock);
 	while (socurkva + len  somaxkva) {
-		size_t freed;
-
-		/*
-		 * try to do pendfree.
-		 */
-
-		freed = sodopendfreel();
-
-		/*
-		 * if some kva was freed, try again.
-		 */
-
-		if (freed)
-			continue;
-
 		SOSEND_COUNTER_INCR(sosend_kvalimit);
 		error = cv_wait_sig(socurkva_cv, so_pendfree_lock);
 		if (error) {
@@ -264,56 +251,45 @@
 	sokvafree(sva, len);
 }
 
-static size_t
-sodopendfree(void)
-{
-	size_t rv;
-
-	if (__predict_true(so_pendfree == NULL))
-		return 0;
-
-	mutex_enter(so_pendfree_lock);
-	rv = sodopendfreel();
-	mutex_exit(so_pendfree_lock);
-
-	return rv;
-}
-
 /*
- * sodopendfreel: free mbufs on pendfree list.
+ * sopendfree_thread: free mbufs on pendfree list.
  * unlock and relock so_pendfree_lock when freeing mbufs.
- *
- * = called with so_pendfree_lock held.
  */
 
-static size_t
-sodopendfreel(void)
+static void
+sopendfree_thread(void *v)
 {
 	struct mbuf *m, *next;
-	size_t rv = 0;
-
-	KASSERT(mutex_owned(so_pendfree_lock));
+	size_t rv;
 
-	while (so_pendfree != NULL) {
-		m = so_pendfree;
-		so_pendfree = NULL;
-	

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

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:47:02 UTC 2011

Modified Files:
src/sys/kern [netbsd-5-1]: init_main.c uipc_socket.c
src/sys/sys [netbsd-5-1]: socketvar.h

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1644):
sys/sys/socketvar.h: revision 1.126
sys/kern/init_main.c: revision 1.433
sys/kern/uipc_socket.c: revision 1.205
Fix kern/45093 as discussed on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2011/06/17/msg010734.html
The cause of the problem is that the so_pendfree is processed with
the softnet_lock held at one point, and processing the list
calls sodoloanfree() which may kpause(). As the thread sleeps with
softnet_lock held, it ultimately cause a deadlock (see the PR or tech-kern
thread for details).
Although it should be possible to call sodopendfree() after releasing
the socket lock, it's not so easy to know where he socket lock is held and
where it's not, so we may hit the issue again later.
Add a kernel thread to handle the so_pendfree list, and wake up this
thread when adding mbufs to this list. Get rid of the various sodopendfree()
calls, hopefully fixing definitively the problem.


To generate a diff of this commit:
cvs rdiff -u -r1.371.2.4 -r1.371.2.4.2.1 src/sys/kern/init_main.c
cvs rdiff -u -r1.177.4.3 -r1.177.4.3.2.1 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.116.4.2 -r1.116.4.2.6.1 src/sys/sys/socketvar.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/init_main.c
diff -u src/sys/kern/init_main.c:1.371.2.4 src/sys/kern/init_main.c:1.371.2.4.2.1
--- src/sys/kern/init_main.c:1.371.2.4	Sun Feb 14 13:35:43 2010
+++ src/sys/kern/init_main.c	Mon Aug  8 19:47:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: init_main.c,v 1.371.2.4 2010/02/14 13:35:43 bouyer Exp $	*/
+/*	$NetBSD: init_main.c,v 1.371.2.4.2.1 2011/08/08 19:47:01 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.371.2.4 2010/02/14 13:35:43 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: init_main.c,v 1.371.2.4.2.1 2011/08/08 19:47:01 riz Exp $);
 
 #include opt_ddb.h
 #include opt_ipsec.h
@@ -463,6 +463,10 @@
 	/* Initialize interfaces. */
 	ifinit1();
 
+	/* Initialize sockets thread(s) */
+	soinit1();
+
+
 	/* Configure the system hardware.  This will enable interrupts. */
 	configure();
 

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.177.4.3 src/sys/kern/uipc_socket.c:1.177.4.3.2.1
--- src/sys/kern/uipc_socket.c:1.177.4.3	Sun May  3 13:18:55 2009
+++ src/sys/kern/uipc_socket.c	Mon Aug  8 19:47:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.177.4.3 2009/05/03 13:18:55 bouyer Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.177.4.3.2.1 2011/08/08 19:47:01 riz Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.177.4.3 2009/05/03 13:18:55 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: uipc_socket.c,v 1.177.4.3.2.1 2011/08/08 19:47:01 riz Exp $);
 
 #include opt_sock_counters.h
 #include opt_sosend_loan.h
@@ -91,6 +91,7 @@
 #include sys/kauth.h
 #include sys/mutex.h
 #include sys/condvar.h
+#include sys/kthread.h
 
 #include uvm/uvm.h
 
@@ -136,7 +137,7 @@
 #endif
 
 static kmutex_t so_pendfree_lock;
-static struct mbuf *so_pendfree;
+static struct mbuf *so_pendfree = NULL;
 
 #ifndef SOMAXKVA
 #define	SOMAXKVA (16 * 1024 * 1024)
@@ -147,8 +148,9 @@
 
 #define	SOCK_LOAN_CHUNK		65536
 
-static size_t sodopendfree(void);
-static size_t sodopendfreel(void);
+static void sopendfree_thread(void *);
+static kcondvar_t pendfree_thread_cv;
+static lwp_t *sopendfree_lwp;
 
 static vsize_t
 sokvareserve(struct socket *so, vsize_t len)
@@ -157,21 +159,6 @@
 
 	mutex_enter(so_pendfree_lock);
 	while (socurkva + len  somaxkva) {
-		size_t freed;
-
-		/*
-		 * try to do pendfree.
-		 */
-
-		freed = sodopendfreel();
-
-		/*
-		 * if some kva was freed, try again.
-		 */
-
-		if (freed)
-			continue;
-
 		SOSEND_COUNTER_INCR(sosend_kvalimit);
 		error = cv_wait_sig(socurkva_cv, so_pendfree_lock);
 		if (error) {
@@ -264,56 +251,45 @@
 	sokvafree(sva, len);
 }
 
-static size_t
-sodopendfree(void)
-{
-	size_t rv;
-
-	if (__predict_true(so_pendfree == NULL))
-		return 0;
-
-	mutex_enter(so_pendfree_lock);
-	rv = sodopendfreel();
-	mutex_exit(so_pendfree_lock);
-
-	return rv;
-}
-
 /*
- * sodopendfreel: free mbufs on pendfree list.
+ * sopendfree_thread: free mbufs on pendfree list.
  * unlock and relock so_pendfree_lock when freeing mbufs.
- *
- * = called with so_pendfree_lock held.
  */
 
-static size_t
-sodopendfreel(void)
+static void
+sopendfree_thread(void *v)
 {
 	struct mbuf *m, *next;
-	size_t rv = 0;
-
-	KASSERT(mutex_owned(so_pendfree_lock));
+	size_t rv;
 
-	while (so_pendfree != NULL) 

CVS commit: [netbsd-5-1] src/doc

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:47:38 UTC 2011

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

Log Message:
Ticket 1644.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-5.1.1

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

Modified files:

Index: src/doc/CHANGES-5.1.1
diff -u src/doc/CHANGES-5.1.1:1.1.2.30 src/doc/CHANGES-5.1.1:1.1.2.31
--- src/doc/CHANGES-5.1.1:1.1.2.30	Mon Aug  8 19:35:41 2011
+++ src/doc/CHANGES-5.1.1	Mon Aug  8 19:47:38 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.1,v 1.1.2.30 2011/08/08 19:35:41 riz Exp $
+# $NetBSD: CHANGES-5.1.1,v 1.1.2.31 2011/08/08 19:47:38 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.1.1
 release:
@@ -2493,3 +2493,10 @@
 	Prevent crash when using 'ifconfig destroy'.
 	[sborrill, ticket #1643]
 
+sys/kern/init_main.c1.433 via patch
+sys/kern/uipc_socket.c1.205 via patch
+sys/sys/socketvar.h1.126 via patch
+
+	Prevent NFS server hang under load.  PR#45093.
+	[bouyer, ticket #1644]
+



CVS commit: src/lib/libc/sys

2011-08-08 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug  8 19:50:17 UTC 2011

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

Log Message:
Sort sections. Remove trailing whitespace. Sort errors.
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/link.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/link.2
diff -u src/lib/libc/sys/link.2:1.25 src/lib/libc/sys/link.2:1.26
--- src/lib/libc/sys/link.2:1.25	Mon Aug  8 12:08:53 2011
+++ src/lib/libc/sys/link.2	Mon Aug  8 19:50:17 2011
@@ -1,4 +1,4 @@
-.\	$NetBSD: link.2,v 1.25 2011/08/08 12:08:53 manu Exp $
+.\	$NetBSD: link.2,v 1.26 2011/08/08 19:50:17 wiz Exp $
 .\
 .\ Copyright (c) 1980, 1991, 1993, 2011
 .\	The Regents of the University of California.  All rights reserved.
@@ -79,24 +79,26 @@
 .Fa name1
 may not be a directory unless the caller is the super-user
 and the file system containing it supports linking to directories.
-.Pp 
+.Pp
 When operating on a symlink,
 .Fn link
-resolves the symlink and creates a hard link on the target. 
+resolves the symlink and creates a hard link on the target.
 .Fn linkat
-will do the same if 
+will do the same if
 .Dv AT_SYMLINK_FOLLOW
-is set in 
+is set in
 .Fa flags ,
 but it will link on the symlink itself if the flag is clear.
 .Pp
-At the moment, 
+At the moment,
 .Fn linkat
-is partially implemented. It will return
-.Er ENOSYS for 
+is partially implemented.
+It will return
+.Er ENOSYS
+for
 .Fa fd1
-and 
-.Fa fd2 
+and
+.Fa fd2
 values different than
 .Dv AT_FDCWD .
 .Sh RETURN VALUES
@@ -108,39 +110,53 @@
 .Fn link
 will fail and no link will be created if:
 .Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of either path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded
-.Brq Dv NAME_MAX
-characters, or an entire path name exceeded
-.Brq Dv PATH_MAX
-characters.
-.It Bq Er ENOENT
-A component of either path prefix does not exist.
 .It Bq Er EACCES
 A component of either path prefix denies search permission, or
 the requested link requires writing in a directory with a mode
 that denies write permission.
+.It Bq Er EDQUOT
+The directory in which the entry for the new link
+is being placed cannot be extended because the
+user's quota of disk blocks on the file system
+containing the directory has been exhausted.
+.It Bq Er EEXIST
+The link named by
+.Fa name2
+does exist.
+.It Bq Er EFAULT
+One of the pathnames specified
+is outside the process's allocated address space.
+.It Bq Er EIO
+An I/O error occurred while reading from or writing to
+the file system to make the directory entry.
 .It Bq Er ELOOP
 Too many symbolic links were encountered in translating one of the pathnames.
+.It Bq Er EMLINK
+The link count of the file named by
+.Fa name1
+would exceed
+.Dv {LINK_MAX} .
+.It Bq Er ENAMETOOLONG
+A component of a pathname exceeded
+.Brq Dv NAME_MAX
+characters, or an entire path name exceeded
+.Brq Dv PATH_MAX
+characters.
 .It Bq Er ENOENT
-The file named by
+A component of either path prefix does not exist, or the file named
+by
 .Fa name1
 does not exist.
+.It Bq Er ENOSPC
+The directory in which the entry for the new link is being placed
+cannot be extended because there is no space left on the file
+system containing the directory.
+.It Bq Er ENOTDIR
+A component of either path prefix is not a directory.
 .It Bq Er EOPNOTSUPP
 The file system containing the file named by
 .Fa name1
 does not support links.
-.It Bq Er EMLINK
-The link count of the file named by
-.Fa name1
-would exceed
-.Dv {LINK_MAX} .
-.It Bq Er EEXIST
-The link named by
-.Fa name2
-does exist.
 .It Bq Er EPERM
 The file named by
 .Fa name1
@@ -149,39 +165,24 @@
 or the file system containing the file does not permit the use of
 .Fn link
 on a directory.
+.It Bq Er EROFS
+The requested link requires writing in a directory on a read-only file
+system.
 .It Bq Er EXDEV
 The link named by
 .Fa name2
 and the file named by
 .Fa name1
 are on different file systems.
-.It Bq Er ENOSPC
-The directory in which the entry for the new link is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.It Bq Er EDQUOT
-The directory in which the entry for the new link
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to
-the file system to make the directory entry.
-.It Bq Er EROFS
-The requested link requires writing in a directory on a read-only file
-system.
-.It Bq Er EFAULT
-One of the pathnames specified
-is outside the process's allocated address space.
 .El
 .Sh SEE ALSO
 .Xr symlink 2 ,
 .Xr unlink 2
-.Sh BUGS
-.Fn linkat 
-is partially implemented.
 .Sh STANDARDS
 The
 .Fn link
 function conforms to
 .St -p1003.1-90 .

CVS commit: [netbsd-5] src/share/mk

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:50:30 UTC 2011

Modified Files:
src/share/mk [netbsd-5]: bsd.x11.mk

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1646):
share/mk/bsd.x11.mk: revision 1.98
Fix the value of appdefaultdir that ends up in native X .pc files.
(It should be app-defaults but was app-default, probably because
of a typo; it's been wrong ever since this logic was put in two and a
half years ago, and as app-defaults files are a legacy mechanism it
took this long for anyone to notice.) Should be pulled up to -5.


To generate a diff of this commit:
cvs rdiff -u -r1.70.2.2 -r1.70.2.3 src/share/mk/bsd.x11.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.x11.mk
diff -u src/share/mk/bsd.x11.mk:1.70.2.2 src/share/mk/bsd.x11.mk:1.70.2.3
--- src/share/mk/bsd.x11.mk:1.70.2.2	Thu Sep 17 04:24:42 2009
+++ src/share/mk/bsd.x11.mk	Mon Aug  8 19:50:30 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.x11.mk,v 1.70.2.2 2009/09/17 04:24:42 snj Exp $
+#	$NetBSD: bsd.x11.mk,v 1.70.2.3 2011/08/08 19:50:30 riz Exp $
 
 .include bsd.init.mk
 
@@ -265,7 +265,7 @@
 		s,@libdir@,\\$$\{prefix\}/lib,; \
 		s,@includedir@,\\$$\{prefix\}/include,; \
 		s,@datarootdir@,\\$$\{prefix\}/share,; \
-		s,@appdefaultdir@,\\$$\{libdir}/X11/app-default,; \
+		s,@appdefaultdir@,\\$$\{libdir}/X11/app-defaults,; \
 		s,@MAPDIR@,\\$$\{libdir\}/X11/fonts/util,; \
 		s,@ICONDIR@,\\$$\{datarootdir\}/icons,; \
 		s,@PACKAGE_VERSION@,$${_pkg_version},; \



CVS commit: [netbsd-5] src/doc

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:51:37 UTC 2011

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

Log Message:
Tickets 1643, 1644, 1646.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.94 -r1.1.2.95 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.94 src/doc/CHANGES-5.2:1.1.2.95
--- src/doc/CHANGES-5.2:1.1.2.94	Sun Jul 17 15:36:32 2011
+++ src/doc/CHANGES-5.2	Mon Aug  8 19:51:37 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.94 2011/07/17 15:36:32 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.95 2011/08/08 19:51:37 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5419,3 +5419,20 @@
 	support.
 	[manu, ticket #1645]
 
+sys/net/if.c	1.243
+
+	Prevent crash when using 'ifconfig destroy'.
+	[sborrill, ticket #1643]
+
+sys/kern/init_main.c1.433 via patch
+sys/kern/uipc_socket.c1.205 via patch
+sys/sys/socketvar.h1.126 via patch
+
+	Prevent NFS server hang under load.  PR#45093.
+	[bouyer, ticket #1644]
+
+share/mk/bsd.x11.mk1.98 via patch
+
+	Fix the value of appdefaultdir that ends up in native X .pc files.
+	[dholland, ticket #1646]
+



CVS commit: [netbsd-5] src/lib/librefuse

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:53:29 UTC 2011

Modified Files:
src/lib/librefuse [netbsd-5]: refuse.c

Log Message:
Pull up following revision(s) (requested by tron in ticket #1648):
lib/librefuse/refuse.c: revision 1.93
Don't ignore userdata argument in fuse_main_real. This can crash
a FUSE file-system that passes a non-NULL argument here.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.89.4.1 src/lib/librefuse/refuse.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/librefuse/refuse.c
diff -u src/lib/librefuse/refuse.c:1.89 src/lib/librefuse/refuse.c:1.89.4.1
--- src/lib/librefuse/refuse.c:1.89	Fri Aug  1 15:54:09 2008
+++ src/lib/librefuse/refuse.c	Mon Aug  8 19:53:29 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: refuse.c,v 1.89 2008/08/01 15:54:09 dillo Exp $	*/
+/*	$NetBSD: refuse.c,v 1.89.4.1 2011/08/08 19:53:29 riz Exp $	*/
 
 /*
  * Copyright © 2007 Alistair Crooks.  All rights reserved.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: refuse.c,v 1.89 2008/08/01 15:54:09 dillo Exp $);
+__RCSID($NetBSD: refuse.c,v 1.89.4.1 2011/08/08 19:53:29 riz Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -1221,8 +1221,8 @@
 	int		 multithreaded;
 	int		 fd;
 
-	fuse = fuse_setup(argc, argv, ops, size, mountpoint, multithreaded,
-			fd);
+	fuse = fuse_setup_real(argc, argv, ops, size, mountpoint,
+	multithreaded, fd, userdata);
 
 	return fuse_loop(fuse);
 }



CVS commit: othersrc/external/bsd/iscsi/sbin/iscsictl

2011-08-08 Thread Thomas Klausner
Module Name:othersrc
Committed By:   wiz
Date:   Mon Aug  8 19:54:51 UTC 2011

Modified Files:
othersrc/external/bsd/iscsi/sbin/iscsictl: iscsictl.8

Log Message:
Try to fix a sentence. New sentence, new line.
Add a comment where the example is unclear. Use more markup.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8

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

Modified files:

Index: othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8
diff -u othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.2 othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.3
--- othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8:1.2	Mon Aug  8 07:22:12 2011
+++ othersrc/external/bsd/iscsi/sbin/iscsictl/iscsictl.8	Mon Aug  8 19:54:51 2011
@@ -1,4 +1,4 @@
-.\ $NetBSD: iscsictl.8,v 1.2 2011/08/08 07:22:12 dholland Exp $
+.\ $NetBSD: iscsictl.8,v 1.3 2011/08/08 19:54:51 wiz Exp $
 .\
 .\ Copyright (c) 2011 Alistair Crooks a...@netbsd.org
 .\ All rights reserved.
@@ -33,8 +33,8 @@
 .Nm
 .Op Fl v
 .Op Fl d Ar directory
-command
-.Op Ar arguments...
+.Ar command
+.Op Ar arguments ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -57,9 +57,7 @@
 The initiator can then issue commands to
 and read responses from the target.
 .Pp
-.\ XXX what does this mean?
-Firstly, a TCP connection
-the iSCSI initiator on the local machine must be made
+Firstly, the iSCSI initiator on the local machine must be made
 aware of the network location of the target.
 The
 .Dv add_send_target
@@ -72,8 +70,7 @@
 To login from the initiator to the target, the
 .Dv login
 command is used; this creates a session between the initiator and target.
-The sessions can be listed by using
-the
+The sessions can be listed by using the
 .Dv list_sessions
 command.
 .Pp
@@ -96,17 +93,18 @@
 .Dq OK
 value is printed.
 For more context on the exact usage of this
-command, please ee the worked example below.
+command, please see the example below.
 .It list_targets
 .It add_send_target
 this command allows the iSCSI initiator to connect to an iSCSI
-target. The subsequent
+target.
+The subsequent
 .Fl a
 target provides the address of the target.
 This can be provided as a numerical IP address,
 or as a textual FQDN.
 For more context on the exact usage of this
-command, please see the worked example below.
+command, please see the example below.
 .It remove_send_target
 .It list_send_targets
 .It add_isns_server
@@ -116,16 +114,17 @@
 .It refresh_isns
 .It login
 To be able to communicate with the iSCSI target, the initiator
-must login. This command allows this login to take place.
+must login.
+This command allows this login to take place.
 The subsequent
-.Fl P session
+.Fl P Ar session
 argument provides the session which should be used to
 perform the login.
 On successful completion of this command, the
 session which has been created will be displayed, along with the connection
 number.
 For more context on the exact usage of this
-command, please see the worked example below.
+command, please see the example below.
 .It logout
 .It add_connection
 .It remove_connection
@@ -141,7 +140,7 @@
 To list the session information, this command is used.
 The session number and target information for each of the targets are displayed.
 For more context on the exact usage of this
-command, please see the worked example below.
+command, please see the example below.
 .It set_node_name
 .El
 .Sh EXAMPLES
@@ -168,6 +167,7 @@
 Created Session 2, Connection 1
 burner# iscsictl list_sessions
 Session 2: Target iqn.1994-04.org.netbsd.iscsi-target:target0
+.\ how do we know that it was assigned sd0?
 burner# newfs /dev/rsd0a
 /dev/rsd0a: 100.0MB (204800 sectors) block size 8192, fragment size 1024
 	using 4 cylinder groups of 25.00MB, 3200 blks, 6144 inodes.



CVS commit: [netbsd-5] src/lib/librefuse

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:55:27 UTC 2011

Modified Files:
src/lib/librefuse [netbsd-5]: fuse_opt.h

Log Message:
Pull up following revision(s) (requested by tron in ticket #1649):
lib/librefuse/fuse_opt.h: revision 1.5
PR/41250: David H. Gutteridge: librefuse fuse_opt.h header doesn't accommod=
ate
C++ compilation


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.18.1 src/lib/librefuse/fuse_opt.h

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

Modified files:

Index: src/lib/librefuse/fuse_opt.h
diff -u src/lib/librefuse/fuse_opt.h:1.4 src/lib/librefuse/fuse_opt.h:1.4.18.1
--- src/lib/librefuse/fuse_opt.h:1.4	Thu May 17 01:55:43 2007
+++ src/lib/librefuse/fuse_opt.h	Mon Aug  8 19:55:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fuse_opt.h,v 1.4 2007/05/17 01:55:43 christos Exp $	*/
+/*	$NetBSD: fuse_opt.h,v 1.4.18.1 2011/08/08 19:55:27 riz Exp $	*/
 
 /*
  * Copyright (c) 2007 Alistair Crooks.  All rights reserved.
@@ -31,6 +31,10 @@
 #ifndef _FUSE_OPT_H_
 #define _FUSE_OPT_H_
 
+#ifdef __cplusplus
+extern C {
+#endif  
+
 enum {
 	FUSE_OPT_KEY_OPT = -1,
 	FUSE_OPT_KEY_NONOPT = -2,
@@ -59,4 +63,8 @@
 		   const struct fuse_opt *, fuse_opt_proc_t);
 int fuse_opt_match(const struct fuse_opt *, const char *);
 
+#ifdef __cplusplus
+}
+#endif 
+
 #endif /* _FUSE_OPT_H_ */



CVS commit: [netbsd-5] src/lib/librefuse

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:56:50 UTC 2011

Modified Files:
src/lib/librefuse [netbsd-5]: refuse.c

Log Message:
Pull up following revision(s) (requested by tron in ticket #1650):
lib/librefuse/refuse.c: revision 1.94
Call the FUSE init operation before we try to access the file-system.
This prevents a crash in fuse_ext2 which I previously worked around
with a patch.


To generate a diff of this commit:
cvs rdiff -u -r1.89.4.1 -r1.89.4.2 src/lib/librefuse/refuse.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/librefuse/refuse.c
diff -u src/lib/librefuse/refuse.c:1.89.4.1 src/lib/librefuse/refuse.c:1.89.4.2
--- src/lib/librefuse/refuse.c:1.89.4.1	Mon Aug  8 19:53:29 2011
+++ src/lib/librefuse/refuse.c	Mon Aug  8 19:56:50 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: refuse.c,v 1.89.4.1 2011/08/08 19:53:29 riz Exp $	*/
+/*	$NetBSD: refuse.c,v 1.89.4.2 2011/08/08 19:56:50 riz Exp $	*/
 
 /*
  * Copyright © 2007 Alistair Crooks.  All rights reserved.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h
 #if !defined(lint)
-__RCSID($NetBSD: refuse.c,v 1.89.4.1 2011/08/08 19:53:29 riz Exp $);
+__RCSID($NetBSD: refuse.c,v 1.89.4.2 2011/08/08 19:56:50 riz Exp $);
 #endif /* !lint */
 
 #include sys/types.h
@@ -1298,6 +1298,9 @@
 
 	fuse-fc = fc;
 
+	if (fuse-op.init != NULL)
+		fusectx-private_data = fuse-op.init(NULL); /* XXX */
+
 	/* initialise the puffs operations structure */
 PUFFSOP_INIT(pops);
 
@@ -1361,9 +1364,6 @@
 			puffs_stat2vattr(pn_root-pn_va, st);
 	assert(pn_root-pn_va.va_type == VDIR);
 
-	if (fuse-op.init)
-		fusectx-private_data = fuse-op.init(NULL); /* XXX */
-
 	puffs_set_prepost(pu, set_fuse_context_pid, NULL);
 
 	puffs_zerostatvfs(svfsb);



CVS commit: [netbsd-5] src/doc

2011-08-08 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Aug  8 19:57:46 UTC 2011

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

Log Message:
Tickets 1648-1650.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.95 -r1.1.2.96 src/doc/CHANGES-5.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-5.2
diff -u src/doc/CHANGES-5.2:1.1.2.95 src/doc/CHANGES-5.2:1.1.2.96
--- src/doc/CHANGES-5.2:1.1.2.95	Mon Aug  8 19:51:37 2011
+++ src/doc/CHANGES-5.2	Mon Aug  8 19:57:46 2011
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2,v 1.1.2.95 2011/08/08 19:51:37 riz Exp $
+# $NetBSD: CHANGES-5.2,v 1.1.2.96 2011/08/08 19:57:46 riz Exp $
 
 A complete list of changes from the NetBSD 5.1 release to the NetBSD 5.2
 release:
@@ -5436,3 +5436,19 @@
 	Fix the value of appdefaultdir that ends up in native X .pc files.
 	[dholland, ticket #1646]
 
+lib/librefuse/refuse.c1.93
+
+	Don't ignore userdata argument in fuse_main_real. This can crash
+	a FUSE file-system that passes a non-NULL argument here.
+	[tron, ticket #1648]
+
+lib/librefuse/fuse_opt.h			1.5
+
+	Fix compilation of FUSE file systems written in C++.  PR#41250.
+	[tron, ticket #1649]
+
+lib/librefuse/refuse.c1.94
+
+	Call the FUSE init operation before we try to access the file-system.
+	[tron, ticket #1650]
+



CVS commit: src

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  8 22:15:42 UTC 2011

Modified Files:
src: Makefile build.sh

Log Message:
add an installmodules=dir command to build.sh


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 src/Makefile
cvs rdiff -u -r1.244 -r1.245 src/build.sh

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

Modified files:

Index: src/Makefile
diff -u src/Makefile:1.286 src/Makefile:1.287
--- src/Makefile:1.286	Wed Jun 29 02:05:24 2011
+++ src/Makefile	Mon Aug  8 22:15:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.286 2011/06/29 02:05:24 mrg Exp $
+#	$NetBSD: Makefile,v 1.287 2011/08/08 22:15:42 jmcneill Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -342,6 +342,29 @@
 	@printf make ${.TARGET} finished at:   date
 
 #
+# Install modules from $DESTDIR to $INSTALLMODULESDIR
+#
+installmodules: .PHONY .MAKE
+.if (!defined(DESTDIR) || ${DESTDIR} ==  || ${DESTDIR} == /)
+	@echo Can't make ${.TARGET} to DESTDIR=/
+	@false
+.endif
+.if !defined(INSTALLMODULESDIR) || \
+${INSTALLMODULESDIR} ==  || ${INSTALLMODULESDIR} == /
+.if (${HOST_UNAME_S} != NetBSD)
+	@echo Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLMODULESDIR=/
+	@false
+.endif
+.if (${HOST_UNAME_M} != ${MACHINE})
+	@echo Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLMODULESDIR=/
+	@false
+.endif
+.endif
+	${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:*/}
+	@echo   make ${.TARGET} started at:  ${START_TIME}
+	@printf make ${.TARGET} finished at:   date
+
+#
 # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR
 #
 

Index: src/build.sh
diff -u src/build.sh:1.244 src/build.sh:1.245
--- src/build.sh:1.244	Wed Jan 26 01:18:43 2011
+++ src/build.sh	Mon Aug  8 22:15:42 2011
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.244 2011/01/26 01:18:43 pooka Exp $
+#	$NetBSD: build.sh,v 1.245 2011/08/08 22:15:42 jmcneill Exp $
 #
 # Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -258,6 +258,7 @@
 	do_kernel=false
 	do_releasekernel=false
 	do_modules=false
+	do_installmodules=false
 	do_install=false
 	do_sets=false
 	do_sourcesets=false
@@ -618,6 +619,8 @@
 except \`etc'.  Useful after distribution or release
 kernel=conf Build kernel with config file \`conf'
 releasekernel=conf  Install kernel built by kernel=conf to RELEASEDIR.
+installmodules=idir Run make installmodules to \`idir' to install all
+kernel modules.
 modules Build kernel modules.
 rumptestDo a linktest for rump (for developers).
 setsCreate binary sets in
@@ -910,7 +913,7 @@
 			op=modules
 			;;
 
-		install=*)
+		install=*|installmodules=*)
 			arg=${op#*=}
 			op=${op%%=*}
 			[ -n ${arg} ] ||
@@ -1384,7 +1387,7 @@
 	eval cat EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy make building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.244 2011/01/26 01:18:43 pooka Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.245 2011/08/08 22:15:42 jmcneill Exp $
 # with these arguments: ${_args}
 #
 
@@ -1547,6 +1550,14 @@
 	statusmsg Successful build of kernel modules for NetBSD/${MACHINE} ${DISTRIBVER}
 }
 
+installmodules()
+{
+	dir=$1
+	${runcmd} ${makewrapper} INSTALLMODULESDIR=${dir} installmodules ||
+	bomb Failed to make installmodules to ${dir}
+	statusmsg Successful installmodules to ${dir}
+}
+
 installworld()
 {
 	dir=$1
@@ -1718,6 +1729,16 @@
 			buildmodules
 			;;
 
+		installmodules=*)
+			arg=${op#*=}
+			if [ ${arg} = / ]  \
+			(	[ ${uname_s} != NetBSD ] || \
+[ ${uname_m} != ${MACHINE} ] ); then
+bomb '${op}' must != / for cross builds.
+			fi
+			installmodules ${arg}
+			;;
+
 		install=*)
 			arg=${op#*=}
 			if [ ${arg} = / ]  \



CVS commit: src

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Aug  8 23:18:36 UTC 2011

Modified Files:
src: Makefile

Log Message:
Fix typo that prevented installmodules from working with -U


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/Makefile

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

Modified files:

Index: src/Makefile
diff -u src/Makefile:1.287 src/Makefile:1.288
--- src/Makefile:1.287	Mon Aug  8 22:15:42 2011
+++ src/Makefile	Mon Aug  8 23:18:36 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.287 2011/08/08 22:15:42 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.288 2011/08/08 23:18:36 jmcneill Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -360,7 +360,7 @@
 	@false
 .endif
 .endif
-	${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:*/}
+	${MAKEDIRTARGET} sys/modules install DESTDIR=${INSTALLMODULESDIR:U/}
 	@echo   make ${.TARGET} started at:  ${START_TIME}
 	@printf make ${.TARGET} finished at:   date
 



CVS commit: src/sys/compat/common

2011-08-08 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Aug  8 23:44:06 UTC 2011

Modified Files:
src/sys/compat/common: compat_mod.c

Log Message:
COMPAT_16 code only exists on amd64 in the presence of COMPAT_NETBSD32.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/compat/common/compat_mod.c

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

Modified files:

Index: src/sys/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.13 src/sys/compat/common/compat_mod.c:1.14
--- src/sys/compat/common/compat_mod.c:1.13	Sun Mar  6 17:08:33 2011
+++ src/sys/compat/common/compat_mod.c	Mon Aug  8 23:44:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.13 2011/03/06 17:08:33 bouyer Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.14 2011/08/08 23:44:06 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.13 2011/03/06 17:08:33 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: compat_mod.c,v 1.14 2011/08/08 23:44:06 jakllsch Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_compat_netbsd.h
@@ -63,9 +63,11 @@
 int	ttcompat(struct tty *, u_long, void *, int, struct lwp *);
 
 #ifdef COMPAT_16
+#if !(defined(__amd64__)  !defined(COMPAT_NETBSD32))
 extern char sigcode[], esigcode[];
 struct uvm_object *emul_netbsd_object;
 #endif
+#endif
 
 extern krwlock_t exec_lock;
 extern krwlock_t ttcompat_lock;
@@ -157,9 +159,11 @@
 #endif
 
 #if defined(COMPAT_16)
+#if !(defined(__amd64__)  !defined(COMPAT_NETBSD32))
 	{ SYS_compat_16___sigaction14, 0, (sy_call_t *)compat_16_sys___sigaction14 },
 	{ SYS_compat_16___sigreturn14, 0, (sy_call_t *)compat_16_sys___sigreturn14 },
 #endif
+#endif
 
 #if defined(COMPAT_20)
 	{ SYS_compat_20_fhstatfs, 0, (sy_call_t *)compat_20_sys_fhstatfs },
@@ -254,6 +258,7 @@
 		ttcompatvec = ttcompat;
 #endif
 #ifdef COMPAT_16
+#if !(defined(__amd64__)  !defined(COMPAT_NETBSD32))
 		KASSERT(emul_netbsd.e_sigobject == NULL);
 		rw_enter(exec_lock, RW_WRITER);
 		emul_netbsd.e_sigcode = sigcode;
@@ -263,6 +268,7 @@
 		KASSERT(sendsig_sigcontext_vec == NULL);
 		sendsig_sigcontext_vec = sendsig_sigcontext;
 #endif
+#endif
 #if defined(COMPAT_09) || defined(COMPAT_43)
 		compat_sysctl_init();
 #endif
@@ -305,6 +311,7 @@
 		}
 #endif
 #ifdef COMPAT_16
+#if !(defined(__amd64__)  !defined(COMPAT_NETBSD32))
 		/*
 		 * The sigobject may persist if still in use, but
 		 * is reference counted so will die eventually.
@@ -319,6 +326,7 @@
 		emul_netbsd.e_esigcode = NULL;
 		emul_netbsd.e_sigobject = NULL;
 		rw_exit(exec_lock);
+#endif
 #endif	/* COMPAT_16 */
 #if defined(COMPAT_09) || defined(COMPAT_43)
 		compat_sysctl_fini();



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

2011-08-08 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Aug  9 00:39:36 UTC 2011

Modified Files:
src/sys/arch/bebox/include: Makefile

Log Message:
Fix build failed.  mouse.h and pccons.h already removed.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/bebox/include/Makefile

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/bebox/include/Makefile
diff -u src/sys/arch/bebox/include/Makefile:1.22 src/sys/arch/bebox/include/Makefile:1.23
--- src/sys/arch/bebox/include/Makefile:1.22	Sun Dec 11 12:17:03 2005
+++ src/sys/arch/bebox/include/Makefile	Tue Aug  9 00:39:35 2011
@@ -1,12 +1,10 @@
-#	$NetBSD: Makefile,v 1.22 2005/12/11 12:17:03 christos Exp $
+#	$NetBSD: Makefile,v 1.23 2011/08/09 00:39:35 kiyohara Exp $
 
 INCSDIR= /usr/include/bebox
 
 INCS=   bootinfo.h \
 	disklabel.h \
 	intr.h \
-	mouse.h \
-	pccons.h \
 	spkr.h \
 	vmparam.h
 



CVS commit: src/sys

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Aug  9 01:42:25 UTC 2011

Modified Files:
src/sys/conf: files
src/sys/dev/dtv: dtv_buffer.c dtv_device.c dtv_math.c dtvif.h dtvvar.h
files.dtv
src/sys/dev/i2c: files.i2c xc3028.c
src/sys/dev/pci: coram.c coramvar.h cxdtv.c cxdtvvar.h
src/sys/dev/usb: auvitek.c auvitek_dtv.c auvitek_video.c auvitekvar.h
emdtv.c emdtv_dtv.c emdtvvar.h
src/sys/modules: Makefile
src/sys/modules/dtv: Makefile
Added Files:
src/sys/modules/dtv_math: Makefile

Log Message:
modify the dtv device api so hardware drivers can be loaded independently
of the dtv module


To generate a diff of this commit:
cvs rdiff -u -r1.1023 -r1.1024 src/sys/conf/files
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/dtv/dtv_buffer.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/dtv/dtv_device.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/dtv/dtv_math.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/dtv/dtvif.h
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/dtv/dtvvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/dtv/files.dtv
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/i2c/files.i2c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/xc3028.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/coram.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/coramvar.h \
src/sys/dev/pci/cxdtvvar.h
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/pci/cxdtv.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/auvitek.c \
src/sys/dev/usb/auvitek_video.c src/sys/dev/usb/emdtv_dtv.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/usb/auvitek_dtv.c \
src/sys/dev/usb/emdtvvar.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/auvitekvar.h src/sys/dev/usb/emdtv.c
cvs rdiff -u -r1.81 -r1.82 src/sys/modules/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/modules/dtv/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/dtv_math/Makefile

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

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1023 src/sys/conf/files:1.1024
--- src/sys/conf/files:1.1023	Sun Aug  7 13:33:01 2011
+++ src/sys/conf/files	Tue Aug  9 01:42:24 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1023 2011/08/07 13:33:01 rmind Exp $
+#	$NetBSD: files,v 1.1024 2011/08/09 01:42:24 jmcneill Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20100430
@@ -327,6 +327,10 @@
 device	video
 attach	video at videobus
 
+# DTV subsystem
+#
+include dev/dtv/files.dtv
+
 # National Semiconductor LM7[89]
 #
 # (included here so files.i2c can define an attachment)
@@ -1729,8 +1733,3 @@
 # NOR subsytem
 #
 include dev/nor/files.nor
-
-#
-# DTV subsystem
-#
-include dev/dtv/files.dtv

Index: src/sys/dev/dtv/dtv_buffer.c
diff -u src/sys/dev/dtv/dtv_buffer.c:1.6 src/sys/dev/dtv/dtv_buffer.c:1.7
--- src/sys/dev/dtv/dtv_buffer.c:1.6	Sat Jul 16 12:20:01 2011
+++ src/sys/dev/dtv/dtv_buffer.c	Tue Aug  9 01:42:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dtv_buffer.c,v 1.6 2011/07/16 12:20:01 jmcneill Exp $ */
+/* $NetBSD: dtv_buffer.c,v 1.7 2011/08/09 01:42:24 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dtv_buffer.c,v 1.6 2011/07/16 12:20:01 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: dtv_buffer.c,v 1.7 2011/08/09 01:42:24 jmcneill Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -96,9 +96,9 @@
 }
 
 void
-dtv_submit_payload(device_t self, const struct dtv_payload *payload)
+dtv_buffer_submit(void *priv, const struct dtv_payload *payload)
 {
-	struct dtv_softc *sc = device_private(self);
+	struct dtv_softc *sc = priv;
 	struct dtv_ts *ts = sc-sc_ts;
 	const uint8_t *tspkt;
 	unsigned int npkts, i;

Index: src/sys/dev/dtv/dtv_device.c
diff -u src/sys/dev/dtv/dtv_device.c:1.7 src/sys/dev/dtv/dtv_device.c:1.8
--- src/sys/dev/dtv/dtv_device.c:1.7	Sat Jul 16 12:20:01 2011
+++ src/sys/dev/dtv/dtv_device.c	Tue Aug  9 01:42:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dtv_device.c,v 1.7 2011/07/16 12:20:01 jmcneill Exp $ */
+/* $NetBSD: dtv_device.c,v 1.8 2011/08/09 01:42:24 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: dtv_device.c,v 1.7 2011/07/16 12:20:01 jmcneill Exp $);
+__KERNEL_RCSID(0, $NetBSD: dtv_device.c,v 1.8 2011/08/09 01:42:24 jmcneill Exp $);
 
 #include sys/types.h
 #include sys/conf.h
@@ -301,12 +301,3 @@
 	}
 	mutex_exit(sc-sc_lock);
 }
-
-int
-dtv_print(void *arg, const char *pnp)
-{
-	if (pnp)
-		aprint_normal(dtv at %s, pnp);
-
-	return UNCONF;
-}

Index: src/sys/dev/dtv/dtv_math.c
diff -u src/sys/dev/dtv/dtv_math.c:1.4 src/sys/dev/dtv/dtv_math.c:1.5
--- src/sys/dev/dtv/dtv_math.c:1.4	Sat Jul 16 22:41:59 2011
+++ src/sys/dev/dtv/dtv_math.c	Tue Aug  9 01:42:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dtv_math.c,v 1.4 2011/07/16 22:41:59 apb Exp $ */
+/* $NetBSD: dtv_math.c,v 1.5 2011/08/09 01:42:24 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 

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

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Aug  9 01:42:57 UTC 2011

Modified Files:
src/distrib/sets/lists/modules: md.evbppc mi

Log Message:
add dtv_math module


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/modules/md.evbppc
cvs rdiff -u -r1.25 -r1.26 src/distrib/sets/lists/modules/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/modules/md.evbppc
diff -u src/distrib/sets/lists/modules/md.evbppc:1.5 src/distrib/sets/lists/modules/md.evbppc:1.6
--- src/distrib/sets/lists/modules/md.evbppc:1.5	Wed Aug  3 01:32:16 2011
+++ src/distrib/sets/lists/modules/md.evbppc	Tue Aug  9 01:42:57 2011
@@ -1,4 +1,4 @@
-# $NetBSD: md.evbppc,v 1.5 2011/08/03 01:32:16 he Exp $
+# $NetBSD: md.evbppc,v 1.6 2011/08/09 01:42:57 jmcneill Exp $
 ./stand/powerpc-4xx		base-kernel-modules	kmod
 ./stand/powerpc-4xx/@OSRELEASE@	base-kernel-modules	kmod
 ./stand/powerpc-4xx/@OSRELEASE@/modules	base-kernel-modules	kmod
@@ -32,6 +32,8 @@
 ./stand/powerpc-4xx/@OSRELEASE@/modules/dtrace/dtrace.kmod		base-kernel-modules	kmod,dtrace
 ./stand/powerpc-4xx/@OSRELEASE@/modules/dtvbase-kernel-modules	kmod
 ./stand/powerpc-4xx/@OSRELEASE@/modules/dtv/dtv.kmod			base-kernel-modules	kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/dtv_math			base-kernel-modules	kmod
+./stand/powerpc-4xx/@OSRELEASE@/modules/dtv_math/dtv_math.kmod		base-kernel-modules	kmod
 ./stand/powerpc-4xx/@OSRELEASE@/modules/efsbase-kernel-modules	kmod
 ./stand/powerpc-4xx/@OSRELEASE@/modules/efs/efs.kmod			base-kernel-modules	kmod
 ./stand/powerpc-4xx/@OSRELEASE@/modules/exec_script			base-kernel-modules	kmod
@@ -179,6 +181,8 @@
 ./stand/powerpc-booke/@OSRELEASE@/modules/dtrace/dtrace.kmod		base-kernel-modules	kmod,dtrace
 ./stand/powerpc-booke/@OSRELEASE@/modules/dtvbase-kernel-modules	kmod
 ./stand/powerpc-booke/@OSRELEASE@/modules/dtv/dtv.kmod			base-kernel-modules	kmod
+./stand/powerpc-booke/@OSRELEASE@/modules/dtv_math			base-kernel-modules	kmod
+./stand/powerpc-booke/@OSRELEASE@/modules/dtv_math/dtv_math.kmod	base-kernel-modules	kmod
 ./stand/powerpc-booke/@OSRELEASE@/modules/efsbase-kernel-modules	kmod
 ./stand/powerpc-booke/@OSRELEASE@/modules/efs/efs.kmod			base-kernel-modules	kmod
 ./stand/powerpc-booke/@OSRELEASE@/modules/exec_script			base-kernel-modules	kmod

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.25 src/distrib/sets/lists/modules/mi:1.26
--- src/distrib/sets/lists/modules/mi:1.25	Mon Aug  1 03:56:23 2011
+++ src/distrib/sets/lists/modules/mi	Tue Aug  9 01:42:57 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.25 2011/08/01 03:56:23 pgoyette Exp $
+# $NetBSD: mi,v 1.26 2011/08/09 01:42:57 jmcneill Exp $
 #
 # Note: don't delete entries from here - mark them as obsolete instead.
 #
@@ -36,6 +36,8 @@
 ./@MODULEDIR@/dtrace/dtrace.kmod		base-kernel-modules	kmod,dtrace
 ./@MODULEDIR@/dtvbase-kernel-modules	kmod
 ./@MODULEDIR@/dtv/dtv.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/dtv_mathbase-kernel-modules	kmod
+./@MODULEDIR@/dtv_math/dtv_math.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/efsbase-kernel-modules	kmod
 ./@MODULEDIR@/efs/efs.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/exec_script			base-kernel-modules	kmod



CVS commit: src/sys/arch

2011-08-08 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Tue Aug  9 02:52:29 UTC 2011

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

Log Message:
remove commented out entries for emdtv, auvitek, and dtv


To generate a diff of this commit:
cvs rdiff -u -r1.331 -r1.332 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.1045 -r1.1046 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.331 src/sys/arch/amd64/conf/GENERIC:1.332
--- src/sys/arch/amd64/conf/GENERIC:1.331	Mon Aug  8 18:57:58 2011
+++ src/sys/arch/amd64/conf/GENERIC	Tue Aug  9 02:52:29 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.331 2011/08/08 18:57:58 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.332 2011/08/09 02:52:29 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.331 $
+#ident 		GENERIC-$Revision: 1.332 $
 
 maxusers	64		# estimated number of users
 
@@ -1025,7 +1025,6 @@
 pseye* at uhub?		# Sony PLAYSTATION(R) Eye webcam
 uvideo* at uhub?	# USB Video Class capture devices
 video* at videobus?
-#dtv* at dtvbus?
 
 
 # TV cards

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1045 src/sys/arch/i386/conf/GENERIC:1.1046
--- src/sys/arch/i386/conf/GENERIC:1.1045	Mon Aug  8 18:58:18 2011
+++ src/sys/arch/i386/conf/GENERIC	Tue Aug  9 02:52:29 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1045 2011/08/08 18:58:18 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.1046 2011/08/09 02:52:29 jmcneill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.1045 $
+#ident 		GENERIC-$Revision: 1.1046 $
 
 maxusers	64		# estimated number of users
 
@@ -1421,10 +1421,7 @@
 
 pseye*	at uhub?		# Sony PLAYSTATION(R) Eye webcam
 uvideo* at uhub?		# USB Video Class capture devices
-#auvitek* at uhub?		# Auvitek AU0828 video capture devices
-#emdtv*	at uhub?		# Empia EM28xx video capture devices
 video* at videobus?
-#dtv* at dtvbus?
 
 
 # TV cards



CVS commit: src/sys/sys

2011-08-08 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Tue Aug  9 04:19:18 UTC 2011

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

Log Message:
improve comment about AT_* defines: they are not only used by linkat(2)


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/sys/fcntl.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/fcntl.h
diff -u src/sys/sys/fcntl.h:1.40 src/sys/sys/fcntl.h:1.41
--- src/sys/sys/fcntl.h:1.40	Mon Aug  8 12:08:54 2011
+++ src/sys/sys/fcntl.h	Tue Aug  9 04:19:17 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: fcntl.h,v 1.40 2011/08/08 12:08:54 manu Exp $	*/
+/*	$NetBSD: fcntl.h,v 1.41 2011/08/09 04:19:17 manu Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1990, 1993
@@ -281,7 +281,7 @@
 #define	POSIX_FADV_NOREUSE	5	/* be accessed once */
 
 /*
- * Constants for linkat(2)
+ * Constants for X/Open Extended API set 2 (a.k.a. C063)
  */
 #if defined(_INCOMPLETE_XOPEN_C063) || defined(_KERNEL)
 #define	AT_FDCWD		-100	/* Use cwd for relative link target */