From owner-svn-src-stable@FreeBSD.ORG  Sun Mar  4 07:29:36 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4069B106564A;
	Sun,  4 Mar 2012 07:29:36 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F10C8FC08;
	Sun,  4 Mar 2012 07:29:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q247TaVn020059;
	Sun, 4 Mar 2012 07:29:36 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q247TZTg020057;
	Sun, 4 Mar 2012 07:29:35 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201203040729.q247TZTg020057@svn.freebsd.org>
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Sun, 4 Mar 2012 07:29:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232481 - stable/9/sbin/ipfw
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 07:29:36 -0000

Author: glebius
Date: Sun Mar  4 07:29:35 2012
New Revision: 232481
URL: http://svn.freebsd.org/changeset/base/232481

Log:
  Merge r227419:
    Note that NAT instance argument can be tablearg.
  
    PR:		misc/162265
    Submitted by:	Paul Procacci <pprocacci gmail.com>

Modified:
  stable/9/sbin/ipfw/ipfw.8
Directory Properties:
  stable/9/sbin/ipfw/   (props changed)

Modified: stable/9/sbin/ipfw/ipfw.8
==============================================================================
--- stable/9/sbin/ipfw/ipfw.8	Sun Mar  4 05:52:26 2012	(r232480)
+++ stable/9/sbin/ipfw/ipfw.8	Sun Mar  4 07:29:35 2012	(r232481)
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 20, 2011
+.Dd November 10, 2011
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -769,7 +769,7 @@ To enable
 .Cm fwd
 a custom kernel needs to be compiled with the option
 .Cd "options IPFIREWALL_FORWARD" .
-.It Cm nat Ar nat_nr
+.It Cm nat Ar nat_nr | tablearg
 Pass packet to a
 nat instance
 (for network address translation, address redirect, etc.):

From owner-svn-src-stable@FreeBSD.ORG  Sun Mar  4 10:37:26 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7129D106564A;
	Sun,  4 Mar 2012 10:37:26 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5F4508FC0A;
	Sun,  4 Mar 2012 10:37:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24AbQYL026107;
	Sun, 4 Mar 2012 10:37:26 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24AbQhv026104;
	Sun, 4 Mar 2012 10:37:26 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203041037.q24AbQhv026104@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Sun, 4 Mar 2012 10:37:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232486 - stable/9/sbin/ifconfig
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 10:37:26 -0000

Author: remko
Date: Sun Mar  4 10:37:26 2012
New Revision: 232486
URL: http://svn.freebsd.org/changeset/base/232486

Log:
  Add an ifconfig carp option that enables users to set
  the state of the carp cluster.
  
  This is a direct commit to stable/9 because -HEAD's
  code is very different. I discussed this with Gleb
  and the reason for this is that since we do not
  touch the kernel itself and are not adding very
  weird or confusing things, we can commit this to the
  stable branch directly.
  
  The options 'master' and 'backup' are now available,
  which enables the administrator to force a node into
  the backup or master state on the cluster. Ofcourse
  preempt has to be disabled otherwise the master node
  will become master again.
  
  One can do that with:
  
  sysctl net.inet.carp.preempt=0
  
  After that one can schedule maintenance on the node
  normally running as the master and such.
  
  PR:		100956
  Discussed with:	glebius
  MFC after:	1 weeks

Modified:
  stable/9/sbin/ifconfig/ifcarp.c
  stable/9/sbin/ifconfig/ifconfig.8

Modified: stable/9/sbin/ifconfig/ifcarp.c
==============================================================================
--- stable/9/sbin/ifconfig/ifcarp.c	Sun Mar  4 09:48:58 2012	(r232485)
+++ stable/9/sbin/ifconfig/ifcarp.c	Sun Mar  4 10:37:26 2012	(r232486)
@@ -57,6 +57,7 @@ void setcarp_advbase(const char *,int, i
 void setcarp_advskew(const char *, int, int, const struct afswtch *rafp);
 void setcarp_passwd(const char *, int, int, const struct afswtch *rafp);
 void setcarp_vhid(const char *, int, int, const struct afswtch *rafp);
+void setcarp_state(const char *, int, int, const struct afswtch *rafp);
 
 void
 carp_status(int s)
@@ -175,11 +176,34 @@ setcarp_advbase(const char *val, int d, 
 	return;
 }
 
+void setcarp_state(const char *val, int d, int s, const struct afswtch *afp)
+{
+	struct carpreq carpr;
+	int i;
+
+	bzero((char *)&carpr, sizeof(struct carpreq));
+	ifr.ifr_data = (caddr_t)&carpr;
+
+	if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1)
+		err(1, "SIOCGVH");
+
+	for (i = 0; i <= CARP_MAXSTATE; i++) {
+		if (!strcasecmp(val, carp_states[i])) {
+			carpr.carpr_state = i;
+			break;
+		}
+	}
+
+	if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1)
+		err(1, "SIOCSVH");
+}
+
 static struct cmd carp_cmds[] = {
 	DEF_CMD_ARG("advbase",	setcarp_advbase),
 	DEF_CMD_ARG("advskew",	setcarp_advskew),
 	DEF_CMD_ARG("pass",	setcarp_passwd),
 	DEF_CMD_ARG("vhid",	setcarp_vhid),
+	DEF_CMD_ARG("state",	setcarp_state),
 };
 static struct afswtch af_carp = {
 	.af_name	= "af_carp",

Modified: stable/9/sbin/ifconfig/ifconfig.8
==============================================================================
--- stable/9/sbin/ifconfig/ifconfig.8	Sun Mar  4 09:48:58 2012	(r232485)
+++ stable/9/sbin/ifconfig/ifconfig.8	Sun Mar  4 10:37:26 2012	(r232486)
@@ -28,7 +28,7 @@
 .\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd December 17, 2011
+.Dd March 4, 2012
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -2436,6 +2436,13 @@ Set the authentication key to
 Set the virtual host ID.
 This is a required setting.
 Acceptable values are 1 to 255.
+.It Cm state Ar state
+Force the interface into state 
+.Ar state . 
+Valid states are INIT, BACKUP, and MASTER. Note that manually setting the state
+to INIT is ignored by 
+.Xr carp 4 .
+This state is set automatically when the underlying interface is down.
 .El
 .Pp
 The

From owner-svn-src-stable@FreeBSD.ORG  Sun Mar  4 16:21:21 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1B119106566B;
	Sun,  4 Mar 2012 16:21:21 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 09C448FC16;
	Sun,  4 Mar 2012 16:21:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GLK1Z042695;
	Sun, 4 Mar 2012 16:21:20 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24GLKO0042693;
	Sun, 4 Mar 2012 16:21:20 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203041621.q24GLKO0042693@svn.freebsd.org>
From: Eitan Adler <eadler@FreeBSD.org>
Date: Sun, 4 Mar 2012 16:21:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232499 - stable/9/sys/dev/acpica
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 16:21:21 -0000

Author: eadler
Date: Sun Mar  4 16:21:20 2012
New Revision: 232499
URL: http://svn.freebsd.org/changeset/base/232499

Log:
  MFC r227626, r227642:
  	- be more precise about the unit of measurement
  
  Approved by:	cperciva

Modified:
  stable/9/sys/dev/acpica/acpi_thermal.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/acpica/acpi_thermal.c
==============================================================================
--- stable/9/sys/dev/acpica/acpi_thermal.c	Sun Mar  4 15:31:13 2012	(r232498)
+++ stable/9/sys/dev/acpica/acpi_thermal.c	Sun Mar  4 16:21:20 2012	(r232499)
@@ -245,7 +245,7 @@ acpi_tz_attach(device_t dev)
 	SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
 		       SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
 		       OID_AUTO, "polling_rate", CTLFLAG_RW,
-		       &acpi_tz_polling_rate, 0, "monitor polling rate");
+		       &acpi_tz_polling_rate, 0, "monitor polling interval in seconds");
 	SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
 		       SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO,
 		       "user_override", CTLFLAG_RW, &acpi_tz_override, 0,

From owner-svn-src-stable@FreeBSD.ORG  Sun Mar  4 16:24:59 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A89C41065687;
	Sun,  4 Mar 2012 16:24:59 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5D60E8FC12;
	Sun,  4 Mar 2012 16:24:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GOxHA042857;
	Sun, 4 Mar 2012 16:24:59 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24GOx7A042855;
	Sun, 4 Mar 2012 16:24:59 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203041624.q24GOx7A042855@svn.freebsd.org>
From: Eitan Adler <eadler@FreeBSD.org>
Date: Sun, 4 Mar 2012 16:24:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232500 - stable/7/sys/dev/acpica
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 16:24:59 -0000

Author: eadler
Date: Sun Mar  4 16:24:58 2012
New Revision: 232500
URL: http://svn.freebsd.org/changeset/base/232500

Log:
  MFC r227626, r227642:
  	- be more precise about the unit of measurement
  
  Approved by:	cperciva

Modified:
  stable/7/sys/dev/acpica/acpi_thermal.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/acpica/acpi_thermal.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_thermal.c	Sun Mar  4 16:21:20 2012	(r232499)
+++ stable/7/sys/dev/acpica/acpi_thermal.c	Sun Mar  4 16:24:58 2012	(r232500)
@@ -243,7 +243,7 @@ acpi_tz_attach(device_t dev)
 	SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
 		       SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
 		       OID_AUTO, "polling_rate", CTLFLAG_RW,
-		       &acpi_tz_polling_rate, 0, "monitor polling rate");
+		       &acpi_tz_polling_rate, 0, "monitor polling interval in seconds");
 	SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
 		       SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO,
 		       "user_override", CTLFLAG_RW, &acpi_tz_override, 0,

From owner-svn-src-stable@FreeBSD.ORG  Sun Mar  4 17:00:46 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CBCE31065672;
	Sun,  4 Mar 2012 17:00:46 +0000 (UTC) (envelope-from raj@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ACBF18FC13;
	Sun,  4 Mar 2012 17:00:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24H0kWk044301;
	Sun, 4 Mar 2012 17:00:46 GMT (envelope-from raj@svn.freebsd.org)
Received: (from raj@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24H0kL8044297;
	Sun, 4 Mar 2012 17:00:46 GMT (envelope-from raj@svn.freebsd.org)
Message-Id: <201203041700.q24H0kL8044297@svn.freebsd.org>
From: Rafal Jaworowski <raj@FreeBSD.org>
Date: Sun, 4 Mar 2012 17:00:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232508 - in stable/9/sys: arm/arm arm/include i386/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 17:00:47 -0000

Author: raj
Date: Sun Mar  4 17:00:46 2012
New Revision: 232508
URL: http://svn.freebsd.org/changeset/base/232508

Log:
  MFC r228504, r228530.
  
  r228504:
   Make *intr{cnt,names} on ARM reside in data section, similar to other arches.
  
   sintrnames and sintrcnt are initialized with non-zero values, which were
   discarded by the .bss directive, so consumers like "vmstat -i" were not
   getting correct data.
  
   Submitted by:	Lukasz Plachno
   Obtained from:	Semihalf
  
  r228530:
   ARM pmap fixes:
  
   - Write Buffers have to be drained after write to Page Table even if caches
     are in write-through mode.
  
   - Make sure to sync PTE in pmap_zero_page_generic().
  
   Submitted by:	Michal Mazur
   Reviewed by:	cognet
   Obtained from:	Semihalf

Modified:
  stable/9/sys/arm/arm/irq_dispatch.S
  stable/9/sys/arm/arm/pmap.c
  stable/9/sys/arm/include/pmap.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/arm/arm/irq_dispatch.S
==============================================================================
--- stable/9/sys/arm/arm/irq_dispatch.S	Sun Mar  4 16:59:45 2012	(r232507)
+++ stable/9/sys/arm/arm/irq_dispatch.S	Sun Mar  4 17:00:46 2012	(r232508)
@@ -98,10 +98,9 @@ ASENTRY_NP(irq_entry)
 	PULLFRAMEFROMSVCANDEXIT
 	movs	pc, lr			/* Exit */
 
-	.bss
+	.data
 	.align	0
 
-
 	.global _C_LABEL(intrnames), _C_LABEL(sintrnames)
 	.global _C_LABEL(intrcnt), _C_LABEL(sintrcnt)
 _C_LABEL(intrnames): 

Modified: stable/9/sys/arm/arm/pmap.c
==============================================================================
--- stable/9/sys/arm/arm/pmap.c	Sun Mar  4 16:59:45 2012	(r232507)
+++ stable/9/sys/arm/arm/pmap.c	Sun Mar  4 17:00:46 2012	(r232508)
@@ -4044,6 +4044,7 @@ pmap_zero_page_generic(vm_paddr_t phys, 
 	 * order to work without corruption when write-allocate is enabled.
 	 */
 	*cdst_pte = L2_S_PROTO | phys | L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE);
+	PTE_SYNC(cdst_pte);
 	cpu_tlb_flushD_SE(cdstp);
 	cpu_cpwait();
 	if (off || size != PAGE_SIZE)

Modified: stable/9/sys/arm/include/pmap.h
==============================================================================
--- stable/9/sys/arm/include/pmap.h	Sun Mar  4 16:59:45 2012	(r232507)
+++ stable/9/sys/arm/include/pmap.h	Sun Mar  4 17:00:46 2012	(r232508)
@@ -382,7 +382,8 @@ do {									\
 	if (PMAP_NEEDS_PTE_SYNC) {					\
 		cpu_dcache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\
 		cpu_l2cache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\
-	}\
+	} else								\
+		cpu_drain_writebuf();					\
 } while (/*CONSTCOND*/0)
 
 #define	PTE_SYNC_RANGE(pte, cnt)					\
@@ -392,7 +393,8 @@ do {									\
 		    (cnt) << 2); /* * sizeof(pt_entry_t) */		\
 		cpu_l2cache_wb_range((vm_offset_t)(pte), 		\
 		    (cnt) << 2); /* * sizeof(pt_entry_t) */		\
-	}								\
+	} else								\
+		cpu_drain_writebuf();					\
 } while (/*CONSTCOND*/0)
 
 extern pt_entry_t		pte_l1_s_cache_mode;

From owner-svn-src-stable@FreeBSD.ORG  Sun Mar  4 17:53:41 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 085F7106564A;
	Sun,  4 Mar 2012 17:53:41 +0000 (UTC) (envelope-from raj@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E6E0F8FC08;
	Sun,  4 Mar 2012 17:53:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24HreoR046136;
	Sun, 4 Mar 2012 17:53:40 GMT (envelope-from raj@svn.freebsd.org)
Received: (from raj@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Hreiv046133;
	Sun, 4 Mar 2012 17:53:40 GMT (envelope-from raj@svn.freebsd.org)
Message-Id: <201203041753.q24Hreiv046133@svn.freebsd.org>
From: Rafal Jaworowski <raj@FreeBSD.org>
Date: Sun, 4 Mar 2012 17:53:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232511 - in stable/9/sys: dev/mvs i386/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Mar 2012 17:53:41 -0000

Author: raj
Date: Sun Mar  4 17:53:40 2012
New Revision: 232511
URL: http://svn.freebsd.org/changeset/base/232511

Log:
  MFC r230865:
  
   Adjust mvs(4) to handle interrupt cause reg depending on the actual number of
   channels available
  
   - current code treats bits 4:7 in 'SATAHC interrupt mask' and 'SATAHC
     interrupt cause' as flags for SATA channels 2 and 3
  
   - for embedded SATA controllers (SoC) these bits have been marked as reserved
     in datasheets so far, but for some new and upcoming chips they are used for
     purposes other than SATA
  
   Submitted by:	Lukasz Plachno
   Reviewed by:	mav
   Obtained from:	Semihalf

Modified:
  stable/9/sys/dev/mvs/mvs.h
  stable/9/sys/dev/mvs/mvs_soc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/dev/mvs/mvs.h
==============================================================================
--- stable/9/sys/dev/mvs/mvs.h	Sun Mar  4 17:33:22 2012	(r232510)
+++ stable/9/sys/dev/mvs/mvs.h	Sun Mar  4 17:53:40 2012	(r232511)
@@ -61,6 +61,9 @@
 
 #define CHIP_SOC_LED		0x2C	/* SoC LED Configuration */
 
+/* Additional mask for SoC devices with less than 4 channels */
+#define CHIP_SOC_HC0_MASK(num)	(0xff >> ((4 - (num)) * 2))
+
 /* Chip CCC registers */
 #define CHIP_ICC		0x18008
 #define CHIP_ICC_ALL_PORTS	 (1 << 4)	/* all ports irq event */

Modified: stable/9/sys/dev/mvs/mvs_soc.c
==============================================================================
--- stable/9/sys/dev/mvs/mvs_soc.c	Sun Mar  4 17:33:22 2012	(r232510)
+++ stable/9/sys/dev/mvs/mvs_soc.c	Sun Mar  4 17:53:40 2012	(r232511)
@@ -216,7 +216,9 @@ mvs_ctlr_setup(device_t dev)
 	if (ccc)
 		ccim |= IC_HC0_COAL_DONE;
 	/* Enable chip interrupts */
-	ctlr->gmim = (ccc ? IC_HC0_COAL_DONE : IC_DONE_HC0) | IC_ERR_HC0;
+	ctlr->gmim = ((ccc ? IC_HC0_COAL_DONE :
+	    (IC_DONE_HC0 & CHIP_SOC_HC0_MASK(ctlr->channels))) |
+	    (IC_ERR_HC0 & CHIP_SOC_HC0_MASK(ctlr->channels)));
 	ATA_OUTL(ctlr->r_mem, CHIP_SOC_MIM, ctlr->gmim | ctlr->pmim);
 	return (0);
 }
@@ -291,25 +293,26 @@ mvs_intr(void *data)
 	struct mvs_controller *ctlr = data;
 	struct mvs_intr_arg arg;
 	void (*function)(void *);
-	int p;
+	int p, chan_num;
 	u_int32_t ic, aic;
 
 	ic = ATA_INL(ctlr->r_mem, CHIP_SOC_MIC);
 	if ((ic & IC_HC0) == 0)
 		return;
+
 	/* Acknowledge interrupts of this HC. */
 	aic = 0;
-	if (ic & (IC_DONE_IRQ << 0))
-		aic |= HC_IC_DONE(0) | HC_IC_DEV(0);
-	if (ic & (IC_DONE_IRQ << 2))
-		aic |= HC_IC_DONE(1) | HC_IC_DEV(1);
-	if (ic & (IC_DONE_IRQ << 4))
-		aic |= HC_IC_DONE(2) | HC_IC_DEV(2);
-	if (ic & (IC_DONE_IRQ << 6))
-		aic |= HC_IC_DONE(3) | HC_IC_DEV(3);
+
+	/* Processing interrupts from each initialized channel */
+	for (chan_num = 0; chan_num < ctlr->channels; chan_num++) {
+		if (ic & (IC_DONE_IRQ << (chan_num * 2)))
+			aic |= HC_IC_DONE(chan_num) | HC_IC_DEV(chan_num);
+	}
+
 	if (ic & IC_HC0_COAL_DONE)
 		aic |= HC_IC_COAL;
 	ATA_OUTL(ctlr->r_mem, HC_IC, ~aic);
+
 	/* Call per-port interrupt handler. */
 	for (p = 0; p < ctlr->channels; p++) {
 		arg.cause = ic & (IC_ERR_IRQ|IC_DONE_IRQ);

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 04:46:28 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ACCC81065673;
	Mon,  5 Mar 2012 04:46:28 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9691B8FC12;
	Mon,  5 Mar 2012 04:46:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q254kSMP067233;
	Mon, 5 Mar 2012 04:46:28 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q254kSCd067231;
	Mon, 5 Mar 2012 04:46:28 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201203050446.q254kSCd067231@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Mon, 5 Mar 2012 04:46:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232534 - stable/9/sys/geom/part
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 04:46:28 -0000

Author: ae
Date: Mon Mar  5 04:46:28 2012
New Revision: 232534
URL: http://svn.freebsd.org/changeset/base/232534

Log:
  MFC r231751:
    Add PART::type attribute handler. It returns partition type as string.

Modified:
  stable/9/sys/geom/part/g_part.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/part/g_part.c
==============================================================================
--- stable/9/sys/geom/part/g_part.c	Mon Mar  5 03:44:16 2012	(r232533)
+++ stable/9/sys/geom/part/g_part.c	Mon Mar  5 04:46:28 2012	(r232534)
@@ -2056,6 +2056,7 @@ g_part_start(struct bio *bp)
 	struct g_part_table *table;
 	struct g_kerneldump *gkd;
 	struct g_provider *pp;
+	char buf[64];
 
 	pp = bp->bio_to;
 	gp = pp->geom;
@@ -2104,6 +2105,9 @@ g_part_start(struct bio *bp)
 		if (g_handleattr_str(bp, "PART::scheme",
 		    table->gpt_scheme->name))
 			return;
+		if (g_handleattr_str(bp, "PART::type",
+		    G_PART_TYPE(table, entry, buf, sizeof(buf))))
+			return;
 		if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) {
 			/*
 			 * Check that the partition is suitable for kernel

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 04:51:23 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3BCCF1065670;
	Mon,  5 Mar 2012 04:51:23 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 25C238FC1A;
	Mon,  5 Mar 2012 04:51:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q254pN8P067444;
	Mon, 5 Mar 2012 04:51:23 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q254pMab067441;
	Mon, 5 Mar 2012 04:51:22 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201203050451.q254pMab067441@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Mon, 5 Mar 2012 04:51:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232535 - stable/9/sys/geom/part
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 04:51:23 -0000

Author: ae
Date: Mon Mar  5 04:51:22 2012
New Revision: 232535
URL: http://svn.freebsd.org/changeset/base/232535

Log:
  MFC r231754:
    Add additional check to EBR probe and create methods:
    don't try probe and create  EBR scheme when parent partition type
    is not "ebr". This fixes error messages about corrupted EBR for
    some partitions where is actually another partition scheme.
  
    NOTE: if you have EBR on the partition with different than "ebr"
    (0x05) type, then you will lost access to partitions until it will be
    changed.
  
  MFC r231928:
    Add alias for the partition type 0x0f. Now "ebr" name is used for both
    types 0x05 and 0x0f, but 0x05 is preferred and used when partition is
    created with "gpart add -t ebr ...".
    This should keep EBR partitions accessible after r231754 for those,
    who have EBR on the partition with type 0x0f.

Modified:
  stable/9/sys/geom/part/g_part_ebr.c
  stable/9/sys/geom/part/g_part_mbr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/part/g_part_ebr.c
==============================================================================
--- stable/9/sys/geom/part/g_part_ebr.c	Mon Mar  5 04:46:28 2012	(r232534)
+++ stable/9/sys/geom/part/g_part_ebr.c	Mon Mar  5 04:51:22 2012	(r232535)
@@ -268,7 +268,7 @@ g_part_ebr_add(struct g_part_table *base
 static int
 g_part_ebr_create(struct g_part_table *basetable, struct g_part_parms *gpp)
 {
-	char psn[8];
+	char type[64];
 	struct g_consumer *cp;
 	struct g_provider *pp;
 	uint32_t msize;
@@ -285,10 +285,15 @@ g_part_ebr_create(struct g_part_table *b
 	if (basetable->gpt_depth == 0)
 		return (ENXIO);
 	cp = LIST_FIRST(&pp->consumers);
-	error = g_getattr("PART::scheme", cp, &psn);
-	if (error)
+	error = g_getattr("PART::scheme", cp, &type);
+	if (error != 0)
 		return (error);
-	if (strcmp(psn, "MBR"))
+	if (strcmp(type, "MBR") != 0)
+		return (ENXIO);
+	error = g_getattr("PART::type", cp, &type);
+	if (error != 0)
+		return (error);
+	if (strcmp(type, "ebr") != 0)
 		return (ENXIO);
 
 	msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX);
@@ -405,7 +410,7 @@ g_part_ebr_precheck(struct g_part_table 
 static int
 g_part_ebr_probe(struct g_part_table *table, struct g_consumer *cp)
 {
-	char psn[8];
+	char type[64];
 	struct g_provider *pp;
 	u_char *buf, *p;
 	int error, index, res;
@@ -422,10 +427,16 @@ g_part_ebr_probe(struct g_part_table *ta
 	/* Check that we have a parent and that it's a MBR. */
 	if (table->gpt_depth == 0)
 		return (ENXIO);
-	error = g_getattr("PART::scheme", cp, &psn);
-	if (error)
+	error = g_getattr("PART::scheme", cp, &type);
+	if (error != 0)
+		return (error);
+	if (strcmp(type, "MBR") != 0)
+		return (ENXIO);
+	/* Check that partition has type DOSPTYP_EBR. */
+	error = g_getattr("PART::type", cp, &type);
+	if (error != 0)
 		return (error);
-	if (strcmp(psn, "MBR"))
+	if (strcmp(type, "ebr") != 0)
 		return (ENXIO);
 
 	/* Check that there's a EBR. */

Modified: stable/9/sys/geom/part/g_part_mbr.c
==============================================================================
--- stable/9/sys/geom/part/g_part_mbr.c	Mon Mar  5 04:46:28 2012	(r232534)
+++ stable/9/sys/geom/part/g_part_mbr.c	Mon Mar  5 04:51:22 2012	(r232535)
@@ -119,6 +119,7 @@ static struct g_part_mbr_alias {
 	{ DOSPTYP_EXT,		G_PART_ALIAS_EBR },
 	{ DOSPTYP_NTFS,		G_PART_ALIAS_MS_NTFS },
 	{ DOSPTYP_FAT32,	G_PART_ALIAS_MS_FAT32 },
+	{ DOSPTYP_EXTLBA,	G_PART_ALIAS_EBR },
 	{ DOSPTYP_LDM,		G_PART_ALIAS_MS_LDM_DATA },
 	{ DOSPTYP_LINSWP,	G_PART_ALIAS_LINUX_SWAP },
 	{ DOSPTYP_LINUX,	G_PART_ALIAS_LINUX_DATA },

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 04:53:49 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C3D771065674;
	Mon,  5 Mar 2012 04:53:49 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AE4988FC12;
	Mon,  5 Mar 2012 04:53:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q254rnoA067565;
	Mon, 5 Mar 2012 04:53:49 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q254rnEx067563;
	Mon, 5 Mar 2012 04:53:49 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201203050453.q254rnEx067563@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Mon, 5 Mar 2012 04:53:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232536 - stable/9/sys/geom/part
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 04:53:49 -0000

Author: ae
Date: Mon Mar  5 04:53:49 2012
New Revision: 232536
URL: http://svn.freebsd.org/changeset/base/232536

Log:
  MFC r231929:
    If nested scheme allows dump kernel to its partition, we may allow
    dump for the parent partition too.

Modified:
  stable/9/sys/geom/part/g_part.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/part/g_part.c
==============================================================================
--- stable/9/sys/geom/part/g_part.c	Mon Mar  5 04:51:22 2012	(r232535)
+++ stable/9/sys/geom/part/g_part.c	Mon Mar  5 04:53:49 2012	(r232536)
@@ -2112,9 +2112,12 @@ g_part_start(struct bio *bp)
 			/*
 			 * Check that the partition is suitable for kernel
 			 * dumps. Typically only swap partitions should be
-			 * used.
+			 * used. If the request comes from the nested scheme
+			 * we allow dumping there as well.
 			 */
-			if (!G_PART_DUMPTO(table, entry)) {
+			if ((bp->bio_from == NULL ||
+			    bp->bio_from->geom->class != &g_part_class) &&
+			    G_PART_DUMPTO(table, entry) == 0) {
 				g_io_deliver(bp, ENODEV);
 				printf("GEOM_PART: Partition '%s' not suitable"
 				    " for kernel dumps (wrong type?)\n",

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 05:18:58 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 96563106564A;
	Mon,  5 Mar 2012 05:18:58 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7855E8FC08;
	Mon,  5 Mar 2012 05:18:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q255Iwf3068495;
	Mon, 5 Mar 2012 05:18:58 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q255Iw40068493;
	Mon, 5 Mar 2012 05:18:58 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201203050518.q255Iw40068493@svn.freebsd.org>
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 5 Mar 2012 05:18:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232537 - stable/9/usr.sbin/cron/crontab
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 05:18:58 -0000

Author: delphij
Date: Mon Mar  5 05:18:58 2012
New Revision: 232537
URL: http://svn.freebsd.org/changeset/base/232537

Log:
  MFC r232202:
  
  Drop setuid status while doing file operations to prevent potential
  information leak.  This changeset is intended to be a minimal one
  to make backports easier.
  
  Reviewed by:	kevlo, remko

Modified:
  stable/9/usr.sbin/cron/crontab/crontab.c
Directory Properties:
  stable/9/usr.sbin/cron/   (props changed)
  stable/9/usr.sbin/cron/crontab/   (props changed)

Modified: stable/9/usr.sbin/cron/crontab/crontab.c
==============================================================================
--- stable/9/usr.sbin/cron/crontab/crontab.c	Mon Mar  5 04:53:49 2012	(r232536)
+++ stable/9/usr.sbin/cron/crontab/crontab.c	Mon Mar  5 05:18:58 2012	(r232537)
@@ -194,6 +194,17 @@ parse_args(argc, argv)
 	}
 
 	if (Option == opt_replace) {
+		/* relinquish the setuid status of the binary during
+		 * the open, lest nonroot users read files they should
+		 * not be able to read.  we can't use access() here
+		 * since there's a race condition.  thanks go out to
+		 * Arnt Gulbrandsen <agulbra@pvv.unit.no> for spotting
+		 * the race.
+		 */
+
+		if (swap_uids() < OK)
+			err(ERROR_EXIT, "swapping uids");
+
 		/* we have to open the file here because we're going to
 		 * chdir(2) into /var/cron before we get around to
 		 * reading the file.
@@ -204,21 +215,11 @@ parse_args(argc, argv)
 		    !strcmp(resolved_path, SYSCRONTAB)) {
 			err(ERROR_EXIT, SYSCRONTAB " must be edited manually");
 		} else {
-			/* relinquish the setuid status of the binary during
-			 * the open, lest nonroot users read files they should
-			 * not be able to read.  we can't use access() here
-			 * since there's a race condition.  thanks go out to
-			 * Arnt Gulbrandsen <agulbra@pvv.unit.no> for spotting
-			 * the race.
-			 */
-
-			if (swap_uids() < OK)
-				err(ERROR_EXIT, "swapping uids");
 			if (!(NewCrontab = fopen(Filename, "r")))
 				err(ERROR_EXIT, "%s", Filename);
-			if (swap_uids_back() < OK)
-				err(ERROR_EXIT, "swapping uids back");
 		}
+		if (swap_uids_back() < OK)
+			err(ERROR_EXIT, "swapping uids back");
 	}
 
 	Debug(DMISC, ("user=%s, file=%s, option=%s\n",
@@ -363,11 +364,15 @@ edit_cmd() {
 		goto fatal;
 	}
  again:
+	if (swap_uids() < OK)
+		err(ERROR_EXIT, "swapping uids");
 	if (stat(Filename, &statbuf) < 0) {
 		warn("stat");
  fatal:		unlink(Filename);
 		exit(ERROR_EXIT);
 	}
+	if (swap_uids_back() < OK)
+		err(ERROR_EXIT, "swapping uids back");
 	if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino)
 		errx(ERROR_EXIT, "temp file must be edited in place");
 	if (MD5File(Filename, orig_md5) == NULL) {
@@ -433,6 +438,8 @@ edit_cmd() {
 			editor, WTERMSIG(waiter), WCOREDUMP(waiter) ?"" :"no ");
 		goto fatal;
 	}
+	if (swap_uids() < OK)
+		err(ERROR_EXIT, "swapping uids");
 	if (stat(Filename, &statbuf) < 0) {
 		warn("stat");
 		goto fatal;
@@ -443,6 +450,8 @@ edit_cmd() {
 		warn("MD5");
 		goto fatal;
 	}
+	if (swap_uids_back() < OK)
+		err(ERROR_EXIT, "swapping uids back");
 	if (strcmp(orig_md5, new_md5) == 0 && !syntax_error) {
 		warnx("no changes made to crontab");
 		goto remove;

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 11:43:28 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 564DC106564A;
	Mon,  5 Mar 2012 11:43:28 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 450B18FC08;
	Mon,  5 Mar 2012 11:43:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25BhSQF084960;
	Mon, 5 Mar 2012 11:43:28 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25BhS50084958;
	Mon, 5 Mar 2012 11:43:28 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203051143.q25BhS50084958@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Mon, 5 Mar 2012 11:43:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232542 - stable/9/lib/libc/gen
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 11:43:28 -0000

Author: kib
Date: Mon Mar  5 11:43:27 2012
New Revision: 232542
URL: http://svn.freebsd.org/changeset/base/232542

Log:
  MFC r232392:
  Belatedly add dl_iterate_phdr(3) to the list of installed manpages.

Modified:
  stable/9/lib/libc/gen/Makefile.inc
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/gen/Makefile.inc
==============================================================================
--- stable/9/lib/libc/gen/Makefile.inc	Mon Mar  5 11:38:02 2012	(r232541)
+++ stable/9/lib/libc/gen/Makefile.inc	Mon Mar  5 11:43:27 2012	(r232542)
@@ -52,7 +52,7 @@ SYM_MAPS+=${.CURDIR}/gen/Symbol.map
 MAN+=	alarm.3 arc4random.3 \
 	basename.3 check_utility_compat.3 clock.3 \
 	confstr.3 ctermid.3 daemon.3 devname.3 directory.3 dirname.3 \
-	dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \
+	dl_iterate_phdr.3 dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \
 	err.3 exec.3 \
 	feature_present.3 fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 frexp.3 \
 	ftok.3 fts.3 ftw.3 \

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 11:45:20 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3CCED106564A;
	Mon,  5 Mar 2012 11:45:20 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B9FD8FC0A;
	Mon,  5 Mar 2012 11:45:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25BjKre085077;
	Mon, 5 Mar 2012 11:45:20 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25BjKP2085075;
	Mon, 5 Mar 2012 11:45:20 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203051145.q25BjKP2085075@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Mon, 5 Mar 2012 11:45:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232543 - stable/9/contrib/top
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 11:45:20 -0000

Author: kib
Date: Mon Mar  5 11:45:19 2012
New Revision: 232543
URL: http://svn.freebsd.org/changeset/base/232543

Log:
  MFC r232239:
  Fix a race in top non-interactive mode.  Use plain sleep(3) call instead
  of arming timer and then pausing.  If SIGALRM is delivered before pause(3)
  is entered, top hangs.

Modified:
  stable/9/contrib/top/top.c
Directory Properties:
  stable/9/contrib/top/   (props changed)

Modified: stable/9/contrib/top/top.c
==============================================================================
--- stable/9/contrib/top/top.c	Mon Mar  5 11:43:27 2012	(r232542)
+++ stable/9/contrib/top/top.c	Mon Mar  5 11:45:19 2012	(r232543)
@@ -70,7 +70,6 @@ int pcpu_stats = No;
 
 /* signal handling routines */
 sigret_t leave();
-sigret_t onalrm();
 sigret_t tstop();
 #ifdef SIGWINCH
 sigret_t winch();
@@ -723,12 +722,7 @@ restart:
 	    no_command = Yes;
 	    if (!interactive)
 	    {
-		/* set up alarm */
-		(void) signal(SIGALRM, onalrm);
-		(void) alarm((unsigned)delay);
-    
-		/* wait for the rest of it .... */
-		pause();
+		sleep(delay);
 	    }
 	    else while (no_command)
 	    {
@@ -1174,11 +1168,3 @@ int status;
     exit(status);
     /*NOTREACHED*/
 }
-
-sigret_t onalrm()	/* SIGALRM handler */
-
-{
-    /* this is only used in batch mode to break out of the pause() */
-    /* return; */
-}
-

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 17:06:35 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8CA271065674;
	Mon,  5 Mar 2012 17:06:35 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B3478FC19;
	Mon,  5 Mar 2012 17:06:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25H6Zlt095204;
	Mon, 5 Mar 2012 17:06:35 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25H6ZtK095202;
	Mon, 5 Mar 2012 17:06:35 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201203051706.q25H6ZtK095202@svn.freebsd.org>
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 5 Mar 2012 17:06:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232549 - stable/8/etc
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 17:06:35 -0000

Author: delphij
Date: Mon Mar  5 17:06:34 2012
New Revision: 232549
URL: http://svn.freebsd.org/changeset/base/232549

Log:
  MFC r231888:
  
  Put the signal trap output to standard error instead of standard output.
  Without this change, pressing ^T could result in rc.d script putting
  junk strings like:
  
          Script <filename> running
  
  in configuration files when redirecting standard output to these files.

Modified:
  stable/8/etc/rc.subr
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/rc.subr
==============================================================================
--- stable/8/etc/rc.subr	Mon Mar  5 16:37:51 2012	(r232548)
+++ stable/8/etc/rc.subr	Mon Mar  5 17:06:34 2012	(r232549)
@@ -1027,9 +1027,9 @@ run_rc_script()
 			if [ -n "$rc_fast_and_loose" ]; then
 				set $_arg; . $_file
 			else
-				( trap "echo Script $_file interrupted; kill -QUIT $$" 3
-				  trap "echo Script $_file interrupted; exit 1" 2
-				  trap "echo Script $_file running" 29
+				( trap "echo Script $_file interrupted >&2 ; kill -QUIT $$" 3
+				  trap "echo Script $_file interrupted >&2 ; exit 1" 2
+				  trap "echo Script $_file running >&2" 29
 				  set $_arg; . $_file )
 			fi
 		fi

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 17:08:43 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 03597106566B;
	Mon,  5 Mar 2012 17:08:43 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E61D28FC0C;
	Mon,  5 Mar 2012 17:08:42 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25H8gY0095318;
	Mon, 5 Mar 2012 17:08:42 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25H8g1o095316;
	Mon, 5 Mar 2012 17:08:42 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201203051708.q25H8g1o095316@svn.freebsd.org>
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 5 Mar 2012 17:08:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232550 - stable/8/usr.sbin/pw
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 17:08:43 -0000

Author: delphij
Date: Mon Mar  5 17:08:42 2012
New Revision: 232550
URL: http://svn.freebsd.org/changeset/base/232550

Log:
  Backout r223115 and restore the historic behavior (create the
  default base directory in pw.conf).

Modified:
  stable/8/usr.sbin/pw/pw_user.c
Directory Properties:
  stable/8/usr.sbin/pw/   (props changed)

Modified: stable/8/usr.sbin/pw/pw_user.c
==============================================================================
--- stable/8/usr.sbin/pw/pw_user.c	Mon Mar  5 17:06:34 2012	(r232549)
+++ stable/8/usr.sbin/pw/pw_user.c	Mon Mar  5 17:08:42 2012	(r232550)
@@ -170,7 +170,7 @@ pw_user(struct userconf * cnf, int mode,
 	 * If we'll need to use it or we're updating it,
 	 * then create the base home directory if necessary
 	 */
-	if ((arg != NULL || getarg(args, 'm') != NULL) && (getarg(args, 'd') == NULL)) {
+	if (arg != NULL || getarg(args, 'm') != NULL) {
 		int	l = strlen(cnf->home);
 
 		if (l > 1 && cnf->home[l-1] == '/')	/* Shave off any trailing path delimiter */

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 17:09:17 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 59FF8106566C;
	Mon,  5 Mar 2012 17:09:17 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3ECD98FC25;
	Mon,  5 Mar 2012 17:09:17 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25H9GZo095373;
	Mon, 5 Mar 2012 17:09:16 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25H9GkP095370;
	Mon, 5 Mar 2012 17:09:16 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201203051709.q25H9GkP095370@svn.freebsd.org>
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 5 Mar 2012 17:09:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232551 - stable/8/usr.sbin/cron/crontab
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 17:09:17 -0000

Author: delphij
Date: Mon Mar  5 17:09:16 2012
New Revision: 232551
URL: http://svn.freebsd.org/changeset/base/232551

Log:
  MFC r232202:
  
  Drop setuid status while doing file operations to prevent potential
  information leak.  This changeset is intended to be a minimal one
  to make backports easier.
  
  Reviewed by:	kevlo, remko

Modified:
  stable/8/usr.sbin/cron/crontab/crontab.c
Directory Properties:
  stable/8/usr.sbin/cron/   (props changed)
  stable/8/usr.sbin/cron/crontab/   (props changed)

Modified: stable/8/usr.sbin/cron/crontab/crontab.c
==============================================================================
--- stable/8/usr.sbin/cron/crontab/crontab.c	Mon Mar  5 17:08:42 2012	(r232550)
+++ stable/8/usr.sbin/cron/crontab/crontab.c	Mon Mar  5 17:09:16 2012	(r232551)
@@ -194,6 +194,17 @@ parse_args(argc, argv)
 	}
 
 	if (Option == opt_replace) {
+		/* relinquish the setuid status of the binary during
+		 * the open, lest nonroot users read files they should
+		 * not be able to read.  we can't use access() here
+		 * since there's a race condition.  thanks go out to
+		 * Arnt Gulbrandsen <agulbra@pvv.unit.no> for spotting
+		 * the race.
+		 */
+
+		if (swap_uids() < OK)
+			err(ERROR_EXIT, "swapping uids");
+
 		/* we have to open the file here because we're going to
 		 * chdir(2) into /var/cron before we get around to
 		 * reading the file.
@@ -204,21 +215,11 @@ parse_args(argc, argv)
 		    !strcmp(resolved_path, SYSCRONTAB)) {
 			err(ERROR_EXIT, SYSCRONTAB " must be edited manually");
 		} else {
-			/* relinquish the setuid status of the binary during
-			 * the open, lest nonroot users read files they should
-			 * not be able to read.  we can't use access() here
-			 * since there's a race condition.  thanks go out to
-			 * Arnt Gulbrandsen <agulbra@pvv.unit.no> for spotting
-			 * the race.
-			 */
-
-			if (swap_uids() < OK)
-				err(ERROR_EXIT, "swapping uids");
 			if (!(NewCrontab = fopen(Filename, "r")))
 				err(ERROR_EXIT, "%s", Filename);
-			if (swap_uids_back() < OK)
-				err(ERROR_EXIT, "swapping uids back");
 		}
+		if (swap_uids_back() < OK)
+			err(ERROR_EXIT, "swapping uids back");
 	}
 
 	Debug(DMISC, ("user=%s, file=%s, option=%s\n",
@@ -363,11 +364,15 @@ edit_cmd() {
 		goto fatal;
 	}
  again:
+	if (swap_uids() < OK)
+		err(ERROR_EXIT, "swapping uids");
 	if (stat(Filename, &statbuf) < 0) {
 		warn("stat");
  fatal:		unlink(Filename);
 		exit(ERROR_EXIT);
 	}
+	if (swap_uids_back() < OK)
+		err(ERROR_EXIT, "swapping uids back");
 	if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino)
 		errx(ERROR_EXIT, "temp file must be edited in place");
 	if (MD5File(Filename, orig_md5) == NULL) {
@@ -433,6 +438,8 @@ edit_cmd() {
 			editor, WTERMSIG(waiter), WCOREDUMP(waiter) ?"" :"no ");
 		goto fatal;
 	}
+	if (swap_uids() < OK)
+		err(ERROR_EXIT, "swapping uids");
 	if (stat(Filename, &statbuf) < 0) {
 		warn("stat");
 		goto fatal;
@@ -443,6 +450,8 @@ edit_cmd() {
 		warn("MD5");
 		goto fatal;
 	}
+	if (swap_uids_back() < OK)
+		err(ERROR_EXIT, "swapping uids back");
 	if (strcmp(orig_md5, new_md5) == 0 && !syntax_error) {
 		warnx("no changes made to crontab");
 		goto remove;

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 17:33:02 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1779F106566B;
	Mon,  5 Mar 2012 17:33:02 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F1A608FC13;
	Mon,  5 Mar 2012 17:33:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25HX1R7096156;
	Mon, 5 Mar 2012 17:33:01 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25HX1CM096134;
	Mon, 5 Mar 2012 17:33:01 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201203051733.q25HX1CM096134@svn.freebsd.org>
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Mon, 5 Mar 2012 17:33:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232552 - in stable/8: contrib/netcat etc etc/rc.d
	share/man/man4 sys/contrib/pf/net sys/fs/nfsclient
	sys/i386/conf sys/kern sys/net sys/netinet sys/netinet/ipfw
	sys/netinet6 sys/netips...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 17:33:02 -0000

Author: bz
Date: Mon Mar  5 17:33:01 2012
New Revision: 232552
URL: http://svn.freebsd.org/changeset/base/232552

Log:
  MFC r231852,232127:
  
    Merge multi-FIB IPv6 support.
  
    Extend the so far IPv4-only support for multiple routing tables (FIBs)
    introduced in r178888 to IPv6 providing feature parity.
  
    This includes an extended rtalloc(9) KPI for IPv6, the necessary
    adjustments to the network stack, and user land support as in netstat.
  
  Sponsored by:	Cisco Systems, Inc.

Modified:
  stable/8/contrib/netcat/netcat.c
  stable/8/etc/network.subr
  stable/8/etc/rc.d/network_ipv6
  stable/8/etc/rc.d/routing
  stable/8/share/man/man4/faith.4
  stable/8/sys/contrib/pf/net/pf.c
  stable/8/sys/contrib/pf/net/pf_ioctl.c
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfs_clvfsops.c
  stable/8/sys/kern/uipc_socket.c
  stable/8/sys/net/flowtable.c
  stable/8/sys/net/if_faith.c
  stable/8/sys/net/route.c
  stable/8/sys/net/route.h
  stable/8/sys/netinet/in.c
  stable/8/sys/netinet/ipfw/ip_fw2.c
  stable/8/sys/netinet/sctp_os_bsd.h
  stable/8/sys/netinet/tcp_subr.c
  stable/8/sys/netinet6/icmp6.c
  stable/8/sys/netinet6/in6.c
  stable/8/sys/netinet6/in6_gif.c
  stable/8/sys/netinet6/in6_ifattach.c
  stable/8/sys/netinet6/in6_mcast.c
  stable/8/sys/netinet6/in6_rmx.c
  stable/8/sys/netinet6/in6_src.c
  stable/8/sys/netinet6/in6_var.h
  stable/8/sys/netinet6/ip6_forward.c
  stable/8/sys/netinet6/ip6_input.c
  stable/8/sys/netinet6/ip6_output.c
  stable/8/sys/netinet6/ip6_var.h
  stable/8/sys/netinet6/nd6.c
  stable/8/sys/netinet6/nd6_nbr.c
  stable/8/sys/netinet6/nd6_rtr.c
  stable/8/sys/netinet6/raw_ip6.c
  stable/8/sys/netipsec/ipsec_output.c
  stable/8/sys/nfs/bootp_subr.c
  stable/8/sys/nfsclient/nfs_vfsops.c
  stable/8/usr.bin/netstat/route.c   (contents, props changed)
Directory Properties:
  stable/8/contrib/netcat/   (props changed)
  stable/8/etc/   (props changed)
  stable/8/share/man/man4/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/i386/conf/XENHVM   (props changed)
  stable/8/usr.bin/netstat/   (props changed)
  stable/8/usr.bin/netstat/Makefile   (props changed)
  stable/8/usr.bin/netstat/atalk.c   (props changed)
  stable/8/usr.bin/netstat/bpf.c   (props changed)
  stable/8/usr.bin/netstat/if.c   (props changed)
  stable/8/usr.bin/netstat/inet.c   (props changed)
  stable/8/usr.bin/netstat/inet6.c   (props changed)
  stable/8/usr.bin/netstat/ipsec.c   (props changed)
  stable/8/usr.bin/netstat/ipx.c   (props changed)
  stable/8/usr.bin/netstat/main.c   (props changed)
  stable/8/usr.bin/netstat/mbuf.c   (props changed)
  stable/8/usr.bin/netstat/mroute.c   (props changed)
  stable/8/usr.bin/netstat/mroute6.c   (props changed)
  stable/8/usr.bin/netstat/netgraph.c   (props changed)
  stable/8/usr.bin/netstat/netisr.c   (props changed)
  stable/8/usr.bin/netstat/netstat.1   (props changed)
  stable/8/usr.bin/netstat/netstat.h   (props changed)
  stable/8/usr.bin/netstat/pfkey.c   (props changed)
  stable/8/usr.bin/netstat/sctp.c   (props changed)
  stable/8/usr.bin/netstat/unix.c   (props changed)

Modified: stable/8/contrib/netcat/netcat.c
==============================================================================
--- stable/8/contrib/netcat/netcat.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/contrib/netcat/netcat.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -605,8 +605,10 @@ remote_connect(const char *host, const c
 #endif
 
 		if (rtableid) {
-			if (setfib(rtableid) == -1)
-				err(1, "setfib");
+			if (setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid,
+			    sizeof(rtableid)) == -1)
+				err(1, "setsockopt(.., SO_SETFIB, %u, ..)",
+				    rtableid);
 		}
 
 		/* Bind to a local port or source address if specified. */
@@ -678,8 +680,11 @@ local_listen(char *host, char *port, str
 			continue;
 
 		if (rtableid) {
-			if (setfib(rtableid) == -1)
-				err(1, "setfib");
+			ret = setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid,
+			    sizeof(rtableid));
+			if (ret == -1)
+				err(1, "setsockopt(.., SO_SETFIB, %u, ..)",
+				    rtableid);
 		}
 
 		ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));

Modified: stable/8/etc/network.subr
==============================================================================
--- stable/8/etc/network.subr	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/etc/network.subr	Mon Mar  5 17:33:01 2012	(r232552)
@@ -1125,16 +1125,33 @@ network6_default_interface_setup()
 		;;
 	esac
 
+	# Get the number of FIBs supported.
+	fibs=`sysctl -n net.fibs`
+	: ${fibs:=1}
+
 	# Disallow unicast packets without outgoing scope identifiers,
 	# or route such packets to a "default" interface, if it is specified.
 	route add -inet6 fe80:: -prefixlen 10 ::1 -reject
 	case ${ipv6_default_interface} in
 	[Nn][Oo] | '')
-		route add -inet6 ff02:: -prefixlen 16 ::1 -reject
+		i=0
+		while test ${i} -lt ${fibs}; do
+			setfib -F ${i} \
+			    route add -inet6 ff02:: -prefixlen 16 ::1 -reject
+			i=$((i + 1))
+		done
 		;;
 	*)
 		laddr=`network6_getladdr ${ipv6_default_interface}`
+		# Only add the laddr route to the default FIB and a reject
+		# route to all others.
 		route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface
+		i=1
+		while test ${i} -lt ${fibs}; do
+			setfib -F ${i} \
+			    route add -inet6 ff02:: -prefixlen 16 ::1 -reject
+			i=$((i + 1))
+		done
 
 		# Disable installing the default interface with the
 		# case net.inet6.ip6.forwarding=0 and

Modified: stable/8/etc/rc.d/network_ipv6
==============================================================================
--- stable/8/etc/rc.d/network_ipv6	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/etc/rc.d/network_ipv6	Mon Mar  5 17:33:01 2012	(r232552)
@@ -41,6 +41,7 @@ start_cmd="network_ipv6_start"
 
 network_ipv6_start()
 {
+
 	case ${ipv6_network_interfaces} in
 	[Aa][Uu][Tt][Oo])
 		# Get a list of network interfaces

Modified: stable/8/etc/rc.d/routing
==============================================================================
--- stable/8/etc/rc.d/routing	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/etc/rc.d/routing	Mon Mar  5 17:33:01 2012	(r232552)
@@ -61,9 +61,21 @@ static_start()
 	# Disallow "internal" addresses to appear on the wire if inet6
 	# is enabled.
 	if afexists inet6; then
+		local fibs i
+
+		# Get the number of FIBs supported.
+		fibs=`sysctl -n net.fibs`
+		: ${fibs:=1}
+
 		# disallow "internal" addresses to appear on the wire
-		route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
-		route add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
+		i=0
+		while test ${i} -lt ${fibs}; do
+			setfib -F ${i} route add -inet6 \
+			    ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject
+			setfib -F ${i} route add -inet6 \
+			    ::0.0.0.0 -prefixlen 96 ::1 -reject
+			i=$((i + 1))
+		done
 	fi
 }
 

Modified: stable/8/share/man/man4/faith.4
==============================================================================
--- stable/8/share/man/man4/faith.4	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/share/man/man4/faith.4	Mon Mar  5 17:33:01 2012	(r232552)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 10, 1999
+.Dd January 23, 2012
 .Dt FAITH 4
 .Os
 .Sh NAME
@@ -58,7 +58,7 @@ variable in
 .Xr rc.conf 5 .
 .Pp
 Special action will be taken when IPv6 TCP traffic is seen on a router,
-and the routing table suggests to route it to the
+and the default routing table suggests to route it to the
 .Nm
 interface.
 In this case, the packet will be accepted by the router,

Modified: stable/8/sys/contrib/pf/net/pf.c
==============================================================================
--- stable/8/sys/contrib/pf/net/pf.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/contrib/pf/net/pf.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -3197,11 +3197,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam
 		dst->sin_len = sizeof(*dst);
 		dst->sin_addr = addr->v4;
 #ifdef __FreeBSD__
-#ifdef RTF_PRCLONING
-		rtalloc_ign(&ro, (RTF_CLONING | RTF_PRCLONING));
-#else /* !RTF_PRCLONING */
-		in_rtalloc_ign(&ro, 0, 0);
-#endif
+		in_rtalloc_ign(&ro, 0, RT_DEFAULT_FIB);
 #else /* ! __FreeBSD__ */
 		rtalloc_noclone(&ro, NO_CLONING);
 #endif
@@ -3217,12 +3213,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam
 		dst6->sin6_len = sizeof(*dst6);
 		dst6->sin6_addr = addr->v6;
 #ifdef __FreeBSD__
-#ifdef RTF_PRCLONING
-		rtalloc_ign((struct route *)&ro6,
-		    (RTF_CLONING | RTF_PRCLONING));
-#else /* !RTF_PRCLONING */
-		rtalloc_ign((struct route *)&ro6, 0);
-#endif
+		in6_rtalloc_ign(&ro6, 0, RT_DEFAULT_FIB);
 #else /* ! __FreeBSD__ */
 		rtalloc_noclone((struct route *)&ro6, NO_CLONING);
 #endif
@@ -6134,9 +6125,11 @@ pf_routable(struct pf_addr *addr, sa_fam
 #ifdef __FreeBSD__
 /* XXX MRT not always INET */ /* stick with table 0 though */
 	if (af == AF_INET)
-		in_rtalloc_ign((struct route *)&ro, 0, 0);
+		in_rtalloc_ign((struct route *)&ro, 0, RT_DEFAULT_FIB);
+#ifdef INET6
 	else
-		rtalloc_ign((struct route *)&ro, 0);
+		in6_rtalloc_ign(&ro, 0, RT_DEFAULT_FIB);
+#endif
 #else /* ! __FreeBSD__ */
 	rtalloc_noclone((struct route *)&ro, NO_CLONING);
 #endif
@@ -6212,14 +6205,12 @@ pf_rtlabel_match(struct pf_addr *addr, s
 	}
 
 #ifdef __FreeBSD__
-# ifdef RTF_PRCLONING
-	rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING));
-# else /* !RTF_PRCLONING */
 	if (af == AF_INET)
-		in_rtalloc_ign((struct route *)&ro, 0, 0);
+		in_rtalloc_ign((struct route *)&ro, 0, RT_DEFAULT_FIB);
+#ifdef INET6
 	else
-		rtalloc_ign((struct route *)&ro, 0);
-# endif
+		in6_rtalloc_ign(&ro, 0, RT_DEFAULT_FIB);
+#endif
 #else /* ! __FreeBSD__ */
 	rtalloc_noclone((struct route *)&ro, NO_CLONING);
 #endif

Modified: stable/8/sys/contrib/pf/net/pf_ioctl.c
==============================================================================
--- stable/8/sys/contrib/pf/net/pf_ioctl.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/contrib/pf/net/pf_ioctl.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -1531,7 +1531,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a
 		}
 
 #ifdef __FreeBSD__ /* ROUTING */
-		if (rule->rtableid > 0 && rule->rtableid > rt_numfibs)
+		if (rule->rtableid > 0 && rule->rtableid >= rt_numfibs)
 #else
 		if (rule->rtableid > 0 && !rtable_exists(rule->rtableid))
 #endif
@@ -1794,7 +1794,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a
 
 			if (newrule->rtableid > 0 &&
 #ifdef __FreeBSD__ /* ROUTING */
-			    newrule->rtableid > rt_numfibs)
+			    newrule->rtableid >= rt_numfibs)
 #else
 			    !rtable_exists(newrule->rtableid))
 #endif

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -946,7 +946,8 @@ nfscl_getmyip(struct nfsmount *nmp, int 
 		sad.sin_len = sizeof (struct sockaddr_in);
 		sad.sin_addr.s_addr = sin->sin_addr.s_addr;
 		CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred));
-		rt = rtalloc1((struct sockaddr *)&sad, 0, 0UL);
+		rt = rtalloc1_fib((struct sockaddr *)&sad, 0, 0UL,
+		     curthread->td_proc->p_fibnum);
 		if (rt != NULL) {
 			if (rt->rt_ifp != NULL &&
 			    rt->rt_ifa != NULL &&
@@ -971,7 +972,8 @@ nfscl_getmyip(struct nfsmount *nmp, int 
 		sad6.sin6_len = sizeof (struct sockaddr_in6);
 		sad6.sin6_addr = sin6->sin6_addr;
 		CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred));
-		rt = rtalloc1((struct sockaddr *)&sad6, 0, 0UL);
+		rt = rtalloc1_fib((struct sockaddr *)&sad6, 0, 0UL,
+		     curthread->td_proc->p_fibnum);
 		if (rt != NULL) {
 			if (rt->rt_ifp != NULL &&
 			    rt->rt_ifa != NULL &&

Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvfsops.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -455,10 +455,10 @@ nfs_mountroot(struct mount *mp)
 		sin.sin_len = sizeof(sin);
                 /* XXX MRT use table 0 for this sort of thing */
 		CURVNET_SET(TD_TO_VNET(td));
-		error = rtrequest(RTM_ADD, (struct sockaddr *)&sin,
+		error = rtrequest_fib(RTM_ADD, (struct sockaddr *)&sin,
 		    (struct sockaddr *)&nd->mygateway,
 		    (struct sockaddr *)&mask,
-		    RTF_UP | RTF_GATEWAY, NULL);
+		    RTF_UP | RTF_GATEWAY, NULL, RT_DEFAULT_FIB);
 		CURVNET_RESTORE();
 		if (error)
 			panic("nfs_mountroot: RTM_ADD: %d", error);

Modified: stable/8/sys/kern/uipc_socket.c
==============================================================================
--- stable/8/sys/kern/uipc_socket.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/kern/uipc_socket.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -383,6 +383,7 @@ socreate(int dom, struct socket **aso, i
 	so->so_type = type;
 	so->so_cred = crhold(cred);
 	if ((prp->pr_domain->dom_family == PF_INET) ||
+	    (prp->pr_domain->dom_family == PF_INET6) ||
 	    (prp->pr_domain->dom_family == PF_ROUTE))
 		so->so_fibnum = td->td_proc->p_fibnum;
 	else
@@ -2498,6 +2499,7 @@ sosetopt(struct socket *so, struct socko
 			}
 			if (so->so_proto != NULL &&
 			   ((so->so_proto->pr_domain->dom_family == PF_INET) ||
+			   (so->so_proto->pr_domain->dom_family == PF_INET6) ||
 			   (so->so_proto->pr_domain->dom_family == PF_ROUTE))) {
 				so->so_fibnum = optval;
 				/* Note: ignore error */

Modified: stable/8/sys/net/flowtable.c
==============================================================================
--- stable/8/sys/net/flowtable.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/net/flowtable.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -373,7 +373,7 @@ SYSCTL_VNET_PROC(_net_inet_flowtable, OI
 
 #ifndef RADIX_MPATH
 static void
-in_rtalloc_ign_wrapper(struct route *ro, uint32_t hash, u_int fibnum)
+rtalloc_ign_wrapper(struct route *ro, uint32_t hash, u_int fibnum)
 {
 
 	rtalloc_ign_fib(ro, 0, fibnum);
@@ -1315,7 +1315,7 @@ flowtable_alloc(char *name, int nentry, 
 #ifdef RADIX_MPATH
 	ft->ft_rtalloc = rtalloc_mpath_fib;
 #else
-	ft->ft_rtalloc = in_rtalloc_ign_wrapper;
+	ft->ft_rtalloc = rtalloc_ign_wrapper;
 #endif
 	if (flags & FL_PCPU) {
 		ft->ft_lock = flowtable_pcpu_lock;

Modified: stable/8/sys/net/if_faith.c
==============================================================================
--- stable/8/sys/net/if_faith.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/net/if_faith.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -338,7 +338,7 @@ faithprefix(in6)
 	sin6.sin6_family = AF_INET6;
 	sin6.sin6_len = sizeof(struct sockaddr_in6);
 	sin6.sin6_addr = *in6;
-	rt = rtalloc1((struct sockaddr *)&sin6, 0, 0UL);
+	rt = in6_rtalloc1((struct sockaddr *)&sin6, 0, 0UL, RT_DEFAULT_FIB);
 	if (rt && rt->rt_ifp && rt->rt_ifp->if_type == IFT_FAITH &&
 	    (rt->rt_ifp->if_flags & IFF_UP) != 0)
 		ret = 1;

Modified: stable/8/sys/net/route.c
==============================================================================
--- stable/8/sys/net/route.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/net/route.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -35,6 +35,7 @@
  ***********************************************************************/
 
 #include "opt_inet.h"
+#include "opt_inet6.h"
 #include "opt_route.h"
 #include "opt_mrouting.h"
 #include "opt_mpath.h"
@@ -72,7 +73,11 @@ SYSCTL_INT(_net, OID_AUTO, fibs, CTLFLAG
 /*
  * Allow the boot code to allow LESS than RT_MAXFIBS to be used.
  * We can't do more because storage is statically allocated for now.
- * (for compatibility reasons.. this will change).
+ * (for compatibility reasons.. this will change. When this changes, code should
+ * be refactored to protocol independent parts and protocol dependent parts,
+ * probably hanging of domain(9) specific storage to not need the full
+ * fib * af RNH allocation etc. but allow tuning the number of tables per
+ * address family).
  */
 TUNABLE_INT("net.fibs", &rt_numfibs);
 
@@ -82,6 +87,9 @@ TUNABLE_INT("net.fibs", &rt_numfibs);
  * changes for the FIB of the caller when adding a new set of addresses
  * to an interface.  XXX this is a shotgun aproach to a problem that needs
  * a more fine grained solution.. that will come.
+ * XXX also has the problems getting the FIB from curthread which will not
+ * always work given the fib can be overridden and prefixes can be added
+ * from the network stack context.
  */
 u_int rt_add_addr_allfibs = 1;
 SYSCTL_INT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RW,
@@ -196,27 +204,23 @@ vnet_route_init(const void *unused __unu
 	V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), NULL, NULL,
 	    NULL, NULL, UMA_ALIGN_PTR, 0);
 	for (dom = domains; dom; dom = dom->dom_next) {
-		if (dom->dom_rtattach)  {
-			for  (table = 0; table < rt_numfibs; table++) {
-				if ( (fam = dom->dom_family) == AF_INET ||
-				    table == 0) {
- 			        	/* for now only AF_INET has > 1 table */
-					/* XXX MRT 
-					 * rtattach will be also called
-					 * from vfs_export.c but the
-					 * offset will be 0
-					 * (only for AF_INET and AF_INET6
-					 * which don't need it anyhow)
-					 */
-					rnh = rt_tables_get_rnh_ptr(table, fam);
-					if (rnh == NULL)
-						panic("%s: rnh NULL", __func__);
-					dom->dom_rtattach((void **)rnh,
-				    	    dom->dom_rtoffset);
-				} else {
-					break;
-				}
-			}
+		if (dom->dom_rtattach == NULL)
+			continue;
+
+		for  (table = 0; table < rt_numfibs; table++) {
+			fam = dom->dom_family;
+			if (table != 0 && fam != AF_INET6 && fam != AF_INET)
+				break;
+
+			/*
+			 * XXX MRT rtattach will be also called from
+			 * vfs_export.c but the offset will be 0 (only for
+			 * AF_INET and AF_INET6 which don't need it anyhow).
+			 */
+			rnh = rt_tables_get_rnh_ptr(table, fam);
+			if (rnh == NULL)
+				panic("%s: rnh NULL", __func__);
+			dom->dom_rtattach((void **)rnh, dom->dom_rtoffset);
 		}
 	}
 }
@@ -233,20 +237,19 @@ vnet_route_uninit(const void *unused __u
 	struct radix_node_head **rnh;
 
 	for (dom = domains; dom; dom = dom->dom_next) {
-		if (dom->dom_rtdetach) {
-			for (table = 0; table < rt_numfibs; table++) {
-				if ( (fam = dom->dom_family) == AF_INET ||
-				    table == 0) {
-					/* For now only AF_INET has > 1 tbl. */
-					rnh = rt_tables_get_rnh_ptr(table, fam);
-					if (rnh == NULL)
-						panic("%s: rnh NULL", __func__);
-					dom->dom_rtdetach((void **)rnh,
-					    dom->dom_rtoffset);
-				} else {
-					break;
-				}
-			}
+		if (dom->dom_rtdetach == NULL)
+			continue;
+
+		for (table = 0; table < rt_numfibs; table++) {
+			fam = dom->dom_family;
+
+			if (table != 0 && fam != AF_INET6 && fam != AF_INET)
+				break;
+
+			rnh = rt_tables_get_rnh_ptr(table, fam);
+			if (rnh == NULL)
+				panic("%s: rnh NULL", __func__);
+			dom->dom_rtdetach((void **)rnh, dom->dom_rtoffset);
 		}
 	}
 }
@@ -274,7 +277,8 @@ setfib(struct thread *td, struct setfib_
 void
 rtalloc(struct route *ro)
 {
-	rtalloc_ign_fib(ro, 0UL, 0);
+
+	rtalloc_ign_fib(ro, 0UL, RT_DEFAULT_FIB);
 }
 
 void
@@ -294,7 +298,7 @@ rtalloc_ign(struct route *ro, u_long ign
 		RTFREE(rt);
 		ro->ro_rt = NULL;
 	}
-	ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, 0);
+	ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, RT_DEFAULT_FIB);
 	if (ro->ro_rt)
 		RT_UNLOCK(ro->ro_rt);
 }
@@ -324,7 +328,8 @@ rtalloc_ign_fib(struct route *ro, u_long
 struct rtentry *
 rtalloc1(struct sockaddr *dst, int report, u_long ignflags)
 {
-	return (rtalloc1_fib(dst, report, ignflags, 0));
+
+	return (rtalloc1_fib(dst, report, ignflags, RT_DEFAULT_FIB));
 }
 
 struct rtentry *
@@ -339,8 +344,15 @@ rtalloc1_fib(struct sockaddr *dst, int r
 	int needlock;
 
 	KASSERT((fibnum < rt_numfibs), ("rtalloc1_fib: bad fibnum"));
-	if (dst->sa_family != AF_INET)	/* Only INET supports > 1 fib now */
-		fibnum = 0;
+	switch (dst->sa_family) {
+	case AF_INET6:
+	case AF_INET:
+		/* We support multiple FIBs. */
+		break;
+	default:
+		fibnum = RT_DEFAULT_FIB;
+		break;
+	}
 	rnh = rt_tables_get_rnh(fibnum, dst->sa_family);
 	newrt = NULL;
 	if (rnh == NULL)
@@ -486,7 +498,8 @@ rtredirect(struct sockaddr *dst,
 	int flags,
 	struct sockaddr *src)
 {
-	rtredirect_fib(dst, gateway, netmask, flags, src, 0);
+
+	rtredirect_fib(dst, gateway, netmask, flags, src, RT_DEFAULT_FIB);
 }
 
 void
@@ -617,7 +630,8 @@ out:
 int
 rtioctl(u_long req, caddr_t data)
 {
-	return (rtioctl_fib(req, data, 0));
+
+	return (rtioctl_fib(req, data, RT_DEFAULT_FIB));
 }
 
 /*
@@ -647,7 +661,8 @@ rtioctl_fib(u_long req, caddr_t data, u_
 struct ifaddr *
 ifa_ifwithroute(int flags, struct sockaddr *dst, struct sockaddr *gateway)
 {
-	return (ifa_ifwithroute_fib(flags, dst, gateway, 0));
+
+	return (ifa_ifwithroute_fib(flags, dst, gateway, RT_DEFAULT_FIB));
 }
 
 struct ifaddr *
@@ -732,7 +747,9 @@ rtrequest(int req,
 	int flags,
 	struct rtentry **ret_nrt)
 {
-	return (rtrequest_fib(req, dst, gateway, netmask, flags, ret_nrt, 0));
+
+	return (rtrequest_fib(req, dst, gateway, netmask, flags, ret_nrt,
+	    RT_DEFAULT_FIB));
 }
 
 int
@@ -771,7 +788,8 @@ rtrequest_fib(int req,
 int
 rt_getifa(struct rt_addrinfo *info)
 {
-	return (rt_getifa_fib(info, 0));
+
+	return (rt_getifa_fib(info, RT_DEFAULT_FIB));
 }
 
 /*
@@ -1029,8 +1047,16 @@ rtrequest1_fib(int req, struct rt_addrin
 #define senderr(x) { error = x ; goto bad; }
 
 	KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum"));
-	if (dst->sa_family != AF_INET)	/* Only INET supports > 1 fib now */
-		fibnum = 0;
+	switch (dst->sa_family) {
+	case AF_INET6:
+	case AF_INET:
+		/* We support multiple FIBs. */
+		break;
+	default:
+		fibnum = RT_DEFAULT_FIB;
+		break;
+	}
+
 	/*
 	 * Find the correct routing tree to use for this Address Family
 	 */
@@ -1136,8 +1162,7 @@ rtrequest1_fib(int req, struct rt_addrin
 		rt->rt_flags = RTF_UP | flags;
 		rt->rt_fibnum = fibnum;
 		/*
-		 * Add the gateway. Possibly re-malloc-ing the storage for it
-		 * 
+		 * Add the gateway. Possibly re-malloc-ing the storage for it.
 		 */
 		RT_LOCK(rt);
 		if ((error = rt_setgate(rt, dst, gateway)) != 0) {
@@ -1186,12 +1211,17 @@ rtrequest1_fib(int req, struct rt_addrin
 
 #ifdef FLOWTABLE
 		rt0 = NULL;
-		/* XXX
-		 * "flow-table" only support IPv4 at the moment.
-		 * XXX-BZ as of r205066 it would support IPv6.
-		 */
+		/* "flow-table" only supports IPv6 and IPv4 at the moment. */
+		switch (dst->sa_family) {
+#ifdef notyet
+#ifdef INET6
+		case AF_INET6:
+#endif
+#endif
 #ifdef INET
-		if (dst->sa_family == AF_INET) {
+		case AF_INET:
+#endif
+#if defined(INET6) || defined(INET)
 			rn = rnh->rnh_matchaddr(dst, rnh);
 			if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) {
 				struct sockaddr *mask;
@@ -1230,9 +1260,9 @@ rtrequest1_fib(int req, struct rt_addrin
 					}
 				}
 			}
+#endif/* INET6 || INET */
 		}
-#endif
-#endif
+#endif /* FLOWTABLE */
 
 		/* XXX mtu manipulation will be done in rnh_addaddr -- itojun */
 		rn = rnh->rnh_addaddr(ndst, netmask, rnh, rt->rt_nodes);
@@ -1254,9 +1284,20 @@ rtrequest1_fib(int req, struct rt_addrin
 		} 
 #ifdef FLOWTABLE
 		else if (rt0 != NULL) {
+			switch (dst->sa_family) {
+#ifdef notyet
+#ifdef INET6
+			case AF_INET6:
+				flowtable_route_flush(V_ip6_ft, rt0);
+				break;
+#endif
+#endif
 #ifdef INET
-			flowtable_route_flush(V_ip_ft, rt0);
+			case AF_INET:
+				flowtable_route_flush(V_ip_ft, rt0);
+				break;
 #endif
+			}
 			RTFREE(rt0);
 		}
 #endif
@@ -1388,8 +1429,17 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 		dst = ifa->ifa_addr;
 		netmask = ifa->ifa_netmask;
 	}
-	if ( dst->sa_family != AF_INET)
-		fibnum = 0;
+	if (dst->sa_len == 0)
+		return(EINVAL);
+	switch (dst->sa_family) {
+	case AF_INET6:
+	case AF_INET:
+		/* We support multiple FIBs. */
+		break;
+	default:
+		fibnum = RT_DEFAULT_FIB;
+		break;
+	}
 	if (fibnum == -1) {
 		if (rt_add_addr_allfibs == 0 && cmd == (int)RTM_ADD) {
 			startfib = endfib = curthread->td_proc->p_fibnum;
@@ -1402,8 +1452,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 		startfib = fibnum;
 		endfib = fibnum;
 	}
-	if (dst->sa_len == 0)
-		return(EINVAL);
 
 	/*
 	 * If it's a delete, check that if it exists,
@@ -1427,9 +1475,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 	 * Now go through all the requested tables (fibs) and do the
 	 * requested action. Realistically, this will either be fib 0
 	 * for protocols that don't do multiple tables or all the
-	 * tables for those that do. XXX For this version only AF_INET.
-	 * When that changes code should be refactored to protocol
-	 * independent parts and protocol dependent parts.
+	 * tables for those that do.
 	 */
 	for ( fibnum = startfib; fibnum <= endfib; fibnum++) {
 		if (cmd == RTM_DELETE) {
@@ -1569,12 +1615,14 @@ rtinit1(struct ifaddr *ifa, int cmd, int
 	return (error);
 }
 
+#ifndef BURN_BRIDGES
 /* special one for inet internal use. may not use. */
 int
 rtinit_fib(struct ifaddr *ifa, int cmd, int flags)
 {
 	return (rtinit1(ifa, cmd, flags, -1));
 }
+#endif
 
 /*
  * Set up a routing table entry, normally
@@ -1584,7 +1632,7 @@ int
 rtinit(struct ifaddr *ifa, int cmd, int flags)
 {
 	struct sockaddr *dst;
-	int fib = 0;
+	int fib = RT_DEFAULT_FIB;
 
 	if (flags & RTF_HOST) {
 		dst = ifa->ifa_dstaddr;
@@ -1592,7 +1640,12 @@ rtinit(struct ifaddr *ifa, int cmd, int 
 		dst = ifa->ifa_addr;
 	}
 
-	if (dst->sa_family == AF_INET)
+	switch (dst->sa_family) {
+	case AF_INET6:
+	case AF_INET:
+		/* We do support multiple FIBs. */
 		fib = -1;
+		break;
+	}
 	return (rtinit1(ifa, cmd, flags, fib));
 }

Modified: stable/8/sys/net/route.h
==============================================================================
--- stable/8/sys/net/route.h	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/net/route.h	Mon Mar  5 17:33:01 2012	(r232552)
@@ -107,6 +107,7 @@ struct rt_metrics {
  #endif
 #endif
 
+#define	RT_DEFAULT_FIB	0	/* Explicitly mark fib=0 restricted cases */
 extern u_int rt_numfibs;	/* number fo usable routing tables */
 /*
  * XXX kernel function pointer `rt_output' is visible to applications.
@@ -401,8 +402,10 @@ void	 rtredirect(struct sockaddr *, stru
 int	 rtrequest(int, struct sockaddr *,
 	    struct sockaddr *, struct sockaddr *, int, struct rtentry **);
 
+#ifndef BURN_BRIDGES
 /* defaults to "all" FIBs */
 int	 rtinit_fib(struct ifaddr *, int, int);
+#endif
 
 /* XXX MRT NEW VERSIONS THAT USE FIBs
  * For now the protocol indepedent versions are the same as the AF_INET ones

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/netinet/in.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -957,7 +957,7 @@ in_ifinit(struct ifnet *ifp, struct in_i
 
 		bzero(&ia_ro, sizeof(ia_ro));
 		*((struct sockaddr_in *)(&ia_ro.ro_dst)) = ia->ia_addr;
-		rtalloc_ign_fib(&ia_ro, 0, 0);
+		rtalloc_ign_fib(&ia_ro, 0, RT_DEFAULT_FIB);
 		if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) &&
 		    (ia_ro.ro_rt->rt_ifp == V_loif)) {
 			RT_LOCK(ia_ro.ro_rt);

Modified: stable/8/sys/netinet/ipfw/ip_fw2.c
==============================================================================
--- stable/8/sys/netinet/ipfw/ip_fw2.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/netinet/ipfw/ip_fw2.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -494,7 +494,7 @@ search_ip6_addr_net (struct in6_addr * i
 }
 
 static int
-verify_path6(struct in6_addr *src, struct ifnet *ifp)
+verify_path6(struct in6_addr *src, struct ifnet *ifp, u_int fib)
 {
 	struct route_in6 ro;
 	struct sockaddr_in6 *dst;
@@ -505,9 +505,8 @@ verify_path6(struct in6_addr *src, struc
 	dst->sin6_family = AF_INET6;
 	dst->sin6_len = sizeof(*dst);
 	dst->sin6_addr = *src;
-	/* XXX MRT 0 for ipv6 at this time */
-	rtalloc_ign((struct route *)&ro, 0);
 
+	in6_rtalloc_ign(&ro, 0, fib);
 	if (ro.ro_rt == NULL)
 		return 0;
 
@@ -1682,7 +1681,7 @@ do {								\
 #ifdef INET6
 				    is_ipv6 ?
 					verify_path6(&(args->f_id.src_ip6),
-					    m->m_pkthdr.rcvif) :
+					    m->m_pkthdr.rcvif, args->f_id.fib) :
 #endif
 				    verify_path(src_ip, m->m_pkthdr.rcvif,
 				        args->f_id.fib)));
@@ -1694,7 +1693,7 @@ do {								\
 #ifdef INET6
 				    is_ipv6 ?
 				        verify_path6(&(args->f_id.src_ip6),
-				            NULL) :
+				            NULL, args->f_id.fib) :
 #endif
 				    verify_path(src_ip, NULL, args->f_id.fib)));
 				break;
@@ -1712,7 +1711,8 @@ do {								\
 #ifdef INET6
 					    is_ipv6 ? verify_path6(
 					        &(args->f_id.src_ip6),
-					        m->m_pkthdr.rcvif) :
+					        m->m_pkthdr.rcvif,
+						args->f_id.fib) :
 #endif
 					    verify_path(src_ip,
 					    	m->m_pkthdr.rcvif,

Modified: stable/8/sys/netinet/sctp_os_bsd.h
==============================================================================
--- stable/8/sys/netinet/sctp_os_bsd.h	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/netinet/sctp_os_bsd.h	Mon Mar  5 17:33:01 2012	(r232552)
@@ -424,6 +424,12 @@ typedef struct callout sctp_os_timer_t;
 typedef struct route sctp_route_t;
 typedef struct rtentry sctp_rtentry_t;
 
+/*
+ * XXX multi-FIB support was backed out in r179783 and it seems clear that the
+ * VRF support as currently in FreeBSD is not ready to support multi-FIB.
+ * It might be best to implement multi-FIB support for both v4 and v6 indepedent
+ * of VRFs and leave those to a real MPLS stack.
+ */
 #define SCTP_RTALLOC(ro, vrf_id) rtalloc_ign((struct route *)ro, 0UL)
 
 /* Future zero copy wakeup/send  function */

Modified: stable/8/sys/netinet/tcp_subr.c
==============================================================================
--- stable/8/sys/netinet/tcp_subr.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/netinet/tcp_subr.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -1801,7 +1801,7 @@ tcp_maxmtu6(struct in_conninfo *inc, int
 		sro6.ro_dst.sin6_family = AF_INET6;
 		sro6.ro_dst.sin6_len = sizeof(struct sockaddr_in6);
 		sro6.ro_dst.sin6_addr = inc->inc6_faddr;
-		rtalloc_ign((struct route *)&sro6, 0);
+		in6_rtalloc_ign(&sro6, 0, inc->inc_fibnum);
 	}
 	if (sro6.ro_rt != NULL) {
 		ifp = sro6.ro_rt->rt_ifp;

Modified: stable/8/sys/netinet6/icmp6.c
==============================================================================
--- stable/8/sys/netinet6/icmp6.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/netinet6/icmp6.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -359,7 +359,7 @@ icmp6_error(struct mbuf *m, int type, in
 		m_adj(m, ICMPV6_PLD_MAXLEN - m->m_pkthdr.len);
 
 	preplen = sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr);
-	M_PREPEND(m, preplen, M_DONTWAIT);
+	M_PREPEND(m, preplen, M_DONTWAIT);	/* FIB is also copied over. */
 	if (m && m->m_len < preplen)
 		m = m_pullup(m, preplen);
 	if (m == NULL) {
@@ -581,7 +581,7 @@ icmp6_input(struct mbuf **mp, int *offp,
 			MGETHDR(n, M_DONTWAIT, n0->m_type);
 			n0len = n0->m_pkthdr.len;	/* save for use below */
 			if (n)
-				M_MOVE_PKTHDR(n, n0);
+				M_MOVE_PKTHDR(n, n0);	/* FIB copied. */
 			if (n && maxlen >= MHLEN) {
 				MCLGET(n, M_DONTWAIT);
 				if ((n->m_flags & M_EXT) == 0) {
@@ -1419,7 +1419,7 @@ ni6_input(struct mbuf *m, int off)
 		m_freem(m);
 		return (NULL);
 	}
-	M_MOVE_PKTHDR(n, m); /* just for recvif */
+	M_MOVE_PKTHDR(n, m); /* just for recvif and FIB */
 	if (replylen > MHLEN) {
 		if (replylen > MCLBYTES) {
 			/*
@@ -2332,7 +2332,7 @@ icmp6_redirect_input(struct mbuf *m, int
 	sin6.sin6_family = AF_INET6;
 	sin6.sin6_len = sizeof(struct sockaddr_in6);
 	bcopy(&reddst6, &sin6.sin6_addr, sizeof(reddst6));
-	rt = rtalloc1((struct sockaddr *)&sin6, 0, 0UL);
+	rt = in6_rtalloc1((struct sockaddr *)&sin6, 0, 0UL, RT_DEFAULT_FIB);
 	if (rt) {
 		if (rt->rt_gateway == NULL ||
 		    rt->rt_gateway->sa_family != AF_INET6) {
@@ -2421,6 +2421,7 @@ icmp6_redirect_input(struct mbuf *m, int
 		struct sockaddr_in6 sdst;
 		struct sockaddr_in6 sgw;
 		struct sockaddr_in6 ssrc;
+		u_int fibnum;
 
 		bzero(&sdst, sizeof(sdst));
 		bzero(&sgw, sizeof(sgw));
@@ -2431,9 +2432,11 @@ icmp6_redirect_input(struct mbuf *m, int
 		bcopy(&redtgt6, &sgw.sin6_addr, sizeof(struct in6_addr));
 		bcopy(&reddst6, &sdst.sin6_addr, sizeof(struct in6_addr));
 		bcopy(&src6, &ssrc.sin6_addr, sizeof(struct in6_addr));
-		rtredirect((struct sockaddr *)&sdst, (struct sockaddr *)&sgw,
-		    (struct sockaddr *)NULL, RTF_GATEWAY | RTF_HOST,
-		    (struct sockaddr *)&ssrc);
+		for (fibnum = 0; fibnum < rt_numfibs; fibnum++)
+			in6_rtredirect((struct sockaddr *)&sdst,
+			    (struct sockaddr *)&sgw, (struct sockaddr *)NULL,
+			    RTF_GATEWAY | RTF_HOST, (struct sockaddr *)&ssrc,
+			    fibnum);
 	}
 	/* finally update cached route in each socket via pfctlinput */
     {
@@ -2517,6 +2520,7 @@ icmp6_redirect_output(struct mbuf *m0, s
 		MCLGET(m, M_DONTWAIT);
 	if (!m)
 		goto fail;
+	M_SETFIB(m, rt->rt_fibnum);
 	m->m_pkthdr.rcvif = NULL;
 	m->m_len = 0;
 	maxlen = M_TRAILINGSPACE(m);

Modified: stable/8/sys/netinet6/in6.c
==============================================================================
--- stable/8/sys/netinet6/in6.c	Mon Mar  5 17:09:16 2012	(r232551)
+++ stable/8/sys/netinet6/in6.c	Mon Mar  5 17:33:01 2012	(r232552)
@@ -198,6 +198,11 @@ in6_control(struct socket *so, u_long cm
 	switch (cmd) {
 	case SIOCGETSGCNT_IN6:
 	case SIOCGETMIFCNT_IN6:
+		/*	
+		 * XXX mrt_ioctl has a 3rd, unused, FIB argument in route.c.
+		 * We cannot see how that would be needed, so do not adjust the
+		 * KPI blindly; more likely should clean up the IPv4 variant.
+		 */
 		return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP);
 	}
 
@@ -696,6 +701,169 @@ out:
 }
 
 /*
+ * Join necessary multicast groups.  Factored out from in6_update_ifa().
+ * This entire work should only be done once, for the default FIB.
+ */
+static int
+in6_update_ifa_join_mc(struct ifnet *ifp, struct in6_aliasreq *ifra,
+    struct in6_ifaddr *ia, int flags, struct in6_multi **in6m_sol)
+{
+	char ip6buf[INET6_ADDRSTRLEN];
+	struct sockaddr_in6 mltaddr, mltmask;
+	struct in6_addr llsol;
+	struct in6_multi_mship *imm;
+	struct rtentry *rt;
+	int delay, error;
+
+	KASSERT(in6m_sol != NULL, ("%s: in6m_sol is NULL", __func__));
+
+	/* Join solicited multicast addr for new host id. */
+	bzero(&llsol, sizeof(struct in6_addr));
+	llsol.s6_addr32[0] = IPV6_ADDR_INT32_MLL;
+	llsol.s6_addr32[1] = 0;
+	llsol.s6_addr32[2] = htonl(1);
+	llsol.s6_addr32[3] = ifra->ifra_addr.sin6_addr.s6_addr32[3];
+	llsol.s6_addr8[12] = 0xff;
+	if ((error = in6_setscope(&llsol, ifp, NULL)) != 0) {
+		/* XXX: should not happen */
+		log(LOG_ERR, "%s: in6_setscope failed\n", __func__);
+		goto cleanup;
+	}
+	delay = 0;
+	if ((flags & IN6_IFAUPDATE_DADDELAY)) {
+		/*
+		 * We need a random delay for DAD on the address being
+		 * configured.  It also means delaying transmission of the
+		 * corresponding MLD report to avoid report collision.
+		 * [RFC 4861, Section 6.3.7]
+		 */
+		delay = arc4random() % (MAX_RTR_SOLICITATION_DELAY * hz);
+	}
+	imm = in6_joingroup(ifp, &llsol, &error, delay);
+	if (imm == NULL) {
+		nd6log((LOG_WARNING, "%s: addmulti failed for %s on %s "
+		    "(errno=%d)\n", __func__, ip6_sprintf(ip6buf, &llsol),
+		    if_name(ifp), error));
+		goto cleanup;
+	}
+	LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain);
+	*in6m_sol = imm->i6mm_maddr;
+
+	bzero(&mltmask, sizeof(mltmask));
+	mltmask.sin6_len = sizeof(struct sockaddr_in6);
+	mltmask.sin6_family = AF_INET6;
+	mltmask.sin6_addr = in6mask32;
+#define	MLTMASK_LEN  4	/* mltmask's masklen (=32bit=4octet) */
+
+	/*
+	 * Join link-local all-nodes address.
+	 */
+	bzero(&mltaddr, sizeof(mltaddr));
+	mltaddr.sin6_len = sizeof(struct sockaddr_in6);
+	mltaddr.sin6_family = AF_INET6;
+	mltaddr.sin6_addr = in6addr_linklocal_allnodes;
+	if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0)
+		goto cleanup; /* XXX: should not fail */
+
+	/*
+	 * XXX: do we really need this automatic routes?  We should probably
+	 * reconsider this stuff.  Most applications actually do not need the
+	 * routes, since they usually specify the outgoing interface.
+	 */
+	rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB);
+	if (rt != NULL) {
+		/* XXX: only works in !SCOPEDROUTING case. */
+		if (memcmp(&mltaddr.sin6_addr,
+		    &((struct sockaddr_in6 *)rt_key(rt))->sin6_addr,
+		    MLTMASK_LEN)) {
+			RTFREE_LOCKED(rt);
+			rt = NULL;
+		}
+	}
+	if (rt == NULL) {
+		error = in6_rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr,
+		    (struct sockaddr *)&ia->ia_addr,
+		    (struct sockaddr *)&mltmask, RTF_UP,
+		    (struct rtentry **)0, RT_DEFAULT_FIB);
+		if (error)
+			goto cleanup;
+	} else
+		RTFREE_LOCKED(rt);
+
+	imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error, 0);
+	if (imm == NULL) {
+		nd6log((LOG_WARNING, "%s: addmulti failed for %s on %s "
+		    "(errno=%d)\n", __func__, ip6_sprintf(ip6buf,
+		    &mltaddr.sin6_addr), if_name(ifp), error));
+		goto cleanup;
+	}
+	LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain);
+
+	/*
+	 * Join node information group address.
+	 */
+	delay = 0;
+	if ((flags & IN6_IFAUPDATE_DADDELAY)) {
+		/*
+		 * The spec does not say anything about delay for this group,
+		 * but the same logic should apply.
+		 */
+		delay = arc4random() % (MAX_RTR_SOLICITATION_DELAY * hz);
+	}
+	if (in6_nigroup(ifp, NULL, -1, &mltaddr.sin6_addr) == 0) {
+		/* XXX jinmei */
+		imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error, delay);
+		if (imm == NULL)
+			nd6log((LOG_WARNING, "%s: addmulti failed for %s on %s "
+			    "(errno=%d)\n", __func__, ip6_sprintf(ip6buf,
+			    &mltaddr.sin6_addr), if_name(ifp), error));
+			/* XXX not very fatal, go on... */
+		else
+			LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain);
+	}
+
+	/*
+	 * Join interface-local all-nodes address.
+	 * (ff01::1%ifN, and ff01::%ifN/32)
+	 */
+	mltaddr.sin6_addr = in6addr_nodelocal_allnodes;
+	if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0)
+		goto cleanup; /* XXX: should not fail */
+	/* XXX: again, do we really need the route? */
+	rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB);
+	if (rt != NULL) {
+		if (memcmp(&mltaddr.sin6_addr,
+		    &((struct sockaddr_in6 *)rt_key(rt))->sin6_addr,
+		    MLTMASK_LEN)) {
+			RTFREE_LOCKED(rt);
+			rt = NULL;
+		}
+	}
+	if (rt == NULL) {
+		error = in6_rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr,
+		    (struct sockaddr *)&ia->ia_addr,

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 17:35:23 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A5DE1065672;
	Mon,  5 Mar 2012 17:35:23 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25])
	by mx1.freebsd.org (Postfix) with ESMTP id 71F738FC23;
	Mon,  5 Mar 2012 17:35:22 +0000 (UTC)
Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587])
	(using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.sbone.de (Postfix) with ESMTPS id 3A23025D37D1;
	Mon,  5 Mar 2012 17:35:21 +0000 (UTC)
Received: from content-filter.sbone.de (content-filter.sbone.de
	[IPv6:fde9:577b:c1a9:31::2013:2742])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPS id 63828BDCC1F;
	Mon,  5 Mar 2012 17:35:20 +0000 (UTC)
X-Virus-Scanned: amavisd-new at sbone.de
Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587])
	by content-filter.sbone.de (content-filter.sbone.de
	[fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024)
	with ESMTP id ReghrMcUNm-o; Mon,  5 Mar 2012 17:35:18 +0000 (UTC)
Received: from orange-en1.sbone.de (orange-en1.sbone.de
	[IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPSA id BAD5DBDCC1E;
	Mon,  5 Mar 2012 17:35:17 +0000 (UTC)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
In-Reply-To: <201202110115.q1B1F2GZ006478@svn.freebsd.org>
Date: Mon, 5 Mar 2012 17:35:16 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: <E8A9DDB5-7DE9-458C-9EEA-103B27AA6D38@FreeBSD.org>
References: <201202110115.q1B1F2GZ006478@svn.freebsd.org>
To: Michael Tuexen <tuexen@FreeBSD.org>
X-Mailer: Apple Mail (2.1084)
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r231501 - in stable/8/usr.bin: chpass netstat su
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 17:35:23 -0000


On 11. Feb 2012, at 01:15 , Michael Tuexen wrote:

> Author: tuexen
> Date: Sat Feb 11 01:15:02 2012
> New Revision: 231501
> URL: http://svn.freebsd.org/changeset/base/231501
>=20
> Log:
>  MFC r230555:
>  Don't print a warning when using netstat to print
>  SCTP statistics when there is not SCTP in the kernel.
>  This problem was reported by Sean Mahood.
>=20
> Modified:
>  stable/8/usr.bin/netstat/sctp.c   (contents, props changed)
> Directory Properties:
>  stable/8/usr.bin/   (props changed)
>  stable/8/usr.bin/apply/   (props changed)
>  stable/8/usr.bin/ar/   (props changed)
>  stable/8/usr.bin/awk/   (props changed)
>  stable/8/usr.bin/biff/   (props changed)
>  stable/8/usr.bin/c89/   (props changed)
>  stable/8/usr.bin/c99/   (props changed)
>  stable/8/usr.bin/calendar/   (props changed)
>  stable/8/usr.bin/catman/   (props changed)
>  stable/8/usr.bin/checknr/   (props changed)
>  stable/8/usr.bin/chpass/Makefile   (props changed)
>  stable/8/usr.bin/column/   (props changed)
>  stable/8/usr.bin/comm/   (props changed)
>  stable/8/usr.bin/compress/   (props changed)
>  stable/8/usr.bin/cpio/   (props changed)
>  stable/8/usr.bin/cpuset/   (props changed)
>  stable/8/usr.bin/csup/   (props changed)
>  stable/8/usr.bin/du/   (props changed)
>  stable/8/usr.bin/ee/   (props changed)
>  stable/8/usr.bin/enigma/   (props changed)
>  stable/8/usr.bin/fetch/   (props changed)
>  stable/8/usr.bin/find/   (props changed)
>  stable/8/usr.bin/finger/   (props changed)
>  stable/8/usr.bin/fold/   (props changed)
>  stable/8/usr.bin/fstat/   (props changed)
>  stable/8/usr.bin/gcore/   (props changed)
>  stable/8/usr.bin/getopt/   (props changed)
>  stable/8/usr.bin/gzip/   (props changed)
>  stable/8/usr.bin/hexdump/   (props changed)
>  stable/8/usr.bin/indent/   (props changed)
>  stable/8/usr.bin/ipcs/   (props changed)
>  stable/8/usr.bin/jot/   (props changed)
>  stable/8/usr.bin/kdump/   (props changed)
>  stable/8/usr.bin/killall/   (props changed)
>  stable/8/usr.bin/ktrace/   (props changed)
>  stable/8/usr.bin/lastcomm/   (props changed)
>  stable/8/usr.bin/ldd/   (props changed)
>  stable/8/usr.bin/less/   (props changed)
>  stable/8/usr.bin/lex/   (props changed)
>  stable/8/usr.bin/limits/   (props changed)
>  stable/8/usr.bin/locale/   (props changed)
>  stable/8/usr.bin/locate/   (props changed)
>  stable/8/usr.bin/lock/   (props changed)
>  stable/8/usr.bin/lockf/   (props changed)
>  stable/8/usr.bin/logger/   (props changed)
>  stable/8/usr.bin/look/   (props changed)
>  stable/8/usr.bin/m4/   (props changed)
>  stable/8/usr.bin/mail/   (props changed)
>  stable/8/usr.bin/make/   (props changed)
>  stable/8/usr.bin/makewhatis/   (props changed)
>  stable/8/usr.bin/minigzip/   (props changed)
>  stable/8/usr.bin/ncal/   (props changed)
>  stable/8/usr.bin/netstat/   (props changed)
>  stable/8/usr.bin/netstat/Makefile   (props changed)
>  stable/8/usr.bin/netstat/atalk.c   (props changed)
>  stable/8/usr.bin/netstat/bpf.c   (props changed)
>  stable/8/usr.bin/netstat/if.c   (props changed)
>  stable/8/usr.bin/netstat/inet.c   (props changed)
>  stable/8/usr.bin/netstat/inet6.c   (props changed)
>  stable/8/usr.bin/netstat/ipsec.c   (props changed)
>  stable/8/usr.bin/netstat/ipx.c   (props changed)
>  stable/8/usr.bin/netstat/main.c   (props changed)
>  stable/8/usr.bin/netstat/mbuf.c   (props changed)
>  stable/8/usr.bin/netstat/mroute.c   (props changed)
>  stable/8/usr.bin/netstat/mroute6.c   (props changed)
>  stable/8/usr.bin/netstat/netgraph.c   (props changed)
>  stable/8/usr.bin/netstat/netisr.c   (props changed)
>  stable/8/usr.bin/netstat/netstat.1   (props changed)
>  stable/8/usr.bin/netstat/netstat.h   (props changed)
>  stable/8/usr.bin/netstat/pfkey.c   (props changed)
>  stable/8/usr.bin/netstat/route.c   (props changed)
>  stable/8/usr.bin/netstat/unix.c   (props changed)

This really splattered a lot of merge-info of stuff.  I noticed doing my =
own MFC and was quite doh!   Please be more careful in the future.


>  stable/8/usr.bin/newgrp/   (props changed)
>  stable/8/usr.bin/nfsstat/   (props changed)
>  stable/8/usr.bin/pathchk/   (props changed)
>  stable/8/usr.bin/perror/   (props changed)
>  stable/8/usr.bin/printf/   (props changed)
>  stable/8/usr.bin/procstat/   (props changed)
>  stable/8/usr.bin/rlogin/   (props changed)
>  stable/8/usr.bin/rpcgen/   (props changed)
>  stable/8/usr.bin/rpcinfo/   (props changed)
>  stable/8/usr.bin/rs/   (props changed)
>  stable/8/usr.bin/ruptime/   (props changed)
>  stable/8/usr.bin/script/   (props changed)
>  stable/8/usr.bin/sed/   (props changed)
>  stable/8/usr.bin/showmount/   (props changed)
>  stable/8/usr.bin/sockstat/   (props changed)
>  stable/8/usr.bin/split/   (props changed)
>  stable/8/usr.bin/stat/   (props changed)
>  stable/8/usr.bin/su/   (props changed)
>  stable/8/usr.bin/su/Makefile   (props changed)
>  stable/8/usr.bin/su/su.1   (props changed)
>  stable/8/usr.bin/su/su.c   (props changed)
>  stable/8/usr.bin/systat/   (props changed)
>  stable/8/usr.bin/tail/   (props changed)
>  stable/8/usr.bin/tar/   (props changed)
>  stable/8/usr.bin/tftp/   (props changed)
>  stable/8/usr.bin/tip/   (props changed)
>  stable/8/usr.bin/top/   (props changed)
>  stable/8/usr.bin/touch/   (props changed)
>  stable/8/usr.bin/tr/   (props changed)
>  stable/8/usr.bin/truss/   (props changed)
>  stable/8/usr.bin/uname/   (props changed)
>  stable/8/usr.bin/unifdef/   (props changed)
>  stable/8/usr.bin/uniq/   (props changed)
>  stable/8/usr.bin/unzip/   (props changed)
>  stable/8/usr.bin/usbhidaction/   (props changed)
>  stable/8/usr.bin/usbhidctl/   (props changed)
>  stable/8/usr.bin/uudecode/   (props changed)
>  stable/8/usr.bin/vmstat/   (props changed)
>  stable/8/usr.bin/w/   (props changed)
>  stable/8/usr.bin/wall/   (props changed)
>  stable/8/usr.bin/whois/   (props changed)
>  stable/8/usr.bin/xargs/   (props changed)
>  stable/8/usr.bin/xinstall/   (props changed)
>  stable/8/usr.bin/xlint/   (props changed)
>  stable/8/usr.bin/xz/   (props changed)
>  stable/8/usr.bin/yacc/   (props changed)
>=20
> Modified: stable/8/usr.bin/netstat/sctp.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- stable/8/usr.bin/netstat/sctp.c	Sat Feb 11 01:13:35 2012	=
(r231500)
> +++ stable/8/usr.bin/netstat/sctp.c	Sat Feb 11 01:15:02 2012	=
(r231501)
> @@ -611,7 +611,8 @@ sctp_stats(u_long off, const char *name,
> 			memset(&zerostat, 0, len);
> 		if (sysctlbyname("net.inet.sctp.stats", &sctpstat, &len,
> 		    zflag ? &zerostat : NULL, zflag ? len : 0) < 0) {
> -			warn("sysctl: net.inet.sctp.stats");
> +			if (errno !=3D ENOENT)
> +				warn("sysctl: net.inet.sctp.stats");
> 			return;
> 		}
> 	} else

--=20
Bjoern A. Zeeb                                 You have to have visions!
   It does not matter how good you are. It matters what good you do!


From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 17:39:14 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 31193106564A;
	Mon,  5 Mar 2012 17:39:14 +0000 (UTC)
	(envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F3648FC08;
	Mon,  5 Mar 2012 17:39:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25HdDel096466;
	Mon, 5 Mar 2012 17:39:13 GMT
	(envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25HdDVD096464;
	Mon, 5 Mar 2012 17:39:13 GMT
	(envelope-from jimharris@svn.freebsd.org)
Message-Id: <201203051739.q25HdDVD096464@svn.freebsd.org>
From: Jim Harris <jimharris@FreeBSD.org>
Date: Mon, 5 Mar 2012 17:39:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232554 - stable/8/sys/dev/isci
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 17:39:14 -0000

Author: jimharris
Date: Mon Mar  5 17:39:13 2012
New Revision: 232554
URL: http://svn.freebsd.org/changeset/base/232554

Log:
  MFC r232225
  
  Update PCI-IDs with devices found on Intel SDP
  
  Return  BUS_PROBE_DEFAULT so that non-default drivers may be loaded
  
  Approved by: sbruno

Modified:
  stable/8/sys/dev/isci/isci.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/isci/isci.c
==============================================================================
--- stable/8/sys/dev/isci/isci.c	Mon Mar  5 17:38:44 2012	(r232553)
+++ stable/8/sys/dev/isci/isci.c	Mon Mar  5 17:39:13 2012	(r232554)
@@ -98,7 +98,11 @@ static struct _pcsid
 	 { 0x1d688086,	"Intel(R) C600 Series Chipset SAS Controller"  },
 	 { 0x1d698086,	"Intel(R) C600 Series Chipset SAS Controller"  },
 	 { 0x1d6a8086,	"Intel(R) C600 Series Chipset SAS Controller (SATA mode)"  },
-	 { 0x1d6b8086,	"Intel(R) C600 Series Chipset SAS Controller (SATA mode)"  },
+	 { 0x1d6b8086,  "Intel(R) C600 Series Chipset SAS Controller (SATA mode)"  },
+	 { 0x1d6c8086,	"Intel(R) C600 Series Chipset SAS Controller"  },
+	 { 0x1d6d8086,	"Intel(R) C600 Series Chipset SAS Controller"  },
+	 { 0x1d6e8086,	"Intel(R) C600 Series Chipset SAS Controller"  },
+	 { 0x1d6f8086,	"Intel(R) C600 Series Chipset SAS Controller (SATA mode)"  },
 	 { 0x00000000,	NULL				}
 };
 
@@ -114,7 +118,7 @@ isci_probe (device_t device)
 	if (ep->desc)
 	{
 		device_set_desc(device, ep->desc);
-		return (0);
+		return (BUS_PROBE_DEFAULT);
 	}
 	else
 		return (ENXIO);

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 17:51:58 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 943D8106568F;
	Mon,  5 Mar 2012 17:51:58 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 833538FC34;
	Mon,  5 Mar 2012 17:51:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Hpwfa097133;
	Mon, 5 Mar 2012 17:51:58 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25HpwTP097131;
	Mon, 5 Mar 2012 17:51:58 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201203051751.q25HpwTP097131@svn.freebsd.org>
From: Gleb Smirnoff <glebius@FreeBSD.org>
Date: Mon, 5 Mar 2012 17:51:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232556 - stable/8/sys/netgraph
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 17:51:58 -0000

Author: glebius
Date: Mon Mar  5 17:51:57 2012
New Revision: 232556
URL: http://svn.freebsd.org/changeset/base/232556

Log:
  Merge r231761 from head:
    In ng_bypass() add more protection against potential race
    with ng_rmnode() and its followers.

Modified:
  stable/8/sys/netgraph/ng_base.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/netgraph/ng_base.c
==============================================================================
--- stable/8/sys/netgraph/ng_base.c	Mon Mar  5 17:51:15 2012	(r232555)
+++ stable/8/sys/netgraph/ng_base.c	Mon Mar  5 17:51:57 2012	(r232556)
@@ -1169,6 +1169,10 @@ ng_bypass(hook_p hook1, hook_p hook2)
 		return (EINVAL);
 	}
 	mtx_lock(&ng_topo_mtx);
+	if (NG_HOOK_NOT_VALID(hook1) || NG_HOOK_NOT_VALID(hook2)) {
+		mtx_unlock(&ng_topo_mtx);
+		return (EINVAL);
+	}
 	hook1->hk_peer->hk_peer = hook2->hk_peer;
 	hook2->hk_peer->hk_peer = hook1->hk_peer;
 

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 18:40:54 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 069221065676;
	Mon,  5 Mar 2012 18:40:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E98C18FC26;
	Mon,  5 Mar 2012 18:40:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25IerGV099048;
	Mon, 5 Mar 2012 18:40:53 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25IereZ099046;
	Mon, 5 Mar 2012 18:40:53 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201203051840.q25IereZ099046@svn.freebsd.org>
From: Hiroki Sato <hrs@FreeBSD.org>
Date: Mon, 5 Mar 2012 18:40:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232560 - stable/8/sys/netinet6
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 18:40:54 -0000

Author: hrs
Date: Mon Mar  5 18:40:53 2012
New Revision: 232560
URL: http://svn.freebsd.org/changeset/base/232560

Log:
  MFC r225682:
  Copy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts().  This fixes
  inconsistency when options are specified by both setsockopt() and ancillary
  data types.
  
  PR:	kern/158307

Modified:
  stable/8/sys/netinet6/ip6_output.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/netinet6/ip6_output.c
==============================================================================
--- stable/8/sys/netinet6/ip6_output.c	Mon Mar  5 18:20:31 2012	(r232559)
+++ stable/8/sys/netinet6/ip6_output.c	Mon Mar  5 18:40:53 2012	(r232560)
@@ -2328,6 +2328,8 @@ copypktopts(struct ip6_pktopts *dst, str
 	dst->ip6po_hlim = src->ip6po_hlim;
 	dst->ip6po_tclass = src->ip6po_tclass;
 	dst->ip6po_flags = src->ip6po_flags;
+	dst->ip6po_minmtu = src->ip6po_minmtu;
+	dst->ip6po_prefer_tempaddr = src->ip6po_prefer_tempaddr;
 	if (src->ip6po_pktinfo) {
 		dst->ip6po_pktinfo = malloc(sizeof(*dst->ip6po_pktinfo),
 		    M_IP6OPT, canwait);

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 18:51:48 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7B0D91065678;
	Mon,  5 Mar 2012 18:51:48 +0000 (UTC)
	(envelope-from pluknet@gmail.com)
Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com
	[209.85.215.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 8334F8FC19;
	Mon,  5 Mar 2012 18:51:47 +0000 (UTC)
Received: by lagv3 with SMTP id v3so7080753lag.13
	for <multiple recipients>; Mon, 05 Mar 2012 10:51:46 -0800 (PST)
Received-SPF: pass (google.com: domain of pluknet@gmail.com designates
	10.112.44.232 as permitted sender) client-ip=10.112.44.232; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of pluknet@gmail.com
	designates 10.112.44.232 as permitted sender)
	smtp.mail=pluknet@gmail.com;
	dkim=pass header.i=pluknet@gmail.com
Received: from mr.google.com ([10.112.44.232])
	by 10.112.44.232 with SMTP id h8mr9683162lbm.85.1330973506316 (num_hops
	= 1); Mon, 05 Mar 2012 10:51:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=/5LwckiD7nObzhJQH+SvLOBRv2bCpev1jYpcQJdR2xs=;
	b=vclM3TZVJpDZ4YN0gvnAvgmueacEN8oB0uPS3t6KJd75kWkRXnG3Ig+6JhJPpHRyN2
	oc53JPxk+AFmXY4IbQziRSyIVzrH8Qyd5GUJnbuGynmeIVSHkl+/Cy9LJ+DtoR35yXnU
	wOZuYtp8G9D22EcntSjkMATuLbnrzExm1zVCh3iEnFKVgUQPK92Np5RAWz7qHD5jcruO
	ZX5kl7l2Mzha3MfHZVAKiKmIy3b6atNJd6zlAhurwF/Yo4Ku7Rz/YzbY1TwZZK8MOnOX
	ftwZVlr3AS9t126NV5IIERI2jyZ21yg6Owp6o2CMNV+W26Il0jK5+uPl3UU+F+6qwOPC
	ehGA==
MIME-Version: 1.0
Received: by 10.112.44.232 with SMTP id h8mr7903578lbm.85.1330972116191; Mon,
	05 Mar 2012 10:28:36 -0800 (PST)
Sender: pluknet@gmail.com
Received: by 10.152.21.73 with HTTP; Mon, 5 Mar 2012 10:28:36 -0800 (PST)
In-Reply-To: <201203041037.q24AbQhv026104@svn.freebsd.org>
References: <201203041037.q24AbQhv026104@svn.freebsd.org>
Date: Mon, 5 Mar 2012 21:28:36 +0300
X-Google-Sender-Auth: 5ucdC8k3vwNUzM9nhm9ieUFFIbo
Message-ID: <CAE-mSOLYobVfoPgH7p8QU-mnsGuK1nQ2-0dQEGh6YOZ2Uk8Tsg@mail.gmail.com>
From: Sergey Kandaurov <pluknet@freebsd.org>
To: Remko Lodder <remko@freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-9@freebsd.org
Subject: Re: svn commit: r232486 - stable/9/sbin/ifconfig
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 18:51:48 -0000

On 4 March 2012 14:37, Remko Lodder <remko@freebsd.org> wrote:
> Author: remko
> Date: Sun Mar =A04 10:37:26 2012
> New Revision: 232486
> URL: http://svn.freebsd.org/changeset/base/232486
>
> Log:
> =A0Add an ifconfig carp option that enables users to set
> =A0the state of the carp cluster.
>
> =A0This is a direct commit to stable/9 because -HEAD's
> =A0code is very different. I discussed this with Gleb
> =A0and the reason for this is that since we do not
> =A0touch the kernel itself and are not adding very
> =A0weird or confusing things, we can commit this to the
> =A0stable branch directly.
>
> =A0The options 'master' and 'backup' are now available,
> =A0which enables the administrator to force a node into
> =A0the backup or master state on the cluster. Ofcourse
> =A0preempt has to be disabled otherwise the master node
> =A0will become master again.
>
> =A0One can do that with:
>
> =A0sysctl net.inet.carp.preempt=3D0
>
> =A0After that one can schedule maintenance on the node
> =A0normally running as the master and such.
>
> =A0PR: =A0 =A0 =A0 =A0 =A0 100956
> =A0Discussed with: =A0 =A0 =A0 glebius
> =A0MFC after: =A0 =A01 weeks

What are the chances this will appear in 8.3-RELEASE?

--=20
wbr,
pluknet

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 18:54:28 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 8CE331065690;
	Mon,  5 Mar 2012 18:54:28 +0000 (UTC) (envelope-from ken@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B0CC8FC13;
	Mon,  5 Mar 2012 18:54:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25IsSZv099642;
	Mon, 5 Mar 2012 18:54:28 GMT (envelope-from ken@svn.freebsd.org)
Received: (from ken@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25IsS8n099640;
	Mon, 5 Mar 2012 18:54:28 GMT (envelope-from ken@svn.freebsd.org)
Message-Id: <201203051854.q25IsS8n099640@svn.freebsd.org>
From: "Kenneth D. Merry" <ken@FreeBSD.org>
Date: Mon, 5 Mar 2012 18:54:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232562 - stable/9/sys/dev/mpt
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 18:54:28 -0000

Author: ken
Date: Mon Mar  5 18:54:28 2012
New Revision: 232562
URL: http://svn.freebsd.org/changeset/base/232562

Log:
  MFC 232411:
  
    Fix a problem that was causing the mpt(4) driver to attach to MegaRAID
    cards that should be handled by the mfi(4) driver.
  
    The root of the problem is that the mpt(4) driver was masking off the
    bottom bit of the PCI device ID when deciding which cards to attach to.
  
    It appears that a number of the mpt(4) Fibre Channel cards had a LAN
    variant whose PCI device ID was just one bit off from the FC card's device
    ID.  The FC cards were even and the LAN cards were odd.
  
    The problem was that this pattern wasn't carried over on the SAS and
    parallel SCSI mpt(4) cards.  Luckily the SAS and parallel SCSI PCI device
    IDs were either even numbers, or they would get masked to a supported
    adjacent PCI device ID, and everything worked well.
  
    Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb
    SAS device IDs for their new MegaRAID cards.  This is causing the mpt(4)
    driver to attach to the RAID cards instead of the mfi(4) driver.
  
    The solution is to stop masking off the bottom bit of the device ID, and
    explicitly list the PCI device IDs of all supported cards.
  
    This change should be a no-op for mpt(4) hardware.  The only intended
    functional change is that for the 929X, the is_fc variable gets set.  It
    wasn't being set previously, but needs to be because the 929X is a Fibre
    Channel card.
  
    Reported by:	Kashyap Desai <Kashyap.Desai@lsi.com>

Modified:
  stable/9/sys/dev/mpt/mpt_pci.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/mpt/mpt_pci.c
==============================================================================
--- stable/9/sys/dev/mpt/mpt_pci.c	Mon Mar  5 18:47:42 2012	(r232561)
+++ stable/9/sys/dev/mpt/mpt_pci.c	Mon Mar  5 18:54:28 2012	(r232562)
@@ -129,18 +129,34 @@ __FBSDID("$FreeBSD$");
 #define	PCI_PRODUCT_LSI_FC919		0x0624
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC919_LAN
+#define	PCI_PRODUCT_LSI_FC919_LAN	0x0625
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC929
 #define	PCI_PRODUCT_LSI_FC929		0x0622
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC929_LAN
+#define	PCI_PRODUCT_LSI_FC929_LAN	0x0623
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC929X
 #define	PCI_PRODUCT_LSI_FC929X		0x0626
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC929X_LAN
+#define	PCI_PRODUCT_LSI_FC929X_LAN	0x0627
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC919X
 #define	PCI_PRODUCT_LSI_FC919X		0x0628
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC919X_LAN
+#define	PCI_PRODUCT_LSI_FC919X_LAN	0x0629
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC7X04X
 #define	PCI_PRODUCT_LSI_FC7X04X		0x0640
 #endif
@@ -153,6 +169,10 @@ __FBSDID("$FreeBSD$");
 #define	PCI_PRODUCT_LSI_1030		0x0030
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_1030ZC
+#define	PCI_PRODUCT_LSI_1030ZC		0x0031
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_SAS1064
 #define PCI_PRODUCT_LSI_SAS1064		0x0050
 #endif
@@ -177,6 +197,10 @@ __FBSDID("$FreeBSD$");
 #define PCI_PRODUCT_LSI_SAS1068		0x0054
 #endif
 
+#ifndef PCI_PRODUCT_LSI_SAS1068A
+#define PCI_PRODUCT_LSI_SAS1068A	0x0055
+#endif
+
 #ifndef PCI_PRODUCT_LSI_SAS1068E
 #define PCI_PRODUCT_LSI_SAS1068E	0x0058
 #endif
@@ -232,7 +256,7 @@ mpt_pci_probe(device_t dev)
 		return (ENXIO);
 	}
 
-	switch ((pci_get_device(dev) & ~1)) {
+	switch (pci_get_device(dev)) {
 	case PCI_PRODUCT_LSI_FC909:
 		desc = "LSILogic FC909 FC Adapter";
 		break;
@@ -242,15 +266,27 @@ mpt_pci_probe(device_t dev)
 	case PCI_PRODUCT_LSI_FC919:
 		desc = "LSILogic FC919 FC Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC919_LAN:
+		desc = "LSILogic FC919 LAN Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC929:
 		desc = "Dual LSILogic FC929 FC Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC929_LAN:
+		desc = "Dual LSILogic FC929 LAN Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC919X:
 		desc = "LSILogic FC919 FC PCI-X Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC919X_LAN:
+		desc = "LSILogic FC919 LAN PCI-X Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC929X:
 		desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC929X_LAN:
+		desc = "Dual LSILogic FC929X LAN PCI-X Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC646:
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter";
 		break;
@@ -258,6 +294,7 @@ mpt_pci_probe(device_t dev)
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter";
 		break;
 	case PCI_PRODUCT_LSI_1030:
+	case PCI_PRODUCT_LSI_1030ZC:
 		desc = "LSILogic 1030 Ultra4 Adapter";
 		break;
 	case PCI_PRODUCT_LSI_SAS1064:
@@ -266,6 +303,7 @@ mpt_pci_probe(device_t dev)
 	case PCI_PRODUCT_LSI_SAS1066:
 	case PCI_PRODUCT_LSI_SAS1066E:
 	case PCI_PRODUCT_LSI_SAS1068:
+	case PCI_PRODUCT_LSI_SAS1068A:
 	case PCI_PRODUCT_LSI_SAS1068E:
 	case PCI_PRODUCT_LSI_SAS1078:
 	case PCI_PRODUCT_LSI_SAS1078DE:
@@ -428,12 +466,17 @@ mpt_pci_attach(device_t dev)
 		return (ENOMEM);
 	}
 	memset(mpt, 0, sizeof(struct mpt_softc));
-	switch ((pci_get_device(dev) & ~1)) {
+	switch (pci_get_device(dev)) {
 	case PCI_PRODUCT_LSI_FC909:
 	case PCI_PRODUCT_LSI_FC909A:
 	case PCI_PRODUCT_LSI_FC919:
+	case PCI_PRODUCT_LSI_FC919_LAN:
 	case PCI_PRODUCT_LSI_FC929:
+	case PCI_PRODUCT_LSI_FC929_LAN:
+	case PCI_PRODUCT_LSI_FC929X:
+	case PCI_PRODUCT_LSI_FC929X_LAN:
 	case PCI_PRODUCT_LSI_FC919X:
+	case PCI_PRODUCT_LSI_FC919X_LAN:
 	case PCI_PRODUCT_LSI_FC646:
 	case PCI_PRODUCT_LSI_FC7X04X:
 		mpt->is_fc = 1;
@@ -448,6 +491,7 @@ mpt_pci_attach(device_t dev)
 	case PCI_PRODUCT_LSI_SAS1066:
 	case PCI_PRODUCT_LSI_SAS1066E:
 	case PCI_PRODUCT_LSI_SAS1068:
+	case PCI_PRODUCT_LSI_SAS1068A:
 	case PCI_PRODUCT_LSI_SAS1068E:
 		mpt->is_sas = 1;
 		break;
@@ -499,11 +543,17 @@ mpt_pci_attach(device_t dev)
 	 * Is this part a dual?
 	 * If so, link with our partner (around yet)
 	 */
-	if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC646 ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC7X04X ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) {
+	switch (pci_get_device(dev)) {
+	case PCI_PRODUCT_LSI_FC929:
+	case PCI_PRODUCT_LSI_FC929_LAN:
+	case PCI_PRODUCT_LSI_FC646:
+	case PCI_PRODUCT_LSI_FC7X04X:
+	case PCI_PRODUCT_LSI_1030:
+	case PCI_PRODUCT_LSI_1030ZC:
 		mpt_link_peer(mpt);
+		break;
+	default:
+		break;
 	}
 
 	/*

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 19:01:23 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD53A106564A;
	Mon,  5 Mar 2012 19:01:23 +0000 (UTC) (envelope-from ken@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9BC318FC16;
	Mon,  5 Mar 2012 19:01:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25J1Nqt099941;
	Mon, 5 Mar 2012 19:01:23 GMT (envelope-from ken@svn.freebsd.org)
Received: (from ken@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25J1NUH099939;
	Mon, 5 Mar 2012 19:01:23 GMT (envelope-from ken@svn.freebsd.org)
Message-Id: <201203051901.q25J1NUH099939@svn.freebsd.org>
From: "Kenneth D. Merry" <ken@FreeBSD.org>
Date: Mon, 5 Mar 2012 19:01:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232563 - stable/8/sys/dev/mpt
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 19:01:23 -0000

Author: ken
Date: Mon Mar  5 19:01:23 2012
New Revision: 232563
URL: http://svn.freebsd.org/changeset/base/232563

Log:
  MFC 232411:
  
    Fix a problem that was causing the mpt(4) driver to attach to MegaRAID
    cards that should be handled by the mfi(4) driver.
  
    The root of the problem is that the mpt(4) driver was masking off the
    bottom bit of the PCI device ID when deciding which cards to attach to.
  
    It appears that a number of the mpt(4) Fibre Channel cards had a LAN
    variant whose PCI device ID was just one bit off from the FC card's device
    ID.  The FC cards were even and the LAN cards were odd.
  
    The problem was that this pattern wasn't carried over on the SAS and
    parallel SCSI mpt(4) cards.  Luckily the SAS and parallel SCSI PCI device
    IDs were either even numbers, or they would get masked to a supported
    adjacent PCI device ID, and everything worked well.
  
    Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb
    SAS device IDs for their new MegaRAID cards.  This is causing the mpt(4)
    driver to attach to the RAID cards instead of the mfi(4) driver.
  
    The solution is to stop masking off the bottom bit of the device ID, and
    explicitly list the PCI device IDs of all supported cards.
  
    This change should be a no-op for mpt(4) hardware.  The only intended
    functional change is that for the 929X, the is_fc variable gets set.  It
    wasn't being set previously, but needs to be because the 929X is a Fibre
    Channel card.
  
    Reported by:	Kashyap Desai <Kashyap.Desai@lsi.com>

Modified:
  stable/8/sys/dev/mpt/mpt_pci.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/mpt/mpt_pci.c
==============================================================================
--- stable/8/sys/dev/mpt/mpt_pci.c	Mon Mar  5 18:54:28 2012	(r232562)
+++ stable/8/sys/dev/mpt/mpt_pci.c	Mon Mar  5 19:01:23 2012	(r232563)
@@ -129,18 +129,34 @@ __FBSDID("$FreeBSD$");
 #define	PCI_PRODUCT_LSI_FC919		0x0624
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC919_LAN
+#define	PCI_PRODUCT_LSI_FC919_LAN	0x0625
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC929
 #define	PCI_PRODUCT_LSI_FC929		0x0622
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC929_LAN
+#define	PCI_PRODUCT_LSI_FC929_LAN	0x0623
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC929X
 #define	PCI_PRODUCT_LSI_FC929X		0x0626
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC929X_LAN
+#define	PCI_PRODUCT_LSI_FC929X_LAN	0x0627
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC919X
 #define	PCI_PRODUCT_LSI_FC919X		0x0628
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC919X_LAN
+#define	PCI_PRODUCT_LSI_FC919X_LAN	0x0629
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC7X04X
 #define	PCI_PRODUCT_LSI_FC7X04X		0x0640
 #endif
@@ -153,6 +169,10 @@ __FBSDID("$FreeBSD$");
 #define	PCI_PRODUCT_LSI_1030		0x0030
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_1030ZC
+#define	PCI_PRODUCT_LSI_1030ZC		0x0031
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_SAS1064
 #define PCI_PRODUCT_LSI_SAS1064		0x0050
 #endif
@@ -177,6 +197,10 @@ __FBSDID("$FreeBSD$");
 #define PCI_PRODUCT_LSI_SAS1068		0x0054
 #endif
 
+#ifndef PCI_PRODUCT_LSI_SAS1068A
+#define PCI_PRODUCT_LSI_SAS1068A	0x0055
+#endif
+
 #ifndef PCI_PRODUCT_LSI_SAS1068E
 #define PCI_PRODUCT_LSI_SAS1068E	0x0058
 #endif
@@ -232,7 +256,7 @@ mpt_pci_probe(device_t dev)
 		return (ENXIO);
 	}
 
-	switch ((pci_get_device(dev) & ~1)) {
+	switch (pci_get_device(dev)) {
 	case PCI_PRODUCT_LSI_FC909:
 		desc = "LSILogic FC909 FC Adapter";
 		break;
@@ -242,15 +266,27 @@ mpt_pci_probe(device_t dev)
 	case PCI_PRODUCT_LSI_FC919:
 		desc = "LSILogic FC919 FC Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC919_LAN:
+		desc = "LSILogic FC919 LAN Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC929:
 		desc = "Dual LSILogic FC929 FC Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC929_LAN:
+		desc = "Dual LSILogic FC929 LAN Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC919X:
 		desc = "LSILogic FC919 FC PCI-X Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC919X_LAN:
+		desc = "LSILogic FC919 LAN PCI-X Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC929X:
 		desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC929X_LAN:
+		desc = "Dual LSILogic FC929X LAN PCI-X Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC646:
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter";
 		break;
@@ -258,6 +294,7 @@ mpt_pci_probe(device_t dev)
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter";
 		break;
 	case PCI_PRODUCT_LSI_1030:
+	case PCI_PRODUCT_LSI_1030ZC:
 		desc = "LSILogic 1030 Ultra4 Adapter";
 		break;
 	case PCI_PRODUCT_LSI_SAS1064:
@@ -266,6 +303,7 @@ mpt_pci_probe(device_t dev)
 	case PCI_PRODUCT_LSI_SAS1066:
 	case PCI_PRODUCT_LSI_SAS1066E:
 	case PCI_PRODUCT_LSI_SAS1068:
+	case PCI_PRODUCT_LSI_SAS1068A:
 	case PCI_PRODUCT_LSI_SAS1068E:
 	case PCI_PRODUCT_LSI_SAS1078:
 	case PCI_PRODUCT_LSI_SAS1078DE:
@@ -428,12 +466,17 @@ mpt_pci_attach(device_t dev)
 		return (ENOMEM);
 	}
 	memset(mpt, 0, sizeof(struct mpt_softc));
-	switch ((pci_get_device(dev) & ~1)) {
+	switch (pci_get_device(dev)) {
 	case PCI_PRODUCT_LSI_FC909:
 	case PCI_PRODUCT_LSI_FC909A:
 	case PCI_PRODUCT_LSI_FC919:
+	case PCI_PRODUCT_LSI_FC919_LAN:
 	case PCI_PRODUCT_LSI_FC929:
+	case PCI_PRODUCT_LSI_FC929_LAN:
+	case PCI_PRODUCT_LSI_FC929X:
+	case PCI_PRODUCT_LSI_FC929X_LAN:
 	case PCI_PRODUCT_LSI_FC919X:
+	case PCI_PRODUCT_LSI_FC919X_LAN:
 	case PCI_PRODUCT_LSI_FC646:
 	case PCI_PRODUCT_LSI_FC7X04X:
 		mpt->is_fc = 1;
@@ -448,6 +491,7 @@ mpt_pci_attach(device_t dev)
 	case PCI_PRODUCT_LSI_SAS1066:
 	case PCI_PRODUCT_LSI_SAS1066E:
 	case PCI_PRODUCT_LSI_SAS1068:
+	case PCI_PRODUCT_LSI_SAS1068A:
 	case PCI_PRODUCT_LSI_SAS1068E:
 		mpt->is_sas = 1;
 		break;
@@ -499,11 +543,17 @@ mpt_pci_attach(device_t dev)
 	 * Is this part a dual?
 	 * If so, link with our partner (around yet)
 	 */
-	if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC646 ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC7X04X ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) {
+	switch (pci_get_device(dev)) {
+	case PCI_PRODUCT_LSI_FC929:
+	case PCI_PRODUCT_LSI_FC929_LAN:
+	case PCI_PRODUCT_LSI_FC646:
+	case PCI_PRODUCT_LSI_FC7X04X:
+	case PCI_PRODUCT_LSI_1030:
+	case PCI_PRODUCT_LSI_1030ZC:
 		mpt_link_peer(mpt);
+		break;
+	default:
+		break;
 	}
 
 	/*

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 19:10:56 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 58947106566C;
	Mon,  5 Mar 2012 19:10:56 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 474188FC19;
	Mon,  5 Mar 2012 19:10:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JAuuF000427;
	Mon, 5 Mar 2012 19:10:56 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JAuc4000426;
	Mon, 5 Mar 2012 19:10:56 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201203051910.q25JAuc4000426@svn.freebsd.org>
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Mon, 5 Mar 2012 19:10:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232564 - stable/9/tools/regression/sockets/so_setfib
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 19:10:56 -0000

Author: bz
Date: Mon Mar  5 19:10:55 2012
New Revision: 232564
URL: http://svn.freebsd.org/changeset/base/232564

Log:
  MFC r231855:
  
   Add regression tests for the setsockopt(2) SO_SETFIB socket option.
  
   Check that the expected domain(9) families all handle the socket option
   correctly and do proper bounds checks.  This would catch bugs as fixed
   in (r230938,)r230981.
  
  Sponsored by:	Cisco Systems, Inc.

Added:
  stable/9/tools/regression/sockets/so_setfib/
     - copied from r231855, head/tools/regression/sockets/so_setfib/
Modified:
Directory Properties:
  stable/9/tools/regression/sockets/   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 19:10:59 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 672A1106564A;
	Mon,  5 Mar 2012 19:10:59 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 55D148FC08;
	Mon,  5 Mar 2012 19:10:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JAxUF000468;
	Mon, 5 Mar 2012 19:10:59 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JAx2s000467;
	Mon, 5 Mar 2012 19:10:59 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201203051910.q25JAx2s000467@svn.freebsd.org>
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Mon, 5 Mar 2012 19:10:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232565 - stable/8/tools/regression/sockets/so_setfib
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 19:10:59 -0000

Author: bz
Date: Mon Mar  5 19:10:58 2012
New Revision: 232565
URL: http://svn.freebsd.org/changeset/base/232565

Log:
  MFC r231855:
  
   Add regression tests for the setsockopt(2) SO_SETFIB socket option.
  
   Check that the expected domain(9) families all handle the socket option
   correctly and do proper bounds checks.  This would catch bugs as fixed
   in (r230938,)r230981.
  
  Sponsored by:	Cisco Systems, Inc.

Added:
  stable/8/tools/regression/sockets/so_setfib/
     - copied from r231855, head/tools/regression/sockets/so_setfib/
Modified:
Directory Properties:
  stable/8/tools/regression/sockets/   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 19:13:19 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 059EC1065672;
	Mon,  5 Mar 2012 19:13:19 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E797E8FC17;
	Mon,  5 Mar 2012 19:13:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JDISv000604;
	Mon, 5 Mar 2012 19:13:18 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JDI8j000595;
	Mon, 5 Mar 2012 19:13:18 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201203051913.q25JDI8j000595@svn.freebsd.org>
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Mon, 5 Mar 2012 19:13:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232566 - in stable/9/tools/test: . netfibs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 19:13:19 -0000

Author: bz
Date: Mon Mar  5 19:13:18 2012
New Revision: 232566
URL: http://svn.freebsd.org/changeset/base/232566

Log:
  MFC r231858:
  
   Add regression tests scripts for multi-IP FIBs exercising the send,
   receive and forward path tagging packets with both the ifconfig fib
   option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and
   testing both setfib(2) as well as the SO_SETFIB socket option.
  
   At 16 FIBs a total of over 64k return codes/replies/stati are checked,
   sometimes multiple times (in different ways, e.g. the reflected request
   as well as ipfw counter values).
  
   The scripts need two or three machines to run and are thus not added
   to the tools/regression framework but only to tools/test.
  
  MFC r232114:
  
   Update scripts to work around two sh(1) bugs found in stable/8:
   1) _x=$((_x + 1)) does not work while x=$((x + 1)) does.
   2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted.
  
   Correct typos and improve some details forwarding.sh already
   had in initiator, esp. related to ipfw accepting if the default
   is deny.
  
   Add an extra stat call to the "delay" function in addition to the
   touch which together is still a lot faster than sleep 1 but seems
   to help a lot more to mitigate the unrelated kernel race seen.
  
  Sponsored by:	Cisco Systems, Inc.

Added:
  stable/9/tools/test/netfibs/
     - copied from r231858, head/tools/test/netfibs/
Modified:
  stable/9/tools/test/README
  stable/9/tools/test/netfibs/README
  stable/9/tools/test/netfibs/forwarding.sh
  stable/9/tools/test/netfibs/initiator.sh
  stable/9/tools/test/netfibs/reflector.sh
Directory Properties:
  stable/9/tools/test/   (props changed)

Modified: stable/9/tools/test/README
==============================================================================
--- stable/9/tools/test/README	Mon Mar  5 19:10:58 2012	(r232565)
+++ stable/9/tools/test/README	Mon Mar  5 19:13:18 2012	(r232566)
@@ -10,5 +10,6 @@ Please make a subdir per program, and ad
 devrandom	Programs to test /dev/*random.
 dtrace		DTrace test suite
 malloc		A program to test and benchmark malloc().
+netfibs		Programs to test multi-FIB network stacks.
 posixshm	A program to test POSIX shared memory.
 testfloat	Programs to test floating-point implementations

Modified: stable/9/tools/test/netfibs/README
==============================================================================
--- head/tools/test/netfibs/README	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/9/tools/test/netfibs/README	Mon Mar  5 19:13:18 2012	(r232566)
@@ -35,7 +35,7 @@ initiator.sh and reflector.sh
 	output.  A special value of 42 will enable sh(1) xtrace printing.
 
 	The output format is modeled after Test::Harness Perl as used in
-	tools/regression/ but not always complaint following the test case name.
+	tools/regression/ but not always compliant following the test case name.
 
 	NOTE: at the time of writing reflector.sh can trigger kernel races
 	unrelated to multi-FIB test leading to a panic(9).  "delay" calls

Modified: stable/9/tools/test/netfibs/forwarding.sh
==============================================================================
--- head/tools/test/netfibs/forwarding.sh	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/9/tools/test/netfibs/forwarding.sh	Mon Mar  5 19:13:18 2012	(r232566)
@@ -222,36 +222,36 @@ _reachability_check()
 
 reachability_check()
 {
-	local _i _rc
+	local _i rc
 
 	# Try to reach all control addresses on other nodes.
 	# We need to loop for a while as we cannot expect all to be up
 	# the very same moment.
 	i=1
-	_rc=42
-	while test ${_rc} -ne 0 -a ${i} -le ${WAITS}; do
+	rc=42
+	while test ${rc} -ne 0 -a ${i} -le ${WAITS}; do
 		print_debug "${i}/${WAITS} trying to ping6 control addresses."
-		_rc=0
+		rc=0
 		set +e
 		case ${node} in
 		left)	_reachability_check ${MIDDLELEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${MIDDLERIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${RIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			;;
 		middle)	_reachability_check ${LEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${RIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			;;
 		right)	_reachability_check ${MIDDLERIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${MIDDLELEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${LEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			;;
 		esac
 		set -e
@@ -390,14 +390,14 @@ test_icmp6()
 
 test_ulp_reflect_one()
 {
-	local _txt _opts _port _fib
+	local _txt _opts port fib
 	_txt="$1"
 	_opts="$2"
-	_port=$3
-	_fib=$4
+	port=$3
+	fib=$4
 
-	print_debug "./reflect -p $((_port + 1 + _fib)) -t ${_txt}" "${_opts}"
-	./reflect -p $((_port + 1 + _fib)) -t ${_txt} ${_opts}
+	print_debug "./reflect -p $((port + 1 + fib)) -t ${_txt}" "${_opts}"
+	./reflect -p $((port + 1 + fib)) -t ${_txt} ${_opts}
 	print_debug "reflect '${_txt}' terminated without error."
 }
 
@@ -463,19 +463,19 @@ nc_send_recv()
 
 test_ulp()
 {
-	local _maxfibs _msg _addr _port _fib i _txt testno _rc _reply
-	_maxfibs=$1
+	local maxfibs _msg _addr port fib i _txt testno _rc _reply
+	maxfibs=$1
 	_msg="$2"
 	_addr=$3
-	_port=$4
-	_fib=$5
+	port=$4
+	fib=$5
 
-	printf "1..%d\n" $((${_maxfibs} * 2))
+	printf "1..%d\n" $((${maxfibs} * 2))
 	testno=1
 	i=0
-	while test ${i} -lt ${_maxfibs}; do
+	while test ${i} -lt ${maxfibs}; do
 
-		if test ${i} -eq $((${_maxfibs} - 1)); then
+		if test ${i} -eq $((${maxfibs} - 1)); then
 			# Last one; signal DONE.
 			_txt="DONE ${_msg}_${i}"
 		else
@@ -485,18 +485,18 @@ test_ulp()
 		eval _rc="\${rc_${i}}"
 
 		# Test TCP.
-		nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \
-		    $((${_port} + 1 + _fib)) ""
+		nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \
+		    $((${port} + 1 + fib)) ""
 		check_rc $? ${_rc} ${testno} "${_msg}_${i}_tcp" \
-		    "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}"
+		    "[${_addr}]:$((${port} + 1 + fib)) ${_reply}"
 		testno=$((testno + 1))
 		sleep 1
 
 		# Test UDP.
-		nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \
-		    $((${_port} + 1 + _fib)) "-u"
+		nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \
+		    $((${port} + 1 + fib)) "-u"
 		check_rc $? ${_rc} ${testno} "${_msg}_${i}_udp" \
-		    "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}"
+		    "[${_addr}]:$((${port} + 1 + fib)) ${_reply}"
 		sleep 1
 
 		i=$((i + 1))
@@ -506,18 +506,18 @@ test_ulp()
 
 setup_ipfw_count()
 {
-	local i _port _maxfib _p _fib _ofib
-	_port=$1
-	_maxfib=$2
+	local i port maxfib _p _fib _ofib
+	port=$1
+	maxfib=$2
 	_fib=$3
 	_ofib=$4
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 
 		case ${_ofib} in
-		-1)	_p=$((_port + 1 + i)) ;;
-		*)	_p=$((_port + 1 + _maxfib - 1 - i)) ;;
+		-1)	_p=$((port + 1 + i)) ;;
+		*)	_p=$((port + 1 + maxfib - 1 - i)) ;;
 		esac
 
 		# Only count ICMP6 echo replies.
@@ -532,10 +532,10 @@ setup_ipfw_count()
 		ipfw add $((20000 + i)) count ipv6-icmp from any to any \
 		    icmp6types 128 fib ${i} via ${IFACEFAR} out > /dev/null
 		ipfw add $((20000 + i)) count tcp from any to any \
-		    dst-port $((${_port} + 1 + i)) fib ${i} \
+		    dst-port $((${port} + 1 + i)) fib ${i} \
 		    via ${IFACEFAR} out > /dev/null
 		ipfw add $((20000 + i)) count udp from any to any \
-		    dst-port $((${_port} + 1 + i)) fib ${i} \
+		    dst-port $((${port} + 1 + i)) fib ${i} \
 		    via ${IFACEFAR} out > /dev/null
 
 		i=$((i + 1))
@@ -544,7 +544,7 @@ setup_ipfw_count()
 
 report_ipfw_count()
 {
-	local _fib _o i _rstr _c _req _p _opts
+	local _fib _o i _rstr _c _req _p _opts base
 	_o="$2"
 
 	case ${DEBUG} in
@@ -553,9 +553,9 @@ report_ipfw_count()
 	esac
 
 	_rstr="RESULTS "
-	for _base in 10000 20000; do
+	for base in 10000 20000; do
 		for _o in i t u; do
-			case ${_base} in
+			case ${base} in
 			10000)	_rstr="${_rstr}\nLEFT " ;;
 			20000)	_rstr="${_rstr}\nRIGHT " ;;
 			esac
@@ -568,11 +568,11 @@ report_ipfw_count()
 			while test ${i} -lt ${RT_NUMFIBS}; do
 
 				case "${_o}" in
-				i)	_c=`ipfw show $((${_base} + i)) | \
+				i)	_c=`ipfw show $((${base} + i)) | \
 					    awk '/ ipv6-icmp / { print $2 }'` ;;
-				t)	_c=`ipfw show $((${_base} + i)) | \
+				t)	_c=`ipfw show $((${base} + i)) | \
 					    awk '/ tcp / { print $2 }'` ;;
-				u)	_c=`ipfw show $((${_base} + i)) | \
+				u)	_c=`ipfw show $((${base} + i)) | \
 					    awk '/ udp / { print $2 }'` ;;
 				esac
 				_rstr="${_rstr}${i} ${_c},"
@@ -582,7 +582,7 @@ report_ipfw_count()
 		done
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
-			ipfw delete $((${_base} + i)) > /dev/null 2>&1 || true
+			ipfw delete $((${base} + i)) > /dev/null 2>&1 || true
 			i=$((i + 1))
 		done
 	done
@@ -994,18 +994,18 @@ fwd_fib_symmetric_ipfw()
 
 _fwd_fib_asymmetric_results()
 {
-	local _n _fib _maxfib i _edge _type _rc
+	local _n fib maxfib i _edge _type _rc
 	_n="$1"
-	_fib=$2
-	_maxfib=$3
+	fib=$2
+	maxfib=$3
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 		_edge="RIGHT"
 			for _type in "ICMP6" "TCP" "UDP"; do
 
 				case ${i} in
-				${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
+				${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
 					#print_debug \
 					#   "rc_${_n}_${_edge}_${_type}_${i}=1"
 					;;
@@ -1018,14 +1018,14 @@ _fwd_fib_asymmetric_results()
 			done
 		i=$((i + 1))
 	done
-	_fib=$((_maxfib - 1 - _fib))
+	fib=$((maxfib - 1 - fib))
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 		_edge="LEFT"
 			for _type in "ICMP6" "TCP" "UDP"; do
 
 				case ${i} in
-				${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
+				${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
 					#print_debug \
 					#   "rc_${_n}_${_edge}_${_type}_${i}=1"
 					;;
@@ -1073,16 +1073,16 @@ _fwd_fib_asymmetric_left()
 
 _fwd_fib_asymmetric_middle_ifconfig()
 {
-	local _n _maxfib i
+	local _n maxfib i
 	_n="$1"
-	_maxfib=$2
+	maxfib=$2
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 		ifconfig ${IFACE} fib ${i}
-		ifconfig ${IFACEFAR} fib $((${_maxfib} - 1 - ${i}))
-		setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} \
-		    $((${_maxfib} - 1 - ${i}))
+		ifconfig ${IFACEFAR} fib $((${maxfib} - 1 - ${i}))
+		setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} \
+		    $((${maxfib} - 1 - ${i}))
 		wait_remote_ready "START_${_n}_${i}"
 		ipfw -q zero > /dev/null
 		# Nothing to do for the middle node testing the default.
@@ -1095,12 +1095,12 @@ _fwd_fib_asymmetric_middle_ifconfig()
 
 _fwd_fib_asymmetric_middle_ipfw()
 {
-	local _n _maxfib i j _port
+	local _n maxfib i j _port
 	_n="$1"
-	_maxfib=$2
+	maxfib=$2
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 
 		_port=$((CTRLPORT + 1 + i))
 		ipfw add 100 setfib ${i} ipv6-icmp from any to any \
@@ -1110,7 +1110,7 @@ _fwd_fib_asymmetric_middle_ipfw()
 		ipfw add 100 setfib ${i} udp from any to any \
 		    dst-port ${_port} via ${IFACE} in > /dev/null
 
-		j=$((${_maxfib} - 1 - ${i}))
+		j=$((${maxfib} - 1 - ${i}))
 		ipfw add 100 setfib ${j} ipv6-icmp from any to any \
 		    icmp6types 129 via ${IFACEFAR} in > /dev/null
 		ipfw add 100 setfib ${j} tcp from any to any \
@@ -1118,7 +1118,7 @@ _fwd_fib_asymmetric_middle_ipfw()
 		ipfw add 100 setfib ${j} udp from any to any \
 		    src-port ${_port} via ${IFACEFAR} in > /dev/null
 
-		setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} ${j}
+		setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} ${j}
 		wait_remote_ready "START_${_n}_${i}"
 		ipfw -q zero > /dev/null
 		# Nothing to do for the middle node testing the default.

Modified: stable/9/tools/test/netfibs/initiator.sh
==============================================================================
--- head/tools/test/netfibs/initiator.sh	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/9/tools/test/netfibs/initiator.sh	Mon Mar  5 19:13:18 2012	(r232566)
@@ -219,6 +219,7 @@ send_greeting()
 	# The latter is needed to allow indvidiual less specific later rules
 	# from test cases to just disallow any IPv6 traffic on a matching FIB.
 	ipfw -f flush > /dev/null 2>&1
+	ipfw add 65000 permit ip from any to any > /dev/null 2>&1
 	ipfw add 5 permit ipv6-icmp from any to any icmp6types 135,136 fib 0 \
 	    via ${IFACE} out > /dev/null 2>&1
 
@@ -255,7 +256,7 @@ EOI
 	PEERLINKLOCAL=${_linklocal}
 
 	# Swap the zoneid to the local interface scope.
-	PEERLINKLOCAL="${PEERLINKLOCAL%%\%*}%${IFACE}"
+	PEERLINKLOCAL=${PEERLINKLOCAL%%\%*}"%${IFACE}"
 
 	print_debug "Successfully exchanged greeting. Peer at ${PEERLINKLOCAL}"
 }
@@ -510,21 +511,21 @@ testtx_udp6_connected()
 #
 testtx_ulp6_connected_blackhole()
 {
-	local _fib i _n _o
+	local fib i _n _o
 	_n="$1"
 	_o="$2"
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			ipfw delete $((100 + i)) > /dev/null 2>&1 || true
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_l=0
 				eval rc_${i}_a=0
 				;;
@@ -538,17 +539,17 @@ testtx_ulp6_connected_blackhole()
 			i=$((i + 1))
 		done
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
 		case ${DEBUG} in
 		''|0)	;;
 		*)	ipfw show ;;
 		esac
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ipfw delete $((100 + _fib)) > /dev/null 2>&1 || true
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ipfw delete $((100 + fib)) > /dev/null 2>&1 || true
+		fib=$((fib + 1))
 	done
 }
 
@@ -584,50 +585,50 @@ testtx_udp6_connected_blackhole()
 #
 testtx_ulp6_connected_transfernets()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks and firewall.
 	ipfw delete 10 > /dev/null 2>&1 || true
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias
-		ipfw add 10 setfib ${_fib} ipv6-icmp from 2001:2:${_fib}::/64 \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias
+		ipfw add 10 setfib ${fib} ipv6-icmp from 2001:2:${fib}::/64 \
 		    to any ip6 icmp6types 135,136 via ${IFACE} in \
 		    > /dev/null 2>&1
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
 	_p=${PEERADDR}
 
 	# Run tests.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		PEERADDR=2001:2:${_fib}::2
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		PEERADDR=2001:2:${fib}::2
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			eval rc_${i}_l=0
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_a=0
 				;;
 			*)	eval rc_${i}_a=1
@@ -636,18 +637,18 @@ testtx_ulp6_connected_transfernets()
 			i=$((i + 1))
 		done
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
-		_fib=$((_fib + 1))
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
+		fib=$((fib + 1))
 	done
 
 	# Restore PEERADDR
 	PEERADDR=${_p}
 
 	# Cleanup transfer networks and firewall.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias
+		fib=$((fib + 1))
 	done
 	ipfw delete 10 > /dev/null 2>&1
 }
@@ -684,46 +685,46 @@ testtx_udp6_connected_transfernets()
 #
 testtx_ulp6_connected_ifconfig_transfernets()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
 	_p=${PEERADDR}
 
 	# Run tests.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		PEERADDR=2001:2:${_fib}::2
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		PEERADDR=2001:2:${fib}::2
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			eval rc_${i}_l=0
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_a=0
 				;;
 			*)	eval rc_${i}_a=1
@@ -732,20 +733,20 @@ testtx_ulp6_connected_ifconfig_transfern
 			i=$((i + 1))
 		done
 
-		ifconfig ${IFACE} fib ${_fib}
+		ifconfig ${IFACE} fib ${fib}
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
-		_fib=$((_fib + 1))
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
+		fib=$((fib + 1))
 	done
 
 	# Restore PEERADDR
 	PEERADDR=${_p}
 
 	# Cleanup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias
+		fib=$((fib + 1))
 	done
 	ifconfig ${IFACE} fib 0
 }
@@ -779,23 +780,23 @@ testtx_udp6_connected_ifconfig_transfern
 #
 testtx_ulp6_gateway()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup default gateway and expected error codes.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1 || true
-		setfib -F${_fib} route add -inet6 -net default ${PEERADDR} \
+		setfib -F${fib} route add -inet6 -net default ${PEERADDR} \
 		    > /dev/null 2>&1
 		case "${_o}" in
-		-i) eval rc_${_fib}_l=0 ;;	# ICMPv6 will succeed
-		*)  eval rc_${_fib}_l=1 ;;
+		-i) eval rc_${fib}_l=0 ;;	# ICMPv6 will succeed
+		*)  eval rc_${fib}_l=1 ;;
 		esac
-		eval rc_${_fib}_a=0
-		_fib=$((_fib + 1))
+		eval rc_${fib}_a=0
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
@@ -810,11 +811,11 @@ testtx_ulp6_gateway()
 	PEERADDR=${_p}
 
 	# Cleanup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
@@ -851,38 +852,38 @@ testtx_udp6_gateway()
 #
 testtx_ulp6_transfernets_gateways()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks, default routes, and firewall.
-	_fib=0
+	fib=0
 	ipfw delete 10 > /dev/null 2>&1 || true
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \
 		    > /dev/null 2>&1
-		ipfw add 10 setfib ${_fib} ipv6-icmp \
-		    from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \
+		ipfw add 10 setfib ${fib} ipv6-icmp \
+		    from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \
 		    via ${IFACE} in > /dev/null 2>&1
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
 		# Add default route.
-		setfib -F${_fib} route delete -inet6 -net default \
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1 || true
-		setfib -F${_fib} route add -inet6 -net default \
-		    2001:2:${_fib}::2 > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		setfib -F${fib} route add -inet6 -net default \
+		    2001:2:${fib}::2 > /dev/null 2>&1
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
@@ -908,13 +909,13 @@ testtx_ulp6_transfernets_gateways()
 	PEERADDR=${_p}
 
 	# Cleanup default routes, transfer networks, and firewall.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 	ipfw delete 10 > /dev/null 2>&1
 }
@@ -954,33 +955,33 @@ testtx_udp6_transfernets_gateways()
 #
 testtx_ulp6_transfernets_gateway()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks, default routes, and firewall.
-	_fib=0
+	fib=0
 	ipfw delete 10 > /dev/null 2>&1 || true
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \
 		    > /dev/null 2>&1
-		ipfw add 10 setfib ${_fib} ipv6-icmp \
-		    from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \
+		ipfw add 10 setfib ${fib} ipv6-icmp \
+		    from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \
 		    via ${IFACE} in > /dev/null 2>&1
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
@@ -988,10 +989,10 @@ testtx_ulp6_transfernets_gateway()
 	PEERADDR="2001:2:ff01::2"
 
 	# Run tests.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
@@ -1001,7 +1002,7 @@ testtx_ulp6_transfernets_gateway()
 			*)  eval rc_${i}_l=1 ;;
 			esac
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_a=0
 				;;
 			*)	eval rc_${i}_a=1
@@ -1011,30 +1012,30 @@ testtx_ulp6_transfernets_gateway()
 		done
 
 		# Add default route.
-		setfib -F${_fib} route delete -inet6 -net default \
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1 || true
-		setfib -F${_fib} route add -inet6 -net default \
-		    2001:2:${_fib}::2 > /dev/null 2>&1
+		setfib -F${fib} route add -inet6 -net default \
+		    2001:2:${fib}::2 > /dev/null 2>&1
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
 
 		# Delete default route again.
-		setfib -F${_fib} route delete -inet6 -net default \
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Restore PEERADDR
 	PEERADDR=${_p}
 
 	# Cleanup default routes, transfer networks, and firewall.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 	ipfw delete 10 > /dev/null 2>&1
 }
@@ -1356,7 +1357,7 @@ testrx_main_setup_rc()
 
 testrx_main()
 {
-	local _n _o s t _fib _instances _destructive _transfer
+	local _n _o s t fib _instances _destructive _transfer
 	_n="$1"
 	_o="$2"
 	_instances=$3
@@ -1369,14 +1370,14 @@ testrx_main()
 			for t in ipfw ifconfig; do
 
 				print_debug "${_n}_${t}"
-				_fib=0
-				while test ${_fib} -lt ${RT_NUMFIBS}; do
+				fib=0
+				while test ${fib} -lt ${RT_NUMFIBS}; do
 
 					testrx_main_setup_rc "${_n}" "${t}" \
-					    ${_fib} "${_o}" ${_instances} \
+					    ${fib} "${_o}" ${_instances} \
 					    ${_destructive} ${_transfer}
 
-					_fib=$((_fib + 1))
+					fib=$((fib + 1))
 				done
 			done
 		done
@@ -1432,10 +1433,14 @@ testrx_udp6_same_addr_all_fibs_a_time()
 #
 # Prereqs.
 #
-kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw 
+if test `sysctl -n security.jail.jailed` -eq 0; then
+	kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw 
 
-# Reduce the time we wait in case of no reply to 2s.
-sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1
+	# Reduce the time we wait in case of no reply to 2s.
+	sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1
+fi
+ipfw -f flush > /dev/null 2>&1 || die "please load ipfw in base system"
+ipfw add 65000 permit ip from any to any > /dev/null 2>&1
 
 ################################################################################
 #
@@ -1491,7 +1496,7 @@ for uso in 0 1; do
 	testtx_udp6_transfernets_gateway && sleep 1
 done
 
-# Receiver testering.
+# Receiver testing.
 for uso in 0 1; do
 
 	USE_SOSETFIB=${uso}

Modified: stable/9/tools/test/netfibs/reflector.sh
==============================================================================
--- head/tools/test/netfibs/reflector.sh	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/9/tools/test/netfibs/reflector.sh	Mon Mar  5 19:13:18 2012	(r232566)
@@ -70,6 +70,7 @@ delay()
 
 	# sleep 1 is too long.
 	touch /tmp/foo || true
+	stat /tmp/foo > /dev/null 2>&1 || true
 }
 
 check_rc()
@@ -222,7 +223,7 @@ testtx_udp6_connected()
 #
 testtx_icmp6_connected_blackhole()
 {
-	local _opts _fib
+	local _opts fib
 
 	_opts=""
 	case ${DEBUG} in
@@ -231,20 +232,20 @@ testtx_icmp6_connected_blackhole()
 	*)	_opts="-d" ;;
 	esac
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 		print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \
-		    "-t testtx_icmp6_connected_blackhole${_fib} ${_opts}"
+		    "-t testtx_icmp6_connected_blackhole${fib} ${_opts}"
 		./reflect -p ${CTRLPORT} -T TCP6 \
-		    -t testtx_icmp6_connected_blackhole${_fib} ${_opts}
+		    -t testtx_icmp6_connected_blackhole${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
 testtx_tcp6_connected_blackhole()
 {
-	local _opts _fib
+	local _opts fib
 
 	_opts=""
 	case ${DEBUG} in
@@ -253,20 +254,20 @@ testtx_tcp6_connected_blackhole()
 	*)	_opts="-d" ;;
 	esac
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 		print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \
-		    "-t testtx_tcp6_connected_blackhole${_fib} ${_opts}"
+		    "-t testtx_tcp6_connected_blackhole${fib} ${_opts}"
 		./reflect -p ${CTRLPORT} -T TCP6 \
-		    -t testtx_tcp6_connected_blackhole${_fib} ${_opts}
+		    -t testtx_tcp6_connected_blackhole${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
 testtx_udp6_connected_blackhole()
 {
-	local _opts _fib
+	local _opts fib
 
 	_opts=""
 	case ${DEBUG} in
@@ -275,14 +276,14 @@ testtx_udp6_connected_blackhole()
 	*)	_opts="-d" ;;
 	esac
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 		print_debug "./reflect -p ${CTRLPORT} -T UDP6 " \
-		    "-t testtx_udp6_connected_blackhole${_fib} ${_opts}"
+		    "-t testtx_udp6_connected_blackhole${fib} ${_opts}"
 		./reflect -p ${CTRLPORT} -T UDP6 \
-		    -t testtx_udp6_connected_blackhole${_fib} ${_opts}
+		    -t testtx_udp6_connected_blackhole${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
@@ -290,7 +291,7 @@ testtx_udp6_connected_blackhole()
 #
 testtx_ulp6_connected_transfernets()
 {
-	local _opts _fib _n _o
+	local _opts fib _n _o
 	_n="$1"
 	_o="$2"
 
@@ -302,28 +303,28 @@ testtx_ulp6_connected_transfernets()
 	esac
 
 	# Setup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} \
-		    ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 alias
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} \
+		    ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 alias
+		fib=$((fib + 1))
 	done
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts}"
-		./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts}
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts}"
+		./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Cleanup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} \
-		    ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 -alias
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} \
+		    ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 -alias
 		delay
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 19:13:20 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 0C1991065677;
	Mon,  5 Mar 2012 19:13:20 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ED82A8FC1B;
	Mon,  5 Mar 2012 19:13:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JDJNB000636;
	Mon, 5 Mar 2012 19:13:19 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JDJec000630;
	Mon, 5 Mar 2012 19:13:19 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201203051913.q25JDJec000630@svn.freebsd.org>
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Date: Mon, 5 Mar 2012 19:13:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232567 - in stable/8/tools/test: . netfibs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 19:13:20 -0000

Author: bz
Date: Mon Mar  5 19:13:19 2012
New Revision: 232567
URL: http://svn.freebsd.org/changeset/base/232567

Log:
  MFC r231858:
  
   Add regression tests scripts for multi-IP FIBs exercising the send,
   receive and forward path tagging packets with both the ifconfig fib
   option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and
   testing both setfib(2) as well as the SO_SETFIB socket option.
  
   At 16 FIBs a total of over 64k return codes/replies/stati are checked,
   sometimes multiple times (in different ways, e.g. the reflected request
   as well as ipfw counter values).
  
   The scripts need two or three machines to run and are thus not added
   to the tools/regression framework but only to tools/test.
  
  MFC r232114:
  
   Update scripts to work around two sh(1) bugs found in stable/8:
   1) _x=$((_x + 1)) does not work while x=$((x + 1)) does.
   2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted.
  
   Correct typos and improve some details forwarding.sh already
   had in initiator, esp. related to ipfw accepting if the default
   is deny.
  
   Add an extra stat call to the "delay" function in addition to the
   touch which together is still a lot faster than sleep 1 but seems
   to help a lot more to mitigate the unrelated kernel race seen.
  
  Sponsored by:	Cisco Systems, Inc.

Added:
  stable/8/tools/test/netfibs/
     - copied from r231858, head/tools/test/netfibs/
Modified:
  stable/8/tools/test/README
  stable/8/tools/test/netfibs/README
  stable/8/tools/test/netfibs/forwarding.sh
  stable/8/tools/test/netfibs/initiator.sh
  stable/8/tools/test/netfibs/reflector.sh
Directory Properties:
  stable/8/tools/test/   (props changed)

Modified: stable/8/tools/test/README
==============================================================================
--- stable/8/tools/test/README	Mon Mar  5 19:13:18 2012	(r232566)
+++ stable/8/tools/test/README	Mon Mar  5 19:13:19 2012	(r232567)
@@ -10,5 +10,6 @@ Please make a subdir per program, and ad
 devrandom	Programs to test /dev/*random.
 dtrace		DTrace test suite
 malloc		A program to test and benchmark malloc().
+netfibs		Programs to test multi-FIB network stacks.
 posixshm	A program to test POSIX shared memory.
 testfloat	Programs to test floating-point implementations

Modified: stable/8/tools/test/netfibs/README
==============================================================================
--- head/tools/test/netfibs/README	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/8/tools/test/netfibs/README	Mon Mar  5 19:13:19 2012	(r232567)
@@ -35,7 +35,7 @@ initiator.sh and reflector.sh
 	output.  A special value of 42 will enable sh(1) xtrace printing.
 
 	The output format is modeled after Test::Harness Perl as used in
-	tools/regression/ but not always complaint following the test case name.
+	tools/regression/ but not always compliant following the test case name.
 
 	NOTE: at the time of writing reflector.sh can trigger kernel races
 	unrelated to multi-FIB test leading to a panic(9).  "delay" calls

Modified: stable/8/tools/test/netfibs/forwarding.sh
==============================================================================
--- head/tools/test/netfibs/forwarding.sh	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/8/tools/test/netfibs/forwarding.sh	Mon Mar  5 19:13:19 2012	(r232567)
@@ -222,36 +222,36 @@ _reachability_check()
 
 reachability_check()
 {
-	local _i _rc
+	local _i rc
 
 	# Try to reach all control addresses on other nodes.
 	# We need to loop for a while as we cannot expect all to be up
 	# the very same moment.
 	i=1
-	_rc=42
-	while test ${_rc} -ne 0 -a ${i} -le ${WAITS}; do
+	rc=42
+	while test ${rc} -ne 0 -a ${i} -le ${WAITS}; do
 		print_debug "${i}/${WAITS} trying to ping6 control addresses."
-		_rc=0
+		rc=0
 		set +e
 		case ${node} in
 		left)	_reachability_check ${MIDDLELEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${MIDDLERIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${RIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			;;
 		middle)	_reachability_check ${LEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${RIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			;;
 		right)	_reachability_check ${MIDDLERIGHTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${MIDDLELEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			_reachability_check ${LEFTADDR}
-			_rc=$((_rc + $?))
+			rc=$((rc + $?))
 			;;
 		esac
 		set -e
@@ -390,14 +390,14 @@ test_icmp6()
 
 test_ulp_reflect_one()
 {
-	local _txt _opts _port _fib
+	local _txt _opts port fib
 	_txt="$1"
 	_opts="$2"
-	_port=$3
-	_fib=$4
+	port=$3
+	fib=$4
 
-	print_debug "./reflect -p $((_port + 1 + _fib)) -t ${_txt}" "${_opts}"
-	./reflect -p $((_port + 1 + _fib)) -t ${_txt} ${_opts}
+	print_debug "./reflect -p $((port + 1 + fib)) -t ${_txt}" "${_opts}"
+	./reflect -p $((port + 1 + fib)) -t ${_txt} ${_opts}
 	print_debug "reflect '${_txt}' terminated without error."
 }
 
@@ -463,19 +463,19 @@ nc_send_recv()
 
 test_ulp()
 {
-	local _maxfibs _msg _addr _port _fib i _txt testno _rc _reply
-	_maxfibs=$1
+	local maxfibs _msg _addr port fib i _txt testno _rc _reply
+	maxfibs=$1
 	_msg="$2"
 	_addr=$3
-	_port=$4
-	_fib=$5
+	port=$4
+	fib=$5
 
-	printf "1..%d\n" $((${_maxfibs} * 2))
+	printf "1..%d\n" $((${maxfibs} * 2))
 	testno=1
 	i=0
-	while test ${i} -lt ${_maxfibs}; do
+	while test ${i} -lt ${maxfibs}; do
 
-		if test ${i} -eq $((${_maxfibs} - 1)); then
+		if test ${i} -eq $((${maxfibs} - 1)); then
 			# Last one; signal DONE.
 			_txt="DONE ${_msg}_${i}"
 		else
@@ -485,18 +485,18 @@ test_ulp()
 		eval _rc="\${rc_${i}}"
 
 		# Test TCP.
-		nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \
-		    $((${_port} + 1 + _fib)) ""
+		nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \
+		    $((${port} + 1 + fib)) ""
 		check_rc $? ${_rc} ${testno} "${_msg}_${i}_tcp" \
-		    "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}"
+		    "[${_addr}]:$((${port} + 1 + fib)) ${_reply}"
 		testno=$((testno + 1))
 		sleep 1
 
 		# Test UDP.
-		nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \
-		    $((${_port} + 1 + _fib)) "-u"
+		nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \
+		    $((${port} + 1 + fib)) "-u"
 		check_rc $? ${_rc} ${testno} "${_msg}_${i}_udp" \
-		    "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}"
+		    "[${_addr}]:$((${port} + 1 + fib)) ${_reply}"
 		sleep 1
 
 		i=$((i + 1))
@@ -506,18 +506,18 @@ test_ulp()
 
 setup_ipfw_count()
 {
-	local i _port _maxfib _p _fib _ofib
-	_port=$1
-	_maxfib=$2
+	local i port maxfib _p _fib _ofib
+	port=$1
+	maxfib=$2
 	_fib=$3
 	_ofib=$4
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 
 		case ${_ofib} in
-		-1)	_p=$((_port + 1 + i)) ;;
-		*)	_p=$((_port + 1 + _maxfib - 1 - i)) ;;
+		-1)	_p=$((port + 1 + i)) ;;
+		*)	_p=$((port + 1 + maxfib - 1 - i)) ;;
 		esac
 
 		# Only count ICMP6 echo replies.
@@ -532,10 +532,10 @@ setup_ipfw_count()
 		ipfw add $((20000 + i)) count ipv6-icmp from any to any \
 		    icmp6types 128 fib ${i} via ${IFACEFAR} out > /dev/null
 		ipfw add $((20000 + i)) count tcp from any to any \
-		    dst-port $((${_port} + 1 + i)) fib ${i} \
+		    dst-port $((${port} + 1 + i)) fib ${i} \
 		    via ${IFACEFAR} out > /dev/null
 		ipfw add $((20000 + i)) count udp from any to any \
-		    dst-port $((${_port} + 1 + i)) fib ${i} \
+		    dst-port $((${port} + 1 + i)) fib ${i} \
 		    via ${IFACEFAR} out > /dev/null
 
 		i=$((i + 1))
@@ -544,7 +544,7 @@ setup_ipfw_count()
 
 report_ipfw_count()
 {
-	local _fib _o i _rstr _c _req _p _opts
+	local _fib _o i _rstr _c _req _p _opts base
 	_o="$2"
 
 	case ${DEBUG} in
@@ -553,9 +553,9 @@ report_ipfw_count()
 	esac
 
 	_rstr="RESULTS "
-	for _base in 10000 20000; do
+	for base in 10000 20000; do
 		for _o in i t u; do
-			case ${_base} in
+			case ${base} in
 			10000)	_rstr="${_rstr}\nLEFT " ;;
 			20000)	_rstr="${_rstr}\nRIGHT " ;;
 			esac
@@ -568,11 +568,11 @@ report_ipfw_count()
 			while test ${i} -lt ${RT_NUMFIBS}; do
 
 				case "${_o}" in
-				i)	_c=`ipfw show $((${_base} + i)) | \
+				i)	_c=`ipfw show $((${base} + i)) | \
 					    awk '/ ipv6-icmp / { print $2 }'` ;;
-				t)	_c=`ipfw show $((${_base} + i)) | \
+				t)	_c=`ipfw show $((${base} + i)) | \
 					    awk '/ tcp / { print $2 }'` ;;
-				u)	_c=`ipfw show $((${_base} + i)) | \
+				u)	_c=`ipfw show $((${base} + i)) | \
 					    awk '/ udp / { print $2 }'` ;;
 				esac
 				_rstr="${_rstr}${i} ${_c},"
@@ -582,7 +582,7 @@ report_ipfw_count()
 		done
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
-			ipfw delete $((${_base} + i)) > /dev/null 2>&1 || true
+			ipfw delete $((${base} + i)) > /dev/null 2>&1 || true
 			i=$((i + 1))
 		done
 	done
@@ -994,18 +994,18 @@ fwd_fib_symmetric_ipfw()
 
 _fwd_fib_asymmetric_results()
 {
-	local _n _fib _maxfib i _edge _type _rc
+	local _n fib maxfib i _edge _type _rc
 	_n="$1"
-	_fib=$2
-	_maxfib=$3
+	fib=$2
+	maxfib=$3
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 		_edge="RIGHT"
 			for _type in "ICMP6" "TCP" "UDP"; do
 
 				case ${i} in
-				${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
+				${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
 					#print_debug \
 					#   "rc_${_n}_${_edge}_${_type}_${i}=1"
 					;;
@@ -1018,14 +1018,14 @@ _fwd_fib_asymmetric_results()
 			done
 		i=$((i + 1))
 	done
-	_fib=$((_maxfib - 1 - _fib))
+	fib=$((maxfib - 1 - fib))
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 		_edge="LEFT"
 			for _type in "ICMP6" "TCP" "UDP"; do
 
 				case ${i} in
-				${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
+				${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1
 					#print_debug \
 					#   "rc_${_n}_${_edge}_${_type}_${i}=1"
 					;;
@@ -1073,16 +1073,16 @@ _fwd_fib_asymmetric_left()
 
 _fwd_fib_asymmetric_middle_ifconfig()
 {
-	local _n _maxfib i
+	local _n maxfib i
 	_n="$1"
-	_maxfib=$2
+	maxfib=$2
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 		ifconfig ${IFACE} fib ${i}
-		ifconfig ${IFACEFAR} fib $((${_maxfib} - 1 - ${i}))
-		setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} \
-		    $((${_maxfib} - 1 - ${i}))
+		ifconfig ${IFACEFAR} fib $((${maxfib} - 1 - ${i}))
+		setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} \
+		    $((${maxfib} - 1 - ${i}))
 		wait_remote_ready "START_${_n}_${i}"
 		ipfw -q zero > /dev/null
 		# Nothing to do for the middle node testing the default.
@@ -1095,12 +1095,12 @@ _fwd_fib_asymmetric_middle_ifconfig()
 
 _fwd_fib_asymmetric_middle_ipfw()
 {
-	local _n _maxfib i j _port
+	local _n maxfib i j _port
 	_n="$1"
-	_maxfib=$2
+	maxfib=$2
 
 	i=0
-	while test ${i} -lt ${_maxfib}; do
+	while test ${i} -lt ${maxfib}; do
 
 		_port=$((CTRLPORT + 1 + i))
 		ipfw add 100 setfib ${i} ipv6-icmp from any to any \
@@ -1110,7 +1110,7 @@ _fwd_fib_asymmetric_middle_ipfw()
 		ipfw add 100 setfib ${i} udp from any to any \
 		    dst-port ${_port} via ${IFACE} in > /dev/null
 
-		j=$((${_maxfib} - 1 - ${i}))
+		j=$((${maxfib} - 1 - ${i}))
 		ipfw add 100 setfib ${j} ipv6-icmp from any to any \
 		    icmp6types 129 via ${IFACEFAR} in > /dev/null
 		ipfw add 100 setfib ${j} tcp from any to any \
@@ -1118,7 +1118,7 @@ _fwd_fib_asymmetric_middle_ipfw()
 		ipfw add 100 setfib ${j} udp from any to any \
 		    src-port ${_port} via ${IFACEFAR} in > /dev/null
 
-		setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} ${j}
+		setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} ${j}
 		wait_remote_ready "START_${_n}_${i}"
 		ipfw -q zero > /dev/null
 		# Nothing to do for the middle node testing the default.

Modified: stable/8/tools/test/netfibs/initiator.sh
==============================================================================
--- head/tools/test/netfibs/initiator.sh	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/8/tools/test/netfibs/initiator.sh	Mon Mar  5 19:13:19 2012	(r232567)
@@ -219,6 +219,7 @@ send_greeting()
 	# The latter is needed to allow indvidiual less specific later rules
 	# from test cases to just disallow any IPv6 traffic on a matching FIB.
 	ipfw -f flush > /dev/null 2>&1
+	ipfw add 65000 permit ip from any to any > /dev/null 2>&1
 	ipfw add 5 permit ipv6-icmp from any to any icmp6types 135,136 fib 0 \
 	    via ${IFACE} out > /dev/null 2>&1
 
@@ -255,7 +256,7 @@ EOI
 	PEERLINKLOCAL=${_linklocal}
 
 	# Swap the zoneid to the local interface scope.
-	PEERLINKLOCAL="${PEERLINKLOCAL%%\%*}%${IFACE}"
+	PEERLINKLOCAL=${PEERLINKLOCAL%%\%*}"%${IFACE}"
 
 	print_debug "Successfully exchanged greeting. Peer at ${PEERLINKLOCAL}"
 }
@@ -510,21 +511,21 @@ testtx_udp6_connected()
 #
 testtx_ulp6_connected_blackhole()
 {
-	local _fib i _n _o
+	local fib i _n _o
 	_n="$1"
 	_o="$2"
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			ipfw delete $((100 + i)) > /dev/null 2>&1 || true
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_l=0
 				eval rc_${i}_a=0
 				;;
@@ -538,17 +539,17 @@ testtx_ulp6_connected_blackhole()
 			i=$((i + 1))
 		done
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
 		case ${DEBUG} in
 		''|0)	;;
 		*)	ipfw show ;;
 		esac
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ipfw delete $((100 + _fib)) > /dev/null 2>&1 || true
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ipfw delete $((100 + fib)) > /dev/null 2>&1 || true
+		fib=$((fib + 1))
 	done
 }
 
@@ -584,50 +585,50 @@ testtx_udp6_connected_blackhole()
 #
 testtx_ulp6_connected_transfernets()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks and firewall.
 	ipfw delete 10 > /dev/null 2>&1 || true
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias
-		ipfw add 10 setfib ${_fib} ipv6-icmp from 2001:2:${_fib}::/64 \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias
+		ipfw add 10 setfib ${fib} ipv6-icmp from 2001:2:${fib}::/64 \
 		    to any ip6 icmp6types 135,136 via ${IFACE} in \
 		    > /dev/null 2>&1
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
 	_p=${PEERADDR}
 
 	# Run tests.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		PEERADDR=2001:2:${_fib}::2
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		PEERADDR=2001:2:${fib}::2
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			eval rc_${i}_l=0
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_a=0
 				;;
 			*)	eval rc_${i}_a=1
@@ -636,18 +637,18 @@ testtx_ulp6_connected_transfernets()
 			i=$((i + 1))
 		done
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
-		_fib=$((_fib + 1))
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
+		fib=$((fib + 1))
 	done
 
 	# Restore PEERADDR
 	PEERADDR=${_p}
 
 	# Cleanup transfer networks and firewall.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias
+		fib=$((fib + 1))
 	done
 	ipfw delete 10 > /dev/null 2>&1
 }
@@ -684,46 +685,46 @@ testtx_udp6_connected_transfernets()
 #
 testtx_ulp6_connected_ifconfig_transfernets()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
 	_p=${PEERADDR}
 
 	# Run tests.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		PEERADDR=2001:2:${_fib}::2
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		PEERADDR=2001:2:${fib}::2
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			eval rc_${i}_l=0
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_a=0
 				;;
 			*)	eval rc_${i}_a=1
@@ -732,20 +733,20 @@ testtx_ulp6_connected_ifconfig_transfern
 			i=$((i + 1))
 		done
 
-		ifconfig ${IFACE} fib ${_fib}
+		ifconfig ${IFACE} fib ${fib}
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
-		_fib=$((_fib + 1))
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
+		fib=$((fib + 1))
 	done
 
 	# Restore PEERADDR
 	PEERADDR=${_p}
 
 	# Cleanup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias
+		fib=$((fib + 1))
 	done
 	ifconfig ${IFACE} fib 0
 }
@@ -779,23 +780,23 @@ testtx_udp6_connected_ifconfig_transfern
 #
 testtx_ulp6_gateway()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup default gateway and expected error codes.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1 || true
-		setfib -F${_fib} route add -inet6 -net default ${PEERADDR} \
+		setfib -F${fib} route add -inet6 -net default ${PEERADDR} \
 		    > /dev/null 2>&1
 		case "${_o}" in
-		-i) eval rc_${_fib}_l=0 ;;	# ICMPv6 will succeed
-		*)  eval rc_${_fib}_l=1 ;;
+		-i) eval rc_${fib}_l=0 ;;	# ICMPv6 will succeed
+		*)  eval rc_${fib}_l=1 ;;
 		esac
-		eval rc_${_fib}_a=0
-		_fib=$((_fib + 1))
+		eval rc_${fib}_a=0
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
@@ -810,11 +811,11 @@ testtx_ulp6_gateway()
 	PEERADDR=${_p}
 
 	# Cleanup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
@@ -851,38 +852,38 @@ testtx_udp6_gateway()
 #
 testtx_ulp6_transfernets_gateways()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks, default routes, and firewall.
-	_fib=0
+	fib=0
 	ipfw delete 10 > /dev/null 2>&1 || true
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \
 		    > /dev/null 2>&1
-		ipfw add 10 setfib ${_fib} ipv6-icmp \
-		    from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \
+		ipfw add 10 setfib ${fib} ipv6-icmp \
+		    from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \
 		    via ${IFACE} in > /dev/null 2>&1
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
 		# Add default route.
-		setfib -F${_fib} route delete -inet6 -net default \
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1 || true
-		setfib -F${_fib} route add -inet6 -net default \
-		    2001:2:${_fib}::2 > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		setfib -F${fib} route add -inet6 -net default \
+		    2001:2:${fib}::2 > /dev/null 2>&1
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
@@ -908,13 +909,13 @@ testtx_ulp6_transfernets_gateways()
 	PEERADDR=${_p}
 
 	# Cleanup default routes, transfer networks, and firewall.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 	ipfw delete 10 > /dev/null 2>&1
 }
@@ -954,33 +955,33 @@ testtx_udp6_transfernets_gateways()
 #
 testtx_ulp6_transfernets_gateway()
 {
-	local _fib i _n _o _p
+	local fib i _n _o _p
 	_n="$1"
 	_o="$2"
 
 	# Setup transfer networks, default routes, and firewall.
-	_fib=0
+	fib=0
 	ipfw delete 10 > /dev/null 2>&1 || true
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1 || true
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \
 		    > /dev/null 2>&1
-		ipfw add 10 setfib ${_fib} ipv6-icmp \
-		    from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \
+		ipfw add 10 setfib ${fib} ipv6-icmp \
+		    from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \
 		    via ${IFACE} in > /dev/null 2>&1
 		# Remove connected routes from all but matching FIB.
 		i=0
 		while test ${i} -lt ${RT_NUMFIBS}; do
 			case ${i} in
-			${_fib});;
+			${fib});;
 			*)	setfib -F${i} route delete -inet6 \
-				    -net 2001:2:${_fib}:: > /dev/null 2>&1
+				    -net 2001:2:${fib}:: > /dev/null 2>&1
 				;;
 			esac
 			i=$((i + 1))
 		done
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Save PEERADDR
@@ -988,10 +989,10 @@ testtx_ulp6_transfernets_gateway()
 	PEERADDR="2001:2:ff01::2"
 
 	# Run tests.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 
-		print_debug "${_n} ${_fib}"
+		print_debug "${_n} ${fib}"
 
 		# Setup expected return values.
 		i=0
@@ -1001,7 +1002,7 @@ testtx_ulp6_transfernets_gateway()
 			*)  eval rc_${i}_l=1 ;;
 			esac
 			case ${i} in
-			${_fib})
+			${fib})
 				eval rc_${i}_a=0
 				;;
 			*)	eval rc_${i}_a=1
@@ -1011,30 +1012,30 @@ testtx_ulp6_transfernets_gateway()
 		done
 
 		# Add default route.
-		setfib -F${_fib} route delete -inet6 -net default \
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1 || true
-		setfib -F${_fib} route add -inet6 -net default \
-		    2001:2:${_fib}::2 > /dev/null 2>&1
+		setfib -F${fib} route add -inet6 -net default \
+		    2001:2:${fib}::2 > /dev/null 2>&1
 
-		testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib}
+		testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib}
 
 		# Delete default route again.
-		setfib -F${_fib} route delete -inet6 -net default \
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Restore PEERADDR
 	PEERADDR=${_p}
 
 	# Cleanup default routes, transfer networks, and firewall.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} route delete -inet6 -net default \
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} route delete -inet6 -net default \
 		    > /dev/null 2>&1
-		ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \
+		ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \
 		    > /dev/null 2>&1
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 	ipfw delete 10 > /dev/null 2>&1
 }
@@ -1356,7 +1357,7 @@ testrx_main_setup_rc()
 
 testrx_main()
 {
-	local _n _o s t _fib _instances _destructive _transfer
+	local _n _o s t fib _instances _destructive _transfer
 	_n="$1"
 	_o="$2"
 	_instances=$3
@@ -1369,14 +1370,14 @@ testrx_main()
 			for t in ipfw ifconfig; do
 
 				print_debug "${_n}_${t}"
-				_fib=0
-				while test ${_fib} -lt ${RT_NUMFIBS}; do
+				fib=0
+				while test ${fib} -lt ${RT_NUMFIBS}; do
 
 					testrx_main_setup_rc "${_n}" "${t}" \
-					    ${_fib} "${_o}" ${_instances} \
+					    ${fib} "${_o}" ${_instances} \
 					    ${_destructive} ${_transfer}
 
-					_fib=$((_fib + 1))
+					fib=$((fib + 1))
 				done
 			done
 		done
@@ -1432,10 +1433,14 @@ testrx_udp6_same_addr_all_fibs_a_time()
 #
 # Prereqs.
 #
-kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw 
+if test `sysctl -n security.jail.jailed` -eq 0; then
+	kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw 
 
-# Reduce the time we wait in case of no reply to 2s.
-sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1
+	# Reduce the time we wait in case of no reply to 2s.
+	sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1
+fi
+ipfw -f flush > /dev/null 2>&1 || die "please load ipfw in base system"
+ipfw add 65000 permit ip from any to any > /dev/null 2>&1
 
 ################################################################################
 #
@@ -1491,7 +1496,7 @@ for uso in 0 1; do
 	testtx_udp6_transfernets_gateway && sleep 1
 done
 
-# Receiver testering.
+# Receiver testing.
 for uso in 0 1; do
 
 	USE_SOSETFIB=${uso}

Modified: stable/8/tools/test/netfibs/reflector.sh
==============================================================================
--- head/tools/test/netfibs/reflector.sh	Fri Feb 17 04:26:24 2012	(r231858)
+++ stable/8/tools/test/netfibs/reflector.sh	Mon Mar  5 19:13:19 2012	(r232567)
@@ -70,6 +70,7 @@ delay()
 
 	# sleep 1 is too long.
 	touch /tmp/foo || true
+	stat /tmp/foo > /dev/null 2>&1 || true
 }
 
 check_rc()
@@ -222,7 +223,7 @@ testtx_udp6_connected()
 #
 testtx_icmp6_connected_blackhole()
 {
-	local _opts _fib
+	local _opts fib
 
 	_opts=""
 	case ${DEBUG} in
@@ -231,20 +232,20 @@ testtx_icmp6_connected_blackhole()
 	*)	_opts="-d" ;;
 	esac
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 		print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \
-		    "-t testtx_icmp6_connected_blackhole${_fib} ${_opts}"
+		    "-t testtx_icmp6_connected_blackhole${fib} ${_opts}"
 		./reflect -p ${CTRLPORT} -T TCP6 \
-		    -t testtx_icmp6_connected_blackhole${_fib} ${_opts}
+		    -t testtx_icmp6_connected_blackhole${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
 testtx_tcp6_connected_blackhole()
 {
-	local _opts _fib
+	local _opts fib
 
 	_opts=""
 	case ${DEBUG} in
@@ -253,20 +254,20 @@ testtx_tcp6_connected_blackhole()
 	*)	_opts="-d" ;;
 	esac
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 		print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \
-		    "-t testtx_tcp6_connected_blackhole${_fib} ${_opts}"
+		    "-t testtx_tcp6_connected_blackhole${fib} ${_opts}"
 		./reflect -p ${CTRLPORT} -T TCP6 \
-		    -t testtx_tcp6_connected_blackhole${_fib} ${_opts}
+		    -t testtx_tcp6_connected_blackhole${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
 testtx_udp6_connected_blackhole()
 {
-	local _opts _fib
+	local _opts fib
 
 	_opts=""
 	case ${DEBUG} in
@@ -275,14 +276,14 @@ testtx_udp6_connected_blackhole()
 	*)	_opts="-d" ;;
 	esac
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
 		print_debug "./reflect -p ${CTRLPORT} -T UDP6 " \
-		    "-t testtx_udp6_connected_blackhole${_fib} ${_opts}"
+		    "-t testtx_udp6_connected_blackhole${fib} ${_opts}"
 		./reflect -p ${CTRLPORT} -T UDP6 \
-		    -t testtx_udp6_connected_blackhole${_fib} ${_opts}
+		    -t testtx_udp6_connected_blackhole${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 }
 
@@ -290,7 +291,7 @@ testtx_udp6_connected_blackhole()
 #
 testtx_ulp6_connected_transfernets()
 {
-	local _opts _fib _n _o
+	local _opts fib _n _o
 	_n="$1"
 	_o="$2"
 
@@ -302,28 +303,28 @@ testtx_ulp6_connected_transfernets()
 	esac
 
 	# Setup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} \
-		    ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 alias
-		_fib=$((_fib + 1))
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} \
+		    ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 alias
+		fib=$((fib + 1))
 	done
 
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts}"
-		./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts}
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts}"
+		./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts}
 		print_debug "reflect terminated without error."
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))
 	done
 
 	# Cleanup transfer networks.
-	_fib=0
-	while test ${_fib} -lt ${RT_NUMFIBS}; do
-		setfib -F${_fib} \
-		    ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 -alias
+	fib=0
+	while test ${fib} -lt ${RT_NUMFIBS}; do
+		setfib -F${fib} \
+		    ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 -alias
 		delay
-		_fib=$((_fib + 1))
+		fib=$((fib + 1))

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@FreeBSD.ORG  Mon Mar  5 19:32:45 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 50C5E106566B;
	Mon,  5 Mar 2012 19:32:45 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3DBAC8FC1D;
	Mon,  5 Mar 2012 19:32:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JWjv9001545;
	Mon, 5 Mar 2012 19:32:45 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JWiB6001530;
	Mon, 5 Mar 2012 19:32:44 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201203051932.q25JWiB6001530@svn.freebsd.org>
From: Xin LI <delphij@FreeBSD.org>
Date: Mon, 5 Mar 2012 19:32:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232568 - in stable/7/usr.sbin/cron: cron crontab doc
	lib
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Mar 2012 19:32:45 -0000

Author: delphij
Date: Mon Mar  5 19:32:44 2012
New Revision: 232568
URL: http://svn.freebsd.org/changeset/base/232568

Log:
  Merge all revisions except r199804 back to stable/7.

Modified:
  stable/7/usr.sbin/cron/cron/Makefile
  stable/7/usr.sbin/cron/cron/cron.c
  stable/7/usr.sbin/cron/cron/cron.h
  stable/7/usr.sbin/cron/cron/database.c
  stable/7/usr.sbin/cron/cron/do_command.c
  stable/7/usr.sbin/cron/cron/externs.h
  stable/7/usr.sbin/cron/crontab/Makefile
  stable/7/usr.sbin/cron/crontab/crontab.5
  stable/7/usr.sbin/cron/crontab/crontab.c
  stable/7/usr.sbin/cron/doc/CHANGES
  stable/7/usr.sbin/cron/doc/MAIL
  stable/7/usr.sbin/cron/lib/Makefile
  stable/7/usr.sbin/cron/lib/entry.c
  stable/7/usr.sbin/cron/lib/misc.c
Directory Properties:
  stable/7/usr.sbin/cron/   (props changed)
  stable/7/usr.sbin/cron/cron/   (props changed)
  stable/7/usr.sbin/cron/crontab/   (props changed)

Modified: stable/7/usr.sbin/cron/cron/Makefile
==============================================================================
--- stable/7/usr.sbin/cron/cron/Makefile	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/cron/Makefile	Mon Mar  5 19:32:44 2012	(r232568)
@@ -9,4 +9,6 @@ CFLAGS+= -DLOGIN_CAP -DPAM
 DPADD=	${LIBCRON} ${LIBPAM} ${LIBUTIL}
 LDADD=	${LIBCRON} ${MINUSLPAM} -lutil
 
+WARNS?=	2
+
 .include <bsd.prog.mk>

Modified: stable/7/usr.sbin/cron/cron/cron.c
==============================================================================
--- stable/7/usr.sbin/cron/cron/cron.c	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/cron/cron.c	Mon Mar  5 19:32:44 2012	(r232568)
@@ -32,17 +32,17 @@ static const char rcsid[] =
 #endif
 
 
-static	void	usage __P((void)),
-		run_reboot_jobs __P((cron_db *)),
-		cron_tick __P((cron_db *)),
-		cron_sync __P((void)),
-		cron_sleep __P((cron_db *)),
-		cron_clean __P((cron_db *)),
+static	void	usage(void),
+		run_reboot_jobs(cron_db *),
+		cron_tick(cron_db *),
+		cron_sync(void),
+		cron_sleep(cron_db *),
+		cron_clean(cron_db *),
 #ifdef USE_SIGCHLD
-		sigchld_handler __P((int)),
+		sigchld_handler(int),
 #endif
-		sighup_handler __P((int)),
-		parse_args __P((int c, char *v[]));
+		sighup_handler(int),
+		parse_args(int c, char *v[]);
 
 static time_t	last_time = 0;
 static int	dst_enabled = 0;

Modified: stable/7/usr.sbin/cron/cron/cron.h
==============================================================================
--- stable/7/usr.sbin/cron/cron/cron.h	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/cron/cron.h	Mon Mar  5 19:32:44 2012	(r232568)
@@ -199,49 +199,50 @@ typedef	struct _cron_db {
 } cron_db;
 
 
-void		set_cron_uid __P((void)),
-		set_cron_cwd __P((void)),
-		load_database __P((cron_db *)),
-		open_logfile __P((void)),
-		sigpipe_func __P((void)),
-		job_add __P((entry *, user *)),
-		do_command __P((entry *, user *)),
-		link_user __P((cron_db *, user *)),
-		unlink_user __P((cron_db *, user *)),
-		free_user __P((user *)),
-		env_free __P((char **)),
-		unget_char __P((int, FILE *)),
-		free_entry __P((entry *)),
-		skip_comments __P((FILE *)),
-		log_it __P((char *, int, char *, char *)),
-		log_close __P((void));
-
-int		job_runqueue __P((void)),
-		set_debug_flags __P((char *)),
-		get_char __P((FILE *)),
-		get_string __P((char *, int, FILE *, char *)),
-		swap_uids __P((void)),
-		load_env __P((char *, FILE *)),
-		cron_pclose __P((FILE *)),
-		strcmp_until __P((char *, char *, int)),
-		allowed __P((char *)),
-		strdtb __P((char *));
-
-char		*env_get __P((char *, char **)),
-		*arpadate __P((time_t *)),
-		*mkprints __P((unsigned char *, unsigned int)),
-		*first_word __P((char *, char *)),
-		**env_init __P((void)),
-		**env_copy __P((char **)),
-		**env_set __P((char **, char *));
+void		set_cron_uid(void),
+		set_cron_cwd(void),
+		load_database(cron_db *),
+		open_logfile(void),
+		sigpipe_func(void),
+		job_add(entry *, user *),
+		do_command(entry *, user *),
+		link_user(cron_db *, user *),
+		unlink_user(cron_db *, user *),
+		free_user(user *),
+		env_free(char **),
+		unget_char(int, FILE *),
+		free_entry(entry *),
+		skip_comments(FILE *),
+		log_it(char *, int, char *, char *),
+		log_close(void);
+
+int		job_runqueue(void),
+		set_debug_flags(char *),
+		get_char(FILE *),
+		get_string(char *, int, FILE *, char *),
+		swap_uids(void),
+		swap_uids_back(void),
+		load_env(char *, FILE *),
+		cron_pclose(FILE *),
+		strcmp_until(char *, char *, int),
+		allowed(char *),
+		strdtb(char *);
+
+char		*env_get(char *, char **),
+		*arpadate(time_t *),
+		*mkprints(unsigned char *, unsigned int),
+		*first_word(char *, char *),
+		**env_init(void),
+		**env_copy(char **),
+		**env_set(char **, char *);
 
-user		*load_user __P((int, struct passwd *, char *)),
-		*find_user __P((cron_db *, char *));
+user		*load_user(int, struct passwd *, char *),
+		*find_user(cron_db *, char *);
 
-entry		*load_entry __P((FILE *, void (*)(),
-				 struct passwd *, char **));
+entry		*load_entry(FILE *, void (*)(char *),
+				 struct passwd *, char **);
 
-FILE		*cron_popen __P((char *, char *, entry *));
+FILE		*cron_popen(char *, char *, entry *);
 
 
 				/* in the C tradition, we only create

Modified: stable/7/usr.sbin/cron/cron/database.c
==============================================================================
--- stable/7/usr.sbin/cron/cron/database.c	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/cron/database.c	Mon Mar  5 19:32:44 2012	(r232568)
@@ -33,9 +33,9 @@ static const char rcsid[] =
 #define TMAX(a,b) ((a)>(b)?(a):(b))
 
 
-static	void		process_crontab __P((char *, char *, char *,
+static	void		process_crontab(char *, char *, char *,
 					     struct stat *,
-					     cron_db *, cron_db *));
+					     cron_db *, cron_db *);
 
 
 void

Modified: stable/7/usr.sbin/cron/cron/do_command.c
==============================================================================
--- stable/7/usr.sbin/cron/cron/do_command.c	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/cron/do_command.c	Mon Mar  5 19:32:44 2012	(r232568)
@@ -38,8 +38,8 @@ static const char rcsid[] =
 #endif
 
 
-static void		child_process __P((entry *, user *)),
-			do_univ __P((user *));
+static void		child_process(entry *, user *),
+			do_univ(user *);
 
 
 void
@@ -147,7 +147,7 @@ child_process(e, u)
 #ifdef USE_SIGCHLD
 	/* our parent is watching for our death by catching SIGCHLD.  we
 	 * do not care to watch for our children's deaths this way -- we
-	 * use wait() explictly.  so we have to disable the signal (which
+	 * use wait() explicitly.  so we have to disable the signal (which
 	 * was inherited from the parent).
 	 */
 	(void) signal(SIGCHLD, SIG_DFL);

Modified: stable/7/usr.sbin/cron/cron/externs.h
==============================================================================
--- stable/7/usr.sbin/cron/cron/externs.h	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/cron/externs.h	Mon Mar  5 19:32:44 2012	(r232568)
@@ -1,3 +1,5 @@
+/*	$FreeBSD$	*/
+
 /* Copyright 1993,1994 by Paul Vixie
  * All rights reserved
  *
@@ -71,7 +73,7 @@ extern	void		*malloc(), *realloc();
  * external variables needed for the interface.
  */
 #if (!defined(BSD) || (BSD < 198911)) && !defined(ATT) && !defined(UNICOS)
-int	getopt __P((int, char * const *, const char *));
+int	getopt(int, char * const *, const char *);
 #endif
 
 #if (!defined(BSD) || (BSD < 199103))
@@ -109,19 +111,19 @@ extern	int optind, opterr, optopt;
 #endif
 
 #ifdef NEED_STRCASECMP
-extern	int		strcasecmp __P((char *, char *));
+extern	int		strcasecmp(char *, char *);
 #endif
 
 #ifdef NEED_STRDUP
-extern	char		*strdup __P((char *));
+extern	char		*strdup(char *);
 #endif
 
 #ifdef NEED_STRERROR
-extern	char		*strerror __P((int));
+extern	char		*strerror(int);
 #endif
 
 #ifdef NEED_FLOCK
-extern	int		flock __P((int, int));
+extern	int		flock(int, int);
 # define LOCK_SH 1
 # define LOCK_EX 2
 # define LOCK_NB 4
@@ -129,17 +131,17 @@ extern	int		flock __P((int, int));
 #endif
 
 #ifdef NEED_SETSID
-extern	int		setsid __P((void));
+extern	int		setsid(void);
 #endif
 
 #ifdef NEED_GETDTABLESIZE
-extern	int		getdtablesize __P((void));
+extern	int		getdtablesize(void);
 #endif
 
 #ifdef NEED_SETENV
-extern	int		setenv __P((char *, char *, int));
+extern	int		setenv(char *, char *, int);
 #endif
 
 #ifdef NEED_VFORK
-extern	PID_T		vfork __P((void));
+extern	PID_T		vfork(void);
 #endif

Modified: stable/7/usr.sbin/cron/crontab/Makefile
==============================================================================
--- stable/7/usr.sbin/cron/crontab/Makefile	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/crontab/Makefile	Mon Mar  5 19:32:44 2012	(r232568)
@@ -8,6 +8,8 @@ BINOWN=	root
 BINMODE=4555
 PRECIOUSPROG=
 
+WARNS?=	3
+
 CFLAGS+= -I${.CURDIR}/../cron
 
 DPADD=	${LIBCRON} ${LIBMD} ${LIBUTIL}

Modified: stable/7/usr.sbin/cron/crontab/crontab.5
==============================================================================
--- stable/7/usr.sbin/cron/crontab/crontab.5	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/crontab/crontab.5	Mon Mar  5 19:32:44 2012	(r232568)
@@ -118,7 +118,7 @@ is defined (and non-empty), mail is
 sent to the user so named.
 .Ev MAILTO
 may also be used to direct mail to multiple recipients
-by seperating recipient users with a comma.
+by separating recipient users with a comma.
 If
 .Ev MAILTO
 is defined but empty (MAILTO=""), no

Modified: stable/7/usr.sbin/cron/crontab/crontab.c
==============================================================================
--- stable/7/usr.sbin/cron/crontab/crontab.c	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/crontab/crontab.c	Mon Mar  5 19:32:44 2012	(r232568)
@@ -63,18 +63,17 @@ static	FILE		*NewCrontab;
 static	int		CheckErrorCount;
 static	enum opt_t	Option;
 static	struct passwd	*pw;
-static	void		list_cmd __P((void)),
-			delete_cmd __P((void)),
-			edit_cmd __P((void)),
-			poke_daemon __P((void)),
-			check_error __P((char *)),
-			parse_args __P((int c, char *v[]));
-static	int		replace_cmd __P((void));
+static	void		list_cmd(void),
+			delete_cmd(void),
+			edit_cmd(void),
+			poke_daemon(void),
+			check_error(char *),
+			parse_args(int c, char *v[]);
+static	int		replace_cmd(void);
 
 
 static void
-usage(msg)
-	char *msg;
+usage(char *msg)
 {
 	fprintf(stderr, "crontab: usage error: %s\n", msg);
 	fprintf(stderr, "%s\n%s\n",
@@ -85,9 +84,7 @@ usage(msg)
 
 
 int
-main(argc, argv)
-	int	argc;
-	char	*argv[];
+main(int argc, char *argv[])
 {
 	int	exitstatus;
 
@@ -138,6 +135,7 @@ parse_args(argc, argv)
 
 	if (!(pw = getpwuid(getuid())))
 		errx(ERROR_EXIT, "your UID isn't in the passwd file, bailing out");
+	bzero(pw->pw_passwd, strlen(pw->pw_passwd));
 	(void) strncpy(User, pw->pw_name, (sizeof User)-1);
 	User[(sizeof User)-1] = '\0';
 	strcpy(RealUser, User);
@@ -154,6 +152,7 @@ parse_args(argc, argv)
 				errx(ERROR_EXIT, "must be privileged to use -u");
 			if (!(pw = getpwnam(optarg)))
 				errx(ERROR_EXIT, "user `%s' unknown", optarg);
+			bzero(pw->pw_passwd, strlen(pw->pw_passwd));
 			(void) strncpy(User, pw->pw_name, (sizeof User)-1);
 			User[(sizeof User)-1] = '\0';
 			break;
@@ -195,6 +194,17 @@ parse_args(argc, argv)
 	}
 
 	if (Option == opt_replace) {
+		/* relinquish the setuid status of the binary during
+		 * the open, lest nonroot users read files they should
+		 * not be able to read.  we can't use access() here
+		 * since there's a race condition.  thanks go out to
+		 * Arnt Gulbrandsen <agulbra@pvv.unit.no> for spotting
+		 * the race.
+		 */
+
+		if (swap_uids() < OK)
+			err(ERROR_EXIT, "swapping uids");
+
 		/* we have to open the file here because we're going to
 		 * chdir(2) into /var/cron before we get around to
 		 * reading the file.
@@ -205,21 +215,11 @@ parse_args(argc, argv)
 		    !strcmp(resolved_path, SYSCRONTAB)) {
 			err(ERROR_EXIT, SYSCRONTAB " must be edited manually");
 		} else {
-			/* relinquish the setuid status of the binary during
-			 * the open, lest nonroot users read files they should
-			 * not be able to read.  we can't use access() here
-			 * since there's a race condition.  thanks go out to
-			 * Arnt Gulbrandsen <agulbra@pvv.unit.no> for spotting
-			 * the race.
-			 */
-
-			if (swap_uids() < OK)
-				err(ERROR_EXIT, "swapping uids");
 			if (!(NewCrontab = fopen(Filename, "r")))
 				err(ERROR_EXIT, "%s", Filename);
-			if (swap_uids() < OK)
-				err(ERROR_EXIT, "swapping uids back");
 		}
+		if (swap_uids_back() < OK)
+			err(ERROR_EXIT, "swapping uids back");
 	}
 
 	Debug(DMISC, ("user=%s, file=%s, option=%s\n",
@@ -261,7 +261,7 @@ list_cmd() {
 	FILE	*f;
 
 	log_it(RealUser, Pid, "LIST", User);
-	(void) sprintf(n, CRON_TAB(User));
+	(void) snprintf(n, sizeof(n), CRON_TAB(User));
 	if (!(f = fopen(n, "r"))) {
 		if (errno == ENOENT)
 			errx(ERROR_EXIT, "no crontab for %s", User);
@@ -291,7 +291,7 @@ delete_cmd() {
 	}
 
 	log_it(RealUser, Pid, "DELETE", User);
-	(void) sprintf(n, CRON_TAB(User));
+	(void) snprintf(n, sizeof(n), CRON_TAB(User));
 	if (unlink(n)) {
 		if (errno == ENOENT)
 			errx(ERROR_EXIT, "no crontab for %s", User);
@@ -325,7 +325,7 @@ edit_cmd() {
 	char		new_md5[MD5_SIZE];
 
 	log_it(RealUser, Pid, "BEGIN EDIT", User);
-	(void) sprintf(n, CRON_TAB(User));
+	(void) snprintf(n, sizeof(n), CRON_TAB(User));
 	if (!(f = fopen(n, "r"))) {
 		if (errno != ENOENT)
 			err(ERROR_EXIT, "%s", n);
@@ -335,7 +335,7 @@ edit_cmd() {
 	}
 
 	um = umask(077);
-	(void) sprintf(Filename, "/tmp/crontab.XXXXXXXXXX");
+	(void) snprintf(Filename, sizeof(Filename), "/tmp/crontab.XXXXXXXXXX");
 	if ((t = mkstemp(Filename)) == -1) {
 		warn("%s", Filename);
 		(void) umask(um);
@@ -364,11 +364,15 @@ edit_cmd() {
 		goto fatal;
 	}
  again:
+	if (swap_uids() < OK)
+		err(ERROR_EXIT, "swapping uids");
 	if (stat(Filename, &statbuf) < 0) {
 		warn("stat");
  fatal:		unlink(Filename);
 		exit(ERROR_EXIT);
 	}
+	if (swap_uids_back() < OK)
+		err(ERROR_EXIT, "swapping uids back");
 	if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino)
 		errx(ERROR_EXIT, "temp file must be edited in place");
 	if (MD5File(Filename, orig_md5) == NULL) {
@@ -412,14 +416,14 @@ edit_cmd() {
 
 	/* parent */
 	{
-	void (*f[4])();
-	f[0] = signal(SIGHUP, SIG_IGN);
-	f[1] = signal(SIGINT, SIG_IGN);
-	f[2] = signal(SIGTERM, SIG_IGN);
+	void (*sig[3])(int signal);
+	sig[0] = signal(SIGHUP, SIG_IGN);
+	sig[1] = signal(SIGINT, SIG_IGN);
+	sig[2] = signal(SIGTERM, SIG_IGN);
 	xpid = wait(&waiter);
-	signal(SIGHUP, f[0]);
-	signal(SIGINT, f[1]);
-	signal(SIGTERM, f[2]);
+	signal(SIGHUP, sig[0]);
+	signal(SIGINT, sig[1]);
+	signal(SIGTERM, sig[2]);
 	}
 	if (xpid != pid) {
 		warnx("wrong PID (%d != %d) from \"%s\"", xpid, pid, editor);
@@ -434,6 +438,8 @@ edit_cmd() {
 			editor, WTERMSIG(waiter), WCOREDUMP(waiter) ?"" :"no ");
 		goto fatal;
 	}
+	if (swap_uids() < OK)
+		err(ERROR_EXIT, "swapping uids");
 	if (stat(Filename, &statbuf) < 0) {
 		warn("stat");
 		goto fatal;
@@ -444,6 +450,8 @@ edit_cmd() {
 		warn("MD5");
 		goto fatal;
 	}
+	if (swap_uids_back() < OK)
+		err(ERROR_EXIT, "swapping uids back");
 	if (strcmp(orig_md5, new_md5) == 0 && !syntax_error) {
 		warnx("no changes made to crontab");
 		goto remove;
@@ -502,8 +510,9 @@ replace_cmd() {
 		return (-2);
 	}
 
-	(void) sprintf(n, "tmp.%d", Pid);
-	(void) sprintf(tn, CRON_TAB(n));
+	(void) snprintf(n, sizeof(n), "tmp.%d", Pid);
+	(void) snprintf(tn, sizeof(tn), CRON_TAB(n));
+
 	if (!(tmp = fopen(tn, "w+"))) {
 		warn("%s", tn);
 		return (-2);
@@ -590,12 +599,13 @@ replace_cmd() {
 		return (-2);
 	}
 
-	(void) sprintf(n, CRON_TAB(User));
+	(void) snprintf(n, sizeof(n), CRON_TAB(User));
 	if (rename(tn, n)) {
 		warn("error renaming %s to %s", tn, n);
 		unlink(tn);
 		return (-2);
 	}
+
 	log_it(RealUser, Pid, "REPLACE", User);
 
 	poke_daemon();

Modified: stable/7/usr.sbin/cron/doc/CHANGES
==============================================================================
--- stable/7/usr.sbin/cron/doc/CHANGES	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/doc/CHANGES	Mon Mar  5 19:32:44 2012	(r232568)
@@ -1,3 +1,6 @@
+$FreeBSD$
+--------
+
 Vixie Cron		Changes from V2 to V3
 Paul Vixie
 29-Dec-1993
@@ -20,7 +23,7 @@ be reread whenever it changes.
 
 I also added a "-e" option to crontab(1).  Nine people also sent me diffs
 to add this option, but I had already implemented it on my own.  I actually
-released an interrim version (V2.2, I think) for limited testing, and got a
+released an interim version (V2.2, I think) for limited testing, and got a
 chance to fix a bad security bug in the "-e" option thanks to XXX.
 
 The daemon used to be extraordinarily sloppy in its use of file descriptors.
@@ -57,7 +60,7 @@ which explains why a lot of other people
 syslog even when they configured it that way :-).  Steve Simmons told me
 first, though, so he gets the point.
 
-An interrim version of the daemon tried to "stat" every file before
+An interim version of the daemon tried to "stat" every file before
 executing it; this turned out to be a horribly bad idea since finding the
 name of a file from a shell command is a hard job (that's why we have
 shells, right?)  I removed this bogus code.  Dave Burgess gets the point.

Modified: stable/7/usr.sbin/cron/doc/MAIL
==============================================================================
--- stable/7/usr.sbin/cron/doc/MAIL	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/doc/MAIL	Mon Mar  5 19:32:44 2012	(r232568)
@@ -186,7 +186,7 @@ five fields.  Examples:
 
 (run command if day-of-month AND day-of-week are true)
 
-Get the picture?  This would be compatable with existing versions of
+Get the picture?  This would be compatible with existing versions of
 cron (which wouldn't currently be using any special characters, so
 that old crontabs would be handled correctly).
 

Modified: stable/7/usr.sbin/cron/lib/Makefile
==============================================================================
--- stable/7/usr.sbin/cron/lib/Makefile	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/lib/Makefile	Mon Mar  5 19:32:44 2012	(r232568)
@@ -4,6 +4,8 @@ LIB=	cron
 INTERNALLIB=
 SRCS= entry.c env.c misc.c
 
+WARNS?=	3
+
 CFLAGS+= -I${.CURDIR}/../cron
 CFLAGS+= -DLOGIN_CAP -DPAM
 

Modified: stable/7/usr.sbin/cron/lib/entry.c
==============================================================================
--- stable/7/usr.sbin/cron/lib/entry.c	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/lib/entry.c	Mon Mar  5 19:32:44 2012	(r232568)
@@ -41,10 +41,10 @@ typedef	enum ecode {
 #endif
 } ecode_e;
 
-static char	get_list __P((bitstr_t *, int, int, char *[], int, FILE *)),
-		get_range __P((bitstr_t *, int, int, char *[], int, FILE *)),
-		get_number __P((int *, int, char *[], int, FILE *));
-static int	set_element __P((bitstr_t *, int, int, int));
+static char	get_list(bitstr_t *, int, int, char *[], int, FILE *),
+		get_range(bitstr_t *, int, int, char *[], int, FILE *),
+		get_number(int *, int, char *[], int, FILE *);
+static int	set_element(bitstr_t *, int, int, int);
 
 static char *ecodes[] =
 	{
@@ -87,7 +87,7 @@ free_entry(e)
 entry *
 load_entry(file, error_func, pw, envp)
 	FILE		*file;
-	void		(*error_func)();
+	void		(*error_func)(char *);
 	struct passwd	*pw;
 	char		**envp;
 {
@@ -254,7 +254,7 @@ load_entry(file, error_func, pw, envp)
 		}
 	}
 
-	/* make sundays equivilent */
+	/* make sundays equivalent */
 	if (bit_test(e->dow, 0) || bit_test(e->dow, 7)) {
 		bit_set(e->dow, 0);
 		bit_set(e->dow, 7);

Modified: stable/7/usr.sbin/cron/lib/misc.c
==============================================================================
--- stable/7/usr.sbin/cron/lib/misc.c	Mon Mar  5 19:13:19 2012	(r232567)
+++ stable/7/usr.sbin/cron/lib/misc.c	Mon Mar  5 19:32:44 2012	(r232568)
@@ -324,9 +324,7 @@ skip_comments(file)
  *	FALSE otherwise.
  */
 static int
-in_file(string, file)
-	char *string;
-	FILE *file;
+in_file(char *string, FILE *file)
 {
 	char line[MAX_TEMPSTR];
 
@@ -520,11 +518,8 @@ first_word(s, t)
 /* warning:
  *	heavily ascii-dependent.
  */
-void
-mkprint(dst, src, len)
-	register char *dst;
-	register unsigned char *src;
-	register int len;
+static void
+mkprint(register char *dst, register unsigned char *src, register int len)
 {
 	while (len-- > 0)
 	{

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 10:20:16 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1837D1065673;
	Tue,  6 Mar 2012 10:20:16 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ECB248FC0C;
	Tue,  6 Mar 2012 10:20:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AKFqb031412;
	Tue, 6 Mar 2012 10:20:15 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AKFR0031408;
	Tue, 6 Mar 2012 10:20:15 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203061020.q26AKFR0031408@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Tue, 6 Mar 2012 10:20:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232593 - in stable/8/share/man: man7 man8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 10:20:16 -0000

Author: remko
Date: Tue Mar  6 10:20:15 2012
New Revision: 232593
URL: http://svn.freebsd.org/changeset/base/232593

Log:
  Merge r218998
  
  Move the sticky manual from section 8 to section
  7 like NetBSD has, since this is not a command
  on itself.
  
  PR: 124468

Added:
  stable/8/share/man/man7/sticky.7
     - copied unchanged from r218998, head/share/man/man7/sticky.7
Deleted:
  stable/8/share/man/man8/sticky.8
Modified:
  stable/8/share/man/man7/Makefile
  stable/8/share/man/man8/Makefile
Directory Properties:
  stable/8/share/man/   (props changed)
  stable/8/share/man/man7/   (props changed)
  stable/8/share/man/man8/   (props changed)

Modified: stable/8/share/man/man7/Makefile
==============================================================================
--- stable/8/share/man/man7/Makefile	Tue Mar  6 09:57:50 2012	(r232592)
+++ stable/8/share/man/man7/Makefile	Tue Mar  6 10:20:15 2012	(r232593)
@@ -23,6 +23,7 @@ MAN=	adding_user.7 \
 	security.7 \
 	sprog.7 \
 	stdint.7 \
+	sticky.7 \
 	tuning.7
 
 MLINKS=	intro.7 miscellaneous.7

Copied: stable/8/share/man/man7/sticky.7 (from r218998, head/share/man/man7/sticky.7)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/share/man/man7/sticky.7	Tue Mar  6 10:20:15 2012	(r232593, copy of r218998, head/share/man/man7/sticky.7)
@@ -0,0 +1,82 @@
+.\" Copyright (c) 1980, 1991, 1993
+.\"	The Regents of the University of California.  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.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"	This product includes software developed by the University of
+.\"	California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"     @(#)sticky.8	8.1 (Berkeley) 6/5/93
+.\" $FreeBSD$
+.\"
+.Dd June 5, 1993
+.Dt STICKY 7
+.Os
+.Sh NAME
+.Nm sticky
+.Nd sticky text and append-only directories
+.Sh DESCRIPTION
+A special file mode, called the
+.Em sticky bit
+(mode S_ISTXT),
+is used to indicate special treatment
+for directories.
+It is ignored for regular files.
+See
+.Xr chmod 2
+or
+the file
+.In sys/stat.h
+for an explanation of file modes.
+.Sh STICKY DIRECTORIES
+A directory whose `sticky bit' is set
+becomes an append-only directory, or, more accurately,
+a directory in which the deletion of files is restricted.
+A file in a sticky directory may only be removed or renamed
+by a user if the user has write permission for the directory and
+the user is the owner of the file, the owner of the directory,
+or the super-user.
+This feature is usefully applied to directories such as
+.Pa /tmp
+which must be publicly writable but
+should deny users the license to arbitrarily
+delete or rename each others' files.
+.Pp
+Any user may create a sticky directory.
+See
+.Xr chmod 1
+for details about modifying file modes.
+.Sh HISTORY
+A
+.Nm
+command appeared in
+.At 32v .
+.Sh BUGS
+Neither
+.Xr open 2
+nor
+.Xr mkdir 2
+will create a file with the sticky bit set.

Modified: stable/8/share/man/man8/Makefile
==============================================================================
--- stable/8/share/man/man8/Makefile	Tue Mar  6 09:57:50 2012	(r232592)
+++ stable/8/share/man/man8/Makefile	Tue Mar  6 10:20:15 2012	(r232593)
@@ -10,7 +10,6 @@ MAN=	crash.8 \
 	rc.sendmail.8 \
 	rc.subr.8 \
 	rescue.8 \
-	sticky.8 \
 	yp.8
 
 MLINKS=	rc.8 rc.atm.8 \

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 10:24:32 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1537B106564A;
	Tue,  6 Mar 2012 10:24:32 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F39BC8FC12;
	Tue,  6 Mar 2012 10:24:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AOVUD031599;
	Tue, 6 Mar 2012 10:24:31 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AOV8g031596;
	Tue, 6 Mar 2012 10:24:31 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203061024.q26AOV8g031596@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Tue, 6 Mar 2012 10:24:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232594 - in stable/8/sys/dev/usb: . wlan
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 10:24:32 -0000

Author: remko
Date: Tue Mar  6 10:24:31 2012
New Revision: 232594
URL: http://svn.freebsd.org/changeset/base/232594

Log:
  MFC r230333
  
  Add support for new if_run(4) Logitech device.
  
  Original commit message:
    Add support for new USB device.
  
    PR: usb/164275
    MFC after: 3 days
  
  PR: usb/164275

Modified:
  stable/8/sys/dev/usb/usbdevs
  stable/8/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/usb/usbdevs
==============================================================================
--- stable/8/sys/dev/usb/usbdevs	Tue Mar  6 10:20:15 2012	(r232593)
+++ stable/8/sys/dev/usb/usbdevs	Tue Mar  6 10:24:31 2012	(r232594)
@@ -2084,7 +2084,6 @@ product LINKSYS4 RT3070		0x0078	RT3070
 product LINKSYS4 WUSB600NV2	0x0079	WUSB600N v2
 
 /* Logitech products */
-product LOGITECH LANW300NU2	0x0166  LAN-W300N/U2
 product LOGITECH M2452		0x0203	M2452 keyboard
 product LOGITECH M4848		0x0301	M4848 mouse
 product LOGITECH PAGESCAN	0x040f	PageScan
@@ -2116,6 +2115,7 @@ product LOGITEC LAN_GTJU2A	0x0160	LAN-GT
 product LOGITEC RT2870_1	0x0162	RT2870
 product LOGITEC RT2870_2	0x0163	RT2870
 product LOGITEC RT2870_3	0x0164	RT2870
+product LOGITEC LANW300NU2	0x0166  LAN-W300N/U2
 
 /* Longcheer Holdings, Ltd. products */
 product LONGCHEER WM66		0x6061	Longcheer WM66 HSDPA

Modified: stable/8/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/8/sys/dev/usb/wlan/if_run.c	Tue Mar  6 10:20:15 2012	(r232593)
+++ stable/8/sys/dev/usb/wlan/if_run.c	Tue Mar  6 10:24:31 2012	(r232594)
@@ -208,7 +208,7 @@ static const STRUCT_USB_HOST_ID run_devs
     RUN_DEV(LOGITEC,		RT2870_1),
     RUN_DEV(LOGITEC,		RT2870_2),
     RUN_DEV(LOGITEC,		RT2870_3),
-    RUN_DEV(LOGITECH,		LANW300NU2),
+    RUN_DEV(LOGITEC,		LANW300NU2),
     RUN_DEV(MELCO,		RT2870_1),
     RUN_DEV(MELCO,		RT2870_2),
     RUN_DEV(MELCO,		WLIUCAG300N),

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 10:26:10 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6E513106566B;
	Tue,  6 Mar 2012 10:26:10 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 582458FC1A;
	Tue,  6 Mar 2012 10:26:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AQAgX031710;
	Tue, 6 Mar 2012 10:26:10 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AQAIG031707;
	Tue, 6 Mar 2012 10:26:10 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203061026.q26AQAIG031707@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Tue, 6 Mar 2012 10:26:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232595 - in stable/9/sys/dev/usb: . wlan
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 10:26:10 -0000

Author: remko
Date: Tue Mar  6 10:26:10 2012
New Revision: 232595
URL: http://svn.freebsd.org/changeset/base/232595

Log:
  MFC r230333
  
  Add new Logitech device to if_run(4).
  
  Original commit message:
    Add support for new USB device.
  
    PR: usb/164275
    MFC after: 3 days
  
  PR: usb/164275

Modified:
  stable/9/sys/dev/usb/usbdevs
  stable/9/sys/dev/usb/wlan/if_run.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/usb/usbdevs
==============================================================================
--- stable/9/sys/dev/usb/usbdevs	Tue Mar  6 10:24:31 2012	(r232594)
+++ stable/9/sys/dev/usb/usbdevs	Tue Mar  6 10:26:10 2012	(r232595)
@@ -2088,7 +2088,6 @@ product LINKSYS4 RT3070		0x0078	RT3070
 product LINKSYS4 WUSB600NV2	0x0079	WUSB600N v2
 
 /* Logitech products */
-product LOGITECH LANW300NU2	0x0166  LAN-W300N/U2
 product LOGITECH M2452		0x0203	M2452 keyboard
 product LOGITECH M4848		0x0301	M4848 mouse
 product LOGITECH PAGESCAN	0x040f	PageScan
@@ -2120,6 +2119,7 @@ product LOGITEC LAN_GTJU2A	0x0160	LAN-GT
 product LOGITEC RT2870_1	0x0162	RT2870
 product LOGITEC RT2870_2	0x0163	RT2870
 product LOGITEC RT2870_3	0x0164	RT2870
+product LOGITEC LANW300NU2	0x0166  LAN-W300N/U2
 
 /* Longcheer Holdings, Ltd. products */
 product LONGCHEER WM66		0x6061	Longcheer WM66 HSDPA

Modified: stable/9/sys/dev/usb/wlan/if_run.c
==============================================================================
--- stable/9/sys/dev/usb/wlan/if_run.c	Tue Mar  6 10:24:31 2012	(r232594)
+++ stable/9/sys/dev/usb/wlan/if_run.c	Tue Mar  6 10:26:10 2012	(r232595)
@@ -208,7 +208,7 @@ static const STRUCT_USB_HOST_ID run_devs
     RUN_DEV(LOGITEC,		RT2870_1),
     RUN_DEV(LOGITEC,		RT2870_2),
     RUN_DEV(LOGITEC,		RT2870_3),
-    RUN_DEV(LOGITECH,		LANW300NU2),
+    RUN_DEV(LOGITEC,		LANW300NU2),
     RUN_DEV(MELCO,		RT2870_1),
     RUN_DEV(MELCO,		RT2870_2),
     RUN_DEV(MELCO,		WLIUCAG300N),

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 10:45:23 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C9D251065672;
	Tue,  6 Mar 2012 10:45:23 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B4F378FC19;
	Tue,  6 Mar 2012 10:45:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AjNDF035828;
	Tue, 6 Mar 2012 10:45:23 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AjN5o035826;
	Tue, 6 Mar 2012 10:45:23 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203061045.q26AjN5o035826@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Tue, 6 Mar 2012 10:45:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232596 - stable/8/sys/vm
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 10:45:23 -0000

Author: kib
Date: Tue Mar  6 10:45:23 2012
New Revision: 232596
URL: http://svn.freebsd.org/changeset/base/232596

Log:
  MFC r232002:
  Remove wrong comment.

Modified:
  stable/8/sys/vm/vnode_pager.h
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/vm/vnode_pager.h
==============================================================================
--- stable/8/sys/vm/vnode_pager.h	Tue Mar  6 10:26:10 2012	(r232595)
+++ stable/8/sys/vm/vnode_pager.h	Tue Mar  6 10:45:23 2012	(r232596)
@@ -40,10 +40,6 @@
 
 #ifdef _KERNEL
 
-/*
- * XXX Generic routines; currently called by badly written FS code; these
- * XXX should go away soon.
- */
 int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m,
 					  int count, int reqpage);
 int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m,

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 10:51:53 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C2608106566C;
	Tue,  6 Mar 2012 10:51:53 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AC7D88FC13;
	Tue,  6 Mar 2012 10:51:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26Apr8x036074;
	Tue, 6 Mar 2012 10:51:53 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AprFh036072;
	Tue, 6 Mar 2012 10:51:53 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203061051.q26AprFh036072@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Tue, 6 Mar 2012 10:51:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232597 - stable/8/sys/i386/linux
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 10:51:53 -0000

Author: kib
Date: Tue Mar  6 10:51:53 2012
New Revision: 232597
URL: http://svn.freebsd.org/changeset/base/232597

Log:
  MFC r232143:
  Do not write to the user address directly, use suword().

Modified:
  stable/8/sys/i386/linux/linux_sysvec.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/i386/linux/linux_sysvec.c
==============================================================================
--- stable/8/sys/i386/linux/linux_sysvec.c	Tue Mar  6 10:45:23 2012	(r232596)
+++ stable/8/sys/i386/linux/linux_sysvec.c	Tue Mar  6 10:51:53 2012	(r232597)
@@ -225,11 +225,11 @@ linux_fixup(register_t **stack_base, str
 	argv = *stack_base;
 	envp = *stack_base + (imgp->args->argc + 1);
 	(*stack_base)--;
-	**stack_base = (intptr_t)(void *)envp;
+	suword(*stack_base, (intptr_t)(void *)envp);
 	(*stack_base)--;
-	**stack_base = (intptr_t)(void *)argv;
+	suword(*stack_base, (intptr_t)(void *)argv);
 	(*stack_base)--;
-	**stack_base = imgp->args->argc;
+	suword(*stack_base, imgp->args->argc);
 	return (0);
 }
 
@@ -285,7 +285,7 @@ elf_linux_fixup(register_t **stack_base,
 	imgp->auxargs = NULL;
 
 	(*stack_base)--;
-	**stack_base = (register_t)imgp->args->argc;
+	suword(*stack_base, (register_t)imgp->args->argc);
 	return (0);
 }
 

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 11:16:14 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B07991065673;
	Tue,  6 Mar 2012 11:16:14 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9AF9F8FC21;
	Tue,  6 Mar 2012 11:16:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26BGE98037001;
	Tue, 6 Mar 2012 11:16:14 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26BGE8n036999;
	Tue, 6 Mar 2012 11:16:14 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203061116.q26BGE8n036999@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Tue, 6 Mar 2012 11:16:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232599 - stable/8/contrib/top
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 11:16:14 -0000

Author: kib
Date: Tue Mar  6 11:16:14 2012
New Revision: 232599
URL: http://svn.freebsd.org/changeset/base/232599

Log:
  MFC r232239:
  Fix a race in top non-interactive mode.  Use plain sleep(3) call instead
  of arming timer and then pausing.  If SIGALRM is delivered before pause(3)
  is entered, top hangs.

Modified:
  stable/8/contrib/top/top.c
Directory Properties:
  stable/8/contrib/top/   (props changed)

Modified: stable/8/contrib/top/top.c
==============================================================================
--- stable/8/contrib/top/top.c	Tue Mar  6 11:05:50 2012	(r232598)
+++ stable/8/contrib/top/top.c	Tue Mar  6 11:16:14 2012	(r232599)
@@ -70,7 +70,6 @@ int pcpu_stats = No;
 
 /* signal handling routines */
 sigret_t leave();
-sigret_t onalrm();
 sigret_t tstop();
 #ifdef SIGWINCH
 sigret_t winch();
@@ -723,12 +722,7 @@ restart:
 	    no_command = Yes;
 	    if (!interactive)
 	    {
-		/* set up alarm */
-		(void) signal(SIGALRM, onalrm);
-		(void) alarm((unsigned)delay);
-    
-		/* wait for the rest of it .... */
-		pause();
+		sleep(delay);
 	    }
 	    else while (no_command)
 	    {
@@ -1174,11 +1168,3 @@ int status;
     exit(status);
     /*NOTREACHED*/
 }
-
-sigret_t onalrm()	/* SIGALRM handler */
-
-{
-    /* this is only used in batch mode to break out of the pause() */
-    /* return; */
-}
-

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 12:54:14 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 20BCA106567B;
	Tue,  6 Mar 2012 12:54:14 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E9F008FC13;
	Tue,  6 Mar 2012 12:54:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26CsDCo040949;
	Tue, 6 Mar 2012 12:54:13 GMT (envelope-from nyan@svn.freebsd.org)
Received: (from nyan@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26CsDC1040946;
	Tue, 6 Mar 2012 12:54:13 GMT (envelope-from nyan@svn.freebsd.org)
Message-Id: <201203061254.q26CsDC1040946@svn.freebsd.org>
From: Takahashi Yoshihiro <nyan@FreeBSD.org>
Date: Tue, 6 Mar 2012 12:54:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232602 - stable/9/sys/boot/pc98/loader
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 12:54:14 -0000

Author: nyan
Date: Tue Mar  6 12:54:13 2012
New Revision: 232602
URL: http://svn.freebsd.org/changeset/base/232602

Log:
  MFC: r231387
  
    Reduce diffs against i386.

Modified:
  stable/9/sys/boot/pc98/loader/Makefile
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/boot/   (props changed)

Modified: stable/9/sys/boot/pc98/loader/Makefile
==============================================================================
--- stable/9/sys/boot/pc98/loader/Makefile	Tue Mar  6 12:53:44 2012	(r232601)
+++ stable/9/sys/boot/pc98/loader/Makefile	Tue Mar  6 12:54:13 2012	(r232602)
@@ -3,7 +3,8 @@
 .include <bsd.own.mk>
 MK_SSP=		no
 
-PROG=		loader.sym
+LOADER?=	loader
+PROG=		${LOADER}.sym
 INTERNALPROG=
 NEWVERSWHAT=	"bootstrap loader" pc98
 
@@ -39,14 +40,14 @@ CFLAGS+=	-DLOADER_BZIP2_SUPPORT
 CFLAGS+=	-DLOADER_GZIP_SUPPORT
 .endif
 
-# Always add MI sources 
+# Always add MI sources
 .PATH:		${.CURDIR}/../../common
 .include	"${.CURDIR}/../../common/Makefile.inc"
 CFLAGS+=	-I${.CURDIR}/../../common
 CFLAGS+=	-I${.CURDIR}/../../i386
 CFLAGS+=	-I.
 
-CLEANFILES=	vers.c loader loader.bin loader.help
+CLEANFILES=	vers.c ${LOADER} ${LOADER}.bin loader.help
 
 CFLAGS+=	-Wall
 LDFLAGS=	-static -Ttext 0x0
@@ -68,36 +69,37 @@ CFLAGS+=	-I${.CURDIR}/../btx/lib
 vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version
 	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT}
 
-loader: loader.bin ${BTXLDR} ${BTXKERN}
+${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
 	btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-		-b ${BTXKERN} loader.bin
+		-b ${BTXKERN} ${LOADER}.bin
 
-loader.bin: loader.sym
+${LOADER}.bin: ${LOADER}.sym
 	cp ${.ALLSRC} ${.TARGET}
 	strip -R .comment -R .note ${.TARGET}
 
 loader.help: help.common help.pc98
 	cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
 
-.PATH: ${.CURDIR}/../../forth 
-FILES=	loader loader.help loader.4th support.4th loader.conf
+FILES=	${LOADER}
+# XXX INSTALLFLAGS_loader= -b
+FILESMODE_${LOADER}= ${BINMODE} -b
+
+.PATH: ${.CURDIR}/../../forth
+FILES+=	loader.help loader.4th support.4th loader.conf
 FILES+= screen.4th frames.4th beastie.4th
 FILES+= brand.4th check-password.4th color.4th delay.4th
 FILES+= menu.4th menu-commands.4th shortcuts.4th version.4th
-# XXX INSTALLFLAGS_loader= -b
-FILESMODE_loader= ${BINMODE} -b
 FILESDIR_loader.conf=	/boot/defaults
 
 .if !exists(${DESTDIR}/boot/loader.rc)
 FILES+=	${.CURDIR}/../../i386/loader/loader.rc
 .endif
-
 .if !exists(${DESTDIR}/boot/menu.rc)
 FILES+= menu.rc
 .endif
 
 # XXX crt0.o needs to be first for pxeboot(8) to work
-OBJS=	${BTXCRT} 
+OBJS=	${BTXCRT}
 
 DPADD=	${LIBFICL} ${LIBPC98} ${LIBSTAND}
 LDADD=	${LIBFICL} ${LIBPC98} ${LIBSTAND}

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 12:58:19 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 883D8106566C;
	Tue,  6 Mar 2012 12:58:19 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5D6258FC0C;
	Tue,  6 Mar 2012 12:58:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26CwJmE041131;
	Tue, 6 Mar 2012 12:58:19 GMT (envelope-from nyan@svn.freebsd.org)
Received: (from nyan@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26CwJTn041129;
	Tue, 6 Mar 2012 12:58:19 GMT (envelope-from nyan@svn.freebsd.org)
Message-Id: <201203061258.q26CwJTn041129@svn.freebsd.org>
From: Takahashi Yoshihiro <nyan@FreeBSD.org>
Date: Tue, 6 Mar 2012 12:58:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232603 - stable/8/sys/boot/pc98/loader
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 12:58:19 -0000

Author: nyan
Date: Tue Mar  6 12:58:19 2012
New Revision: 232603
URL: http://svn.freebsd.org/changeset/base/232603

Log:
  MFC: r231387
  
    Reduce diffs against i386.

Modified:
  stable/8/sys/boot/pc98/loader/Makefile
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/boot/   (props changed)

Modified: stable/8/sys/boot/pc98/loader/Makefile
==============================================================================
--- stable/8/sys/boot/pc98/loader/Makefile	Tue Mar  6 12:54:13 2012	(r232602)
+++ stable/8/sys/boot/pc98/loader/Makefile	Tue Mar  6 12:58:19 2012	(r232603)
@@ -3,7 +3,8 @@
 .include <bsd.own.mk>
 MK_SSP=		no
 
-PROG=		loader.sym
+LOADER?=	loader
+PROG=		${LOADER}.sym
 INTERNALPROG=
 NEWVERSWHAT=	"bootstrap loader" pc98
 
@@ -39,14 +40,14 @@ CFLAGS+=	-DLOADER_BZIP2_SUPPORT
 CFLAGS+=	-DLOADER_GZIP_SUPPORT
 .endif
 
-# Always add MI sources 
+# Always add MI sources
 .PATH:		${.CURDIR}/../../common
 .include	"${.CURDIR}/../../common/Makefile.inc"
 CFLAGS+=	-I${.CURDIR}/../../common
 CFLAGS+=	-I${.CURDIR}/../../i386
 CFLAGS+=	-I.
 
-CLEANFILES=	vers.c loader loader.bin loader.help
+CLEANFILES=	vers.c ${LOADER} ${LOADER}.bin loader.help
 
 CFLAGS+=	-Wall
 LDFLAGS=	-static -Ttext 0x0
@@ -68,30 +69,31 @@ CFLAGS+=	-I${.CURDIR}/../btx/lib
 vers.c:	${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version
 	sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT}
 
-loader: loader.bin ${BTXLDR} ${BTXKERN}
+${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
 	btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
-		-b ${BTXKERN} loader.bin
+		-b ${BTXKERN} ${LOADER}.bin
 
-loader.bin: loader.sym
+${LOADER}.bin: ${LOADER}.sym
 	cp ${.ALLSRC} ${.TARGET}
 	strip -R .comment -R .note ${.TARGET}
 
 loader.help: help.common help.pc98
 	cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
 
-.PATH: ${.CURDIR}/../../forth 
-FILES=	loader loader.help loader.4th support.4th loader.conf
-FILES+= screen.4th frames.4th beastie.4th
+FILES=	${LOADER}
 # XXX INSTALLFLAGS_loader= -b
-FILESMODE_loader= ${BINMODE} -b
+FILESMODE_${LOADER}= ${BINMODE} -b
+
+.PATH: ${.CURDIR}/../../forth
+FILES+=	loader.help loader.4th support.4th loader.conf
+FILES+= screen.4th frames.4th beastie.4th
 FILESDIR_loader.conf=	/boot/defaults
 
 .if !exists(${DESTDIR}/boot/loader.rc)
 FILES+=	${.CURDIR}/../../i386/loader/loader.rc
 .endif
-
 # XXX crt0.o needs to be first for pxeboot(8) to work
-OBJS=	${BTXCRT} 
+OBJS=	${BTXCRT}
 
 DPADD=	${LIBFICL} ${LIBPC98} ${LIBSTAND}
 LDADD=	${LIBFICL} ${LIBPC98} -lstand

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 14:10:58 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 44FCC1065672;
	Tue,  6 Mar 2012 14:10:58 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 33F438FC16;
	Tue,  6 Mar 2012 14:10:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26EAwiX043588;
	Tue, 6 Mar 2012 14:10:58 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26EAvav043586;
	Tue, 6 Mar 2012 14:10:57 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203061410.q26EAvav043586@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Tue, 6 Mar 2012 14:10:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232606 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 14:10:58 -0000

Author: remko
Date: Tue Mar  6 14:10:57 2012
New Revision: 232606
URL: http://svn.freebsd.org/changeset/base/232606

Log:
  Merge r238821
  
  Add sticky.8 to the obsolete files since it had been
  moved to sticky.7
  
  Submitted by:	maxim and pluknet
  
  With help from:	dim (because of awkward merge conflicts)

Modified:
  stable/8/ObsoleteFiles.inc   (contents, props changed)
Directory Properties:
  stable/8/   (props changed)

Modified: stable/8/ObsoleteFiles.inc
==============================================================================
--- stable/8/ObsoleteFiles.inc	Tue Mar  6 13:57:28 2012	(r232605)
+++ stable/8/ObsoleteFiles.inc	Tue Mar  6 14:10:57 2012	(r232606)
@@ -19,6 +19,8 @@ OLD_FILES+=usr/share/man/man4/cc.4.gz
 OLD_FILES+=usr/share/man/man9/cc.9.gz
 # 20101123: removed subblock.h from liblzma
 OLD_FILES+=usr/include/lzma/subblock.h
+# 20110224: sticky.8 -> sticky.7
+OLD_FILES+=usr/share/man/man8/sticky.8.gz
 # 20101114: Remove long-obsolete MAKEDEV.8
 OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz
 # 20101112: vgonel(9) has gone to private API a while ago

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 14:13:24 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7EB081065670;
	Tue,  6 Mar 2012 14:13:24 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6DBE98FC12;
	Tue,  6 Mar 2012 14:13:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26EDOSt043747;
	Tue, 6 Mar 2012 14:13:24 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26EDOf9043745;
	Tue, 6 Mar 2012 14:13:24 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203061413.q26EDOf9043745@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Tue, 6 Mar 2012 14:13:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232607 - stable/7
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 14:13:24 -0000

Author: remko
Date: Tue Mar  6 14:13:23 2012
New Revision: 232607
URL: http://svn.freebsd.org/changeset/base/232607

Log:
  Merge r238821
  
  Add sticky.8 to the obsolete files since it had been
  moved to sticky.7
  
  Submitted by:	maxim and pluknet
  
  With help from:	dim (because of awkward merge conflicts)

Modified:
  stable/7/ObsoleteFiles.inc   (contents, props changed)
Directory Properties:
  stable/7/   (props changed)

Modified: stable/7/ObsoleteFiles.inc
==============================================================================
--- stable/7/ObsoleteFiles.inc	Tue Mar  6 14:10:57 2012	(r232606)
+++ stable/7/ObsoleteFiles.inc	Tue Mar  6 14:13:23 2012	(r232607)
@@ -14,6 +14,8 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20110224: sticky.8 -> sticky.7
+OLD_FILES+=usr/share/man/man8/sticky.8.gz
 # 20101114: Remove long-obsolete MAKEDEV.8
 OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz
 # 20101112: vgonel(9) has gone to private API a while ago

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 14:16:10 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 353ED106564A;
	Tue,  6 Mar 2012 14:16:10 +0000 (UTC)
	(envelope-from remko@elvandar.org)
Received: from mailout.jr-hosting.nl (mailout.jr-hosting.nl
	[IPv6:2a01:4f8:141:5ffd::1:25])
	by mx1.freebsd.org (Postfix) with ESMTP id C2B178FC14;
	Tue,  6 Mar 2012 14:16:09 +0000 (UTC)
Received: from mailgate.jr-hosting.nl (unknown [IPv6:2a01:4f8:141:5061::25])
	by mailout.jr-hosting.nl (Postfix) with ESMTP id D9E673902868;
	Tue,  6 Mar 2012 14:16:07 +0000 (UTC)
Received: from www.jr-hosting.nl (mail.jr-hosting.nl [78.47.69.234])
	by mailgate.jr-hosting.nl (Postfix) with ESMTPSA id 3B7463F44F;
	Tue,  6 Mar 2012 15:16:07 +0100 (CET)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 06 Mar 2012 15:16:06 +0100
From: Remko Lodder <remko@elvandar.org>
To: Remko Lodder <remko@freebsd.org>
In-Reply-To: <201203061413.q26EDOf9043745@svn.freebsd.org>
References: <201203061413.q26EDOf9043745@svn.freebsd.org>
Message-ID: <e8742b5900771f52aeed3800030da281@evilcoder.org>
X-Sender: remko@elvandar.org
User-Agent: Roundcube Webmail/0.7.1
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org,
	svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r232607 - stable/7
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 14:16:10 -0000

On 06.03.2012 15:13, Remko Lodder wrote:

The commit seems to mess up with the time schedule. Normally latest 
entries are on top, but the merge somehow
got a lot of conflicts and now it isn't on top. Anyone has a suggestion 
on how to properly fix this? (Same goes
for stable/8!)

Thanks
Remko

> Author: remko
> Date: Tue Mar  6 14:13:23 2012
> New Revision: 232607
> URL: http://svn.freebsd.org/changeset/base/232607
>
> Log:
>   Merge r238821
>
>   Add sticky.8 to the obsolete files since it had been
>   moved to sticky.7
>
>   Submitted by:	maxim and pluknet
>
>   With help from:	dim (because of awkward merge conflicts)
>
> Modified:
>   stable/7/ObsoleteFiles.inc   (contents, props changed)
> Directory Properties:
>   stable/7/   (props changed)
>
> Modified: stable/7/ObsoleteFiles.inc
> 
> ==============================================================================
> --- stable/7/ObsoleteFiles.inc	Tue Mar  6 14:10:57 2012	(r232606)
> +++ stable/7/ObsoleteFiles.inc	Tue Mar  6 14:13:23 2012	(r232607)
> @@ -14,6 +14,8 @@
>  # The file is partitioned: OLD_FILES first, then OLD_LIBS and 
> OLD_DIRS last.
>  #
>
> +# 20110224: sticky.8 -> sticky.7
> +OLD_FILES+=usr/share/man/man8/sticky.8.gz
>  # 20101114: Remove long-obsolete MAKEDEV.8
>  OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz
>  # 20101112: vgonel(9) has gone to private API a while ago

-- 

/"\   Best regards,                      | remko@FreeBSD.org
\ /   Remko Lodder                       | remko@EFnet
  X    http://www.evilcoder.org/          |
/ \   ASCII Ribbon Campaign              | Against HTML Mail and News

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 14:18:55 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 086A1106564A;
	Tue,  6 Mar 2012 14:18:55 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EB81A8FC15;
	Tue,  6 Mar 2012 14:18:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26EIsTe043964;
	Tue, 6 Mar 2012 14:18:54 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26EIsE6043962;
	Tue, 6 Mar 2012 14:18:54 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203061418.q26EIsE6043962@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Tue, 6 Mar 2012 14:18:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232608 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 14:18:55 -0000

Author: remko
Date: Tue Mar  6 14:18:54 2012
New Revision: 232608
URL: http://svn.freebsd.org/changeset/base/232608

Log:
  On second thought and look; this only goes for 8-stable
  where the ordering had gone beserk. Fix this manually.

Modified:
  stable/8/ObsoleteFiles.inc

Modified: stable/8/ObsoleteFiles.inc
==============================================================================
--- stable/8/ObsoleteFiles.inc	Tue Mar  6 14:13:23 2012	(r232607)
+++ stable/8/ObsoleteFiles.inc	Tue Mar  6 14:18:54 2012	(r232608)
@@ -17,10 +17,10 @@
 # 20110915: rename congestion control manpages
 OLD_FILES+=usr/share/man/man4/cc.4.gz
 OLD_FILES+=usr/share/man/man9/cc.9.gz
-# 20101123: removed subblock.h from liblzma
-OLD_FILES+=usr/include/lzma/subblock.h
 # 20110224: sticky.8 -> sticky.7
 OLD_FILES+=usr/share/man/man8/sticky.8.gz
+# 20101123: removed subblock.h from liblzma
+OLD_FILES+=usr/include/lzma/subblock.h
 # 20101114: Remove long-obsolete MAKEDEV.8
 OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz
 # 20101112: vgonel(9) has gone to private API a while ago

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 14:29:54 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B02D2106564A;
	Tue,  6 Mar 2012 14:29:54 +0000 (UTC)
	(envelope-from pluknet@gmail.com)
Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com
	[209.85.215.182])
	by mx1.freebsd.org (Postfix) with ESMTP id B30A38FC17;
	Tue,  6 Mar 2012 14:29:52 +0000 (UTC)
Received: by eaaf13 with SMTP id f13so1903966eaa.13
	for <multiple recipients>; Tue, 06 Mar 2012 06:29:51 -0800 (PST)
Received-SPF: pass (google.com: domain of pluknet@gmail.com designates
	10.112.49.227 as permitted sender) client-ip=10.112.49.227; 
Authentication-Results: mr.google.com;
	spf=pass (google.com: domain of pluknet@gmail.com
	designates 10.112.49.227 as permitted sender)
	smtp.mail=pluknet@gmail.com;
	dkim=pass header.i=pluknet@gmail.com
Received: from mr.google.com ([10.112.49.227])
	by 10.112.49.227 with SMTP id x3mr2657377lbn.99.1331044191791 (num_hops
	= 1); Tue, 06 Mar 2012 06:29:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=WJ4mgBiLPbS6mqW/lWYaeK4mpn2Y70H4d1L+S0z7WvA=;
	b=tSWviebJGEgZPJfn/KZdFAsi+Lvt+uK8DeytdV157TkWzY9Ai2HqPhkyWguNxIER/d
	Z5Z01kRaRKy1DSejefG3sUnVZq3d5ZNeIfjQ1KKjZvQI4W6EGOZCjbE3B3HaWFV5h+75
	anAIV4Wj6ijpEVkvrhQBD2q88S7P/UGZunMoCKL9Zt8LqO1MPX+x4/CrRysqC6D9lp4f
	lzdNot7/WMe1XeXpIew/V5YLzZ5UWBTjhvtLnFMqtmY3hWOL3XS10u6KOv4U1Lr+KrSk
	5wvPE7hlyisWXR22Hbwp47cwIC64pDYnkjaS4h1a30UCovp5yapMGWVttWsKBXHVsvCc
	4+Iw==
MIME-Version: 1.0
Received: by 10.112.49.227 with SMTP id x3mr2152758lbn.99.1331044191708; Tue,
	06 Mar 2012 06:29:51 -0800 (PST)
Sender: pluknet@gmail.com
Received: by 10.152.21.73 with HTTP; Tue, 6 Mar 2012 06:29:51 -0800 (PST)
In-Reply-To: <201203061410.q26EAvav043586@svn.freebsd.org>
References: <201203061410.q26EAvav043586@svn.freebsd.org>
Date: Tue, 6 Mar 2012 17:29:51 +0300
X-Google-Sender-Auth: W4J-qQPNK9hzoAcz9ISWUNTdxK4
Message-ID: <CAE-mSO+XB5dZFgAj64gg+q2RCzZOwtJwjNo5mzJ3K4OKCkhc5A@mail.gmail.com>
From: Sergey Kandaurov <pluknet@freebsd.org>
To: Remko Lodder <remko@freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r232606 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 14:29:54 -0000

On 6 March 2012 18:10, Remko Lodder <remko@freebsd.org> wrote:
> Author: remko
> Date: Tue Mar =A06 14:10:57 2012
> New Revision: 232606
> URL: http://svn.freebsd.org/changeset/base/232606
>
> Log:
> =A0Merge r238821
>
> =A0Add sticky.8 to the obsolete files since it had been
> =A0moved to sticky.7
>
> =A0Submitted by: maxim and pluknet
>
> =A0With help from: =A0 =A0 =A0 dim (because of awkward merge conflicts)
>
> Modified:
> =A0stable/8/ObsoleteFiles.inc =A0 (contents, props changed)
> Directory Properties:
> =A0stable/8/ =A0 (props changed)

Eh, it seems you merged r238821 to stable/8, and that's wrong.
Changes to top-level files should be merged directly to that file
rather than to the root of the whole tree (see rule 12).

`svn diff -c 232606' gives me:

Index: ObsoleteFiles.inc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- ObsoleteFiles.inc   (revision 232605)
+++ ObsoleteFiles.inc   (revision 232606)
@@ -19,6 +19,8 @@
 OLD_FILES+=3Dusr/share/man/man9/cc.9.gz
 # 20101123: removed subblock.h from liblzma
 OLD_FILES+=3Dusr/include/lzma/subblock.h
+# 20110224: sticky.8 -> sticky.7
+OLD_FILES+=3Dusr/share/man/man8/sticky.8.gz
 # 20101114: Remove long-obsolete MAKEDEV.8
 OLD_FILES+=3Dusr/share/man/man8/MAKEDEV.8.gz
 # 20101112: vgonel(9) has gone to private API a while ago

Property changes on: ObsoleteFiles.inc
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /head/ObsoleteFiles.inc:r219005


Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /head:r219005


--=20
wbr,
pluknet

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 14:38:49 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCCBB106564A;
	Tue,  6 Mar 2012 14:38:49 +0000 (UTC)
	(envelope-from remko@elvandar.org)
Received: from mailout.jr-hosting.nl (mailout.jr-hosting.nl
	[IPv6:2a01:4f8:141:5ffd::1:25])
	by mx1.freebsd.org (Postfix) with ESMTP id 51E588FC12;
	Tue,  6 Mar 2012 14:38:49 +0000 (UTC)
Received: from mailgate.jr-hosting.nl (unknown [IPv6:2a01:4f8:141:5061::25])
	by mailout.jr-hosting.nl (Postfix) with ESMTP id B61093902868;
	Tue,  6 Mar 2012 14:38:48 +0000 (UTC)
Received: from www.jr-hosting.nl (mail.jr-hosting.nl [78.47.69.234])
	by mailgate.jr-hosting.nl (Postfix) with ESMTPSA id 0E9A43F44F;
	Tue,  6 Mar 2012 15:38:47 +0100 (CET)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 06 Mar 2012 15:38:47 +0100
From: Remko Lodder <remko@elvandar.org>
To: Sergey Kandaurov <pluknet@freebsd.org>
In-Reply-To: <CAE-mSO+XB5dZFgAj64gg+q2RCzZOwtJwjNo5mzJ3K4OKCkhc5A@mail.gmail.com>
References: <201203061410.q26EAvav043586@svn.freebsd.org>
	<CAE-mSO+XB5dZFgAj64gg+q2RCzZOwtJwjNo5mzJ3K4OKCkhc5A@mail.gmail.com>
Message-ID: <56c9876464416184673b0ea9b41f025e@evilcoder.org>
X-Sender: remko@elvandar.org
User-Agent: Roundcube Webmail/0.7.1
Cc: svn-src-stable@freebsd.org, Remko Lodder <remko@freebsd.org>,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	svn-src-all@freebsd.org
Subject: Re: svn commit: r232606 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 14:38:49 -0000

On 06.03.2012 15:29, Sergey Kandaurov wrote:
>
> Eh, it seems you merged r238821 to stable/8, and that's wrong.
> Changes to top-level files should be merged directly to that file
> rather than to the root of the whole tree (see rule 12).
>

Point received and taken. I'll look after that the next time. How do I 
clean this up
on the root?

-- 

/"\   Best regards,                      | remko@FreeBSD.org
\ /   Remko Lodder                       | remko@EFnet
  X    http://www.evilcoder.org/          |
/ \   ASCII Ribbon Campaign              | Against HTML Mail and News

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 15:02:19 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 779691065676;
	Tue,  6 Mar 2012 15:02:19 +0000 (UTC)
	(envelope-from sbruno@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 65D968FC13;
	Tue,  6 Mar 2012 15:02:19 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26F2JtD045481;
	Tue, 6 Mar 2012 15:02:19 GMT (envelope-from sbruno@svn.freebsd.org)
Received: (from sbruno@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26F2JHM045479;
	Tue, 6 Mar 2012 15:02:19 GMT (envelope-from sbruno@svn.freebsd.org)
Message-Id: <201203061502.q26F2JHM045479@svn.freebsd.org>
From: Sean Bruno <sbruno@FreeBSD.org>
Date: Tue, 6 Mar 2012 15:02:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232610 - stable/7/sys/dev/mpt
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 15:02:19 -0000

Author: sbruno
Date: Tue Mar  6 15:02:18 2012
New Revision: 232610
URL: http://svn.freebsd.org/changeset/base/232610

Log:
  MFC r232411
  
  Fix a problem that was causing the mpt(4) driver to attach to MegaRAID
  cards that should be handled by the mfi(4) driver.
  
  The root of the problem is that the mpt(4) driver was masking off the
  bottom bit of the PCI device ID when deciding which cards to attach to.
  
  It appears that a number of the mpt(4) Fibre Channel cards had a LAN
  variant whose PCI device ID was just one bit off from the FC card's device
  ID.  The FC cards were even and the LAN cards were odd.
  
  The problem was that this pattern wasn't carried over on the SAS and
  parallel SCSI mpt(4) cards.  Luckily the SAS and parallel SCSI PCI device
  IDs were either even numbers, or they would get masked to a supported
  adjacent PCI device ID, and everything worked well.
  
  Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb
  SAS device IDs for their new MegaRAID cards.  This is causing the mpt(4)
  driver to attach to the RAID cards instead of the mfi(4) driver.
  
  The solution is to stop masking off the bottom bit of the device ID, and
  explicitly list the PCI device IDs of all supported cards.
  
  This change should be a no-op for mpt(4) hardware.  The only intended
  functional change is that for the 929X, the is_fc variable gets set.  It
  wasn't being set previously, but needs to be because the 929X is a Fibre
  Channel card.
  
  Reported by:  Kashyap Desai <Kashyap.Desai@lsi.com>

Modified:
  stable/7/sys/dev/mpt/mpt_pci.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/mpt/mpt_pci.c
==============================================================================
--- stable/7/sys/dev/mpt/mpt_pci.c	Tue Mar  6 14:19:36 2012	(r232609)
+++ stable/7/sys/dev/mpt/mpt_pci.c	Tue Mar  6 15:02:18 2012	(r232610)
@@ -129,18 +129,34 @@ __FBSDID("$FreeBSD$");
 #define	PCI_PRODUCT_LSI_FC919		0x0624
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC919_LAN
+#define	PCI_PRODUCT_LSI_FC919_LAN	0x0625
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC929
 #define	PCI_PRODUCT_LSI_FC929		0x0622
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC929_LAN
+#define	PCI_PRODUCT_LSI_FC929_LAN	0x0623
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC929X
 #define	PCI_PRODUCT_LSI_FC929X		0x0626
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC929X_LAN
+#define	PCI_PRODUCT_LSI_FC929X_LAN	0x0627
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC919X
 #define	PCI_PRODUCT_LSI_FC919X		0x0628
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_FC919X_LAN
+#define	PCI_PRODUCT_LSI_FC919X_LAN	0x0629
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_FC7X04X
 #define	PCI_PRODUCT_LSI_FC7X04X		0x0640
 #endif
@@ -153,6 +169,10 @@ __FBSDID("$FreeBSD$");
 #define	PCI_PRODUCT_LSI_1030		0x0030
 #endif
 
+#ifndef	PCI_PRODUCT_LSI_1030ZC
+#define	PCI_PRODUCT_LSI_1030ZC		0x0031
+#endif
+
 #ifndef	PCI_PRODUCT_LSI_SAS1064
 #define PCI_PRODUCT_LSI_SAS1064		0x0050
 #endif
@@ -177,6 +197,10 @@ __FBSDID("$FreeBSD$");
 #define PCI_PRODUCT_LSI_SAS1068		0x0054
 #endif
 
+#ifndef PCI_PRODUCT_LSI_SAS1068A
+#define PCI_PRODUCT_LSI_SAS1068A	0x0055
+#endif
+
 #ifndef PCI_PRODUCT_LSI_SAS1068E
 #define PCI_PRODUCT_LSI_SAS1068E	0x0058
 #endif
@@ -232,7 +256,7 @@ mpt_pci_probe(device_t dev)
 		return (ENXIO);
 	}
 
-	switch ((pci_get_device(dev) & ~1)) {
+	switch (pci_get_device(dev)) {
 	case PCI_PRODUCT_LSI_FC909:
 		desc = "LSILogic FC909 FC Adapter";
 		break;
@@ -242,15 +266,27 @@ mpt_pci_probe(device_t dev)
 	case PCI_PRODUCT_LSI_FC919:
 		desc = "LSILogic FC919 FC Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC919_LAN:
+		desc = "LSILogic FC919 LAN Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC929:
 		desc = "Dual LSILogic FC929 FC Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC929_LAN:
+		desc = "Dual LSILogic FC929 LAN Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC919X:
 		desc = "LSILogic FC919 FC PCI-X Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC919X_LAN:
+		desc = "LSILogic FC919 LAN PCI-X Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC929X:
 		desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter";
 		break;
+	case PCI_PRODUCT_LSI_FC929X_LAN:
+		desc = "Dual LSILogic FC929X LAN PCI-X Adapter";
+		break;
 	case PCI_PRODUCT_LSI_FC646:
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter";
 		break;
@@ -258,6 +294,7 @@ mpt_pci_probe(device_t dev)
 		desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter";
 		break;
 	case PCI_PRODUCT_LSI_1030:
+	case PCI_PRODUCT_LSI_1030ZC:
 		desc = "LSILogic 1030 Ultra4 Adapter";
 		break;
 	case PCI_PRODUCT_LSI_SAS1064:
@@ -266,6 +303,7 @@ mpt_pci_probe(device_t dev)
 	case PCI_PRODUCT_LSI_SAS1066:
 	case PCI_PRODUCT_LSI_SAS1066E:
 	case PCI_PRODUCT_LSI_SAS1068:
+	case PCI_PRODUCT_LSI_SAS1068A:
 	case PCI_PRODUCT_LSI_SAS1068E:
 	case PCI_PRODUCT_LSI_SAS1078:
 	case PCI_PRODUCT_LSI_SAS1078DE:
@@ -428,12 +466,17 @@ mpt_pci_attach(device_t dev)
 		return (ENOMEM);
 	}
 	memset(mpt, 0, sizeof(struct mpt_softc));
-	switch ((pci_get_device(dev) & ~1)) {
+	switch (pci_get_device(dev)) {
 	case PCI_PRODUCT_LSI_FC909:
 	case PCI_PRODUCT_LSI_FC909A:
 	case PCI_PRODUCT_LSI_FC919:
+	case PCI_PRODUCT_LSI_FC919_LAN:
 	case PCI_PRODUCT_LSI_FC929:
+	case PCI_PRODUCT_LSI_FC929_LAN:
+	case PCI_PRODUCT_LSI_FC929X:
+	case PCI_PRODUCT_LSI_FC929X_LAN:
 	case PCI_PRODUCT_LSI_FC919X:
+	case PCI_PRODUCT_LSI_FC919X_LAN:
 	case PCI_PRODUCT_LSI_FC646:
 	case PCI_PRODUCT_LSI_FC7X04X:
 		mpt->is_fc = 1;
@@ -448,6 +491,7 @@ mpt_pci_attach(device_t dev)
 	case PCI_PRODUCT_LSI_SAS1066:
 	case PCI_PRODUCT_LSI_SAS1066E:
 	case PCI_PRODUCT_LSI_SAS1068:
+	case PCI_PRODUCT_LSI_SAS1068A:
 	case PCI_PRODUCT_LSI_SAS1068E:
 		mpt->is_sas = 1;
 		break;
@@ -499,11 +543,17 @@ mpt_pci_attach(device_t dev)
 	 * Is this part a dual?
 	 * If so, link with our partner (around yet)
 	 */
-	if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC646 ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC7X04X ||
-	    (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) {
+	switch (pci_get_device(dev)) {
+	case PCI_PRODUCT_LSI_FC929:
+	case PCI_PRODUCT_LSI_FC929_LAN:
+	case PCI_PRODUCT_LSI_FC646:
+	case PCI_PRODUCT_LSI_FC7X04X:
+	case PCI_PRODUCT_LSI_1030:
+	case PCI_PRODUCT_LSI_1030ZC:
 		mpt_link_peer(mpt);
+		break;
+	default:
+		break;
 	}
 
 	/*

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 19:08:04 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 47CE11065672;
	Tue,  6 Mar 2012 19:08:04 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi
	[195.197.172.115])
	by mx1.freebsd.org (Postfix) with ESMTP id 8C0D28FC14;
	Tue,  6 Mar 2012 19:08:03 +0000 (UTC)
Received: from jh (a91-153-115-208.elisa-laajakaista.fi [91.153.115.208])
	by gw01.mail.saunalahti.fi (Postfix) with SMTP id EB2F61515FC;
	Tue,  6 Mar 2012 21:07:48 +0200 (EET)
Date: Tue, 6 Mar 2012 21:07:48 +0200
From: Jaakko Heinonen <jh@FreeBSD.org>
To: Remko Lodder <remko@elvandar.org>
Message-ID: <20120306190748.GB51782@jh>
References: <201203061410.q26EAvav043586@svn.freebsd.org>
	<CAE-mSO+XB5dZFgAj64gg+q2RCzZOwtJwjNo5mzJ3K4OKCkhc5A@mail.gmail.com>
	<56c9876464416184673b0ea9b41f025e@evilcoder.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <56c9876464416184673b0ea9b41f025e@evilcoder.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org,
	svn-src-all@freebsd.org, Sergey Kandaurov <pluknet@freebsd.org>,
	svn-src-stable-8@freebsd.org, Remko Lodder <remko@freebsd.org>
Subject: Re: svn commit: r232606 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 19:08:04 -0000

On 2012-03-06, Remko Lodder wrote:
> On 06.03.2012 15:29, Sergey Kandaurov wrote:
> >
> > Eh, it seems you merged r238821 to stable/8, and that's wrong.

Actually mergeinfo says r219005.

> > Changes to top-level files should be merged directly to that file
> > rather than to the root of the whole tree (see rule 12).
> 
> Point received and taken. I'll look after that the next time. How do I 
> clean this up on the root?

In the stable/8 root directory:

$ svn merge -c -232606 .
$ svn revert ObsoleteFiles.inc
$ svn diff

Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
   Reverse-merged /head:r219005


-- 
Jaakko

From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 19:34:24 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CF7871065670;
	Tue,  6 Mar 2012 19:34:24 +0000 (UTC)
	(envelope-from remko@elvandar.org)
Received: from mailout.jr-hosting.nl (mailout.jr-hosting.nl
	[IPv6:2a01:4f8:141:5ffd::1:25])
	by mx1.freebsd.org (Postfix) with ESMTP id 8EEFB8FC1B;
	Tue,  6 Mar 2012 19:34:24 +0000 (UTC)
Received: from mail.jr-hosting.nl (mail.jr-hosting.nl
	[IPv6:2a01:4f8:141:5ffd::25])
	by mailout.jr-hosting.nl (Postfix) with ESMTP id F1D3339028C7;
	Tue,  6 Mar 2012 19:34:23 +0000 (UTC)
Received: from [IPv6:2001:470:d701::1:1a] (unknown [IPv6:2001:470:d701::1:1a])
	by mail.jr-hosting.nl (Postfix) with ESMTPSA id A362838B18B4;
	Tue,  6 Mar 2012 19:34:23 +0000 (UTC)
Mime-Version: 1.0 (Apple Message framework v1257)
Content-Type: text/plain; charset=iso-8859-1
From: Remko Lodder <remko@elvandar.org>
In-Reply-To: <CAE-mSOLYobVfoPgH7p8QU-mnsGuK1nQ2-0dQEGh6YOZ2Uk8Tsg@mail.gmail.com>
Date: Tue, 6 Mar 2012 20:34:19 +0100
Content-Transfer-Encoding: 7bit
Message-Id: <CF5B7259-633C-4D21-8A0C-78A0A45B15FC@elvandar.org>
References: <201203041037.q24AbQhv026104@svn.freebsd.org>
	<CAE-mSOLYobVfoPgH7p8QU-mnsGuK1nQ2-0dQEGh6YOZ2Uk8Tsg@mail.gmail.com>
To: Sergey Kandaurov <pluknet@freebsd.org>
X-Mailer: Apple Mail (2.1257)
Cc: svn-src-stable@freebsd.org, Remko Lodder <remko@freebsd.org>,
	src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable-9@freebsd.org
Subject: Re: svn commit: r232486 - stable/9/sbin/ifconfig
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 19:34:24 -0000


We might ask whether we can commit this to 8.3 quicker then the suggested
MFC period. I'll copy you in the request.


On Mar 5, 2012, at 7:28 PM, Sergey Kandaurov wrote:

> On 4 March 2012 14:37, Remko Lodder <remko@freebsd.org> wrote:
>> Author: remko
>> Date: Sun Mar  4 10:37:26 2012
>> New Revision: 232486
>> URL: http://svn.freebsd.org/changeset/base/232486
>> 
>> Log:
>>  Add an ifconfig carp option that enables users to set
>>  the state of the carp cluster.
>> 
>>  This is a direct commit to stable/9 because -HEAD's
>>  code is very different. I discussed this with Gleb
>>  and the reason for this is that since we do not
>>  touch the kernel itself and are not adding very
>>  weird or confusing things, we can commit this to the
>>  stable branch directly.
>> 
>>  The options 'master' and 'backup' are now available,
>>  which enables the administrator to force a node into
>>  the backup or master state on the cluster. Ofcourse
>>  preempt has to be disabled otherwise the master node
>>  will become master again.
>> 
>>  One can do that with:
>> 
>>  sysctl net.inet.carp.preempt=0
>> 
>>  After that one can schedule maintenance on the node
>>  normally running as the master and such.
>> 
>>  PR:           100956
>>  Discussed with:       glebius
>>  MFC after:    1 weeks
> 
> What are the chances this will appear in 8.3-RELEASE?
> 
> -- 
> wbr,
> pluknet

-- 
/"\   With kind regards,			| remko@elvandar.org
\ /   Remko Lodder			| remko@FreeBSD.org
X    FreeBSD					| http://www.evilcoder.org
/ \   The Power to Serve		| Quis custodiet ipsos custodes


From owner-svn-src-stable@FreeBSD.ORG  Tue Mar  6 20:37:07 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 4B10D1065673;
	Tue,  6 Mar 2012 20:37:07 +0000 (UTC)
	(envelope-from remko@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 225D78FC1F;
	Tue,  6 Mar 2012 20:37:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26Kb6ek056564;
	Tue, 6 Mar 2012 20:37:06 GMT (envelope-from remko@svn.freebsd.org)
Received: (from remko@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26Kb6wJ056563;
	Tue, 6 Mar 2012 20:37:06 GMT (envelope-from remko@svn.freebsd.org)
Message-Id: <201203062037.q26Kb6wJ056563@svn.freebsd.org>
From: Remko Lodder <remko@FreeBSD.org>
Date: Tue, 6 Mar 2012 20:37:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232622 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Mar 2012 20:37:07 -0000

Author: remko
Date: Tue Mar  6 20:37:06 2012
New Revision: 232622
URL: http://svn.freebsd.org/changeset/base/232622

Log:
  Revert mergeinfo on the root directory.
  The mergeinfo should only be on ObsoleteFiles.inc
  
  Thanks for helping:	jh

Modified:
Directory Properties:
  stable/8/   (props changed)

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 01:26:25 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 564E01065694;
	Wed,  7 Mar 2012 01:26:25 +0000 (UTC) (envelope-from mp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3D5DA8FC1B;
	Wed,  7 Mar 2012 01:26:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q271QPDC065917;
	Wed, 7 Mar 2012 01:26:25 GMT (envelope-from mp@svn.freebsd.org)
Received: (from mp@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q271QOH4065905;
	Wed, 7 Mar 2012 01:26:24 GMT (envelope-from mp@svn.freebsd.org)
Message-Id: <201203070126.q271QOH4065905@svn.freebsd.org>
From: Mark Peek <mp@FreeBSD.org>
Date: Wed, 7 Mar 2012 01:26:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232633 - in stable/9: bin/csh contrib/tcsh
	contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C
	contrib/tcsh/nls/et contrib/tcsh/nls/finnish
	contrib/tcsh/nls/french contrib/tcsh/nls...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 01:26:25 -0000

Author: mp
Date: Wed Mar  7 01:26:24 2012
New Revision: 232633
URL: http://svn.freebsd.org/changeset/base/232633

Log:
  MFC r231990
  
  Update to tcsh 6.18.01

Added:
  stable/9/contrib/tcsh/nls/Makefile.in
     - copied unchanged from r231990, head/contrib/tcsh/nls/Makefile.in
  stable/9/contrib/tcsh/nls/catgen
     - copied unchanged from r231990, head/contrib/tcsh/nls/catgen
  stable/9/contrib/tcsh/svn
     - copied unchanged from r231990, head/contrib/tcsh/svn
Deleted:
  stable/9/bin/csh/host.defs
  stable/9/contrib/tcsh/nls/Makefile
Modified:
  stable/9/bin/csh/Makefile
  stable/9/bin/csh/config.h
  stable/9/bin/csh/config_p.h
  stable/9/contrib/tcsh/Fixes
  stable/9/contrib/tcsh/Imakefile
  stable/9/contrib/tcsh/Makefile.in
  stable/9/contrib/tcsh/Ported
  stable/9/contrib/tcsh/README
  stable/9/contrib/tcsh/WishList
  stable/9/contrib/tcsh/complete.tcsh
  stable/9/contrib/tcsh/config.guess
  stable/9/contrib/tcsh/config.h.in
  stable/9/contrib/tcsh/config.sub
  stable/9/contrib/tcsh/config/bsd4.4
  stable/9/contrib/tcsh/config_f.h
  stable/9/contrib/tcsh/configure
  stable/9/contrib/tcsh/configure.in
  stable/9/contrib/tcsh/ed.chared.c
  stable/9/contrib/tcsh/ed.inputl.c
  stable/9/contrib/tcsh/ed.refresh.c
  stable/9/contrib/tcsh/ed.screen.c
  stable/9/contrib/tcsh/ed.term.c
  stable/9/contrib/tcsh/gethost.c
  stable/9/contrib/tcsh/glob.c
  stable/9/contrib/tcsh/glob.h
  stable/9/contrib/tcsh/host.defs
  stable/9/contrib/tcsh/install-sh
  stable/9/contrib/tcsh/nls/C/charset
  stable/9/contrib/tcsh/nls/C/set19
  stable/9/contrib/tcsh/nls/et/charset
  stable/9/contrib/tcsh/nls/et/set1
  stable/9/contrib/tcsh/nls/et/set10
  stable/9/contrib/tcsh/nls/et/set11
  stable/9/contrib/tcsh/nls/et/set13
  stable/9/contrib/tcsh/nls/et/set14
  stable/9/contrib/tcsh/nls/et/set15
  stable/9/contrib/tcsh/nls/et/set16
  stable/9/contrib/tcsh/nls/et/set17
  stable/9/contrib/tcsh/nls/et/set18
  stable/9/contrib/tcsh/nls/et/set19
  stable/9/contrib/tcsh/nls/et/set2
  stable/9/contrib/tcsh/nls/et/set20
  stable/9/contrib/tcsh/nls/et/set21
  stable/9/contrib/tcsh/nls/et/set22
  stable/9/contrib/tcsh/nls/et/set23
  stable/9/contrib/tcsh/nls/et/set24
  stable/9/contrib/tcsh/nls/et/set25
  stable/9/contrib/tcsh/nls/et/set26
  stable/9/contrib/tcsh/nls/et/set27
  stable/9/contrib/tcsh/nls/et/set3
  stable/9/contrib/tcsh/nls/et/set30
  stable/9/contrib/tcsh/nls/et/set4
  stable/9/contrib/tcsh/nls/et/set5
  stable/9/contrib/tcsh/nls/et/set6
  stable/9/contrib/tcsh/nls/et/set7
  stable/9/contrib/tcsh/nls/et/set8
  stable/9/contrib/tcsh/nls/et/set9
  stable/9/contrib/tcsh/nls/finnish/charset
  stable/9/contrib/tcsh/nls/finnish/set1
  stable/9/contrib/tcsh/nls/finnish/set10
  stable/9/contrib/tcsh/nls/finnish/set11
  stable/9/contrib/tcsh/nls/finnish/set12
  stable/9/contrib/tcsh/nls/finnish/set13
  stable/9/contrib/tcsh/nls/finnish/set14
  stable/9/contrib/tcsh/nls/finnish/set16
  stable/9/contrib/tcsh/nls/finnish/set17
  stable/9/contrib/tcsh/nls/finnish/set18
  stable/9/contrib/tcsh/nls/finnish/set19
  stable/9/contrib/tcsh/nls/finnish/set2
  stable/9/contrib/tcsh/nls/finnish/set20
  stable/9/contrib/tcsh/nls/finnish/set22
  stable/9/contrib/tcsh/nls/finnish/set23
  stable/9/contrib/tcsh/nls/finnish/set25
  stable/9/contrib/tcsh/nls/finnish/set26
  stable/9/contrib/tcsh/nls/finnish/set27
  stable/9/contrib/tcsh/nls/finnish/set29
  stable/9/contrib/tcsh/nls/finnish/set3
  stable/9/contrib/tcsh/nls/finnish/set6
  stable/9/contrib/tcsh/nls/finnish/set7
  stable/9/contrib/tcsh/nls/finnish/set9
  stable/9/contrib/tcsh/nls/french/charset
  stable/9/contrib/tcsh/nls/french/set1
  stable/9/contrib/tcsh/nls/french/set10
  stable/9/contrib/tcsh/nls/french/set11
  stable/9/contrib/tcsh/nls/french/set12
  stable/9/contrib/tcsh/nls/french/set13
  stable/9/contrib/tcsh/nls/french/set15
  stable/9/contrib/tcsh/nls/french/set16
  stable/9/contrib/tcsh/nls/french/set17
  stable/9/contrib/tcsh/nls/french/set18
  stable/9/contrib/tcsh/nls/french/set19
  stable/9/contrib/tcsh/nls/french/set2
  stable/9/contrib/tcsh/nls/french/set20
  stable/9/contrib/tcsh/nls/french/set21
  stable/9/contrib/tcsh/nls/french/set22
  stable/9/contrib/tcsh/nls/french/set23
  stable/9/contrib/tcsh/nls/french/set25
  stable/9/contrib/tcsh/nls/french/set26
  stable/9/contrib/tcsh/nls/french/set27
  stable/9/contrib/tcsh/nls/french/set3
  stable/9/contrib/tcsh/nls/french/set30
  stable/9/contrib/tcsh/nls/french/set31
  stable/9/contrib/tcsh/nls/french/set4
  stable/9/contrib/tcsh/nls/french/set6
  stable/9/contrib/tcsh/nls/french/set7
  stable/9/contrib/tcsh/nls/french/set8
  stable/9/contrib/tcsh/nls/french/set9
  stable/9/contrib/tcsh/nls/german/charset
  stable/9/contrib/tcsh/nls/german/set1
  stable/9/contrib/tcsh/nls/german/set10
  stable/9/contrib/tcsh/nls/german/set13
  stable/9/contrib/tcsh/nls/german/set15
  stable/9/contrib/tcsh/nls/german/set16
  stable/9/contrib/tcsh/nls/german/set17
  stable/9/contrib/tcsh/nls/german/set18
  stable/9/contrib/tcsh/nls/german/set19
  stable/9/contrib/tcsh/nls/german/set2
  stable/9/contrib/tcsh/nls/german/set20
  stable/9/contrib/tcsh/nls/german/set22
  stable/9/contrib/tcsh/nls/german/set23
  stable/9/contrib/tcsh/nls/german/set25
  stable/9/contrib/tcsh/nls/german/set26
  stable/9/contrib/tcsh/nls/german/set27
  stable/9/contrib/tcsh/nls/german/set29
  stable/9/contrib/tcsh/nls/german/set3
  stable/9/contrib/tcsh/nls/german/set30
  stable/9/contrib/tcsh/nls/german/set31
  stable/9/contrib/tcsh/nls/german/set4
  stable/9/contrib/tcsh/nls/german/set5
  stable/9/contrib/tcsh/nls/german/set6
  stable/9/contrib/tcsh/nls/german/set7
  stable/9/contrib/tcsh/nls/german/set8
  stable/9/contrib/tcsh/nls/german/set9
  stable/9/contrib/tcsh/nls/greek/charset
  stable/9/contrib/tcsh/nls/greek/set1   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set10   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set11   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set12   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set13   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set14   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set15   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set16   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set17   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set18   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set19   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set2   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set20   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set21   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set22   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set23   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set25   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set26   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set27   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set29   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set3   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set30   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set31   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set4   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set5   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set6   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set7   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set8   (contents, props changed)
  stable/9/contrib/tcsh/nls/greek/set9   (contents, props changed)
  stable/9/contrib/tcsh/nls/italian/charset
  stable/9/contrib/tcsh/nls/italian/set1
  stable/9/contrib/tcsh/nls/italian/set11
  stable/9/contrib/tcsh/nls/italian/set13
  stable/9/contrib/tcsh/nls/italian/set15
  stable/9/contrib/tcsh/nls/italian/set17
  stable/9/contrib/tcsh/nls/italian/set19
  stable/9/contrib/tcsh/nls/italian/set2
  stable/9/contrib/tcsh/nls/italian/set20
  stable/9/contrib/tcsh/nls/italian/set22
  stable/9/contrib/tcsh/nls/italian/set23
  stable/9/contrib/tcsh/nls/italian/set26
  stable/9/contrib/tcsh/nls/italian/set3
  stable/9/contrib/tcsh/nls/italian/set30
  stable/9/contrib/tcsh/nls/italian/set4
  stable/9/contrib/tcsh/nls/italian/set6
  stable/9/contrib/tcsh/nls/italian/set7
  stable/9/contrib/tcsh/nls/ja/charset
  stable/9/contrib/tcsh/nls/ja/set1   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set10   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set11   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set12   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set13   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set15   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set16   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set17   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set18   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set2   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set21   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set29   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set3   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set30   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set4   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set5   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set6   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set7   (contents, props changed)
  stable/9/contrib/tcsh/nls/ja/set8   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/charset
  stable/9/contrib/tcsh/nls/russian/set1   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set10   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set11   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set12   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set13   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set14   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set15   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set16   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set17   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set18   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set19   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set2   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set20   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set22   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set23   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set25   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set26   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set27   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set29   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set30   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set31   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set4   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set5   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set6   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set7   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set8   (contents, props changed)
  stable/9/contrib/tcsh/nls/russian/set9   (contents, props changed)
  stable/9/contrib/tcsh/nls/spanish/charset
  stable/9/contrib/tcsh/nls/spanish/set1
  stable/9/contrib/tcsh/nls/spanish/set10
  stable/9/contrib/tcsh/nls/spanish/set13
  stable/9/contrib/tcsh/nls/spanish/set14
  stable/9/contrib/tcsh/nls/spanish/set15
  stable/9/contrib/tcsh/nls/spanish/set16
  stable/9/contrib/tcsh/nls/spanish/set17
  stable/9/contrib/tcsh/nls/spanish/set18
  stable/9/contrib/tcsh/nls/spanish/set19
  stable/9/contrib/tcsh/nls/spanish/set2
  stable/9/contrib/tcsh/nls/spanish/set20
  stable/9/contrib/tcsh/nls/spanish/set22
  stable/9/contrib/tcsh/nls/spanish/set23
  stable/9/contrib/tcsh/nls/spanish/set25
  stable/9/contrib/tcsh/nls/spanish/set26
  stable/9/contrib/tcsh/nls/spanish/set27
  stable/9/contrib/tcsh/nls/spanish/set3
  stable/9/contrib/tcsh/nls/spanish/set30
  stable/9/contrib/tcsh/nls/spanish/set4
  stable/9/contrib/tcsh/nls/spanish/set5
  stable/9/contrib/tcsh/nls/spanish/set6
  stable/9/contrib/tcsh/nls/spanish/set7
  stable/9/contrib/tcsh/nls/spanish/set8
  stable/9/contrib/tcsh/nls/spanish/set9
  stable/9/contrib/tcsh/nls/ukrainian/charset
  stable/9/contrib/tcsh/nls/ukrainian/set1   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set10   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set11   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set12   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set13   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set14   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set15   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set16   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set17   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set18   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set19   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set2   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set20   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set22   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set23   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set25   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set26   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set27   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set29   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set30   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set31   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set5   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set6   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set7   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set8   (contents, props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set9   (contents, props changed)
  stable/9/contrib/tcsh/patchlevel.h
  stable/9/contrib/tcsh/pathnames.h
  stable/9/contrib/tcsh/sh.c
  stable/9/contrib/tcsh/sh.char.c
  stable/9/contrib/tcsh/sh.char.h
  stable/9/contrib/tcsh/sh.decls.h
  stable/9/contrib/tcsh/sh.dir.c
  stable/9/contrib/tcsh/sh.dol.c
  stable/9/contrib/tcsh/sh.err.c
  stable/9/contrib/tcsh/sh.exec.c
  stable/9/contrib/tcsh/sh.exp.c
  stable/9/contrib/tcsh/sh.file.c
  stable/9/contrib/tcsh/sh.func.c
  stable/9/contrib/tcsh/sh.glob.c
  stable/9/contrib/tcsh/sh.h
  stable/9/contrib/tcsh/sh.hist.c
  stable/9/contrib/tcsh/sh.lex.c
  stable/9/contrib/tcsh/sh.misc.c
  stable/9/contrib/tcsh/sh.parse.c
  stable/9/contrib/tcsh/sh.print.c
  stable/9/contrib/tcsh/sh.proc.c
  stable/9/contrib/tcsh/sh.proc.h
  stable/9/contrib/tcsh/sh.sem.c
  stable/9/contrib/tcsh/sh.set.c
  stable/9/contrib/tcsh/sh.time.c
  stable/9/contrib/tcsh/tc.alloc.c
  stable/9/contrib/tcsh/tc.const.c
  stable/9/contrib/tcsh/tc.decls.h
  stable/9/contrib/tcsh/tc.disc.c
  stable/9/contrib/tcsh/tc.func.c
  stable/9/contrib/tcsh/tc.nls.c
  stable/9/contrib/tcsh/tc.nls.h
  stable/9/contrib/tcsh/tc.os.c
  stable/9/contrib/tcsh/tc.os.h
  stable/9/contrib/tcsh/tc.prompt.c
  stable/9/contrib/tcsh/tc.sig.c
  stable/9/contrib/tcsh/tc.sig.h
  stable/9/contrib/tcsh/tc.str.c
  stable/9/contrib/tcsh/tc.wait.h
  stable/9/contrib/tcsh/tc.who.c
  stable/9/contrib/tcsh/tcsh.man
  stable/9/contrib/tcsh/tcsh.man2html
  stable/9/contrib/tcsh/tw.color.c
  stable/9/contrib/tcsh/tw.init.c
  stable/9/contrib/tcsh/tw.parse.c
  stable/9/contrib/tcsh/vms.termcap.c
Directory Properties:
  stable/9/bin/csh/   (props changed)
  stable/9/contrib/tcsh/   (props changed)
  stable/9/contrib/tcsh/nls/greek/set24   (props changed)
  stable/9/contrib/tcsh/nls/ja/set24   (props changed)
  stable/9/contrib/tcsh/nls/russian/set21   (props changed)
  stable/9/contrib/tcsh/nls/russian/set24   (props changed)
  stable/9/contrib/tcsh/nls/russian/set3   (props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set21   (props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set24   (props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set3   (props changed)
  stable/9/contrib/tcsh/nls/ukrainian/set4   (props changed)

Modified: stable/9/bin/csh/Makefile
==============================================================================
--- stable/9/bin/csh/Makefile	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/bin/csh/Makefile	Wed Mar  7 01:26:24 2012	(r232633)
@@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG
 DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"'
 .endif
 CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS}
-WARNS?=	0
+WARNS?=	1
 SRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
 	sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
 	sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
@@ -116,10 +116,10 @@ gethost: gethost.c sh.err.h tc.const.h s
 	${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
 	    ${TCSHDIR}/gethost.c
 
-tc.defs.c: gethost ${.CURDIR}/host.defs
+tc.defs.c: gethost ${TCSHDIR}/host.defs
 	@rm -f ${.TARGET}
 	@echo "/* Do not edit this file, make creates it */" > ${.TARGET}
-	./gethost ${.CURDIR}/host.defs >> ${.TARGET}
+	./gethost ${TCSHDIR}/host.defs >> ${.TARGET}
 
 ed.defns.h: ed.defns.c
 	@rm -f ${.TARGET}

Modified: stable/9/bin/csh/config.h
==============================================================================
--- stable/9/bin/csh/config.h	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/bin/csh/config.h	Wed Mar  7 01:26:24 2012	(r232633)
@@ -1,5 +1,5 @@
 /* $FreeBSD$ */
-/* config.h.  Generated by configure.  */
+/* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
 /* Define to the type of elements in the array set by `getgroups'. Usually
@@ -12,9 +12,6 @@
 /* Define to 1 if you have the <auth.h> header file. */
 /* #undef HAVE_AUTH_H */
 
-/* Define to 1 if you have the `catgets' function. */
-#define HAVE_CATGETS 1
-
 /* Define to 1 if you have the <crypt.h> header file. */
 /* #undef HAVE_CRYPT_H */
 
@@ -41,6 +38,9 @@
 /* Define to 1 if you have the `dup2' function. */
 #define HAVE_DUP2 1
 
+/* Define to 1 if you have the <features.h> header file. */
+/* #undef HAVE_FEATURES_H */
+
 /* Define to 1 if you have the `getauthid' function. */
 /* #undef HAVE_GETAUTHID */
 
@@ -54,9 +54,12 @@
 #define HAVE_GETPWENT 1
 
 /* Define to 1 if you have the `getutent' function. */
-#define HAVE_GETUTENT 1
+/* #undef HAVE_GETUTENT */
 
-/* Define if you have the iconv() function. */
+/* Define to 1 if you have the `getutxent' function. */
+#define HAVE_GETUTXENT 1
+
+/* Define if you have the iconv() function and it works. */
 /* #undef HAVE_ICONV */
 
 /* Define to 1 if you have the <inttypes.h> header file. */
@@ -65,6 +68,9 @@
 /* Define to 1 if the system has the type `long long'. */
 #define HAVE_LONG_LONG 1
 
+/* Define to 1 if you have the `mallinfo' function. */
+/* #undef HAVE_MALLINFO */
+
 /* Define to 1 if mbrtowc and mbstate_t are properly declared. */
 #define HAVE_MBRTOWC 1
 
@@ -77,6 +83,9 @@
 /* Define to 1 if you have the `memset' function. */
 #define HAVE_MEMSET 1
 
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 /* #undef HAVE_NDIR_H */
 
@@ -86,6 +95,9 @@
 /* Define to 1 if you have the `nl_langinfo' function. */
 #define HAVE_NL_LANGINFO 1
 
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
 /* Define to 1 if you have the `sbrk' function. */
 #define HAVE_SBRK 1
 
@@ -120,22 +132,34 @@
 /* Define to 1 if you have the `strstr' function. */
 #define HAVE_STRSTR 1
 
-/* Define to 1 if `d_ino' is member of `struct dirent'. */
+/* Define to 1 if `d_ino' is a member of `struct dirent'. */
 #define HAVE_STRUCT_DIRENT_D_INO 1
 
-/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
 
-/* Define to 1 if `ut_host' is member of `struct utmp'. */
+/* Define to 1 if `ut_host' is a member of `struct utmpx'. */
+#define HAVE_STRUCT_UTMPX_UT_HOST 1
+
+/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */
+#define HAVE_STRUCT_UTMPX_UT_TV 1
+
+/* Define to 1 if `ut_user' is a member of `struct utmpx'. */
+#define HAVE_STRUCT_UTMPX_UT_USER 1
+
+/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */
+
+/* Define to 1 if `ut_host' is a member of `struct utmp'. */
 #define HAVE_STRUCT_UTMP_UT_HOST 1
 
-/* Define to 1 if `ut_tv' is member of `struct utmp'. */
+/* Define to 1 if `ut_tv' is a member of `struct utmp'. */
 #define HAVE_STRUCT_UTMP_UT_TV 1
 
-/* Define to 1 if `ut_user' is member of `struct utmp'. */
+/* Define to 1 if `ut_user' is a member of `struct utmp'. */
 #define HAVE_STRUCT_UTMP_UT_USER 1
 
-/* Define to 1 if `ut_xtime' is member of `struct utmp'. */
+/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */
 /* #undef HAVE_STRUCT_UTMP_UT_XTIME */
 
 /* Define to 1 if you have the `sysconf' function. */
@@ -179,25 +203,31 @@
 /* Support NLS. */
 #define NLS 1
 
+/* Support NLS catalogs. */
+#define NLS_CATALOGS 1
+
 /* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
+#define PACKAGE_BUGREPORT "http://bugs.gw.com/"
 
 /* Define to the full name of this package. */
-#define PACKAGE_NAME ""
+#define PACKAGE_NAME "tcsh"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
+#define PACKAGE_STRING "tcsh 6.18.01"
 
 /* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
+#define PACKAGE_TARNAME "tcsh"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION ""
+#define PACKAGE_VERSION "6.18.01"
 
 /* Define to 1 if the `setpgrp' function takes no argument. */
 /* #undef SETPGRP_VOID */
 
-/* The size of a `wchar_t', as computed by sizeof. */
+/* The size of `wchar_t', as computed by sizeof. */
 #define SIZEOF_WCHAR_T 4
 
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
@@ -206,6 +236,11 @@
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */
 
@@ -215,7 +250,7 @@
 /* Define to `int' if <sys/types.h> does not define. */
 /* #undef mode_t */
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 /* #undef size_t */
 
 /* Define to `int' if neither <sys/types.h> nor <sys/socket.h> define. */
@@ -227,6 +262,10 @@
 /* Define to `int' if <sys/types.h> doesn't define. */
 /* #undef uid_t */
 
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
 /* Define to empty if the keyword `volatile' does not work. Warning: valid
    code using `volatile' can become incorrect without. Disable with care. */
 /* #undef volatile */
@@ -234,9 +273,5 @@
 #include "config_p.h"
 #include "config_f.h"
 
-#ifndef NO_NLS_CATALOGS
-#define NLS_CATALOGS
-#endif
-
 /* Work around a vendor issue where config_f.h is #undef'ing this setting */
 #define SYSMALLOC

Modified: stable/9/bin/csh/config_p.h
==============================================================================
--- stable/9/bin/csh/config_p.h	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/bin/csh/config_p.h	Wed Mar  7 01:26:24 2012	(r232633)
@@ -106,9 +106,6 @@
 
 #elif defined(__APPLE__)
 # define SYSMALLOC
-
-#else
-# define NLS_CATALOGS
 #endif
 
 #endif /* _h_config */

Modified: stable/9/contrib/tcsh/Fixes
==============================================================================
--- stable/9/contrib/tcsh/Fixes	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/contrib/tcsh/Fixes	Wed Mar  7 01:26:24 2012	(r232633)
@@ -1,3 +1,147 @@
+  6. V6.18.01 - 20120214
+  5. fix interruptible wait again
+  4. ignore bogus compiler overflow message
+  3. cleanup ifdefs in utmp code, and provide default array entries
+  2. Ignore #machine entries in host.defs
+  1. Detect missing ) in gethost.c (Corinna Vinschen)
+
+104. V6.18.00 - 20120114
+103. remove unused variables.
+102. Make gethost use definitions for x __x__ and __x automatically.
+101. More utmp fixes
+100. V6.17.10 - 20120105
+ 99. Add more FreeBSD/NetBSD machines
+ 98. Add portability wrapper for gencat
+ 97. Fix warning for write in SYSMALLOC systems.
+ 96. V6.17.09 - 20120102
+ 95. revert gencat handling to pre-cygwin fixes (without the env settings)
+ 94. remove stray endutent()
+ 93. V6.17.08 - 20111230
+ 92. Remove - from gencat
+ 91. Provide support for malloc_usable_size() so that linux works again
+     without SYSMALLOC
+ 90. Add support for FreeBSD's utmpx.
+ 89. V6.17.07 - 20111227
+ 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
+     there are more than 10 jobs.
+ 87. PR/155: Default $anyerror to set for backward compatibility
+ 86. PR/149: Don't print -1 in %j (Vojtech Vitek)
+ 85. handle -- on chdir commands as the end of options processing so that
+     they can process a directory like -x without resorting to ./-x
+     (Andrew Stevenson)
+ 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes)
+ 83. PR/38: Null check for jobs (Kurt Miller)
+ 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger)
+ 81. PR/120: string0 in filetest does not have enough space.
+ 80. V6.17.06 - 20110415
+ 79. PR/110: Add $anyerror to select behavior. Default to the new one.
+ 78. Don't try to spell commands that are correct (Rouben Rostamian)
+     [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo;
+      chmod +x foo; set correct=cmd; ./foo -> ../foo]
+ 77. Don't push the syntax struct on the cleanup stack, because on foo;bar
+     if foo fails, we will free bar prematurely (Ben Miller)
+ 76. Avoid infinite loop while trying to print the pid of a dying process
+     to a closed file (Bob Arendt)
+ 75. Handle completion of ${ variables (Anthony Mallet)
+ 74. Add --disable-nls-catalogs (Corinna Vinschen)
+ 73. convert message catalogs to UTF-8 (Werner Fink)
+ 72. check that the NLS path works before setting $NLSPATH.
+ 71. use SYSMALLOC for GLIBC (Werner Fink)
+ 70. use mallinfo for SYSMALLOC (Corinna Vinschen)
+ 69. V6.17.05 - 20110201
+ 68. Use mkstemp() if there for here docs (Werner Fink)
+ 67. Fix handling of errors and exit values in builtins (Werner Fink)
+ 66. Better pty name detection (Werner Fink)
+ 65. Enable NLS catalogs on Cygwin (Corinna Vinschen)
+ 64. NLSPATH handling fixes (Corinna Vinschen)
+ 63. Avoid infrequent exit when tcsh cd's into a non-existent directory
+     https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink)
+ 62. Don't try to spell check full path binaries that are correct because
+     they can cause hangs when other nfs partitions are hung. (Werner Fink)
+ 61. Avoid nested interrupts when exiting causing history writing to fail
+     https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink)
+ 60. Instead of giving an error or ignoring lines with missing eol at eof,
+     process them.
+ 59. Avoid leaking fd's in mail check (Werner Fink)
+ 58. Add cygwin_xcrypt() (Corinna Vinschen)
+ 57. Recognize i686 (Corinna Vinschen)
+ 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin
+     settings (Corinna Vinschen)
+ 55. Avoid double slashes in cdpath (Corinna Vinschen)
+ 54. V6.17.04 - 20110118
+ 53. Revert PR/110, breaks the test suite.
+ 52. V6.17.03 - 20110117
+ 51. PR/102: Complain on input files with missing trailing \n
+ 50. PR/104: If atime == mtime we don't have new mail.
+ 49. PR/113: Don't allow illegal variable names to be set.
+ 48. PR/112: don't set $REMOTEHOST on the local machine.
+ 47. PR/110: exit status of the pipeline should be the status of the last
+     command.
+ 46. Android support (Corinna Vinschen)
+ 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that
+     translates unshifted 7 bit ASCII (Werner Fink)
+ 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL
+     (Jean-Luc Leger)
+ 43. PR/109: make wait interruptible (Vojtech Vitek)
+ 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues
+     (Robert Byrnes)
+ 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen)
+ 40. Don't echo history while history -L or history -M
+ 39. Check for EOS before ** from Greg Dionne
+ 38. Don't fork in backeval from Bryan Mason
+ 37. Better globstar support from Greg Dionne
+ 36. Error out when processing the last incomplete line instead of silently
+     ignoring it (Anders Kaseorg)
+ 35. Fix SEGV from echo ``
+ 34. Better fixes for histchars and promptchars (nargs)
+ 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context.
+     (Fabio Fabbri)
+ 32. V6.17.02 - 20100512
+ 31. PR/79: nargs: Better handling for promptchars.
+ 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim
+     Zajkowski)
+ 29. PR/84: Performance fixes for large history merges (add
+     hashtable (Ted Anderson)
+ 28. Revert previous #23; people should use $histlit if they want this
+     feature.
+ 27. Don't kill "hup" background jobs when a child of the shell exits.
+     From Debian.
+ 26. Ignore \r\n in the command line options for OS's that don't strip
+     these from #!; from Debian
+ 25. Fix enhanced missing patch (Greg Dionne)
+ 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now.
+     (Corinna Vinschen)
+ 23. Turn HistLit on while recording history to avoid \!\! losing its \.
+     From Debian
+ 22. set autoexpand; set histchars="";\n<tab> crash. From Debian
+ 21. V6.17.01 - 20100506
+ 20. unset verbose while we are reading the history file to avoid echoing
+     to the terminal. (Jeffrey Bastian)
+ 19. globstar addition, Enhance addition, euid, euser, gid variables
+     (Greg Dionne)
+ 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks)
+ 17. Handle UTF-16 surrogates (Corinna Vinschen)
+ 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen)
+ 15. Better support for Solaris >= 2.9 (Thomas Uhle)
+ 14. Change internal expression calculations to long long so that we can
+     deal with > 32 bit time, inodes, uids, file sizes etc.
+ 13. Add new linux resource limits.
+ 12. Don't print 'Exit X' when printexitvalue is set in `` expressions
+     (Jeff Bastian)
+ 11. Add more LS_COLORS vars (M.H. Anderson)
+ 10. Reduce whitespace in Makefile (Don Estabrook)
+  9. Manual page fixes (Alan R. S. Bueno)
+  8. Remove history in loops bug from the documentation (Holger Weiss)
+  7. Add autorehash (Holger Weiss)
+  6. Add history.at (Ted Anderson)
+  5. Better NLSPATH handling (Norm Jacobs)
+  4. Fix hostname building from utmp (Cyrus Rahman)
+  3. Handle pending signals before flush so that the the history file does
+     not get truncated.  (Ted Anderson)
+  2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil)
+  1. remember to closedir in mailchk (from Werner Fink, reported by
+     David Binderman)
+
  21. V6.17.00 - 20090710
  20. Fix dataroot autoconf issue.
  19. Fix directory stuff for unit tests.

Modified: stable/9/contrib/tcsh/Imakefile
==============================================================================
--- stable/9/contrib/tcsh/Imakefile	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/contrib/tcsh/Imakefile	Wed Mar  7 01:26:24 2012	(r232633)
@@ -1,5 +1,5 @@
 XCOMM
-XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $
+XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $
 XCOMM
 XCOMM Imakefile for tcsh 6.12
 XCOMM Marc Horowitz, MIT SIPB
@@ -93,7 +93,11 @@ ones.  Please send in your fixes and add
 #      if (OSMinorVersion < 6)
 #       define ConfigH sol24
 #      else
-#       define ConfigH sol26
+#       if (OSMinorVersion < 9)
+#        define ConfigH sol26
+#       else
+#        define ConfigH sol29
+#       endif
 #      endif
 #     endif
 #    endif

Modified: stable/9/contrib/tcsh/Makefile.in
==============================================================================
--- stable/9/contrib/tcsh/Makefile.in	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/contrib/tcsh/Makefile.in	Wed Mar  7 01:26:24 2012	(r232633)
@@ -1,4 +1,4 @@
-# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $
+# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $
 #	Makefile.in	4.3	6/11/83
 #
 # C Shell with process control; VM/UNIX VAX Makefile
@@ -26,22 +26,27 @@ CF=-c
 CPPFLAGS=-I. -I$(srcdir)
 
 LFLAGS=
-#LFLAGS= -Zn10000		# hpux lint
+# hpux lint
+#LFLAGS= -Zn10000
 
 
-CFLAGS = @CFLAGS@		# This is set by autoconf.
-#CFLAGS= -g			# debug
-#CFLAGS= -O			# production
-#CFLAGS= 			# Broken optimizers....
+# This is set by autoconf:
+CFLAGS = @CFLAGS@
+# debug:
+#CFLAGS= -g
+# production:
+#CFLAGS= -O
+# Broken optimizers....
+#CFLAGS=
 
 #CFLAGS= -g -pg -DPROF
 #CFLAGS= -O -pg -DPROF
 
 # gcc 1.00-1.37
-#CFLAGS= -O -finline-functions -fstrength-reduce 
+#CFLAGS= -O -finline-functions -fstrength-reduce
 
 # gcc 1.37-1.40
-#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce 
+#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce
 # add -msoft-float for 68881 machines.
 
 # gcc 2.0
@@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@		# This is set by auto
 #CFLAGS= -O -Mnodebug -Mnoperfmon
 
 # DEC Alpha OSF/1
-#CFLAGS= -O2 -Olimit 2000	## Normal Optimization
-#CFLAGS= -O3 -Olimit 2000	## Full Optimization - may not work
+## Normal Optimization
+#CFLAGS= -O2 -Olimit 2000
+## Full Optimization - may not work
+#CFLAGS= -O3 -Olimit 2000
 #CF=-j
 #SUF=u
 #.SUFFIXES: .u
@@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@		# This is set by auto
 # global optimizer! (-O3).
 # On SGI 4.0+ you need to add -D__STDC__ too.
 #CFLAGS= -O3
-#CFLAGS= -O3 -Olimit 2000	## Ultrix 4.2a
+## Ultrix 4.2a
+#CFLAGS= -O3 -Olimit 2000
 #CF=-j
 #SUF=u
 #.SUFFIXES: .u 				## Ultrix and gnu-make need that
@@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@		# This is set by auto
 # CFLAGS= -O3
 
 # SINIX RMx00
-#CFLAGS= -O # -D_POSIX_SOURCE # -kansi
+#CFLAGS= -O# -D_POSIX_SOURCE# -kansi
 
 # Apollo's with cc [apollo builtins don't work with gcc]
 # and apollo should not define __STDC__ if it does not have
 # the standard header files. RT's (aos4.3) need that too;
 # you might want to skip the -O on the rt's... Not very wise.
 # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA)
-#DFLAGS=-U__STDC__ 
+#DFLAGS=-U__STDC__
 #DFLAGS=-D_IBMESA
 # On aix2.2.1 we need more compiler space.
 #DFLAGS=-Nd4000 -Nn3000
@@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs
 ################################################################
 ## LDFLAGS.  Define something here if you need to
 ################################################################
-LDFLAGS= @LDFLAGS@		## This is set by autoconf.
-#LDFLAGS= 			## The simplest, suitable for all.
-#LDFLAGS= -s			## Stripped. Takes less space on disk.
-#LDFLAGS= -s -n			## Pure executable. Spares paging over
-# 				## the network for machines with local
-#				## swap but external /usr/local/bin .
-#LDFLAGS= -s -n -Bstatic	## Without dynamic linking. (SunOS/cc)
-#LDFLAGS= -s -n -static		## Without dynamic linking. (SunOS/gcc)
-#LDFLAGS= -Wl,-s,-n		## Stripped, shared text (Unicos)
-#LDFLAGS= -s -static		## Link statically. (linux)
-#LDFLAGS= -s -N			## Impure executable (linux)
+## This is set by autoconf:
+LDFLAGS= @LDFLAGS@
+## The simplest, suitable for all.
+#LDFLAGS=
+## Stripped. Takes less space on disk.
+#LDFLAGS= -s
+## Pure executable.  Spares paging over the network for machines with
+## local swap but external /usr/local/bin .
+#LDFLAGS= -s -n
+## Without dynamic linking. (SunOS/cc)
+#LDFLAGS= -s -n -Bstatic
+## Without dynamic linking. (SunOS/gcc)
+#LDFLAGS= -s -n -static
+## Stripped, shared text (Unicos)
+#LDFLAGS= -Wl,-s,-n
+## Link statically. (linux)
+#LDFLAGS= -s -static
+## Impure executable (linux)
+#LDFLAGS= -s -N
 
 ################################################################
 ## SBINLDFLAGS.  Flags to build a tcsh suitable for installation in
@@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld
 ################################################################
 ## LIBES.  Pick one, or roll your own.
 ################################################################
-LIBES= @LIBS@	 			 ## This is set by autoconf.
-#LIBES= -ltermcap 			 ## BSD style things
-#LIBES= -ltermcap			 ## SunOS, HP-UX, pyramid
-#LIBES= -ltermcap			 ## Linux
-#LIBES= -ltermcap -lshadow		 ## Linux with PW_SHADOW
-#LIBES= -ltermcap -lsec			 ## Tek XD88/10 (UTekV) with PW_SHADOW
-#LIBES= -ltermcap -lsec			 ## Motorola MPC (sysV88) with PW_SHADOW
-#LIBES= -ltermcap -lcs			 ## Mach
-#LIBES= -ltermcap -lbsd			 ## DEC osf1 on the alpha
-#LIBES= -ltermcap -lbsd			 ## Intel paragon
-#LIBES= -ltermcap -lbsd			 ## Clipper intergraph
-#LIBES= -ltermcap -lseq			 ## Sequent's Dynix
-#LIBES= -ltermcap -lauth		 ## Ultrix with Enhanced Security
-#LIBES= -ltermcap -ldir -lx		 ## Xenix 386 style things
-#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0
-#LIBES= -lcurses			 ## AIX on the rt
-#LIBES= -lcurses			 ## TitanOS on the stellar
-#LIBES= -ltermlib -lsocket -lnsl	 ## SysV4 w/o BSDTIMES or Solaris 2
-#LIBES= -lcurses			 ## SysV3 w/o networking
-#LIBES= -lcurses -lnet			 ## SysV3 with networking
-#LIBES= -lcurses -ldir			 ## SysV2 w/o networking & dirlib
-#LIBES= -lcurses -ldir -lnet		 ## SysV2 with networking & dirlib
-#LIBES= -lcurses -lbsd			 ## AIX on the IBM 370 or rs6000 or ps2
-#LIBES= -lcurses -lbsd			 ## ETA10
-#LIBES= -lcurses -lbsd			 ## Irix3.1 on the SGI-IRIS4D
-#LIBES= -lcurses -lbsd -lc_s		 ## Irix3.3 on the SGI-IRIS4D w/o yp
-#LIBES= -lcurses -lsun -lbsd -lc_s	 ## Irix3.3 on the SGI-IRIS4D with yp
-#LIBES= -lcurses -lsocket -lbsd		 ## Amdahl UTS 2.1
-#LIBES= -lcurses -lsocket		 ## Intel's hypercube.
-#LIBES= -lcurses -lsocket		 ## ns32000 based Opus.
-#LIBES= -lcurses -lcposix		 ## ISC 2.2 without networking
-#LIBES= -lcposix -lc_s -lcurses -linet	 ## ISC 2.2 with networking
-#LIBES= -lcurses -lsec -lc_s		 ## ISC 2.0.2 without networking
-#LIBES= -lcurses -linet -lsec -lc_s	 ## ISC 2.0.2 with networking
-#LIBES= -lcurses -lintl -lcrypt		 ## SCO SysVR3.2v2.0
-#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1
-#LIBES= -lposix -ltermcap		 ## A/UX 2.0
-#LIBES= -lposix -ltermcap -lc_s		 ## A/UX 3.0
-#LIBES= -ldirent -lcurses		 ## att3b1 cc w/o shared lib & dirlib
-#LIBES= -shlib -ldirent -lcurses	 ## att3b1 gcc with shared lib & dirlib
-#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES
-#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra
-#LIBES= -ltermc				 ## emx under OS/2
-#LIBES=					 ## Minix, VMS_POSIX
-#LIBES= -ltermcap -lcrypt		 ## Multiflow
-#LIBES= -ltermcap -lcrypt		 ## NetBSD
-#LIBES= -lcurses 			 ## DDE Supermax
+## This is set by autoconf.
+LIBES= @LIBS@
+## BSD style things
+#LIBES= -ltermcap
+## SunOS, HP-UX, pyramid
+#LIBES= -ltermcap
+## Linux
+#LIBES= -ltermcap
+## Linux with PW_SHADOW
+#LIBES= -ltermcap -lshadow
+## Tek XD88/10 (UTekV) with PW_SHADOW
+#LIBES= -ltermcap -lsec
+## Motorola MPC (sysV88) with PW_SHADOW
+#LIBES= -ltermcap -lsec
+## Mach
+#LIBES= -ltermcap -lcs
+## DEC osf1 on the alpha
+#LIBES= -ltermcap -lbsd
+## Intel paragon
+#LIBES= -ltermcap -lbsd
+## Clipper intergraph
+#LIBES= -ltermcap -lbsd
+## Sequent's Dynix
+#LIBES= -ltermcap -lseq
+## Ultrix with Enhanced Security
+#LIBES= -ltermcap -lauth
+## Xenix 386 style things
+#LIBES= -ltermcap -ldir -lx
+## masscomp RTU6.0
+#LIBES= -ltermcap -lndir -lsocket -ljobs
+## AIX on the rt
+#LIBES= -lcurses
+## TitanOS on the stellar
+#LIBES= -lcurses
+## SysV4 w/o BSDTIMES or Solaris 2
+#LIBES= -ltermlib -lsocket -lnsl
+## SysV3 w/o networking
+#LIBES= -lcurses
+## SysV3 with networking
+#LIBES= -lcurses -lnet
+## SysV2 w/o networking & dirlib
+#LIBES= -lcurses -ldir
+## SysV2 with networking & dirlib
+#LIBES= -lcurses -ldir -lnet
+## AIX on the IBM 370 or rs6000 or ps2
+#LIBES= -lcurses -lbsd
+## ETA10
+#LIBES= -lcurses -lbsd
+## Irix3.1 on the SGI-IRIS4D
+#LIBES= -lcurses -lbsd
+## Irix3.3 on the SGI-IRIS4D w/o yp
+#LIBES= -lcurses -lbsd -lc_s
+## Irix3.3 on the SGI-IRIS4D with yp
+#LIBES= -lcurses -lsun -lbsd -lc_s
+## Amdahl UTS 2.1
+#LIBES= -lcurses -lsocket -lbsd
+## Intel's hypercube.
+#LIBES= -lcurses -lsocket
+## ns32000 based Opus.
+#LIBES= -lcurses -lsocket
+## ISC 2.2 without networking
+#LIBES= -lcurses -lcposix
+## ISC 2.2 with networking
+#LIBES= -lcposix -lc_s -lcurses -linet
+## ISC 2.0.2 without networking
+#LIBES= -lcurses -lsec -lc_s
+## ISC 2.0.2 with networking
+#LIBES= -lcurses -linet -lsec -lc_s
+## SCO SysVR3.2v2.0
+#LIBES= -lcurses -lintl -lcrypt
+## SCO+ODT1.1
+#LIBES= -lcurses -lintl -lsocket -lcrypt
+## A/UX 2.0
+#LIBES= -lposix -ltermcap
+## A/UX 3.0
+#LIBES= -lposix -ltermcap -lc_s
+## att3b1 cc w/o shared lib & dirlib
+#LIBES= -ldirent -lcurses
+## att3b1 gcc with shared lib & dirlib
+#LIBES= -shlib -ldirent -lcurses
+## SysV4 with BSDTIMES
+#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a
+## Stardent Vistra
+#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a
+## emx under OS/2
+#LIBES= -ltermc
+## Minix, VMS_POSIX
+#LIBES=
+## Multiflow
+#LIBES= -ltermcap -lcrypt
+## NetBSD
+#LIBES= -ltermcap -lcrypt
+## DDE Supermax
+#LIBES= -lcurses
 
 ################################################################
 ## EXTRAFLAGS and EXTRALIBS
@@ -222,8 +285,10 @@ LIBES= @LIBS@	 			 ## This is set by aut
 #
 #Solaris and HPUX require the BSD libraries with AFS.
 #We use -lc to use only what we require.
-#AFSAUXLIB = -lsocket -lnsl -lc -lucb                    # Solaris
-#AFSAUXLIB = -lc -lBSD                                   # HPUX   
+# Solaris
+#AFSAUXLIB = -lsocket -lnsl -lc -lucb
+# HPUX   
+#AFSAUXLIB = -lc -lBSD
 #
 #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\
 #         -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\
@@ -244,26 +309,38 @@ EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV
 # will lose the editor and job control.
 
 # This is for setting your C preprocessor value.
-CPP = @CPP@ # This is set by autoconf.
+# This is set by autoconf.
+CPP = @CPP@
 # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which
 # on the suns does not know how to make dynamically linked binaries.
-CC = @CC@ # This is set by autoconf.
+# This is set by autoconf.
+CC = @CC@
 #CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra
-#CC=	gcc -Wall -pipe -B/bin/	# -ansi -pedantic
-#CC=	gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux)
-#CC=	shlicc 	# BSDI2.1 w/ shared libraries
+# -ansi -pedantic
+#CC=	gcc -Wall -pipe -B/bin/
+# Generate code for Intel 486 (linux)
+#CC=	gcc -m486 -pipe -Wall
+# BSDI2.1 w/ shared libraries
+#CC=	shlicc
 #CC=	cc
 #CC=	occ
 #CC=	acc
 #CC=	pcc
 #CC=	hc -w
-#CC=	c89	# For VMS/POSIX
-#CC=	/bin/cc	# For suns, w/o gcc and SVR4
-#CC=	/usr/lib/sun.compile/cc  # FPS 500 (+FPX) with Sun C compiler
-#CC=	/opt/SUNWspro/bin/cc	# Solaris 2.1
-#CC=	scc 	# Alliant fx2800
-#CC=	cc	-h0,ansi,novector,float0 # for NEC SX-4
+# For VMS/POSIX
+#CC=	c89
+# For suns, w/o gcc and SVR4
+#CC=	/bin/cc
+# FPS 500 (+FPX) with Sun C compiler
+#CC=	/usr/lib/sun.compile/cc
+# Solaris 2.1
+#CC=	/opt/SUNWspro/bin/cc
+# Alliant fx2800
+#CC=	scc
+# for NEC SX-4
+#CC=	cc	-h0,ansi,novector,float0
 #CC=	lcc	-wa 
+CC_FOR_GETHOST = @CC_FOR_GETHOST@
 ED=	ed
 AS=	as
 RM=	rm
@@ -272,8 +349,10 @@ VGRIND=	csh /usr/ucb/vgrind
 CTAGS=	/usr/ucb/ctags
 #XSTR= /usr/ucb/xstr
 SCCS=	/usr/local/sccs
-PARALLEL=12				# Make the multi-max run fast.
-#P=&					# Use Sequent's parallel make
+# Make the multi-max run fast.
+PARALLEL=12
+# Use Sequent's parallel make
+#P=&
 P=
 prefix=@prefix@
 exec_prefix=@exec_prefix@
@@ -282,12 +361,17 @@ mandir=@datarootdir@/man
 MANSECT=1
 DESTBIN=${DESTDIR}${bindir}
 DESTMAN=${DESTDIR}${mandir}/man${MANSECT}
-# DESTMAN=${DESTDIR}/catman/man${MANSECT}	 # A/UX
-# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
-# DESTMAN=/usr/catman/1l			 # Amiga unix (SysVR4)
+# A/UX
+# DESTMAN=${DESTDIR}/catman/man${MANSECT}
+# Stardent Vistra (SysVR4)
+# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT}
+# Amiga unix (SysVR4)
+# DESTMAN=/usr/catman/1l
 EXEEXT=@EXEEXT@
 FTPAREA=/usr/spool/ftp
 
+BUILD_CATALOGS = @BUILD_CATALOGS@
+
 ASSRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
 	sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
 	sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
@@ -330,9 +414,9 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin
 	host.defs gethost.c tcsh.man2html configure.in configure config.h.in \
 	tests/testsuite.at
 TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \
-	tests/expr.at tests/lexical.at tests/mb-eucjp.at tests/mb-utf8.at \
-	tests/noexec.at tests/syntax.at tests/subst.at tests/variables.at \
-	tests/sh.dol.at
+	tests/expr.at tests/lexical.at tests/mb-eucjp.at \
+	tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \
+	tests/variables.at tests/sh.dol.at
 
 VHSRCS=${PVSRCS} ${AVSRCS}
 
@@ -345,7 +429,7 @@ DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} 
 OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
 
 
-all: ${BUILD}
+all: ${BUILD} catalogs
 
 tcsh$(EXEEXT):$(P) ${OBJS} 
 	rm -f tcsh$(EXEEXT) core
@@ -365,7 +449,7 @@ pure:$(P) ${OBJS} 
 
 gethost:  gethost.c sh.err.h tc.const.h sh.h
 	rm -f gethost
-	${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS}
+	${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c
 
 tc.defs.c:	gethost host.defs
 	@rm -f $@.tmp
@@ -463,7 +547,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co
 	  echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
 	} >$(srcdir)/tests/package.m4
 
-$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES)
+$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir)/tests/testsuite.at $(TESTFILES)
 	autom4te --language=autotest -I $(srcdir)/tests \
 		$(srcdir)/tests/testsuite.at -o $@.tmp
 	mv $@.tmp $@
@@ -511,20 +595,36 @@ vgrind:
 
 install-strip: install
 
-install: tcsh$(EXEEXT) 
+install: tcsh$(EXEEXT) install.catalogs install.man
 	-mkdir -p ${DESTBIN}
 	-mv -f ${DESTBIN}/tcsh$(EXEEXT)  ${DESTBIN}/tcsh.old
 	cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT)
 	-strip ${DESTBIN}/tcsh$(EXEEXT)
 	chmod 755 ${DESTBIN}/tcsh$(EXEEXT)
 
+install.catalogs:
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0
+
 install.man: tcsh.man
 	-mkdir -p ${DESTMAN}
 	-rm -f ${DESTMAN}/tcsh.${MANSECT}
 	cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT}
 	chmod 444 ${DESTMAN}/tcsh.${MANSECT}
 
-install.cygwin: install install.man
+# Amiga Unix
+#install.man: tcsh.man
+#        compress tcsh.man
+#	cp tcsh.man.Z ${DESTMAN}/tcsh.Z
+#	chmod 444 ${DESTMAN}/tcsh.Z
+
+# Apple A/UX
+#install.man: tcsh.man
+#	-rm -f ${DESTMAN}/tcsh.${MANSECT}.Z
+#	nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
+#	chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
+
+install.cygwin: install
+	-gzip ${DESTMAN}/tcsh.${MANSECT}
 	-mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh
 	cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh
 	cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh
@@ -542,24 +642,15 @@ install.cygwin: install install.man
 	cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh
 	cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh
 
-# Amiga Unix
-#install.man: tcsh.man
-#        compress tcsh.man
-#	cp tcsh.man.Z ${DESTMAN}/tcsh.Z
-#	chmod 444 ${DESTMAN}/tcsh.Z
-
-# Apple A/UX
-#install.man: tcsh.man
-#	-rm -f ${DESTMAN}/tcsh.${MANSECT}.Z
-#	nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
-#	chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
-
-clean:
+clean: clean.catalogs
 	${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost
 	${RM} -f *.${SUF} *.i *.s
 	${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c
 	${RM} -f tcsh.*.m tcsh.*.cat
 
+clean.catalogs:
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0
+
 veryclean: clean
 	${RM} -f Makefile config.h config_p.h
 	${RM} -f config.status config.cache config.log tcsh.ps
@@ -607,7 +698,7 @@ shar:
 	rm -rf tcsh-${VERSION}
 
 catalogs:
-	@(cd nls; make catalogs)
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0
 
 tcsh-${VERSION}.tar.Z:
 	rm -rf tcsh-${VERSION} 

Modified: stable/9/contrib/tcsh/Ported
==============================================================================
--- stable/9/contrib/tcsh/Ported	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/contrib/tcsh/Ported	Wed Mar  7 01:26:24 2012	(r232633)
@@ -7,7 +7,7 @@ find it out-of-date, or you have additio
 christos
 
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun3, sun4, sun386i
 COMPILER:	cc, gcc, acc
 CFLAGS	:	normal
@@ -18,7 +18,7 @@ ENVIRON	:	n/a
 NOTES	:	Don't compile with /usr/5bin/cc
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun4, ultra
 COMPILER:	cc, gcc
 CFLAGS	:	normal
@@ -34,18 +34,29 @@ NOTES	:	The sunpro compiler cannot compi
 	:	point failures of programs exec'ed from tcsh.
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	ultra
 COMPILER:	WorkShop cc
 CFLAGS	:	normal
 LIBES	:	-lcurses -lsocket -lnsl
-OS	:	solaris 2.6
+OS	:	solaris 2.6, 2.7, 8
 CONFIG	:	sol26
 ENVIRON	:	n/a
 NOTES	:	none
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
+MODELS	:	ultra, i686, x86_64
+COMPILER:	Sun Studio cc
+CFLAGS	:	normal
+LIBES	:	-lcurses -lsocket -lnsl
+OS	:	solaris 9, 10
+CONFIG	:	sol29
+ENVIRON	:	n/a
+NOTES	:	none
+VERSION	:	6.18
+
+VENDOR	:	Sun
 MODELS	:	i386
 COMPILER:	cc, gcc
 CFLAGS	:	-D__STDC__=0
@@ -56,7 +67,7 @@ ENVIRON	:	n/a
 NOTES	:	n/a
 VERSION	:	6.04.13
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun4
 COMPILER:	gcc
 CFLAGS	:	normal

Modified: stable/9/contrib/tcsh/README
==============================================================================
--- stable/9/contrib/tcsh/README	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/contrib/tcsh/README	Wed Mar  7 01:26:24 2012	(r232633)
@@ -1,4 +1,4 @@
-This is tcsh version 6.17.00.  Tcsh is a version of the Berkeley
+This is tcsh version 6.18.01.  Tcsh is a version of the Berkeley
 C-Shell, with the addition of: a command line editor, command and file
 name completion, listing, etc. and a bunch of small additions to the
 shell itself.
@@ -87,7 +87,7 @@ To install tcsh:
 
 10) Enjoy.
 
-12) PLEASE file any bug reports (and fixes), code for new features at:
+11) PLEASE file any bug reports (and fixes), code for new features at:
 
 	http://bugs.gw.com/
 

Modified: stable/9/contrib/tcsh/WishList
==============================================================================
--- stable/9/contrib/tcsh/WishList	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/contrib/tcsh/WishList	Wed Mar  7 01:26:24 2012	(r232633)
@@ -52,17 +52,6 @@ ey )
    - bhooglan
      _________________________________________________________________
 
-   I'm a long-time faithful user of tcsh, and one thing has always bugged
-   me -- the need to type "rehash" at a prompt when adding a new command.
-   My  suggestions  is  to  change  tcsh  so before printing "Command not
-   found.",  it  first  searches  its  entire  path and rebuilds its hash
-   table.  Only  after doing this, and if the command is still not in the
-   path,  then  print  "Command  not  found.".  I  realize there are some
-   extreme  cases  in  which  this  is suboptimal, but in most cases with
-   normal  users  this  would  be  a big win, and simplify the manual and
-   perhaps even the code.
-     _________________________________________________________________
-
    Wish "tcsh -l" would accept other flags. At least "-c".
 
    Currently I can't get ssh to have the right environment unless it is a

Modified: stable/9/contrib/tcsh/complete.tcsh
==============================================================================
--- stable/9/contrib/tcsh/complete.tcsh	Wed Mar  7 00:16:32 2012	(r232632)
+++ stable/9/contrib/tcsh/complete.tcsh	Wed Mar  7 01:26:24 2012	(r232633)
@@ -1,5 +1,5 @@
 #
-# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $
+# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $
 # example file using the new completion code
 #
 # Debian GNU/Linux
@@ -636,7 +636,7 @@ if ($?_complete) then
     complete nmap	'n@-e@`ifconfig -l`@' 'p/*/$hostnames/'
     complete perldoc 	'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@'
     complete postfix    'n/*/(start stop reload abort flush check)/'
-    complete postmap	'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/'
+    complete postmap	'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/'
     complete rcsdiff	'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@'

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 01:31:30 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 534631065676;
	Wed,  7 Mar 2012 01:31:30 +0000 (UTC) (envelope-from mp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 39D858FC16;
	Wed,  7 Mar 2012 01:31:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q271VUmv066161;
	Wed, 7 Mar 2012 01:31:30 GMT (envelope-from mp@svn.freebsd.org)
Received: (from mp@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q271VTsY066148;
	Wed, 7 Mar 2012 01:31:29 GMT (envelope-from mp@svn.freebsd.org)
Message-Id: <201203070131.q271VTsY066148@svn.freebsd.org>
From: Mark Peek <mp@FreeBSD.org>
Date: Wed, 7 Mar 2012 01:31:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232635 - in stable/8: bin/csh contrib/tcsh
	contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C
	contrib/tcsh/nls/et contrib/tcsh/nls/finnish
	contrib/tcsh/nls/french contrib/tcsh/nls...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 01:31:30 -0000

Author: mp
Date: Wed Mar  7 01:31:29 2012
New Revision: 232635
URL: http://svn.freebsd.org/changeset/base/232635

Log:
  MFC r231990
  
  Update to tcsh 6.18.01

Added:
  stable/8/contrib/tcsh/nls/Makefile.in
     - copied unchanged from r231990, head/contrib/tcsh/nls/Makefile.in
  stable/8/contrib/tcsh/nls/catgen
     - copied unchanged from r231990, head/contrib/tcsh/nls/catgen
  stable/8/contrib/tcsh/svn
     - copied unchanged from r231990, head/contrib/tcsh/svn
Deleted:
  stable/8/bin/csh/host.defs
  stable/8/contrib/tcsh/nls/Makefile
Modified:
  stable/8/bin/csh/Makefile
  stable/8/bin/csh/config.h
  stable/8/bin/csh/config_p.h
  stable/8/contrib/tcsh/Fixes
  stable/8/contrib/tcsh/Imakefile
  stable/8/contrib/tcsh/Makefile.in
  stable/8/contrib/tcsh/Ported
  stable/8/contrib/tcsh/README
  stable/8/contrib/tcsh/WishList
  stable/8/contrib/tcsh/complete.tcsh
  stable/8/contrib/tcsh/config.guess
  stable/8/contrib/tcsh/config.h.in
  stable/8/contrib/tcsh/config.sub
  stable/8/contrib/tcsh/config/bsd4.4
  stable/8/contrib/tcsh/config_f.h
  stable/8/contrib/tcsh/configure
  stable/8/contrib/tcsh/configure.in
  stable/8/contrib/tcsh/ed.chared.c
  stable/8/contrib/tcsh/ed.inputl.c
  stable/8/contrib/tcsh/ed.refresh.c
  stable/8/contrib/tcsh/ed.screen.c
  stable/8/contrib/tcsh/ed.term.c
  stable/8/contrib/tcsh/gethost.c
  stable/8/contrib/tcsh/glob.c
  stable/8/contrib/tcsh/glob.h
  stable/8/contrib/tcsh/host.defs
  stable/8/contrib/tcsh/install-sh
  stable/8/contrib/tcsh/nls/C/charset
  stable/8/contrib/tcsh/nls/C/set19
  stable/8/contrib/tcsh/nls/et/charset
  stable/8/contrib/tcsh/nls/et/set1
  stable/8/contrib/tcsh/nls/et/set10
  stable/8/contrib/tcsh/nls/et/set11
  stable/8/contrib/tcsh/nls/et/set13
  stable/8/contrib/tcsh/nls/et/set14
  stable/8/contrib/tcsh/nls/et/set15
  stable/8/contrib/tcsh/nls/et/set16
  stable/8/contrib/tcsh/nls/et/set17
  stable/8/contrib/tcsh/nls/et/set18
  stable/8/contrib/tcsh/nls/et/set19
  stable/8/contrib/tcsh/nls/et/set2
  stable/8/contrib/tcsh/nls/et/set20
  stable/8/contrib/tcsh/nls/et/set21
  stable/8/contrib/tcsh/nls/et/set22
  stable/8/contrib/tcsh/nls/et/set23
  stable/8/contrib/tcsh/nls/et/set24
  stable/8/contrib/tcsh/nls/et/set25
  stable/8/contrib/tcsh/nls/et/set26
  stable/8/contrib/tcsh/nls/et/set27
  stable/8/contrib/tcsh/nls/et/set3
  stable/8/contrib/tcsh/nls/et/set30
  stable/8/contrib/tcsh/nls/et/set4
  stable/8/contrib/tcsh/nls/et/set5
  stable/8/contrib/tcsh/nls/et/set6
  stable/8/contrib/tcsh/nls/et/set7
  stable/8/contrib/tcsh/nls/et/set8
  stable/8/contrib/tcsh/nls/et/set9
  stable/8/contrib/tcsh/nls/finnish/charset
  stable/8/contrib/tcsh/nls/finnish/set1
  stable/8/contrib/tcsh/nls/finnish/set10
  stable/8/contrib/tcsh/nls/finnish/set11
  stable/8/contrib/tcsh/nls/finnish/set12
  stable/8/contrib/tcsh/nls/finnish/set13
  stable/8/contrib/tcsh/nls/finnish/set14
  stable/8/contrib/tcsh/nls/finnish/set16
  stable/8/contrib/tcsh/nls/finnish/set17
  stable/8/contrib/tcsh/nls/finnish/set18
  stable/8/contrib/tcsh/nls/finnish/set19
  stable/8/contrib/tcsh/nls/finnish/set2
  stable/8/contrib/tcsh/nls/finnish/set20
  stable/8/contrib/tcsh/nls/finnish/set22
  stable/8/contrib/tcsh/nls/finnish/set23
  stable/8/contrib/tcsh/nls/finnish/set25
  stable/8/contrib/tcsh/nls/finnish/set26
  stable/8/contrib/tcsh/nls/finnish/set27
  stable/8/contrib/tcsh/nls/finnish/set29
  stable/8/contrib/tcsh/nls/finnish/set3
  stable/8/contrib/tcsh/nls/finnish/set6
  stable/8/contrib/tcsh/nls/finnish/set7
  stable/8/contrib/tcsh/nls/finnish/set9
  stable/8/contrib/tcsh/nls/french/charset
  stable/8/contrib/tcsh/nls/french/set1
  stable/8/contrib/tcsh/nls/french/set10
  stable/8/contrib/tcsh/nls/french/set11
  stable/8/contrib/tcsh/nls/french/set12
  stable/8/contrib/tcsh/nls/french/set13
  stable/8/contrib/tcsh/nls/french/set15
  stable/8/contrib/tcsh/nls/french/set16
  stable/8/contrib/tcsh/nls/french/set17
  stable/8/contrib/tcsh/nls/french/set18
  stable/8/contrib/tcsh/nls/french/set19
  stable/8/contrib/tcsh/nls/french/set2
  stable/8/contrib/tcsh/nls/french/set20
  stable/8/contrib/tcsh/nls/french/set21
  stable/8/contrib/tcsh/nls/french/set22
  stable/8/contrib/tcsh/nls/french/set23
  stable/8/contrib/tcsh/nls/french/set25
  stable/8/contrib/tcsh/nls/french/set26
  stable/8/contrib/tcsh/nls/french/set27
  stable/8/contrib/tcsh/nls/french/set3
  stable/8/contrib/tcsh/nls/french/set30
  stable/8/contrib/tcsh/nls/french/set31
  stable/8/contrib/tcsh/nls/french/set4
  stable/8/contrib/tcsh/nls/french/set6
  stable/8/contrib/tcsh/nls/french/set7
  stable/8/contrib/tcsh/nls/french/set8
  stable/8/contrib/tcsh/nls/french/set9
  stable/8/contrib/tcsh/nls/german/charset
  stable/8/contrib/tcsh/nls/german/set1
  stable/8/contrib/tcsh/nls/german/set10
  stable/8/contrib/tcsh/nls/german/set13
  stable/8/contrib/tcsh/nls/german/set15
  stable/8/contrib/tcsh/nls/german/set16
  stable/8/contrib/tcsh/nls/german/set17
  stable/8/contrib/tcsh/nls/german/set18
  stable/8/contrib/tcsh/nls/german/set19
  stable/8/contrib/tcsh/nls/german/set2
  stable/8/contrib/tcsh/nls/german/set20
  stable/8/contrib/tcsh/nls/german/set22
  stable/8/contrib/tcsh/nls/german/set23
  stable/8/contrib/tcsh/nls/german/set25
  stable/8/contrib/tcsh/nls/german/set26
  stable/8/contrib/tcsh/nls/german/set27
  stable/8/contrib/tcsh/nls/german/set29
  stable/8/contrib/tcsh/nls/german/set3
  stable/8/contrib/tcsh/nls/german/set30
  stable/8/contrib/tcsh/nls/german/set31
  stable/8/contrib/tcsh/nls/german/set4
  stable/8/contrib/tcsh/nls/german/set5
  stable/8/contrib/tcsh/nls/german/set6
  stable/8/contrib/tcsh/nls/german/set7
  stable/8/contrib/tcsh/nls/german/set8
  stable/8/contrib/tcsh/nls/german/set9
  stable/8/contrib/tcsh/nls/greek/charset
  stable/8/contrib/tcsh/nls/greek/set1   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set10   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set11   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set12   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set13   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set14   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set15   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set16   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set17   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set18   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set19   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set2   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set20   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set21   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set22   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set23   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set25   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set26   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set27   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set29   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set3   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set30   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set31   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set4   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set5   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set6   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set7   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set8   (contents, props changed)
  stable/8/contrib/tcsh/nls/greek/set9   (contents, props changed)
  stable/8/contrib/tcsh/nls/italian/charset
  stable/8/contrib/tcsh/nls/italian/set1
  stable/8/contrib/tcsh/nls/italian/set11
  stable/8/contrib/tcsh/nls/italian/set13
  stable/8/contrib/tcsh/nls/italian/set15
  stable/8/contrib/tcsh/nls/italian/set17
  stable/8/contrib/tcsh/nls/italian/set19
  stable/8/contrib/tcsh/nls/italian/set2
  stable/8/contrib/tcsh/nls/italian/set20
  stable/8/contrib/tcsh/nls/italian/set22
  stable/8/contrib/tcsh/nls/italian/set23
  stable/8/contrib/tcsh/nls/italian/set26
  stable/8/contrib/tcsh/nls/italian/set3
  stable/8/contrib/tcsh/nls/italian/set30
  stable/8/contrib/tcsh/nls/italian/set4
  stable/8/contrib/tcsh/nls/italian/set6
  stable/8/contrib/tcsh/nls/italian/set7
  stable/8/contrib/tcsh/nls/ja/charset
  stable/8/contrib/tcsh/nls/ja/set1   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set10   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set11   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set12   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set13   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set15   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set16   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set17   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set18   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set2   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set21   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set29   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set3   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set30   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set4   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set5   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set6   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set7   (contents, props changed)
  stable/8/contrib/tcsh/nls/ja/set8   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/charset
  stable/8/contrib/tcsh/nls/russian/set1   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set10   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set11   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set12   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set13   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set14   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set15   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set16   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set17   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set18   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set19   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set2   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set20   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set22   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set23   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set25   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set26   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set27   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set29   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set30   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set31   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set4   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set5   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set6   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set7   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set8   (contents, props changed)
  stable/8/contrib/tcsh/nls/russian/set9   (contents, props changed)
  stable/8/contrib/tcsh/nls/spanish/charset
  stable/8/contrib/tcsh/nls/spanish/set1
  stable/8/contrib/tcsh/nls/spanish/set10
  stable/8/contrib/tcsh/nls/spanish/set13
  stable/8/contrib/tcsh/nls/spanish/set14
  stable/8/contrib/tcsh/nls/spanish/set15
  stable/8/contrib/tcsh/nls/spanish/set16
  stable/8/contrib/tcsh/nls/spanish/set17
  stable/8/contrib/tcsh/nls/spanish/set18
  stable/8/contrib/tcsh/nls/spanish/set19
  stable/8/contrib/tcsh/nls/spanish/set2
  stable/8/contrib/tcsh/nls/spanish/set20
  stable/8/contrib/tcsh/nls/spanish/set22
  stable/8/contrib/tcsh/nls/spanish/set23
  stable/8/contrib/tcsh/nls/spanish/set25
  stable/8/contrib/tcsh/nls/spanish/set26
  stable/8/contrib/tcsh/nls/spanish/set27
  stable/8/contrib/tcsh/nls/spanish/set3
  stable/8/contrib/tcsh/nls/spanish/set30
  stable/8/contrib/tcsh/nls/spanish/set4
  stable/8/contrib/tcsh/nls/spanish/set5
  stable/8/contrib/tcsh/nls/spanish/set6
  stable/8/contrib/tcsh/nls/spanish/set7
  stable/8/contrib/tcsh/nls/spanish/set8
  stable/8/contrib/tcsh/nls/spanish/set9
  stable/8/contrib/tcsh/nls/ukrainian/charset
  stable/8/contrib/tcsh/nls/ukrainian/set1   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set10   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set11   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set12   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set13   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set14   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set15   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set16   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set17   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set18   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set19   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set2   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set20   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set22   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set23   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set25   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set26   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set27   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set29   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set30   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set31   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set5   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set6   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set7   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set8   (contents, props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set9   (contents, props changed)
  stable/8/contrib/tcsh/patchlevel.h
  stable/8/contrib/tcsh/pathnames.h
  stable/8/contrib/tcsh/sh.c
  stable/8/contrib/tcsh/sh.char.c
  stable/8/contrib/tcsh/sh.char.h
  stable/8/contrib/tcsh/sh.decls.h
  stable/8/contrib/tcsh/sh.dir.c
  stable/8/contrib/tcsh/sh.dol.c
  stable/8/contrib/tcsh/sh.err.c
  stable/8/contrib/tcsh/sh.exec.c
  stable/8/contrib/tcsh/sh.exp.c
  stable/8/contrib/tcsh/sh.file.c
  stable/8/contrib/tcsh/sh.func.c
  stable/8/contrib/tcsh/sh.glob.c
  stable/8/contrib/tcsh/sh.h
  stable/8/contrib/tcsh/sh.hist.c
  stable/8/contrib/tcsh/sh.lex.c
  stable/8/contrib/tcsh/sh.misc.c
  stable/8/contrib/tcsh/sh.parse.c
  stable/8/contrib/tcsh/sh.print.c
  stable/8/contrib/tcsh/sh.proc.c
  stable/8/contrib/tcsh/sh.proc.h
  stable/8/contrib/tcsh/sh.sem.c
  stable/8/contrib/tcsh/sh.set.c
  stable/8/contrib/tcsh/sh.time.c
  stable/8/contrib/tcsh/tc.alloc.c
  stable/8/contrib/tcsh/tc.const.c
  stable/8/contrib/tcsh/tc.decls.h
  stable/8/contrib/tcsh/tc.disc.c
  stable/8/contrib/tcsh/tc.func.c
  stable/8/contrib/tcsh/tc.nls.c
  stable/8/contrib/tcsh/tc.nls.h
  stable/8/contrib/tcsh/tc.os.c
  stable/8/contrib/tcsh/tc.os.h
  stable/8/contrib/tcsh/tc.prompt.c
  stable/8/contrib/tcsh/tc.sig.c
  stable/8/contrib/tcsh/tc.sig.h
  stable/8/contrib/tcsh/tc.str.c
  stable/8/contrib/tcsh/tc.wait.h
  stable/8/contrib/tcsh/tc.who.c
  stable/8/contrib/tcsh/tcsh.man
  stable/8/contrib/tcsh/tcsh.man2html
  stable/8/contrib/tcsh/tw.color.c
  stable/8/contrib/tcsh/tw.init.c
  stable/8/contrib/tcsh/tw.parse.c
  stable/8/contrib/tcsh/vms.termcap.c
Directory Properties:
  stable/8/bin/csh/   (props changed)
  stable/8/contrib/tcsh/   (props changed)
  stable/8/contrib/tcsh/nls/greek/set24   (props changed)
  stable/8/contrib/tcsh/nls/ja/set24   (props changed)
  stable/8/contrib/tcsh/nls/russian/set21   (props changed)
  stable/8/contrib/tcsh/nls/russian/set24   (props changed)
  stable/8/contrib/tcsh/nls/russian/set3   (props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set21   (props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set24   (props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set3   (props changed)
  stable/8/contrib/tcsh/nls/ukrainian/set4   (props changed)

Modified: stable/8/bin/csh/Makefile
==============================================================================
--- stable/8/bin/csh/Makefile	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/bin/csh/Makefile	Wed Mar  7 01:31:29 2012	(r232635)
@@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG
 DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"'
 .endif
 CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS}
-WARNS?=	0
+WARNS?=	1
 SRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
 	sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
 	sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
@@ -107,10 +107,10 @@ gethost: gethost.c sh.err.h tc.const.h s
 	@rm -f ${.TARGET}
 	${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c
 
-tc.defs.c: gethost ${.CURDIR}/host.defs
+tc.defs.c: gethost ${TCSHDIR}/host.defs
 	@rm -f ${.TARGET}
 	@echo "/* Do not edit this file, make creates it */" > ${.TARGET}
-	./gethost ${.CURDIR}/host.defs >> ${.TARGET}
+	./gethost ${TCSHDIR}/host.defs >> ${.TARGET}
 
 ed.defns.h: ed.defns.c
 	@rm -f ${.TARGET}

Modified: stable/8/bin/csh/config.h
==============================================================================
--- stable/8/bin/csh/config.h	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/bin/csh/config.h	Wed Mar  7 01:31:29 2012	(r232635)
@@ -1,5 +1,5 @@
 /* $FreeBSD$ */
-/* config.h.  Generated by configure.  */
+/* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
 /* Define to the type of elements in the array set by `getgroups'. Usually
@@ -12,9 +12,6 @@
 /* Define to 1 if you have the <auth.h> header file. */
 /* #undef HAVE_AUTH_H */
 
-/* Define to 1 if you have the `catgets' function. */
-#define HAVE_CATGETS 1
-
 /* Define to 1 if you have the <crypt.h> header file. */
 /* #undef HAVE_CRYPT_H */
 
@@ -41,6 +38,9 @@
 /* Define to 1 if you have the `dup2' function. */
 #define HAVE_DUP2 1
 
+/* Define to 1 if you have the <features.h> header file. */
+/* #undef HAVE_FEATURES_H */
+
 /* Define to 1 if you have the `getauthid' function. */
 /* #undef HAVE_GETAUTHID */
 
@@ -56,7 +56,10 @@
 /* Define to 1 if you have the `getutent' function. */
 /* #undef HAVE_GETUTENT */
 
-/* Define if you have the iconv() function. */
+/* Define to 1 if you have the `getutxent' function. */
+/* #undef HAVE_GETUTXENT */
+
+/* Define if you have the iconv() function and it works. */
 /* #undef HAVE_ICONV */
 
 /* Define to 1 if you have the <inttypes.h> header file. */
@@ -65,6 +68,9 @@
 /* Define to 1 if the system has the type `long long'. */
 #define HAVE_LONG_LONG 1
 
+/* Define to 1 if you have the `mallinfo' function. */
+/* #undef HAVE_MALLINFO */
+
 /* Define to 1 if mbrtowc and mbstate_t are properly declared. */
 #define HAVE_MBRTOWC 1
 
@@ -77,6 +83,9 @@
 /* Define to 1 if you have the `memset' function. */
 #define HAVE_MEMSET 1
 
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 /* #undef HAVE_NDIR_H */
 
@@ -86,6 +95,9 @@
 /* Define to 1 if you have the `nl_langinfo' function. */
 #define HAVE_NL_LANGINFO 1
 
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
 /* Define to 1 if you have the `sbrk' function. */
 #define HAVE_SBRK 1
 
@@ -120,22 +132,34 @@
 /* Define to 1 if you have the `strstr' function. */
 #define HAVE_STRSTR 1
 
-/* Define to 1 if `d_ino' is member of `struct dirent'. */
+/* Define to 1 if `d_ino' is a member of `struct dirent'. */
 #define HAVE_STRUCT_DIRENT_D_INO 1
 
-/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
 
-/* Define to 1 if `ut_host' is member of `struct utmp'. */
+/* Define to 1 if `ut_host' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_HOST */
+
+/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_TV */
+
+/* Define to 1 if `ut_user' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_USER */
+
+/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */
+
+/* Define to 1 if `ut_host' is a member of `struct utmp'. */
 #define HAVE_STRUCT_UTMP_UT_HOST 1
 
-/* Define to 1 if `ut_tv' is member of `struct utmp'. */
+/* Define to 1 if `ut_tv' is a member of `struct utmp'. */
 /* #undef HAVE_STRUCT_UTMP_UT_TV */
 
-/* Define to 1 if `ut_user' is member of `struct utmp'. */
+/* Define to 1 if `ut_user' is a member of `struct utmp'. */
 /* #undef HAVE_STRUCT_UTMP_UT_USER */
 
-/* Define to 1 if `ut_xtime' is member of `struct utmp'. */
+/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */
 /* #undef HAVE_STRUCT_UTMP_UT_XTIME */
 
 /* Define to 1 if you have the `sysconf' function. */
@@ -179,25 +203,31 @@
 /* Support NLS. */
 #define NLS 1
 
+/* Support NLS catalogs. */
+#define NLS_CATALOGS 1
+
 /* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
+#define PACKAGE_BUGREPORT "http://bugs.gw.com/"
 
 /* Define to the full name of this package. */
-#define PACKAGE_NAME ""
+#define PACKAGE_NAME "tcsh"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
+#define PACKAGE_STRING "tcsh 6.18.01"
 
 /* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
+#define PACKAGE_TARNAME "tcsh"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION ""
+#define PACKAGE_VERSION "6.18.01"
 
 /* Define to 1 if the `setpgrp' function takes no argument. */
 /* #undef SETPGRP_VOID */
 
-/* The size of a `wchar_t', as computed by sizeof. */
+/* The size of `wchar_t', as computed by sizeof. */
 #define SIZEOF_WCHAR_T 4
 
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
@@ -206,6 +236,11 @@
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */
 
@@ -215,7 +250,7 @@
 /* Define to `int' if <sys/types.h> does not define. */
 /* #undef mode_t */
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 /* #undef size_t */
 
 /* Define to `int' if neither <sys/types.h> nor <sys/socket.h> define. */
@@ -227,6 +262,10 @@
 /* Define to `int' if <sys/types.h> doesn't define. */
 /* #undef uid_t */
 
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
 /* Define to empty if the keyword `volatile' does not work. Warning: valid
    code using `volatile' can become incorrect without. Disable with care. */
 /* #undef volatile */
@@ -234,9 +273,5 @@
 #include "config_p.h"
 #include "config_f.h"
 
-#ifndef NO_NLS_CATALOGS
-#define NLS_CATALOGS
-#endif
-
 /* Work around a vendor issue where config_f.h is #undef'ing this setting */
 #define SYSMALLOC

Modified: stable/8/bin/csh/config_p.h
==============================================================================
--- stable/8/bin/csh/config_p.h	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/bin/csh/config_p.h	Wed Mar  7 01:31:29 2012	(r232635)
@@ -105,9 +105,6 @@
 
 #elif defined(__APPLE__)
 # define SYSMALLOC
-
-#else
-# define NLS_CATALOGS
 #endif
 
 #endif /* _h_config */

Modified: stable/8/contrib/tcsh/Fixes
==============================================================================
--- stable/8/contrib/tcsh/Fixes	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/contrib/tcsh/Fixes	Wed Mar  7 01:31:29 2012	(r232635)
@@ -1,3 +1,147 @@
+  6. V6.18.01 - 20120214
+  5. fix interruptible wait again
+  4. ignore bogus compiler overflow message
+  3. cleanup ifdefs in utmp code, and provide default array entries
+  2. Ignore #machine entries in host.defs
+  1. Detect missing ) in gethost.c (Corinna Vinschen)
+
+104. V6.18.00 - 20120114
+103. remove unused variables.
+102. Make gethost use definitions for x __x__ and __x automatically.
+101. More utmp fixes
+100. V6.17.10 - 20120105
+ 99. Add more FreeBSD/NetBSD machines
+ 98. Add portability wrapper for gencat
+ 97. Fix warning for write in SYSMALLOC systems.
+ 96. V6.17.09 - 20120102
+ 95. revert gencat handling to pre-cygwin fixes (without the env settings)
+ 94. remove stray endutent()
+ 93. V6.17.08 - 20111230
+ 92. Remove - from gencat
+ 91. Provide support for malloc_usable_size() so that linux works again
+     without SYSMALLOC
+ 90. Add support for FreeBSD's utmpx.
+ 89. V6.17.07 - 20111227
+ 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
+     there are more than 10 jobs.
+ 87. PR/155: Default $anyerror to set for backward compatibility
+ 86. PR/149: Don't print -1 in %j (Vojtech Vitek)
+ 85. handle -- on chdir commands as the end of options processing so that
+     they can process a directory like -x without resorting to ./-x
+     (Andrew Stevenson)
+ 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes)
+ 83. PR/38: Null check for jobs (Kurt Miller)
+ 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger)
+ 81. PR/120: string0 in filetest does not have enough space.
+ 80. V6.17.06 - 20110415
+ 79. PR/110: Add $anyerror to select behavior. Default to the new one.
+ 78. Don't try to spell commands that are correct (Rouben Rostamian)
+     [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo;
+      chmod +x foo; set correct=cmd; ./foo -> ../foo]
+ 77. Don't push the syntax struct on the cleanup stack, because on foo;bar
+     if foo fails, we will free bar prematurely (Ben Miller)
+ 76. Avoid infinite loop while trying to print the pid of a dying process
+     to a closed file (Bob Arendt)
+ 75. Handle completion of ${ variables (Anthony Mallet)
+ 74. Add --disable-nls-catalogs (Corinna Vinschen)
+ 73. convert message catalogs to UTF-8 (Werner Fink)
+ 72. check that the NLS path works before setting $NLSPATH.
+ 71. use SYSMALLOC for GLIBC (Werner Fink)
+ 70. use mallinfo for SYSMALLOC (Corinna Vinschen)
+ 69. V6.17.05 - 20110201
+ 68. Use mkstemp() if there for here docs (Werner Fink)
+ 67. Fix handling of errors and exit values in builtins (Werner Fink)
+ 66. Better pty name detection (Werner Fink)
+ 65. Enable NLS catalogs on Cygwin (Corinna Vinschen)
+ 64. NLSPATH handling fixes (Corinna Vinschen)
+ 63. Avoid infrequent exit when tcsh cd's into a non-existent directory
+     https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink)
+ 62. Don't try to spell check full path binaries that are correct because
+     they can cause hangs when other nfs partitions are hung. (Werner Fink)
+ 61. Avoid nested interrupts when exiting causing history writing to fail
+     https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink)
+ 60. Instead of giving an error or ignoring lines with missing eol at eof,
+     process them.
+ 59. Avoid leaking fd's in mail check (Werner Fink)
+ 58. Add cygwin_xcrypt() (Corinna Vinschen)
+ 57. Recognize i686 (Corinna Vinschen)
+ 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin
+     settings (Corinna Vinschen)
+ 55. Avoid double slashes in cdpath (Corinna Vinschen)
+ 54. V6.17.04 - 20110118
+ 53. Revert PR/110, breaks the test suite.
+ 52. V6.17.03 - 20110117
+ 51. PR/102: Complain on input files with missing trailing \n
+ 50. PR/104: If atime == mtime we don't have new mail.
+ 49. PR/113: Don't allow illegal variable names to be set.
+ 48. PR/112: don't set $REMOTEHOST on the local machine.
+ 47. PR/110: exit status of the pipeline should be the status of the last
+     command.
+ 46. Android support (Corinna Vinschen)
+ 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that
+     translates unshifted 7 bit ASCII (Werner Fink)
+ 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL
+     (Jean-Luc Leger)
+ 43. PR/109: make wait interruptible (Vojtech Vitek)
+ 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues
+     (Robert Byrnes)
+ 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen)
+ 40. Don't echo history while history -L or history -M
+ 39. Check for EOS before ** from Greg Dionne
+ 38. Don't fork in backeval from Bryan Mason
+ 37. Better globstar support from Greg Dionne
+ 36. Error out when processing the last incomplete line instead of silently
+     ignoring it (Anders Kaseorg)
+ 35. Fix SEGV from echo ``
+ 34. Better fixes for histchars and promptchars (nargs)
+ 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context.
+     (Fabio Fabbri)
+ 32. V6.17.02 - 20100512
+ 31. PR/79: nargs: Better handling for promptchars.
+ 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim
+     Zajkowski)
+ 29. PR/84: Performance fixes for large history merges (add
+     hashtable (Ted Anderson)
+ 28. Revert previous #23; people should use $histlit if they want this
+     feature.
+ 27. Don't kill "hup" background jobs when a child of the shell exits.
+     From Debian.
+ 26. Ignore \r\n in the command line options for OS's that don't strip
+     these from #!; from Debian
+ 25. Fix enhanced missing patch (Greg Dionne)
+ 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now.
+     (Corinna Vinschen)
+ 23. Turn HistLit on while recording history to avoid \!\! losing its \.
+     From Debian
+ 22. set autoexpand; set histchars="";\n<tab> crash. From Debian
+ 21. V6.17.01 - 20100506
+ 20. unset verbose while we are reading the history file to avoid echoing
+     to the terminal. (Jeffrey Bastian)
+ 19. globstar addition, Enhance addition, euid, euser, gid variables
+     (Greg Dionne)
+ 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks)
+ 17. Handle UTF-16 surrogates (Corinna Vinschen)
+ 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen)
+ 15. Better support for Solaris >= 2.9 (Thomas Uhle)
+ 14. Change internal expression calculations to long long so that we can
+     deal with > 32 bit time, inodes, uids, file sizes etc.
+ 13. Add new linux resource limits.
+ 12. Don't print 'Exit X' when printexitvalue is set in `` expressions
+     (Jeff Bastian)
+ 11. Add more LS_COLORS vars (M.H. Anderson)
+ 10. Reduce whitespace in Makefile (Don Estabrook)
+  9. Manual page fixes (Alan R. S. Bueno)
+  8. Remove history in loops bug from the documentation (Holger Weiss)
+  7. Add autorehash (Holger Weiss)
+  6. Add history.at (Ted Anderson)
+  5. Better NLSPATH handling (Norm Jacobs)
+  4. Fix hostname building from utmp (Cyrus Rahman)
+  3. Handle pending signals before flush so that the the history file does
+     not get truncated.  (Ted Anderson)
+  2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil)
+  1. remember to closedir in mailchk (from Werner Fink, reported by
+     David Binderman)
+
  21. V6.17.00 - 20090710
  20. Fix dataroot autoconf issue.
  19. Fix directory stuff for unit tests.

Modified: stable/8/contrib/tcsh/Imakefile
==============================================================================
--- stable/8/contrib/tcsh/Imakefile	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/contrib/tcsh/Imakefile	Wed Mar  7 01:31:29 2012	(r232635)
@@ -1,5 +1,5 @@
 XCOMM
-XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $
+XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $
 XCOMM
 XCOMM Imakefile for tcsh 6.12
 XCOMM Marc Horowitz, MIT SIPB
@@ -93,7 +93,11 @@ ones.  Please send in your fixes and add
 #      if (OSMinorVersion < 6)
 #       define ConfigH sol24
 #      else
-#       define ConfigH sol26
+#       if (OSMinorVersion < 9)
+#        define ConfigH sol26
+#       else
+#        define ConfigH sol29
+#       endif
 #      endif
 #     endif
 #    endif

Modified: stable/8/contrib/tcsh/Makefile.in
==============================================================================
--- stable/8/contrib/tcsh/Makefile.in	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/contrib/tcsh/Makefile.in	Wed Mar  7 01:31:29 2012	(r232635)
@@ -1,4 +1,4 @@
-# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $
+# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $
 #	Makefile.in	4.3	6/11/83
 #
 # C Shell with process control; VM/UNIX VAX Makefile
@@ -26,22 +26,27 @@ CF=-c
 CPPFLAGS=-I. -I$(srcdir)
 
 LFLAGS=
-#LFLAGS= -Zn10000		# hpux lint
+# hpux lint
+#LFLAGS= -Zn10000
 
 
-CFLAGS = @CFLAGS@		# This is set by autoconf.
-#CFLAGS= -g			# debug
-#CFLAGS= -O			# production
-#CFLAGS= 			# Broken optimizers....
+# This is set by autoconf:
+CFLAGS = @CFLAGS@
+# debug:
+#CFLAGS= -g
+# production:
+#CFLAGS= -O
+# Broken optimizers....
+#CFLAGS=
 
 #CFLAGS= -g -pg -DPROF
 #CFLAGS= -O -pg -DPROF
 
 # gcc 1.00-1.37
-#CFLAGS= -O -finline-functions -fstrength-reduce 
+#CFLAGS= -O -finline-functions -fstrength-reduce
 
 # gcc 1.37-1.40
-#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce 
+#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce
 # add -msoft-float for 68881 machines.
 
 # gcc 2.0
@@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@		# This is set by auto
 #CFLAGS= -O -Mnodebug -Mnoperfmon
 
 # DEC Alpha OSF/1
-#CFLAGS= -O2 -Olimit 2000	## Normal Optimization
-#CFLAGS= -O3 -Olimit 2000	## Full Optimization - may not work
+## Normal Optimization
+#CFLAGS= -O2 -Olimit 2000
+## Full Optimization - may not work
+#CFLAGS= -O3 -Olimit 2000
 #CF=-j
 #SUF=u
 #.SUFFIXES: .u
@@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@		# This is set by auto
 # global optimizer! (-O3).
 # On SGI 4.0+ you need to add -D__STDC__ too.
 #CFLAGS= -O3
-#CFLAGS= -O3 -Olimit 2000	## Ultrix 4.2a
+## Ultrix 4.2a
+#CFLAGS= -O3 -Olimit 2000
 #CF=-j
 #SUF=u
 #.SUFFIXES: .u 				## Ultrix and gnu-make need that
@@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@		# This is set by auto
 # CFLAGS= -O3
 
 # SINIX RMx00
-#CFLAGS= -O # -D_POSIX_SOURCE # -kansi
+#CFLAGS= -O# -D_POSIX_SOURCE# -kansi
 
 # Apollo's with cc [apollo builtins don't work with gcc]
 # and apollo should not define __STDC__ if it does not have
 # the standard header files. RT's (aos4.3) need that too;
 # you might want to skip the -O on the rt's... Not very wise.
 # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA)
-#DFLAGS=-U__STDC__ 
+#DFLAGS=-U__STDC__
 #DFLAGS=-D_IBMESA
 # On aix2.2.1 we need more compiler space.
 #DFLAGS=-Nd4000 -Nn3000
@@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs
 ################################################################
 ## LDFLAGS.  Define something here if you need to
 ################################################################
-LDFLAGS= @LDFLAGS@		## This is set by autoconf.
-#LDFLAGS= 			## The simplest, suitable for all.
-#LDFLAGS= -s			## Stripped. Takes less space on disk.
-#LDFLAGS= -s -n			## Pure executable. Spares paging over
-# 				## the network for machines with local
-#				## swap but external /usr/local/bin .
-#LDFLAGS= -s -n -Bstatic	## Without dynamic linking. (SunOS/cc)
-#LDFLAGS= -s -n -static		## Without dynamic linking. (SunOS/gcc)
-#LDFLAGS= -Wl,-s,-n		## Stripped, shared text (Unicos)
-#LDFLAGS= -s -static		## Link statically. (linux)
-#LDFLAGS= -s -N			## Impure executable (linux)
+## This is set by autoconf:
+LDFLAGS= @LDFLAGS@
+## The simplest, suitable for all.
+#LDFLAGS=
+## Stripped. Takes less space on disk.
+#LDFLAGS= -s
+## Pure executable.  Spares paging over the network for machines with
+## local swap but external /usr/local/bin .
+#LDFLAGS= -s -n
+## Without dynamic linking. (SunOS/cc)
+#LDFLAGS= -s -n -Bstatic
+## Without dynamic linking. (SunOS/gcc)
+#LDFLAGS= -s -n -static
+## Stripped, shared text (Unicos)
+#LDFLAGS= -Wl,-s,-n
+## Link statically. (linux)
+#LDFLAGS= -s -static
+## Impure executable (linux)
+#LDFLAGS= -s -N
 
 ################################################################
 ## SBINLDFLAGS.  Flags to build a tcsh suitable for installation in
@@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld
 ################################################################
 ## LIBES.  Pick one, or roll your own.
 ################################################################
-LIBES= @LIBS@	 			 ## This is set by autoconf.
-#LIBES= -ltermcap 			 ## BSD style things
-#LIBES= -ltermcap			 ## SunOS, HP-UX, pyramid
-#LIBES= -ltermcap			 ## Linux
-#LIBES= -ltermcap -lshadow		 ## Linux with PW_SHADOW
-#LIBES= -ltermcap -lsec			 ## Tek XD88/10 (UTekV) with PW_SHADOW
-#LIBES= -ltermcap -lsec			 ## Motorola MPC (sysV88) with PW_SHADOW
-#LIBES= -ltermcap -lcs			 ## Mach
-#LIBES= -ltermcap -lbsd			 ## DEC osf1 on the alpha
-#LIBES= -ltermcap -lbsd			 ## Intel paragon
-#LIBES= -ltermcap -lbsd			 ## Clipper intergraph
-#LIBES= -ltermcap -lseq			 ## Sequent's Dynix
-#LIBES= -ltermcap -lauth		 ## Ultrix with Enhanced Security
-#LIBES= -ltermcap -ldir -lx		 ## Xenix 386 style things
-#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0
-#LIBES= -lcurses			 ## AIX on the rt
-#LIBES= -lcurses			 ## TitanOS on the stellar
-#LIBES= -ltermlib -lsocket -lnsl	 ## SysV4 w/o BSDTIMES or Solaris 2
-#LIBES= -lcurses			 ## SysV3 w/o networking
-#LIBES= -lcurses -lnet			 ## SysV3 with networking
-#LIBES= -lcurses -ldir			 ## SysV2 w/o networking & dirlib
-#LIBES= -lcurses -ldir -lnet		 ## SysV2 with networking & dirlib
-#LIBES= -lcurses -lbsd			 ## AIX on the IBM 370 or rs6000 or ps2
-#LIBES= -lcurses -lbsd			 ## ETA10
-#LIBES= -lcurses -lbsd			 ## Irix3.1 on the SGI-IRIS4D
-#LIBES= -lcurses -lbsd -lc_s		 ## Irix3.3 on the SGI-IRIS4D w/o yp
-#LIBES= -lcurses -lsun -lbsd -lc_s	 ## Irix3.3 on the SGI-IRIS4D with yp
-#LIBES= -lcurses -lsocket -lbsd		 ## Amdahl UTS 2.1
-#LIBES= -lcurses -lsocket		 ## Intel's hypercube.
-#LIBES= -lcurses -lsocket		 ## ns32000 based Opus.
-#LIBES= -lcurses -lcposix		 ## ISC 2.2 without networking
-#LIBES= -lcposix -lc_s -lcurses -linet	 ## ISC 2.2 with networking
-#LIBES= -lcurses -lsec -lc_s		 ## ISC 2.0.2 without networking
-#LIBES= -lcurses -linet -lsec -lc_s	 ## ISC 2.0.2 with networking
-#LIBES= -lcurses -lintl -lcrypt		 ## SCO SysVR3.2v2.0
-#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1
-#LIBES= -lposix -ltermcap		 ## A/UX 2.0
-#LIBES= -lposix -ltermcap -lc_s		 ## A/UX 3.0
-#LIBES= -ldirent -lcurses		 ## att3b1 cc w/o shared lib & dirlib
-#LIBES= -shlib -ldirent -lcurses	 ## att3b1 gcc with shared lib & dirlib
-#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES
-#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra
-#LIBES= -ltermc				 ## emx under OS/2
-#LIBES=					 ## Minix, VMS_POSIX
-#LIBES= -ltermcap -lcrypt		 ## Multiflow
-#LIBES= -ltermcap -lcrypt		 ## NetBSD
-#LIBES= -lcurses 			 ## DDE Supermax
+## This is set by autoconf.
+LIBES= @LIBS@
+## BSD style things
+#LIBES= -ltermcap
+## SunOS, HP-UX, pyramid
+#LIBES= -ltermcap
+## Linux
+#LIBES= -ltermcap
+## Linux with PW_SHADOW
+#LIBES= -ltermcap -lshadow
+## Tek XD88/10 (UTekV) with PW_SHADOW
+#LIBES= -ltermcap -lsec
+## Motorola MPC (sysV88) with PW_SHADOW
+#LIBES= -ltermcap -lsec
+## Mach
+#LIBES= -ltermcap -lcs
+## DEC osf1 on the alpha
+#LIBES= -ltermcap -lbsd
+## Intel paragon
+#LIBES= -ltermcap -lbsd
+## Clipper intergraph
+#LIBES= -ltermcap -lbsd
+## Sequent's Dynix
+#LIBES= -ltermcap -lseq
+## Ultrix with Enhanced Security
+#LIBES= -ltermcap -lauth
+## Xenix 386 style things
+#LIBES= -ltermcap -ldir -lx
+## masscomp RTU6.0
+#LIBES= -ltermcap -lndir -lsocket -ljobs
+## AIX on the rt
+#LIBES= -lcurses
+## TitanOS on the stellar
+#LIBES= -lcurses
+## SysV4 w/o BSDTIMES or Solaris 2
+#LIBES= -ltermlib -lsocket -lnsl
+## SysV3 w/o networking
+#LIBES= -lcurses
+## SysV3 with networking
+#LIBES= -lcurses -lnet
+## SysV2 w/o networking & dirlib
+#LIBES= -lcurses -ldir
+## SysV2 with networking & dirlib
+#LIBES= -lcurses -ldir -lnet
+## AIX on the IBM 370 or rs6000 or ps2
+#LIBES= -lcurses -lbsd
+## ETA10
+#LIBES= -lcurses -lbsd
+## Irix3.1 on the SGI-IRIS4D
+#LIBES= -lcurses -lbsd
+## Irix3.3 on the SGI-IRIS4D w/o yp
+#LIBES= -lcurses -lbsd -lc_s
+## Irix3.3 on the SGI-IRIS4D with yp
+#LIBES= -lcurses -lsun -lbsd -lc_s
+## Amdahl UTS 2.1
+#LIBES= -lcurses -lsocket -lbsd
+## Intel's hypercube.
+#LIBES= -lcurses -lsocket
+## ns32000 based Opus.
+#LIBES= -lcurses -lsocket
+## ISC 2.2 without networking
+#LIBES= -lcurses -lcposix
+## ISC 2.2 with networking
+#LIBES= -lcposix -lc_s -lcurses -linet
+## ISC 2.0.2 without networking
+#LIBES= -lcurses -lsec -lc_s
+## ISC 2.0.2 with networking
+#LIBES= -lcurses -linet -lsec -lc_s
+## SCO SysVR3.2v2.0
+#LIBES= -lcurses -lintl -lcrypt
+## SCO+ODT1.1
+#LIBES= -lcurses -lintl -lsocket -lcrypt
+## A/UX 2.0
+#LIBES= -lposix -ltermcap
+## A/UX 3.0
+#LIBES= -lposix -ltermcap -lc_s
+## att3b1 cc w/o shared lib & dirlib
+#LIBES= -ldirent -lcurses
+## att3b1 gcc with shared lib & dirlib
+#LIBES= -shlib -ldirent -lcurses
+## SysV4 with BSDTIMES
+#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a
+## Stardent Vistra
+#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a
+## emx under OS/2
+#LIBES= -ltermc
+## Minix, VMS_POSIX
+#LIBES=
+## Multiflow
+#LIBES= -ltermcap -lcrypt
+## NetBSD
+#LIBES= -ltermcap -lcrypt
+## DDE Supermax
+#LIBES= -lcurses
 
 ################################################################
 ## EXTRAFLAGS and EXTRALIBS
@@ -222,8 +285,10 @@ LIBES= @LIBS@	 			 ## This is set by aut
 #
 #Solaris and HPUX require the BSD libraries with AFS.
 #We use -lc to use only what we require.
-#AFSAUXLIB = -lsocket -lnsl -lc -lucb                    # Solaris
-#AFSAUXLIB = -lc -lBSD                                   # HPUX   
+# Solaris
+#AFSAUXLIB = -lsocket -lnsl -lc -lucb
+# HPUX   
+#AFSAUXLIB = -lc -lBSD
 #
 #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\
 #         -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\
@@ -244,26 +309,38 @@ EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV
 # will lose the editor and job control.
 
 # This is for setting your C preprocessor value.
-CPP = @CPP@ # This is set by autoconf.
+# This is set by autoconf.
+CPP = @CPP@
 # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which
 # on the suns does not know how to make dynamically linked binaries.
-CC = @CC@ # This is set by autoconf.
+# This is set by autoconf.
+CC = @CC@
 #CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra
-#CC=	gcc -Wall -pipe -B/bin/	# -ansi -pedantic
-#CC=	gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux)
-#CC=	shlicc 	# BSDI2.1 w/ shared libraries
+# -ansi -pedantic
+#CC=	gcc -Wall -pipe -B/bin/
+# Generate code for Intel 486 (linux)
+#CC=	gcc -m486 -pipe -Wall
+# BSDI2.1 w/ shared libraries
+#CC=	shlicc
 #CC=	cc
 #CC=	occ
 #CC=	acc
 #CC=	pcc
 #CC=	hc -w
-#CC=	c89	# For VMS/POSIX
-#CC=	/bin/cc	# For suns, w/o gcc and SVR4
-#CC=	/usr/lib/sun.compile/cc  # FPS 500 (+FPX) with Sun C compiler
-#CC=	/opt/SUNWspro/bin/cc	# Solaris 2.1
-#CC=	scc 	# Alliant fx2800
-#CC=	cc	-h0,ansi,novector,float0 # for NEC SX-4
+# For VMS/POSIX
+#CC=	c89
+# For suns, w/o gcc and SVR4
+#CC=	/bin/cc
+# FPS 500 (+FPX) with Sun C compiler
+#CC=	/usr/lib/sun.compile/cc
+# Solaris 2.1
+#CC=	/opt/SUNWspro/bin/cc
+# Alliant fx2800
+#CC=	scc
+# for NEC SX-4
+#CC=	cc	-h0,ansi,novector,float0
 #CC=	lcc	-wa 
+CC_FOR_GETHOST = @CC_FOR_GETHOST@
 ED=	ed
 AS=	as
 RM=	rm
@@ -272,8 +349,10 @@ VGRIND=	csh /usr/ucb/vgrind
 CTAGS=	/usr/ucb/ctags
 #XSTR= /usr/ucb/xstr
 SCCS=	/usr/local/sccs
-PARALLEL=12				# Make the multi-max run fast.
-#P=&					# Use Sequent's parallel make
+# Make the multi-max run fast.
+PARALLEL=12
+# Use Sequent's parallel make
+#P=&
 P=
 prefix=@prefix@
 exec_prefix=@exec_prefix@
@@ -282,12 +361,17 @@ mandir=@datarootdir@/man
 MANSECT=1
 DESTBIN=${DESTDIR}${bindir}
 DESTMAN=${DESTDIR}${mandir}/man${MANSECT}
-# DESTMAN=${DESTDIR}/catman/man${MANSECT}	 # A/UX
-# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
-# DESTMAN=/usr/catman/1l			 # Amiga unix (SysVR4)
+# A/UX
+# DESTMAN=${DESTDIR}/catman/man${MANSECT}
+# Stardent Vistra (SysVR4)
+# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT}
+# Amiga unix (SysVR4)
+# DESTMAN=/usr/catman/1l
 EXEEXT=@EXEEXT@
 FTPAREA=/usr/spool/ftp
 
+BUILD_CATALOGS = @BUILD_CATALOGS@
+
 ASSRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
 	sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
 	sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
@@ -330,9 +414,9 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin
 	host.defs gethost.c tcsh.man2html configure.in configure config.h.in \
 	tests/testsuite.at
 TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \
-	tests/expr.at tests/lexical.at tests/mb-eucjp.at tests/mb-utf8.at \
-	tests/noexec.at tests/syntax.at tests/subst.at tests/variables.at \
-	tests/sh.dol.at
+	tests/expr.at tests/lexical.at tests/mb-eucjp.at \
+	tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \
+	tests/variables.at tests/sh.dol.at
 
 VHSRCS=${PVSRCS} ${AVSRCS}
 
@@ -345,7 +429,7 @@ DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} 
 OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
 
 
-all: ${BUILD}
+all: ${BUILD} catalogs
 
 tcsh$(EXEEXT):$(P) ${OBJS} 
 	rm -f tcsh$(EXEEXT) core
@@ -365,7 +449,7 @@ pure:$(P) ${OBJS} 
 
 gethost:  gethost.c sh.err.h tc.const.h sh.h
 	rm -f gethost
-	${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS}
+	${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c
 
 tc.defs.c:	gethost host.defs
 	@rm -f $@.tmp
@@ -463,7 +547,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co
 	  echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
 	} >$(srcdir)/tests/package.m4
 
-$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES)
+$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir)/tests/testsuite.at $(TESTFILES)
 	autom4te --language=autotest -I $(srcdir)/tests \
 		$(srcdir)/tests/testsuite.at -o $@.tmp
 	mv $@.tmp $@
@@ -511,20 +595,36 @@ vgrind:
 
 install-strip: install
 
-install: tcsh$(EXEEXT) 
+install: tcsh$(EXEEXT) install.catalogs install.man
 	-mkdir -p ${DESTBIN}
 	-mv -f ${DESTBIN}/tcsh$(EXEEXT)  ${DESTBIN}/tcsh.old
 	cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT)
 	-strip ${DESTBIN}/tcsh$(EXEEXT)
 	chmod 755 ${DESTBIN}/tcsh$(EXEEXT)
 
+install.catalogs:
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0
+
 install.man: tcsh.man
 	-mkdir -p ${DESTMAN}
 	-rm -f ${DESTMAN}/tcsh.${MANSECT}
 	cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT}
 	chmod 444 ${DESTMAN}/tcsh.${MANSECT}
 
-install.cygwin: install install.man
+# Amiga Unix
+#install.man: tcsh.man
+#        compress tcsh.man
+#	cp tcsh.man.Z ${DESTMAN}/tcsh.Z
+#	chmod 444 ${DESTMAN}/tcsh.Z
+
+# Apple A/UX
+#install.man: tcsh.man
+#	-rm -f ${DESTMAN}/tcsh.${MANSECT}.Z
+#	nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
+#	chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
+
+install.cygwin: install
+	-gzip ${DESTMAN}/tcsh.${MANSECT}
 	-mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh
 	cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh
 	cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh
@@ -542,24 +642,15 @@ install.cygwin: install install.man
 	cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh
 	cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh
 
-# Amiga Unix
-#install.man: tcsh.man
-#        compress tcsh.man
-#	cp tcsh.man.Z ${DESTMAN}/tcsh.Z
-#	chmod 444 ${DESTMAN}/tcsh.Z
-
-# Apple A/UX
-#install.man: tcsh.man
-#	-rm -f ${DESTMAN}/tcsh.${MANSECT}.Z
-#	nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
-#	chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
-
-clean:
+clean: clean.catalogs
 	${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost
 	${RM} -f *.${SUF} *.i *.s
 	${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c
 	${RM} -f tcsh.*.m tcsh.*.cat
 
+clean.catalogs:
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0
+
 veryclean: clean
 	${RM} -f Makefile config.h config_p.h
 	${RM} -f config.status config.cache config.log tcsh.ps
@@ -607,7 +698,7 @@ shar:
 	rm -rf tcsh-${VERSION}
 
 catalogs:
-	@(cd nls; make catalogs)
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0
 
 tcsh-${VERSION}.tar.Z:
 	rm -rf tcsh-${VERSION} 

Modified: stable/8/contrib/tcsh/Ported
==============================================================================
--- stable/8/contrib/tcsh/Ported	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/contrib/tcsh/Ported	Wed Mar  7 01:31:29 2012	(r232635)
@@ -7,7 +7,7 @@ find it out-of-date, or you have additio
 christos
 
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun3, sun4, sun386i
 COMPILER:	cc, gcc, acc
 CFLAGS	:	normal
@@ -18,7 +18,7 @@ ENVIRON	:	n/a
 NOTES	:	Don't compile with /usr/5bin/cc
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun4, ultra
 COMPILER:	cc, gcc
 CFLAGS	:	normal
@@ -34,18 +34,29 @@ NOTES	:	The sunpro compiler cannot compi
 	:	point failures of programs exec'ed from tcsh.
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	ultra
 COMPILER:	WorkShop cc
 CFLAGS	:	normal
 LIBES	:	-lcurses -lsocket -lnsl
-OS	:	solaris 2.6
+OS	:	solaris 2.6, 2.7, 8
 CONFIG	:	sol26
 ENVIRON	:	n/a
 NOTES	:	none
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
+MODELS	:	ultra, i686, x86_64
+COMPILER:	Sun Studio cc
+CFLAGS	:	normal
+LIBES	:	-lcurses -lsocket -lnsl
+OS	:	solaris 9, 10
+CONFIG	:	sol29
+ENVIRON	:	n/a
+NOTES	:	none
+VERSION	:	6.18
+
+VENDOR	:	Sun
 MODELS	:	i386
 COMPILER:	cc, gcc
 CFLAGS	:	-D__STDC__=0
@@ -56,7 +67,7 @@ ENVIRON	:	n/a
 NOTES	:	n/a
 VERSION	:	6.04.13
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun4
 COMPILER:	gcc
 CFLAGS	:	normal

Modified: stable/8/contrib/tcsh/README
==============================================================================
--- stable/8/contrib/tcsh/README	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/contrib/tcsh/README	Wed Mar  7 01:31:29 2012	(r232635)
@@ -1,4 +1,4 @@
-This is tcsh version 6.17.00.  Tcsh is a version of the Berkeley
+This is tcsh version 6.18.01.  Tcsh is a version of the Berkeley
 C-Shell, with the addition of: a command line editor, command and file
 name completion, listing, etc. and a bunch of small additions to the
 shell itself.
@@ -87,7 +87,7 @@ To install tcsh:
 
 10) Enjoy.
 
-12) PLEASE file any bug reports (and fixes), code for new features at:
+11) PLEASE file any bug reports (and fixes), code for new features at:
 
 	http://bugs.gw.com/
 

Modified: stable/8/contrib/tcsh/WishList
==============================================================================
--- stable/8/contrib/tcsh/WishList	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/contrib/tcsh/WishList	Wed Mar  7 01:31:29 2012	(r232635)
@@ -52,17 +52,6 @@ ey )
    - bhooglan
      _________________________________________________________________
 
-   I'm a long-time faithful user of tcsh, and one thing has always bugged
-   me -- the need to type "rehash" at a prompt when adding a new command.
-   My  suggestions  is  to  change  tcsh  so before printing "Command not
-   found.",  it  first  searches  its  entire  path and rebuilds its hash
-   table.  Only  after doing this, and if the command is still not in the
-   path,  then  print  "Command  not  found.".  I  realize there are some
-   extreme  cases  in  which  this  is suboptimal, but in most cases with
-   normal  users  this  would  be  a big win, and simplify the manual and
-   perhaps even the code.
-     _________________________________________________________________
-
    Wish "tcsh -l" would accept other flags. At least "-c".
 
    Currently I can't get ssh to have the right environment unless it is a

Modified: stable/8/contrib/tcsh/complete.tcsh
==============================================================================
--- stable/8/contrib/tcsh/complete.tcsh	Wed Mar  7 01:30:42 2012	(r232634)
+++ stable/8/contrib/tcsh/complete.tcsh	Wed Mar  7 01:31:29 2012	(r232635)
@@ -1,5 +1,5 @@
 #
-# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $
+# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $
 # example file using the new completion code
 #
 # Debian GNU/Linux
@@ -636,7 +636,7 @@ if ($?_complete) then
     complete nmap	'n@-e@`ifconfig -l`@' 'p/*/$hostnames/'
     complete perldoc 	'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@'
     complete postfix    'n/*/(start stop reload abort flush check)/'
-    complete postmap	'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/'
+    complete postmap	'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/'
     complete rcsdiff	'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@'
     complete X		'c/-/(I a ac allowMouseOpenFail allowNonLocalModInDev \
 			allowNonLocalXvidtune ar1 ar2 audit auth bestRefresh \

Modified: stable/8/contrib/tcsh/config.guess
==============================================================================
--- stable/8/contrib/tcsh/config.guess	Wed Mar  7 01:30:42 2012	(r232634)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 03:17:05 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7565C1065673;
	Wed,  7 Mar 2012 03:17:05 +0000 (UTC)
	(envelope-from pluknet@gmail.com)
Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com
	[209.85.215.54])
	by mx1.freebsd.org (Postfix) with ESMTP id ACC858FC0C;
	Wed,  7 Mar 2012 03:17:03 +0000 (UTC)
Received: by lagv3 with SMTP id v3so9609252lag.13
	for <multiple recipients>; Tue, 06 Mar 2012 19:17:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=vzWhP1wUTBBLfmn+iDd1vXt578n4jTnKEpaaQsbycaY=;
	b=x5kAD0zie1kx/EvWVItXp9XIP5dmSw4EF5I9qWzjPEd18b+IfK0mf8Ler1r4UZGROY
	SjtPQ8jHA9pwQf+8l0zSBtPn4HWA0AwJbAVV7R3or3gQWIRKjzJLHHe8ke0a5WM1bw6Q
	YLsgGz9lQpVuNE557A5b4n2AK4kRXK+JEuWO3oUDWQ56z0GxBd3w3h0TWoTLt1W74rkT
	0kIfgdD3pEy6Y4Ve6OhPTWRIIbZaQZb/B82i1fT8Bz7vdkMMeOqJUTYswfFsT+RWcyLo
	VaTN80y861WHV3fIBWwbkA/ulosgW2raUbezJTFRtoAinKp6XH1ZDe0JWPl9+Fzmbl/n
	pSug==
MIME-Version: 1.0
Received: by 10.112.102.161 with SMTP id fp1mr124117lbb.71.1331090222650; Tue,
	06 Mar 2012 19:17:02 -0800 (PST)
Sender: pluknet@gmail.com
Received: by 10.152.21.73 with HTTP; Tue, 6 Mar 2012 19:17:02 -0800 (PST)
In-Reply-To: <20120306190748.GB51782@jh>
References: <201203061410.q26EAvav043586@svn.freebsd.org>
	<CAE-mSO+XB5dZFgAj64gg+q2RCzZOwtJwjNo5mzJ3K4OKCkhc5A@mail.gmail.com>
	<56c9876464416184673b0ea9b41f025e@evilcoder.org>
	<20120306190748.GB51782@jh>
Date: Wed, 7 Mar 2012 06:17:02 +0300
X-Google-Sender-Auth: vtuQBFmE-WhDNDmIAhSgVdAKArc
Message-ID: <CAE-mSOLnEpu5=rrs2t=zwv3i0kj574GG5PtG0uQcMUKpz5U5Cw@mail.gmail.com>
From: Sergey Kandaurov <pluknet@freebsd.org>
To: Jaakko Heinonen <jh@freebsd.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: Remko Lodder <remko@elvandar.org>, svn-src-stable@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	svn-src-stable-8@freebsd.org, Remko Lodder <remko@freebsd.org>
Subject: Re: svn commit: r232606 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 03:17:05 -0000

On 6 March 2012 23:07, Jaakko Heinonen <jh@freebsd.org> wrote:
> On 2012-03-06, Remko Lodder wrote:
>> On 06.03.2012 15:29, Sergey Kandaurov wrote:
>> >
>> > Eh, it seems you merged r238821 to stable/8, and that's wrong.
>
> Actually mergeinfo says r219005.
>
>> > Changes to top-level files should be merged directly to that file
>> > rather than to the root of the whole tree (see rule 12).
>>
>> Point received and taken. I'll look after that the next time. How do I
>> clean this up on the root?
>
> In the stable/8 root directory:
>
> $ svn merge -c -232606 .
> $ svn revert ObsoleteFiles.inc
> $ svn diff
>
> Property changes on: .
> ___________________________________________________________________
> Modified: svn:mergeinfo
> =A0 Reverse-merged /head:r219005

Yep, that is a way I used to reverse-merge things in stable together
with mergeinfo.

--=20
wbr,
pluknet

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 07:55:35 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id CC548106564A;
	Wed,  7 Mar 2012 07:55:35 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B6A008FC0C;
	Wed,  7 Mar 2012 07:55:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q277tZl8081645;
	Wed, 7 Mar 2012 07:55:35 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q277tZXJ081643;
	Wed, 7 Mar 2012 07:55:35 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203070755.q277tZXJ081643@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 07:55:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232642 - stable/9/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 07:55:35 -0000

Author: kib
Date: Wed Mar  7 07:55:35 2012
New Revision: 232642
URL: http://svn.freebsd.org/changeset/base/232642

Log:
  MFC r232296:
  Merge a split multi-line comment.

Modified:
  stable/9/sys/fs/nullfs/null_subr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/nullfs/null_subr.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_subr.c	Wed Mar  7 07:31:50 2012	(r232641)
+++ stable/9/sys/fs/nullfs/null_subr.c	Wed Mar  7 07:55:35 2012	(r232642)
@@ -213,12 +213,9 @@ null_nodeget(mp, lowervp, vpp)
 	/*
 	 * We do not serialize vnode creation, instead we will check for
 	 * duplicates later, when adding new vnode to hash.
-	 *
 	 * Note that duplicate can only appear in hash if the lowervp is
 	 * locked LK_SHARED.
-	 */
-
-	/*
+	 *
 	 * Do the MALLOC before the getnewvnode since doing so afterward
 	 * might cause a bogus v_data pointer to get dereferenced
 	 * elsewhere if MALLOC should block.

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 07:59:31 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3F540106566C;
	Wed,  7 Mar 2012 07:59:31 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 29D828FC12;
	Wed,  7 Mar 2012 07:59:31 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q277xVnT081815;
	Wed, 7 Mar 2012 07:59:31 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q277xVfO081813;
	Wed, 7 Mar 2012 07:59:31 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203070759.q277xVfO081813@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 07:59:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232643 - stable/9/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 07:59:31 -0000

Author: kib
Date: Wed Mar  7 07:59:30 2012
New Revision: 232643
URL: http://svn.freebsd.org/changeset/base/232643

Log:
  MFC r232299:
  Move the code to destroy half-contructed nullfs vnode into helper
  function null_destroy_proto() from null_insmntque_dtr(). Also
  apply null_destroy_proto() in null_nodeget() when we raced and a vnode
  is found in the hash, so the currently allocated protonode shall be
  destroyed.
  
  Lock the vnode interlock around reassigning the v_vnlock.
  
  MFC r232383:
  Do not expose unlocked unconstructed nullfs vnode on mount list.
  Lock the native nullfs vnode lock before switching the locks.

Modified:
  stable/9/sys/fs/nullfs/null_subr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/nullfs/null_subr.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_subr.c	Wed Mar  7 07:55:35 2012	(r232642)
+++ stable/9/sys/fs/nullfs/null_subr.c	Wed Mar  7 07:59:30 2012	(r232643)
@@ -169,17 +169,26 @@ null_hashins(mp, xp)
 }
 
 static void
-null_insmntque_dtr(struct vnode *vp, void *xp)
+null_destroy_proto(struct vnode *vp, void *xp)
 {
 
-	vput(((struct null_node *)xp)->null_lowervp);
+	lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL);
+	VI_LOCK(vp);
 	vp->v_data = NULL;
 	vp->v_vnlock = &vp->v_lock;
-	free(xp, M_NULLFSNODE);
 	vp->v_op = &dead_vnodeops;
-	(void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	VI_UNLOCK(vp);
 	vgone(vp);
 	vput(vp);
+	free(xp, M_NULLFSNODE);
+}
+
+static void
+null_insmntque_dtr(struct vnode *vp, void *xp)
+{
+
+	vput(((struct null_node *)xp)->null_lowervp);
+	null_destroy_proto(vp, xp);
 }
 
 /*
@@ -247,9 +256,7 @@ null_nodeget(mp, lowervp, vpp)
 	*vpp = null_hashins(mp, xp);
 	if (*vpp != NULL) {
 		vrele(lowervp);
-		vp->v_vnlock = &vp->v_lock;
-		xp->null_lowervp = NULL;
-		vrele(vp);
+		null_destroy_proto(vp, xp);
 		return (0);
 	}
 	*vpp = vp;

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 08:02:44 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5DF611065673;
	Wed,  7 Mar 2012 08:02:44 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 493608FC0C;
	Wed,  7 Mar 2012 08:02:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2782iHR081995;
	Wed, 7 Mar 2012 08:02:44 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2782iQ6081993;
	Wed, 7 Mar 2012 08:02:44 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203070802.q2782iQ6081993@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 08:02:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232644 - stable/9/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 08:02:44 -0000

Author: kib
Date: Wed Mar  7 08:02:43 2012
New Revision: 232644
URL: http://svn.freebsd.org/changeset/base/232644

Log:
  MFC r232301:
  Always request exclusive lock for the lower vnode in nullfs_vget().
  The null_nodeget() requires exclusive lock on lowervp to be able to
  insmntque() new vnode.

Modified:
  stable/9/sys/fs/nullfs/null_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 07:59:30 2012	(r232643)
+++ stable/9/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 08:02:43 2012	(r232644)
@@ -307,6 +307,12 @@ nullfs_vget(mp, ino, flags, vpp)
 	struct vnode **vpp;
 {
 	int error;
+
+	KASSERT((flags & LK_TYPE_MASK) != 0,
+	    ("nullfs_vget: no lock requested"));
+	flags &= ~LK_TYPE_MASK;
+	flags |= LK_EXCLUSIVE;
+
 	error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp);
 	if (error)
 		return (error);

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 08:05:12 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BB0C6106566B;
	Wed,  7 Mar 2012 08:05:12 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A5D068FC14;
	Wed,  7 Mar 2012 08:05:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2785CdT082121;
	Wed, 7 Mar 2012 08:05:12 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2785CiJ082119;
	Wed, 7 Mar 2012 08:05:12 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203070805.q2785CiJ082119@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 08:05:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232645 - stable/9/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 08:05:12 -0000

Author: kib
Date: Wed Mar  7 08:05:12 2012
New Revision: 232645
URL: http://svn.freebsd.org/changeset/base/232645

Log:
  MFC r232303:
  In null_reclaim(), assert that reclaimed vnode is fully constructed,
  instead of accepting half-constructed vnode. Previous code cannot decide
  what to do with such vnode anyway, and although processing it for hash
  removal, paniced later when getting rid of nullfs reference on lowervp.
  
  While there, remove initializations from the declaration block.

Modified:
  stable/9/sys/fs/nullfs/null_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/nullfs/null_vnops.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_vnops.c	Wed Mar  7 08:02:43 2012	(r232644)
+++ stable/9/sys/fs/nullfs/null_vnops.c	Wed Mar  7 08:05:12 2012	(r232645)
@@ -697,12 +697,18 @@ null_inactive(struct vop_inactive_args *
 static int
 null_reclaim(struct vop_reclaim_args *ap)
 {
-	struct vnode *vp = ap->a_vp;
-	struct null_node *xp = VTONULL(vp);
-	struct vnode *lowervp = xp->null_lowervp;
+	struct vnode *vp;
+	struct null_node *xp;
+	struct vnode *lowervp;
+
+	vp = ap->a_vp;
+	xp = VTONULL(vp);
+	lowervp = xp->null_lowervp;
+
+	KASSERT(lowervp != NULL && vp->v_vnlock != &vp->v_lock,
+	    ("Reclaiming inclomplete null vnode %p", vp));
 
-	if (lowervp)
-		null_hashrem(xp);
+	null_hashrem(xp);
 	/*
 	 * Use the interlock to protect the clearing of v_data to
 	 * prevent faults in null_lock().
@@ -713,10 +719,7 @@ null_reclaim(struct vop_reclaim_args *ap
 	vp->v_object = NULL;
 	vp->v_vnlock = &vp->v_lock;
 	VI_UNLOCK(vp);
-	if (lowervp)
-		vput(lowervp);
-	else
-		panic("null_reclaim: reclaiming a node with no lowervp");
+	vput(lowervp);
 	free(xp, M_NULLFSNODE);
 
 	return (0);

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 08:07:29 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 595A810656AE;
	Wed,  7 Mar 2012 08:07:29 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 443AE8FC15;
	Wed,  7 Mar 2012 08:07:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2787TKO082252;
	Wed, 7 Mar 2012 08:07:29 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2787T1w082250;
	Wed, 7 Mar 2012 08:07:29 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201203070807.q2787T1w082250@svn.freebsd.org>
From: Sergey Kandaurov <pluknet@FreeBSD.org>
Date: Wed, 7 Mar 2012 08:07:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232646 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 08:07:29 -0000

Author: pluknet
Date: Wed Mar  7 08:07:28 2012
New Revision: 232646
URL: http://svn.freebsd.org/changeset/base/232646

Log:
  MFC r231821:
  
  delete-old does not have delete-old-libs dependency.
  Reflect this in the comment.
  
  PR:		conf/163993
  Submitted by:	Eugen Konkov <kes-kes at yandex ru>

Modified:
  stable/8/Makefile   (contents, props changed)

Modified: stable/8/Makefile
==============================================================================
--- stable/8/Makefile	Wed Mar  7 08:05:12 2012	(r232645)
+++ stable/8/Makefile	Wed Mar  7 08:07:28 2012	(r232646)
@@ -21,7 +21,7 @@
 # check-old-dirs      - List obsolete directories.
 # check-old-files     - List obsolete files.
 # check-old-libs      - List obsolete libraries.
-# delete-old          - Delete obsolete directories/files/libraries.
+# delete-old          - Delete obsolete directories/files.
 # delete-old-dirs     - Delete obsolete directories.
 # delete-old-files    - Delete obsolete files.
 # delete-old-libs     - Delete obsolete libraries.

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 08:08:36 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7B85F106564A;
	Wed,  7 Mar 2012 08:08:36 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6667B8FC0C;
	Wed,  7 Mar 2012 08:08:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2788a7c082332;
	Wed, 7 Mar 2012 08:08:36 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2788adC082330;
	Wed, 7 Mar 2012 08:08:36 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203070808.q2788adC082330@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 08:08:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232647 - stable/9/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 08:08:36 -0000

Author: kib
Date: Wed Mar  7 08:08:36 2012
New Revision: 232647
URL: http://svn.freebsd.org/changeset/base/232647

Log:
  MFC r232304:
  Document that null_nodeget() cannot take shared-locked lowervp due to
  insmntque() requirements.

Modified:
  stable/9/sys/fs/nullfs/null_subr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/nullfs/null_subr.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_subr.c	Wed Mar  7 08:07:28 2012	(r232646)
+++ stable/9/sys/fs/nullfs/null_subr.c	Wed Mar  7 08:08:36 2012	(r232647)
@@ -209,7 +209,11 @@ null_nodeget(mp, lowervp, vpp)
 	struct vnode *vp;
 	int error;
 
-	ASSERT_VOP_LOCKED(lowervp, "lowervp");
+	/*
+	 * The insmntque1() call below requires the exclusive lock on
+	 * the nullfs vnode.
+	 */
+	ASSERT_VOP_ELOCKED(lowervp, "lowervp");
 	KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p\n", lowervp));
 
 	/* Lookup the hash firstly */

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 08:10:56 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 61A36106566B;
	Wed,  7 Mar 2012 08:10:56 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4CD948FC1E;
	Wed,  7 Mar 2012 08:10:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q278AuqV082456;
	Wed, 7 Mar 2012 08:10:56 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q278AuI4082454;
	Wed, 7 Mar 2012 08:10:56 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203070810.q278AuI4082454@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 08:10:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232648 - stable/9/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 08:10:56 -0000

Author: kib
Date: Wed Mar  7 08:10:55 2012
New Revision: 232648
URL: http://svn.freebsd.org/changeset/base/232648

Log:
  MFC r232305:
  Allow shared locks for reads when lower filesystem accept shared locking.

Modified:
  stable/9/sys/fs/nullfs/null_vfsops.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 08:08:36 2012	(r232647)
+++ stable/9/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 08:10:55 2012	(r232648)
@@ -180,7 +180,8 @@ nullfs_mount(struct mount *mp)
 		MNT_IUNLOCK(mp);
 	}
 	MNT_ILOCK(mp);
-	mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE;
+	mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
+	    (MNTK_MPSAFE | MNTK_SHARED_WRITES);
 	MNT_IUNLOCK(mp);
 	mp->mnt_data =  xmp;
 	vfs_getnewfsid(mp);

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 08:21:25 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id CC81B106566B;
	Wed,  7 Mar 2012 08:21:25 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B80FA8FC08;
	Wed,  7 Mar 2012 08:21:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q278LPJQ082903;
	Wed, 7 Mar 2012 08:21:25 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q278LPK5082901;
	Wed, 7 Mar 2012 08:21:25 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201203070821.q278LPK5082901@svn.freebsd.org>
From: Sergey Kandaurov <pluknet@FreeBSD.org>
Date: Wed, 7 Mar 2012 08:21:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232649 - stable/7
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 08:21:25 -0000

Author: pluknet
Date: Wed Mar  7 08:21:25 2012
New Revision: 232649
URL: http://svn.freebsd.org/changeset/base/232649

Log:
  MFC r231821:
  
   delete-old does not have delete-old-libs dependency.
   Reflect this in the comment.
  
  PR:		conf/163993
  Submitted by:	Eugen Konkov <kes-kes at yandex ru>

Modified:
  stable/7/Makefile   (contents, props changed)

Modified: stable/7/Makefile
==============================================================================
--- stable/7/Makefile	Wed Mar  7 08:10:55 2012	(r232648)
+++ stable/7/Makefile	Wed Mar  7 08:21:25 2012	(r232649)
@@ -21,7 +21,7 @@
 # check-old-dirs      - List obsolete directories.
 # check-old-files     - List obsolete files.
 # check-old-libs      - List obsolete libraries.
-# delete-old          - Delete obsolete directories/files/libraries.
+# delete-old          - Delete obsolete directories/files.
 # delete-old-dirs     - Delete obsolete directories.
 # delete-old-files    - Delete obsolete files.
 # delete-old-libs     - Delete obsolete libraries.

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 08:24:49 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 763F01065673;
	Wed,  7 Mar 2012 08:24:49 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2361A8FC22;
	Wed,  7 Mar 2012 08:24:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q278Onvl083049;
	Wed, 7 Mar 2012 08:24:49 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q278Onqp083047;
	Wed, 7 Mar 2012 08:24:49 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203070824.q278Onqp083047@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 08:24:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232650 - stable/8/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 08:24:49 -0000

Author: kib
Date: Wed Mar  7 08:24:48 2012
New Revision: 232650
URL: http://svn.freebsd.org/changeset/base/232650

Log:
  MFC r232296:
  Merge a split multi-line comment.

Modified:
  stable/8/sys/fs/nullfs/null_subr.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/fs/nullfs/null_subr.c
==============================================================================
--- stable/8/sys/fs/nullfs/null_subr.c	Wed Mar  7 08:21:25 2012	(r232649)
+++ stable/8/sys/fs/nullfs/null_subr.c	Wed Mar  7 08:24:48 2012	(r232650)
@@ -208,12 +208,9 @@ null_nodeget(mp, lowervp, vpp)
 	/*
 	 * We do not serialize vnode creation, instead we will check for
 	 * duplicates later, when adding new vnode to hash.
-	 *
 	 * Note that duplicate can only appear in hash if the lowervp is
 	 * locked LK_SHARED.
-	 */
-
-	/*
+	 *
 	 * Do the MALLOC before the getnewvnode since doing so afterward
 	 * might cause a bogus v_data pointer to get dereferenced
 	 * elsewhere if MALLOC should block.

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 18:33:12 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 010EA106564A;
	Wed,  7 Mar 2012 18:33:12 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E393C8FC0A;
	Wed,  7 Mar 2012 18:33:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27IXBgE005348;
	Wed, 7 Mar 2012 18:33:11 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27IXBZK005344;
	Wed, 7 Mar 2012 18:33:11 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203071833.q27IXBZK005344@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Wed, 7 Mar 2012 18:33:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232665 - stable/8/sys/fs/nullfs
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 18:33:12 -0000

Author: kib
Date: Wed Mar  7 18:33:11 2012
New Revision: 232665
URL: http://svn.freebsd.org/changeset/base/232665

Log:
  Synchronize nullfs with HEAD, mostly merge all locking changes.
  
  Tested by:	pho
  
  MFC r229428:
  Document the state of the lowervp vnode for null_nodeget().
  
  MFC r229431:
  Do the vput() for the lowervp in the null_nodeget() for error case too.
  Several callers of null_nodeget() did the cleanup itself, but several
  missed it, most prominent being null_bypass(). Remove the cleanup from
  the callers, now null_nodeget() handles lowervp free itself.
  
  MFC r229600 (by dim):
  In sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode
  pointer 'lowervp' instead of 'vp', which is uninitialized at that point.
  
  MFC r230304 (by rea):
  Use hashdestroy() instead of naive free().
  
  MFC r232299:
  Move the code to destroy half-contructed nullfs vnode into helper
  function null_destroy_proto() from null_insmntque_dtr(). Also
  apply null_destroy_proto() in null_nodeget() when we raced and a vnode
  is found in the hash, so the currently allocated protonode shall be
  destroyed.
  
  Lock the vnode interlock around reassigning the v_vnlock.
  
  MFC r232301:
  Always request exclusive lock for the lower vnode in nullfs_vget().
  The null_nodeget() requires exclusive lock on lowervp to be able to
  insmntque() new vnode.
  
  MFC r232303:
  In null_reclaim(), assert that reclaimed vnode is fully constructed,
  instead of accepting half-constructed vnode. Previous code cannot decide
  what to do with such vnode anyway, and although processing it for hash
  removal, paniced later when getting rid of nullfs reference on lowervp.
  
  While there, remove initializations from the declaration block.
  
  MFC r232304:
  Document that null_nodeget() cannot take shared-locked lowervp due to
  insmntque() requirements.
  
  MFC r232305:
  Allow shared locks for reads when lower filesystem accept shared locking.
  
  MFC r232383:
  Do not expose unlocked unconstructed nullfs vnode on mount list.
  Lock the native nullfs vnode lock before switching the locks.

Modified:
  stable/8/sys/fs/nullfs/null_subr.c
  stable/8/sys/fs/nullfs/null_vfsops.c
  stable/8/sys/fs/nullfs/null_vnops.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/fs/nullfs/null_subr.c
==============================================================================
--- stable/8/sys/fs/nullfs/null_subr.c	Wed Mar  7 18:29:12 2012	(r232664)
+++ stable/8/sys/fs/nullfs/null_subr.c	Wed Mar  7 18:33:11 2012	(r232665)
@@ -90,7 +90,7 @@ nullfs_uninit(vfsp)
 {
 
 	mtx_destroy(&null_hashmtx);
-	free(null_node_hashtbl, M_NULLFSHASH);
+	hashdestroy(null_node_hashtbl, M_NULLFSHASH, null_node_hash);
 	return (0);
 }
 
@@ -169,15 +169,26 @@ null_hashins(mp, xp)
 }
 
 static void
-null_insmntque_dtr(struct vnode *vp, void *xp)
+null_destroy_proto(struct vnode *vp, void *xp)
 {
+
+	lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL);
+	VI_LOCK(vp);
 	vp->v_data = NULL;
 	vp->v_vnlock = &vp->v_lock;
-	free(xp, M_NULLFSNODE);
 	vp->v_op = &dead_vnodeops;
-	(void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+	VI_UNLOCK(vp);
 	vgone(vp);
 	vput(vp);
+	free(xp, M_NULLFSNODE);
+}
+
+static void
+null_insmntque_dtr(struct vnode *vp, void *xp)
+{
+
+	vput(((struct null_node *)xp)->null_lowervp);
+	null_destroy_proto(vp, xp);
 }
 
 /*
@@ -198,6 +209,13 @@ null_nodeget(mp, lowervp, vpp)
 	struct vnode *vp;
 	int error;
 
+	/*
+	 * The insmntque1() call below requires the exclusive lock on
+	 * the nullfs vnode.
+	 */
+	ASSERT_VOP_ELOCKED(lowervp, "lowervp");
+	KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p\n", lowervp));
+
 	/* Lookup the hash firstly */
 	*vpp = null_hashget(mp, lowervp);
 	if (*vpp != NULL) {
@@ -220,6 +238,7 @@ null_nodeget(mp, lowervp, vpp)
 
 	error = getnewvnode("null", mp, &null_vnodeops, &vp);
 	if (error) {
+		vput(lowervp);
 		free(xp, M_NULLFSNODE);
 		return (error);
 	}
@@ -241,9 +260,7 @@ null_nodeget(mp, lowervp, vpp)
 	*vpp = null_hashins(mp, xp);
 	if (*vpp != NULL) {
 		vrele(lowervp);
-		vp->v_vnlock = &vp->v_lock;
-		xp->null_lowervp = NULL;
-		vrele(vp);
+		null_destroy_proto(vp, xp);
 		return (0);
 	}
 	*vpp = vp;

Modified: stable/8/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- stable/8/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 18:29:12 2012	(r232664)
+++ stable/8/sys/fs/nullfs/null_vfsops.c	Wed Mar  7 18:33:11 2012	(r232665)
@@ -157,8 +157,7 @@ nullfs_mount(struct mount *mp)
 	 * Make sure the node alias worked
 	 */
 	if (error) {
-		vrele(lowerrootvp);
-		free(xmp, M_NULLFSMNT);	/* XXX */
+		free(xmp, M_NULLFSMNT);
 		return (error);
 	}
 
@@ -181,7 +180,8 @@ nullfs_mount(struct mount *mp)
 		MNT_IUNLOCK(mp);
 	}
 	MNT_ILOCK(mp);
-	mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE;
+	mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
+	    (MNTK_MPSAFE | MNTK_SHARED_WRITES);
 	MNT_IUNLOCK(mp);
 	mp->mnt_data =  xmp;
 	vfs_getnewfsid(mp);
@@ -308,6 +308,12 @@ nullfs_vget(mp, ino, flags, vpp)
 	struct vnode **vpp;
 {
 	int error;
+
+	KASSERT((flags & LK_TYPE_MASK) != 0,
+	    ("nullfs_vget: no lock requested"));
+	flags &= ~LK_TYPE_MASK;
+	flags |= LK_EXCLUSIVE;
+
 	error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp);
 	if (error)
 		return (error);

Modified: stable/8/sys/fs/nullfs/null_vnops.c
==============================================================================
--- stable/8/sys/fs/nullfs/null_vnops.c	Wed Mar  7 18:29:12 2012	(r232664)
+++ stable/8/sys/fs/nullfs/null_vnops.c	Wed Mar  7 18:33:11 2012	(r232665)
@@ -365,9 +365,7 @@ null_lookup(struct vop_lookup_args *ap)
 			vrele(lvp);
 		} else {
 			error = null_nodeget(dvp->v_mount, lvp, &vp);
-			if (error)
-				vput(lvp);
-			else
+			if (error == 0)
 				*ap->a_vpp = vp;
 		}
 	}
@@ -699,12 +697,18 @@ null_inactive(struct vop_inactive_args *
 static int
 null_reclaim(struct vop_reclaim_args *ap)
 {
-	struct vnode *vp = ap->a_vp;
-	struct null_node *xp = VTONULL(vp);
-	struct vnode *lowervp = xp->null_lowervp;
+	struct vnode *vp;
+	struct null_node *xp;
+	struct vnode *lowervp;
 
-	if (lowervp)
-		null_hashrem(xp);
+	vp = ap->a_vp;
+	xp = VTONULL(vp);
+	lowervp = xp->null_lowervp;
+
+	KASSERT(lowervp != NULL && vp->v_vnlock != &vp->v_lock,
+	    ("Reclaiming inclomplete null vnode %p", vp));
+
+	null_hashrem(xp);
 	/*
 	 * Use the interlock to protect the clearing of v_data to
 	 * prevent faults in null_lock().
@@ -715,10 +719,7 @@ null_reclaim(struct vop_reclaim_args *ap
 	vp->v_object = NULL;
 	vp->v_vnlock = &vp->v_lock;
 	VI_UNLOCK(vp);
-	if (lowervp)
-		vput(lowervp);
-	else
-		panic("null_reclaim: reclaiming a node with no lowervp");
+	vput(lowervp);
 	free(xp, M_NULLFSNODE);
 
 	return (0);
@@ -810,9 +811,7 @@ null_vptocnp(struct vop_vptocnp_args *ap
 #endif
 		vhold(*dvp);
 		vput(*dvp);
-	} else
-		vput(ldvp);
-
+	}
 	vn_lock(vp, locked | LK_RETRY);
 	return (error);
 }

From owner-svn-src-stable@FreeBSD.ORG  Wed Mar  7 22:19:44 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A53D01065673;
	Wed,  7 Mar 2012 22:19:44 +0000 (UTC) (envelope-from mp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9081A8FC0C;
	Wed,  7 Mar 2012 22:19:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27MJipK012903;
	Wed, 7 Mar 2012 22:19:44 GMT (envelope-from mp@svn.freebsd.org)
Received: (from mp@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27MJihI012890;
	Wed, 7 Mar 2012 22:19:44 GMT (envelope-from mp@svn.freebsd.org)
Message-Id: <201203072219.q27MJihI012890@svn.freebsd.org>
From: Mark Peek <mp@FreeBSD.org>
Date: Wed, 7 Mar 2012 22:19:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232674 - in stable/7: bin/csh contrib/tcsh
	contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C
	contrib/tcsh/nls/et contrib/tcsh/nls/finnish
	contrib/tcsh/nls/french contrib/tcsh/nls...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Mar 2012 22:19:44 -0000

Author: mp
Date: Wed Mar  7 22:19:43 2012
New Revision: 232674
URL: http://svn.freebsd.org/changeset/base/232674

Log:
  MFC r231990
  
  Update to tcsh 6.18.01

Added:
  stable/7/contrib/tcsh/nls/Makefile.in
     - copied unchanged from r231990, head/contrib/tcsh/nls/Makefile.in
  stable/7/contrib/tcsh/nls/catgen
     - copied unchanged from r231990, head/contrib/tcsh/nls/catgen
  stable/7/contrib/tcsh/svn
     - copied unchanged from r231990, head/contrib/tcsh/svn
Deleted:
  stable/7/bin/csh/host.defs
  stable/7/contrib/tcsh/nls/Makefile
Modified:
  stable/7/bin/csh/Makefile
  stable/7/bin/csh/config.h
  stable/7/bin/csh/config_p.h
  stable/7/contrib/tcsh/Fixes
  stable/7/contrib/tcsh/Imakefile
  stable/7/contrib/tcsh/Makefile.in
  stable/7/contrib/tcsh/Ported
  stable/7/contrib/tcsh/README
  stable/7/contrib/tcsh/WishList
  stable/7/contrib/tcsh/complete.tcsh
  stable/7/contrib/tcsh/config.guess
  stable/7/contrib/tcsh/config.h.in
  stable/7/contrib/tcsh/config.sub
  stable/7/contrib/tcsh/config/bsd4.4
  stable/7/contrib/tcsh/config_f.h
  stable/7/contrib/tcsh/configure
  stable/7/contrib/tcsh/configure.in
  stable/7/contrib/tcsh/ed.chared.c
  stable/7/contrib/tcsh/ed.inputl.c
  stable/7/contrib/tcsh/ed.refresh.c
  stable/7/contrib/tcsh/ed.screen.c
  stable/7/contrib/tcsh/ed.term.c
  stable/7/contrib/tcsh/gethost.c
  stable/7/contrib/tcsh/glob.c
  stable/7/contrib/tcsh/glob.h
  stable/7/contrib/tcsh/host.defs
  stable/7/contrib/tcsh/install-sh
  stable/7/contrib/tcsh/nls/C/charset
  stable/7/contrib/tcsh/nls/C/set19
  stable/7/contrib/tcsh/nls/et/charset
  stable/7/contrib/tcsh/nls/et/set1
  stable/7/contrib/tcsh/nls/et/set10
  stable/7/contrib/tcsh/nls/et/set11
  stable/7/contrib/tcsh/nls/et/set13
  stable/7/contrib/tcsh/nls/et/set14
  stable/7/contrib/tcsh/nls/et/set15
  stable/7/contrib/tcsh/nls/et/set16
  stable/7/contrib/tcsh/nls/et/set17
  stable/7/contrib/tcsh/nls/et/set18
  stable/7/contrib/tcsh/nls/et/set19
  stable/7/contrib/tcsh/nls/et/set2
  stable/7/contrib/tcsh/nls/et/set20
  stable/7/contrib/tcsh/nls/et/set21
  stable/7/contrib/tcsh/nls/et/set22
  stable/7/contrib/tcsh/nls/et/set23
  stable/7/contrib/tcsh/nls/et/set24
  stable/7/contrib/tcsh/nls/et/set25
  stable/7/contrib/tcsh/nls/et/set26
  stable/7/contrib/tcsh/nls/et/set27
  stable/7/contrib/tcsh/nls/et/set3
  stable/7/contrib/tcsh/nls/et/set30
  stable/7/contrib/tcsh/nls/et/set4
  stable/7/contrib/tcsh/nls/et/set5
  stable/7/contrib/tcsh/nls/et/set6
  stable/7/contrib/tcsh/nls/et/set7
  stable/7/contrib/tcsh/nls/et/set8
  stable/7/contrib/tcsh/nls/et/set9
  stable/7/contrib/tcsh/nls/finnish/charset
  stable/7/contrib/tcsh/nls/finnish/set1
  stable/7/contrib/tcsh/nls/finnish/set10
  stable/7/contrib/tcsh/nls/finnish/set11
  stable/7/contrib/tcsh/nls/finnish/set12
  stable/7/contrib/tcsh/nls/finnish/set13
  stable/7/contrib/tcsh/nls/finnish/set14
  stable/7/contrib/tcsh/nls/finnish/set16
  stable/7/contrib/tcsh/nls/finnish/set17
  stable/7/contrib/tcsh/nls/finnish/set18
  stable/7/contrib/tcsh/nls/finnish/set19
  stable/7/contrib/tcsh/nls/finnish/set2
  stable/7/contrib/tcsh/nls/finnish/set20
  stable/7/contrib/tcsh/nls/finnish/set22
  stable/7/contrib/tcsh/nls/finnish/set23
  stable/7/contrib/tcsh/nls/finnish/set25
  stable/7/contrib/tcsh/nls/finnish/set26
  stable/7/contrib/tcsh/nls/finnish/set27
  stable/7/contrib/tcsh/nls/finnish/set29
  stable/7/contrib/tcsh/nls/finnish/set3
  stable/7/contrib/tcsh/nls/finnish/set6
  stable/7/contrib/tcsh/nls/finnish/set7
  stable/7/contrib/tcsh/nls/finnish/set9
  stable/7/contrib/tcsh/nls/french/charset
  stable/7/contrib/tcsh/nls/french/set1
  stable/7/contrib/tcsh/nls/french/set10
  stable/7/contrib/tcsh/nls/french/set11
  stable/7/contrib/tcsh/nls/french/set12
  stable/7/contrib/tcsh/nls/french/set13
  stable/7/contrib/tcsh/nls/french/set15
  stable/7/contrib/tcsh/nls/french/set16
  stable/7/contrib/tcsh/nls/french/set17
  stable/7/contrib/tcsh/nls/french/set18
  stable/7/contrib/tcsh/nls/french/set19
  stable/7/contrib/tcsh/nls/french/set2
  stable/7/contrib/tcsh/nls/french/set20
  stable/7/contrib/tcsh/nls/french/set21
  stable/7/contrib/tcsh/nls/french/set22
  stable/7/contrib/tcsh/nls/french/set23
  stable/7/contrib/tcsh/nls/french/set25
  stable/7/contrib/tcsh/nls/french/set26
  stable/7/contrib/tcsh/nls/french/set27
  stable/7/contrib/tcsh/nls/french/set3
  stable/7/contrib/tcsh/nls/french/set30
  stable/7/contrib/tcsh/nls/french/set31
  stable/7/contrib/tcsh/nls/french/set4
  stable/7/contrib/tcsh/nls/french/set6
  stable/7/contrib/tcsh/nls/french/set7
  stable/7/contrib/tcsh/nls/french/set8
  stable/7/contrib/tcsh/nls/french/set9
  stable/7/contrib/tcsh/nls/german/charset
  stable/7/contrib/tcsh/nls/german/set1
  stable/7/contrib/tcsh/nls/german/set10
  stable/7/contrib/tcsh/nls/german/set13
  stable/7/contrib/tcsh/nls/german/set15
  stable/7/contrib/tcsh/nls/german/set16
  stable/7/contrib/tcsh/nls/german/set17
  stable/7/contrib/tcsh/nls/german/set18
  stable/7/contrib/tcsh/nls/german/set19
  stable/7/contrib/tcsh/nls/german/set2
  stable/7/contrib/tcsh/nls/german/set20
  stable/7/contrib/tcsh/nls/german/set22
  stable/7/contrib/tcsh/nls/german/set23
  stable/7/contrib/tcsh/nls/german/set25
  stable/7/contrib/tcsh/nls/german/set26
  stable/7/contrib/tcsh/nls/german/set27
  stable/7/contrib/tcsh/nls/german/set29
  stable/7/contrib/tcsh/nls/german/set3
  stable/7/contrib/tcsh/nls/german/set30
  stable/7/contrib/tcsh/nls/german/set31
  stable/7/contrib/tcsh/nls/german/set4
  stable/7/contrib/tcsh/nls/german/set5
  stable/7/contrib/tcsh/nls/german/set6
  stable/7/contrib/tcsh/nls/german/set7
  stable/7/contrib/tcsh/nls/german/set8
  stable/7/contrib/tcsh/nls/german/set9
  stable/7/contrib/tcsh/nls/greek/charset
  stable/7/contrib/tcsh/nls/greek/set1   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set10   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set11   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set12   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set13   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set14   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set15   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set16   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set17   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set18   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set19   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set2   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set20   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set21   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set22   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set23   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set25   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set26   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set27   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set29   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set3   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set30   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set31   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set4   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set5   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set6   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set7   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set8   (contents, props changed)
  stable/7/contrib/tcsh/nls/greek/set9   (contents, props changed)
  stable/7/contrib/tcsh/nls/italian/charset
  stable/7/contrib/tcsh/nls/italian/set1
  stable/7/contrib/tcsh/nls/italian/set11
  stable/7/contrib/tcsh/nls/italian/set13
  stable/7/contrib/tcsh/nls/italian/set15
  stable/7/contrib/tcsh/nls/italian/set17
  stable/7/contrib/tcsh/nls/italian/set19
  stable/7/contrib/tcsh/nls/italian/set2
  stable/7/contrib/tcsh/nls/italian/set20
  stable/7/contrib/tcsh/nls/italian/set22
  stable/7/contrib/tcsh/nls/italian/set23
  stable/7/contrib/tcsh/nls/italian/set26
  stable/7/contrib/tcsh/nls/italian/set3
  stable/7/contrib/tcsh/nls/italian/set30
  stable/7/contrib/tcsh/nls/italian/set4
  stable/7/contrib/tcsh/nls/italian/set6
  stable/7/contrib/tcsh/nls/italian/set7
  stable/7/contrib/tcsh/nls/ja/charset
  stable/7/contrib/tcsh/nls/ja/set1   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set10   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set11   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set12   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set13   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set15   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set16   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set17   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set18   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set2   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set21   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set29   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set3   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set30   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set4   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set5   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set6   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set7   (contents, props changed)
  stable/7/contrib/tcsh/nls/ja/set8   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/charset
  stable/7/contrib/tcsh/nls/russian/set1   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set10   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set11   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set12   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set13   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set14   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set15   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set16   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set17   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set18   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set19   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set2   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set20   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set22   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set23   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set25   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set26   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set27   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set29   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set30   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set31   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set4   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set5   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set6   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set7   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set8   (contents, props changed)
  stable/7/contrib/tcsh/nls/russian/set9   (contents, props changed)
  stable/7/contrib/tcsh/nls/spanish/charset
  stable/7/contrib/tcsh/nls/spanish/set1
  stable/7/contrib/tcsh/nls/spanish/set10
  stable/7/contrib/tcsh/nls/spanish/set13
  stable/7/contrib/tcsh/nls/spanish/set14
  stable/7/contrib/tcsh/nls/spanish/set15
  stable/7/contrib/tcsh/nls/spanish/set16
  stable/7/contrib/tcsh/nls/spanish/set17
  stable/7/contrib/tcsh/nls/spanish/set18
  stable/7/contrib/tcsh/nls/spanish/set19
  stable/7/contrib/tcsh/nls/spanish/set2
  stable/7/contrib/tcsh/nls/spanish/set20
  stable/7/contrib/tcsh/nls/spanish/set22
  stable/7/contrib/tcsh/nls/spanish/set23
  stable/7/contrib/tcsh/nls/spanish/set25
  stable/7/contrib/tcsh/nls/spanish/set26
  stable/7/contrib/tcsh/nls/spanish/set27
  stable/7/contrib/tcsh/nls/spanish/set3
  stable/7/contrib/tcsh/nls/spanish/set30
  stable/7/contrib/tcsh/nls/spanish/set4
  stable/7/contrib/tcsh/nls/spanish/set5
  stable/7/contrib/tcsh/nls/spanish/set6
  stable/7/contrib/tcsh/nls/spanish/set7
  stable/7/contrib/tcsh/nls/spanish/set8
  stable/7/contrib/tcsh/nls/spanish/set9
  stable/7/contrib/tcsh/nls/ukrainian/charset
  stable/7/contrib/tcsh/nls/ukrainian/set1   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set10   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set11   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set12   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set13   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set14   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set15   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set16   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set17   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set18   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set19   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set2   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set20   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set22   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set23   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set25   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set26   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set27   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set29   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set30   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set31   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set5   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set6   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set7   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set8   (contents, props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set9   (contents, props changed)
  stable/7/contrib/tcsh/patchlevel.h
  stable/7/contrib/tcsh/pathnames.h
  stable/7/contrib/tcsh/sh.c
  stable/7/contrib/tcsh/sh.char.c
  stable/7/contrib/tcsh/sh.char.h
  stable/7/contrib/tcsh/sh.decls.h
  stable/7/contrib/tcsh/sh.dir.c
  stable/7/contrib/tcsh/sh.dol.c
  stable/7/contrib/tcsh/sh.err.c
  stable/7/contrib/tcsh/sh.exec.c
  stable/7/contrib/tcsh/sh.exp.c
  stable/7/contrib/tcsh/sh.file.c
  stable/7/contrib/tcsh/sh.func.c
  stable/7/contrib/tcsh/sh.glob.c
  stable/7/contrib/tcsh/sh.h
  stable/7/contrib/tcsh/sh.hist.c
  stable/7/contrib/tcsh/sh.lex.c
  stable/7/contrib/tcsh/sh.misc.c
  stable/7/contrib/tcsh/sh.parse.c
  stable/7/contrib/tcsh/sh.print.c
  stable/7/contrib/tcsh/sh.proc.c
  stable/7/contrib/tcsh/sh.proc.h
  stable/7/contrib/tcsh/sh.sem.c
  stable/7/contrib/tcsh/sh.set.c
  stable/7/contrib/tcsh/sh.time.c
  stable/7/contrib/tcsh/tc.alloc.c
  stable/7/contrib/tcsh/tc.const.c
  stable/7/contrib/tcsh/tc.decls.h
  stable/7/contrib/tcsh/tc.disc.c
  stable/7/contrib/tcsh/tc.func.c
  stable/7/contrib/tcsh/tc.nls.c
  stable/7/contrib/tcsh/tc.nls.h
  stable/7/contrib/tcsh/tc.os.c
  stable/7/contrib/tcsh/tc.os.h
  stable/7/contrib/tcsh/tc.prompt.c
  stable/7/contrib/tcsh/tc.sig.c
  stable/7/contrib/tcsh/tc.sig.h
  stable/7/contrib/tcsh/tc.str.c
  stable/7/contrib/tcsh/tc.wait.h
  stable/7/contrib/tcsh/tc.who.c
  stable/7/contrib/tcsh/tcsh.man
  stable/7/contrib/tcsh/tcsh.man2html
  stable/7/contrib/tcsh/tw.color.c
  stable/7/contrib/tcsh/tw.init.c
  stable/7/contrib/tcsh/tw.parse.c
  stable/7/contrib/tcsh/vms.termcap.c
Directory Properties:
  stable/7/bin/csh/   (props changed)
  stable/7/contrib/tcsh/   (props changed)
  stable/7/contrib/tcsh/nls/greek/set24   (props changed)
  stable/7/contrib/tcsh/nls/ja/set24   (props changed)
  stable/7/contrib/tcsh/nls/russian/set21   (props changed)
  stable/7/contrib/tcsh/nls/russian/set24   (props changed)
  stable/7/contrib/tcsh/nls/russian/set3   (props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set21   (props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set24   (props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set3   (props changed)
  stable/7/contrib/tcsh/nls/ukrainian/set4   (props changed)

Modified: stable/7/bin/csh/Makefile
==============================================================================
--- stable/7/bin/csh/Makefile	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/bin/csh/Makefile	Wed Mar  7 22:19:43 2012	(r232674)
@@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG
 DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"'
 .endif
 CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS}
-WARNS?=	0
+WARNS?=	1
 SRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
 	sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
 	sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
@@ -107,10 +107,10 @@ gethost: gethost.c sh.err.h tc.const.h s
 	@rm -f ${.TARGET}
 	${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c
 
-tc.defs.c: gethost ${.CURDIR}/host.defs
+tc.defs.c: gethost ${TCSHDIR}/host.defs
 	@rm -f ${.TARGET}
 	@echo "/* Do not edit this file, make creates it */" > ${.TARGET}
-	./gethost ${.CURDIR}/host.defs >> ${.TARGET}
+	./gethost ${TCSHDIR}/host.defs >> ${.TARGET}
 
 ed.defns.h: ed.defns.c
 	@rm -f ${.TARGET}

Modified: stable/7/bin/csh/config.h
==============================================================================
--- stable/7/bin/csh/config.h	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/bin/csh/config.h	Wed Mar  7 22:19:43 2012	(r232674)
@@ -1,5 +1,5 @@
 /* $FreeBSD$ */
-/* config.h.  Generated by configure.  */
+/* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
 /* Define to the type of elements in the array set by `getgroups'. Usually
@@ -12,9 +12,6 @@
 /* Define to 1 if you have the <auth.h> header file. */
 /* #undef HAVE_AUTH_H */
 
-/* Define to 1 if you have the `catgets' function. */
-#define HAVE_CATGETS 1
-
 /* Define to 1 if you have the <crypt.h> header file. */
 /* #undef HAVE_CRYPT_H */
 
@@ -41,6 +38,9 @@
 /* Define to 1 if you have the `dup2' function. */
 #define HAVE_DUP2 1
 
+/* Define to 1 if you have the <features.h> header file. */
+/* #undef HAVE_FEATURES_H */
+
 /* Define to 1 if you have the `getauthid' function. */
 /* #undef HAVE_GETAUTHID */
 
@@ -56,7 +56,10 @@
 /* Define to 1 if you have the `getutent' function. */
 /* #undef HAVE_GETUTENT */
 
-/* Define if you have the iconv() function. */
+/* Define to 1 if you have the `getutxent' function. */
+/* #undef HAVE_GETUTXENT */
+
+/* Define if you have the iconv() function and it works. */
 /* #undef HAVE_ICONV */
 
 /* Define to 1 if you have the <inttypes.h> header file. */
@@ -65,6 +68,9 @@
 /* Define to 1 if the system has the type `long long'. */
 #define HAVE_LONG_LONG 1
 
+/* Define to 1 if you have the `mallinfo' function. */
+/* #undef HAVE_MALLINFO */
+
 /* Define to 1 if mbrtowc and mbstate_t are properly declared. */
 #define HAVE_MBRTOWC 1
 
@@ -77,6 +83,9 @@
 /* Define to 1 if you have the `memset' function. */
 #define HAVE_MEMSET 1
 
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
 /* #undef HAVE_NDIR_H */
 
@@ -86,6 +95,9 @@
 /* Define to 1 if you have the `nl_langinfo' function. */
 #define HAVE_NL_LANGINFO 1
 
+/* Define to 1 if you have the <paths.h> header file. */
+#define HAVE_PATHS_H 1
+
 /* Define to 1 if you have the `sbrk' function. */
 #define HAVE_SBRK 1
 
@@ -120,22 +132,34 @@
 /* Define to 1 if you have the `strstr' function. */
 #define HAVE_STRSTR 1
 
-/* Define to 1 if `d_ino' is member of `struct dirent'. */
+/* Define to 1 if `d_ino' is a member of `struct dirent'. */
 #define HAVE_STRUCT_DIRENT_D_INO 1
 
-/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */
+/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
 
-/* Define to 1 if `ut_host' is member of `struct utmp'. */
+/* Define to 1 if `ut_host' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_HOST */
+
+/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_TV */
+
+/* Define to 1 if `ut_user' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_USER */
+
+/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */
+/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */
+
+/* Define to 1 if `ut_host' is a member of `struct utmp'. */
 #define HAVE_STRUCT_UTMP_UT_HOST 1
 
-/* Define to 1 if `ut_tv' is member of `struct utmp'. */
+/* Define to 1 if `ut_tv' is a member of `struct utmp'. */
 /* #undef HAVE_STRUCT_UTMP_UT_TV */
 
-/* Define to 1 if `ut_user' is member of `struct utmp'. */
+/* Define to 1 if `ut_user' is a member of `struct utmp'. */
 /* #undef HAVE_STRUCT_UTMP_UT_USER */
 
-/* Define to 1 if `ut_xtime' is member of `struct utmp'. */
+/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */
 /* #undef HAVE_STRUCT_UTMP_UT_XTIME */
 
 /* Define to 1 if you have the `sysconf' function. */
@@ -179,25 +203,31 @@
 /* Support NLS. */
 #define NLS 1
 
+/* Support NLS catalogs. */
+#define NLS_CATALOGS 1
+
 /* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
+#define PACKAGE_BUGREPORT "http://bugs.gw.com/"
 
 /* Define to the full name of this package. */
-#define PACKAGE_NAME ""
+#define PACKAGE_NAME "tcsh"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
+#define PACKAGE_STRING "tcsh 6.18.01"
 
 /* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
+#define PACKAGE_TARNAME "tcsh"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION ""
+#define PACKAGE_VERSION "6.18.01"
 
 /* Define to 1 if the `setpgrp' function takes no argument. */
 /* #undef SETPGRP_VOID */
 
-/* The size of a `wchar_t', as computed by sizeof. */
+/* The size of `wchar_t', as computed by sizeof. */
 #define SIZEOF_WCHAR_T 4
 
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
@@ -206,6 +236,11 @@
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
 /* Define to empty if `const' does not conform to ANSI C. */
 /* #undef const */
 
@@ -215,7 +250,7 @@
 /* Define to `int' if <sys/types.h> does not define. */
 /* #undef mode_t */
 
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
 /* #undef size_t */
 
 /* Define to `int' if neither <sys/types.h> nor <sys/socket.h> define. */
@@ -227,6 +262,10 @@
 /* Define to `int' if <sys/types.h> doesn't define. */
 /* #undef uid_t */
 
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
 /* Define to empty if the keyword `volatile' does not work. Warning: valid
    code using `volatile' can become incorrect without. Disable with care. */
 /* #undef volatile */
@@ -234,9 +273,5 @@
 #include "config_p.h"
 #include "config_f.h"
 
-#ifndef NO_NLS_CATALOGS
-#define NLS_CATALOGS
-#endif
-
 /* Work around a vendor issue where config_f.h is #undef'ing this setting */
 #define SYSMALLOC

Modified: stable/7/bin/csh/config_p.h
==============================================================================
--- stable/7/bin/csh/config_p.h	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/bin/csh/config_p.h	Wed Mar  7 22:19:43 2012	(r232674)
@@ -105,9 +105,6 @@
 
 #elif defined(__APPLE__)
 # define SYSMALLOC
-
-#else
-# define NLS_CATALOGS
 #endif
 
 #endif /* _h_config */

Modified: stable/7/contrib/tcsh/Fixes
==============================================================================
--- stable/7/contrib/tcsh/Fixes	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/contrib/tcsh/Fixes	Wed Mar  7 22:19:43 2012	(r232674)
@@ -1,3 +1,147 @@
+  6. V6.18.01 - 20120214
+  5. fix interruptible wait again
+  4. ignore bogus compiler overflow message
+  3. cleanup ifdefs in utmp code, and provide default array entries
+  2. Ignore #machine entries in host.defs
+  1. Detect missing ) in gethost.c (Corinna Vinschen)
+
+104. V6.18.00 - 20120114
+103. remove unused variables.
+102. Make gethost use definitions for x __x__ and __x automatically.
+101. More utmp fixes
+100. V6.17.10 - 20120105
+ 99. Add more FreeBSD/NetBSD machines
+ 98. Add portability wrapper for gencat
+ 97. Fix warning for write in SYSMALLOC systems.
+ 96. V6.17.09 - 20120102
+ 95. revert gencat handling to pre-cygwin fixes (without the env settings)
+ 94. remove stray endutent()
+ 93. V6.17.08 - 20111230
+ 92. Remove - from gencat
+ 91. Provide support for malloc_usable_size() so that linux works again
+     without SYSMALLOC
+ 90. Add support for FreeBSD's utmpx.
+ 89. V6.17.07 - 20111227
+ 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and
+     there are more than 10 jobs.
+ 87. PR/155: Default $anyerror to set for backward compatibility
+ 86. PR/149: Don't print -1 in %j (Vojtech Vitek)
+ 85. handle -- on chdir commands as the end of options processing so that
+     they can process a directory like -x without resorting to ./-x
+     (Andrew Stevenson)
+ 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes)
+ 83. PR/38: Null check for jobs (Kurt Miller)
+ 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger)
+ 81. PR/120: string0 in filetest does not have enough space.
+ 80. V6.17.06 - 20110415
+ 79. PR/110: Add $anyerror to select behavior. Default to the new one.
+ 78. Don't try to spell commands that are correct (Rouben Rostamian)
+     [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo;
+      chmod +x foo; set correct=cmd; ./foo -> ../foo]
+ 77. Don't push the syntax struct on the cleanup stack, because on foo;bar
+     if foo fails, we will free bar prematurely (Ben Miller)
+ 76. Avoid infinite loop while trying to print the pid of a dying process
+     to a closed file (Bob Arendt)
+ 75. Handle completion of ${ variables (Anthony Mallet)
+ 74. Add --disable-nls-catalogs (Corinna Vinschen)
+ 73. convert message catalogs to UTF-8 (Werner Fink)
+ 72. check that the NLS path works before setting $NLSPATH.
+ 71. use SYSMALLOC for GLIBC (Werner Fink)
+ 70. use mallinfo for SYSMALLOC (Corinna Vinschen)
+ 69. V6.17.05 - 20110201
+ 68. Use mkstemp() if there for here docs (Werner Fink)
+ 67. Fix handling of errors and exit values in builtins (Werner Fink)
+ 66. Better pty name detection (Werner Fink)
+ 65. Enable NLS catalogs on Cygwin (Corinna Vinschen)
+ 64. NLSPATH handling fixes (Corinna Vinschen)
+ 63. Avoid infrequent exit when tcsh cd's into a non-existent directory
+     https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink)
+ 62. Don't try to spell check full path binaries that are correct because
+     they can cause hangs when other nfs partitions are hung. (Werner Fink)
+ 61. Avoid nested interrupts when exiting causing history writing to fail
+     https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink)
+ 60. Instead of giving an error or ignoring lines with missing eol at eof,
+     process them.
+ 59. Avoid leaking fd's in mail check (Werner Fink)
+ 58. Add cygwin_xcrypt() (Corinna Vinschen)
+ 57. Recognize i686 (Corinna Vinschen)
+ 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin
+     settings (Corinna Vinschen)
+ 55. Avoid double slashes in cdpath (Corinna Vinschen)
+ 54. V6.17.04 - 20110118
+ 53. Revert PR/110, breaks the test suite.
+ 52. V6.17.03 - 20110117
+ 51. PR/102: Complain on input files with missing trailing \n
+ 50. PR/104: If atime == mtime we don't have new mail.
+ 49. PR/113: Don't allow illegal variable names to be set.
+ 48. PR/112: don't set $REMOTEHOST on the local machine.
+ 47. PR/110: exit status of the pipeline should be the status of the last
+     command.
+ 46. Android support (Corinna Vinschen)
+ 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that
+     translates unshifted 7 bit ASCII (Werner Fink)
+ 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL
+     (Jean-Luc Leger)
+ 43. PR/109: make wait interruptible (Vojtech Vitek)
+ 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues
+     (Robert Byrnes)
+ 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen)
+ 40. Don't echo history while history -L or history -M
+ 39. Check for EOS before ** from Greg Dionne
+ 38. Don't fork in backeval from Bryan Mason
+ 37. Better globstar support from Greg Dionne
+ 36. Error out when processing the last incomplete line instead of silently
+     ignoring it (Anders Kaseorg)
+ 35. Fix SEGV from echo ``
+ 34. Better fixes for histchars and promptchars (nargs)
+ 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context.
+     (Fabio Fabbri)
+ 32. V6.17.02 - 20100512
+ 31. PR/79: nargs: Better handling for promptchars.
+ 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim
+     Zajkowski)
+ 29. PR/84: Performance fixes for large history merges (add
+     hashtable (Ted Anderson)
+ 28. Revert previous #23; people should use $histlit if they want this
+     feature.
+ 27. Don't kill "hup" background jobs when a child of the shell exits.
+     From Debian.
+ 26. Ignore \r\n in the command line options for OS's that don't strip
+     these from #!; from Debian
+ 25. Fix enhanced missing patch (Greg Dionne)
+ 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now.
+     (Corinna Vinschen)
+ 23. Turn HistLit on while recording history to avoid \!\! losing its \.
+     From Debian
+ 22. set autoexpand; set histchars="";\n<tab> crash. From Debian
+ 21. V6.17.01 - 20100506
+ 20. unset verbose while we are reading the history file to avoid echoing
+     to the terminal. (Jeffrey Bastian)
+ 19. globstar addition, Enhance addition, euid, euser, gid variables
+     (Greg Dionne)
+ 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks)
+ 17. Handle UTF-16 surrogates (Corinna Vinschen)
+ 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen)
+ 15. Better support for Solaris >= 2.9 (Thomas Uhle)
+ 14. Change internal expression calculations to long long so that we can
+     deal with > 32 bit time, inodes, uids, file sizes etc.
+ 13. Add new linux resource limits.
+ 12. Don't print 'Exit X' when printexitvalue is set in `` expressions
+     (Jeff Bastian)
+ 11. Add more LS_COLORS vars (M.H. Anderson)
+ 10. Reduce whitespace in Makefile (Don Estabrook)
+  9. Manual page fixes (Alan R. S. Bueno)
+  8. Remove history in loops bug from the documentation (Holger Weiss)
+  7. Add autorehash (Holger Weiss)
+  6. Add history.at (Ted Anderson)
+  5. Better NLSPATH handling (Norm Jacobs)
+  4. Fix hostname building from utmp (Cyrus Rahman)
+  3. Handle pending signals before flush so that the the history file does
+     not get truncated.  (Ted Anderson)
+  2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil)
+  1. remember to closedir in mailchk (from Werner Fink, reported by
+     David Binderman)
+
  21. V6.17.00 - 20090710
  20. Fix dataroot autoconf issue.
  19. Fix directory stuff for unit tests.

Modified: stable/7/contrib/tcsh/Imakefile
==============================================================================
--- stable/7/contrib/tcsh/Imakefile	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/contrib/tcsh/Imakefile	Wed Mar  7 22:19:43 2012	(r232674)
@@ -1,5 +1,5 @@
 XCOMM
-XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $
+XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $
 XCOMM
 XCOMM Imakefile for tcsh 6.12
 XCOMM Marc Horowitz, MIT SIPB
@@ -93,7 +93,11 @@ ones.  Please send in your fixes and add
 #      if (OSMinorVersion < 6)
 #       define ConfigH sol24
 #      else
-#       define ConfigH sol26
+#       if (OSMinorVersion < 9)
+#        define ConfigH sol26
+#       else
+#        define ConfigH sol29
+#       endif
 #      endif
 #     endif
 #    endif

Modified: stable/7/contrib/tcsh/Makefile.in
==============================================================================
--- stable/7/contrib/tcsh/Makefile.in	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/contrib/tcsh/Makefile.in	Wed Mar  7 22:19:43 2012	(r232674)
@@ -1,4 +1,4 @@
-# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $
+# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $
 #	Makefile.in	4.3	6/11/83
 #
 # C Shell with process control; VM/UNIX VAX Makefile
@@ -26,22 +26,27 @@ CF=-c
 CPPFLAGS=-I. -I$(srcdir)
 
 LFLAGS=
-#LFLAGS= -Zn10000		# hpux lint
+# hpux lint
+#LFLAGS= -Zn10000
 
 
-CFLAGS = @CFLAGS@		# This is set by autoconf.
-#CFLAGS= -g			# debug
-#CFLAGS= -O			# production
-#CFLAGS= 			# Broken optimizers....
+# This is set by autoconf:
+CFLAGS = @CFLAGS@
+# debug:
+#CFLAGS= -g
+# production:
+#CFLAGS= -O
+# Broken optimizers....
+#CFLAGS=
 
 #CFLAGS= -g -pg -DPROF
 #CFLAGS= -O -pg -DPROF
 
 # gcc 1.00-1.37
-#CFLAGS= -O -finline-functions -fstrength-reduce 
+#CFLAGS= -O -finline-functions -fstrength-reduce
 
 # gcc 1.37-1.40
-#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce 
+#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce
 # add -msoft-float for 68881 machines.
 
 # gcc 2.0
@@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@		# This is set by auto
 #CFLAGS= -O -Mnodebug -Mnoperfmon
 
 # DEC Alpha OSF/1
-#CFLAGS= -O2 -Olimit 2000	## Normal Optimization
-#CFLAGS= -O3 -Olimit 2000	## Full Optimization - may not work
+## Normal Optimization
+#CFLAGS= -O2 -Olimit 2000
+## Full Optimization - may not work
+#CFLAGS= -O3 -Olimit 2000
 #CF=-j
 #SUF=u
 #.SUFFIXES: .u
@@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@		# This is set by auto
 # global optimizer! (-O3).
 # On SGI 4.0+ you need to add -D__STDC__ too.
 #CFLAGS= -O3
-#CFLAGS= -O3 -Olimit 2000	## Ultrix 4.2a
+## Ultrix 4.2a
+#CFLAGS= -O3 -Olimit 2000
 #CF=-j
 #SUF=u
 #.SUFFIXES: .u 				## Ultrix and gnu-make need that
@@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@		# This is set by auto
 # CFLAGS= -O3
 
 # SINIX RMx00
-#CFLAGS= -O # -D_POSIX_SOURCE # -kansi
+#CFLAGS= -O# -D_POSIX_SOURCE# -kansi
 
 # Apollo's with cc [apollo builtins don't work with gcc]
 # and apollo should not define __STDC__ if it does not have
 # the standard header files. RT's (aos4.3) need that too;
 # you might want to skip the -O on the rt's... Not very wise.
 # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA)
-#DFLAGS=-U__STDC__ 
+#DFLAGS=-U__STDC__
 #DFLAGS=-D_IBMESA
 # On aix2.2.1 we need more compiler space.
 #DFLAGS=-Nd4000 -Nn3000
@@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs
 ################################################################
 ## LDFLAGS.  Define something here if you need to
 ################################################################
-LDFLAGS= @LDFLAGS@		## This is set by autoconf.
-#LDFLAGS= 			## The simplest, suitable for all.
-#LDFLAGS= -s			## Stripped. Takes less space on disk.
-#LDFLAGS= -s -n			## Pure executable. Spares paging over
-# 				## the network for machines with local
-#				## swap but external /usr/local/bin .
-#LDFLAGS= -s -n -Bstatic	## Without dynamic linking. (SunOS/cc)
-#LDFLAGS= -s -n -static		## Without dynamic linking. (SunOS/gcc)
-#LDFLAGS= -Wl,-s,-n		## Stripped, shared text (Unicos)
-#LDFLAGS= -s -static		## Link statically. (linux)
-#LDFLAGS= -s -N			## Impure executable (linux)
+## This is set by autoconf:
+LDFLAGS= @LDFLAGS@
+## The simplest, suitable for all.
+#LDFLAGS=
+## Stripped. Takes less space on disk.
+#LDFLAGS= -s
+## Pure executable.  Spares paging over the network for machines with
+## local swap but external /usr/local/bin .
+#LDFLAGS= -s -n
+## Without dynamic linking. (SunOS/cc)
+#LDFLAGS= -s -n -Bstatic
+## Without dynamic linking. (SunOS/gcc)
+#LDFLAGS= -s -n -static
+## Stripped, shared text (Unicos)
+#LDFLAGS= -Wl,-s,-n
+## Link statically. (linux)
+#LDFLAGS= -s -static
+## Impure executable (linux)
+#LDFLAGS= -s -N
 
 ################################################################
 ## SBINLDFLAGS.  Flags to build a tcsh suitable for installation in
@@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld
 ################################################################
 ## LIBES.  Pick one, or roll your own.
 ################################################################
-LIBES= @LIBS@	 			 ## This is set by autoconf.
-#LIBES= -ltermcap 			 ## BSD style things
-#LIBES= -ltermcap			 ## SunOS, HP-UX, pyramid
-#LIBES= -ltermcap			 ## Linux
-#LIBES= -ltermcap -lshadow		 ## Linux with PW_SHADOW
-#LIBES= -ltermcap -lsec			 ## Tek XD88/10 (UTekV) with PW_SHADOW
-#LIBES= -ltermcap -lsec			 ## Motorola MPC (sysV88) with PW_SHADOW
-#LIBES= -ltermcap -lcs			 ## Mach
-#LIBES= -ltermcap -lbsd			 ## DEC osf1 on the alpha
-#LIBES= -ltermcap -lbsd			 ## Intel paragon
-#LIBES= -ltermcap -lbsd			 ## Clipper intergraph
-#LIBES= -ltermcap -lseq			 ## Sequent's Dynix
-#LIBES= -ltermcap -lauth		 ## Ultrix with Enhanced Security
-#LIBES= -ltermcap -ldir -lx		 ## Xenix 386 style things
-#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0
-#LIBES= -lcurses			 ## AIX on the rt
-#LIBES= -lcurses			 ## TitanOS on the stellar
-#LIBES= -ltermlib -lsocket -lnsl	 ## SysV4 w/o BSDTIMES or Solaris 2
-#LIBES= -lcurses			 ## SysV3 w/o networking
-#LIBES= -lcurses -lnet			 ## SysV3 with networking
-#LIBES= -lcurses -ldir			 ## SysV2 w/o networking & dirlib
-#LIBES= -lcurses -ldir -lnet		 ## SysV2 with networking & dirlib
-#LIBES= -lcurses -lbsd			 ## AIX on the IBM 370 or rs6000 or ps2
-#LIBES= -lcurses -lbsd			 ## ETA10
-#LIBES= -lcurses -lbsd			 ## Irix3.1 on the SGI-IRIS4D
-#LIBES= -lcurses -lbsd -lc_s		 ## Irix3.3 on the SGI-IRIS4D w/o yp
-#LIBES= -lcurses -lsun -lbsd -lc_s	 ## Irix3.3 on the SGI-IRIS4D with yp
-#LIBES= -lcurses -lsocket -lbsd		 ## Amdahl UTS 2.1
-#LIBES= -lcurses -lsocket		 ## Intel's hypercube.
-#LIBES= -lcurses -lsocket		 ## ns32000 based Opus.
-#LIBES= -lcurses -lcposix		 ## ISC 2.2 without networking
-#LIBES= -lcposix -lc_s -lcurses -linet	 ## ISC 2.2 with networking
-#LIBES= -lcurses -lsec -lc_s		 ## ISC 2.0.2 without networking
-#LIBES= -lcurses -linet -lsec -lc_s	 ## ISC 2.0.2 with networking
-#LIBES= -lcurses -lintl -lcrypt		 ## SCO SysVR3.2v2.0
-#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1
-#LIBES= -lposix -ltermcap		 ## A/UX 2.0
-#LIBES= -lposix -ltermcap -lc_s		 ## A/UX 3.0
-#LIBES= -ldirent -lcurses		 ## att3b1 cc w/o shared lib & dirlib
-#LIBES= -shlib -ldirent -lcurses	 ## att3b1 gcc with shared lib & dirlib
-#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES
-#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra
-#LIBES= -ltermc				 ## emx under OS/2
-#LIBES=					 ## Minix, VMS_POSIX
-#LIBES= -ltermcap -lcrypt		 ## Multiflow
-#LIBES= -ltermcap -lcrypt		 ## NetBSD
-#LIBES= -lcurses 			 ## DDE Supermax
+## This is set by autoconf.
+LIBES= @LIBS@
+## BSD style things
+#LIBES= -ltermcap
+## SunOS, HP-UX, pyramid
+#LIBES= -ltermcap
+## Linux
+#LIBES= -ltermcap
+## Linux with PW_SHADOW
+#LIBES= -ltermcap -lshadow
+## Tek XD88/10 (UTekV) with PW_SHADOW
+#LIBES= -ltermcap -lsec
+## Motorola MPC (sysV88) with PW_SHADOW
+#LIBES= -ltermcap -lsec
+## Mach
+#LIBES= -ltermcap -lcs
+## DEC osf1 on the alpha
+#LIBES= -ltermcap -lbsd
+## Intel paragon
+#LIBES= -ltermcap -lbsd
+## Clipper intergraph
+#LIBES= -ltermcap -lbsd
+## Sequent's Dynix
+#LIBES= -ltermcap -lseq
+## Ultrix with Enhanced Security
+#LIBES= -ltermcap -lauth
+## Xenix 386 style things
+#LIBES= -ltermcap -ldir -lx
+## masscomp RTU6.0
+#LIBES= -ltermcap -lndir -lsocket -ljobs
+## AIX on the rt
+#LIBES= -lcurses
+## TitanOS on the stellar
+#LIBES= -lcurses
+## SysV4 w/o BSDTIMES or Solaris 2
+#LIBES= -ltermlib -lsocket -lnsl
+## SysV3 w/o networking
+#LIBES= -lcurses
+## SysV3 with networking
+#LIBES= -lcurses -lnet
+## SysV2 w/o networking & dirlib
+#LIBES= -lcurses -ldir
+## SysV2 with networking & dirlib
+#LIBES= -lcurses -ldir -lnet
+## AIX on the IBM 370 or rs6000 or ps2
+#LIBES= -lcurses -lbsd
+## ETA10
+#LIBES= -lcurses -lbsd
+## Irix3.1 on the SGI-IRIS4D
+#LIBES= -lcurses -lbsd
+## Irix3.3 on the SGI-IRIS4D w/o yp
+#LIBES= -lcurses -lbsd -lc_s
+## Irix3.3 on the SGI-IRIS4D with yp
+#LIBES= -lcurses -lsun -lbsd -lc_s
+## Amdahl UTS 2.1
+#LIBES= -lcurses -lsocket -lbsd
+## Intel's hypercube.
+#LIBES= -lcurses -lsocket
+## ns32000 based Opus.
+#LIBES= -lcurses -lsocket
+## ISC 2.2 without networking
+#LIBES= -lcurses -lcposix
+## ISC 2.2 with networking
+#LIBES= -lcposix -lc_s -lcurses -linet
+## ISC 2.0.2 without networking
+#LIBES= -lcurses -lsec -lc_s
+## ISC 2.0.2 with networking
+#LIBES= -lcurses -linet -lsec -lc_s
+## SCO SysVR3.2v2.0
+#LIBES= -lcurses -lintl -lcrypt
+## SCO+ODT1.1
+#LIBES= -lcurses -lintl -lsocket -lcrypt
+## A/UX 2.0
+#LIBES= -lposix -ltermcap
+## A/UX 3.0
+#LIBES= -lposix -ltermcap -lc_s
+## att3b1 cc w/o shared lib & dirlib
+#LIBES= -ldirent -lcurses
+## att3b1 gcc with shared lib & dirlib
+#LIBES= -shlib -ldirent -lcurses
+## SysV4 with BSDTIMES
+#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a
+## Stardent Vistra
+#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a
+## emx under OS/2
+#LIBES= -ltermc
+## Minix, VMS_POSIX
+#LIBES=
+## Multiflow
+#LIBES= -ltermcap -lcrypt
+## NetBSD
+#LIBES= -ltermcap -lcrypt
+## DDE Supermax
+#LIBES= -lcurses
 
 ################################################################
 ## EXTRAFLAGS and EXTRALIBS
@@ -222,8 +285,10 @@ LIBES= @LIBS@	 			 ## This is set by aut
 #
 #Solaris and HPUX require the BSD libraries with AFS.
 #We use -lc to use only what we require.
-#AFSAUXLIB = -lsocket -lnsl -lc -lucb                    # Solaris
-#AFSAUXLIB = -lc -lBSD                                   # HPUX   
+# Solaris
+#AFSAUXLIB = -lsocket -lnsl -lc -lucb
+# HPUX   
+#AFSAUXLIB = -lc -lBSD
 #
 #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\
 #         -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\
@@ -244,26 +309,38 @@ EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV
 # will lose the editor and job control.
 
 # This is for setting your C preprocessor value.
-CPP = @CPP@ # This is set by autoconf.
+# This is set by autoconf.
+CPP = @CPP@
 # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which
 # on the suns does not know how to make dynamically linked binaries.
-CC = @CC@ # This is set by autoconf.
+# This is set by autoconf.
+CC = @CC@
 #CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra
-#CC=	gcc -Wall -pipe -B/bin/	# -ansi -pedantic
-#CC=	gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux)
-#CC=	shlicc 	# BSDI2.1 w/ shared libraries
+# -ansi -pedantic
+#CC=	gcc -Wall -pipe -B/bin/
+# Generate code for Intel 486 (linux)
+#CC=	gcc -m486 -pipe -Wall
+# BSDI2.1 w/ shared libraries
+#CC=	shlicc
 #CC=	cc
 #CC=	occ
 #CC=	acc
 #CC=	pcc
 #CC=	hc -w
-#CC=	c89	# For VMS/POSIX
-#CC=	/bin/cc	# For suns, w/o gcc and SVR4
-#CC=	/usr/lib/sun.compile/cc  # FPS 500 (+FPX) with Sun C compiler
-#CC=	/opt/SUNWspro/bin/cc	# Solaris 2.1
-#CC=	scc 	# Alliant fx2800
-#CC=	cc	-h0,ansi,novector,float0 # for NEC SX-4
+# For VMS/POSIX
+#CC=	c89
+# For suns, w/o gcc and SVR4
+#CC=	/bin/cc
+# FPS 500 (+FPX) with Sun C compiler
+#CC=	/usr/lib/sun.compile/cc
+# Solaris 2.1
+#CC=	/opt/SUNWspro/bin/cc
+# Alliant fx2800
+#CC=	scc
+# for NEC SX-4
+#CC=	cc	-h0,ansi,novector,float0
 #CC=	lcc	-wa 
+CC_FOR_GETHOST = @CC_FOR_GETHOST@
 ED=	ed
 AS=	as
 RM=	rm
@@ -272,8 +349,10 @@ VGRIND=	csh /usr/ucb/vgrind
 CTAGS=	/usr/ucb/ctags
 #XSTR= /usr/ucb/xstr
 SCCS=	/usr/local/sccs
-PARALLEL=12				# Make the multi-max run fast.
-#P=&					# Use Sequent's parallel make
+# Make the multi-max run fast.
+PARALLEL=12
+# Use Sequent's parallel make
+#P=&
 P=
 prefix=@prefix@
 exec_prefix=@exec_prefix@
@@ -282,12 +361,17 @@ mandir=@datarootdir@/man
 MANSECT=1
 DESTBIN=${DESTDIR}${bindir}
 DESTMAN=${DESTDIR}${mandir}/man${MANSECT}
-# DESTMAN=${DESTDIR}/catman/man${MANSECT}	 # A/UX
-# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
-# DESTMAN=/usr/catman/1l			 # Amiga unix (SysVR4)
+# A/UX
+# DESTMAN=${DESTDIR}/catman/man${MANSECT}
+# Stardent Vistra (SysVR4)
+# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT}
+# Amiga unix (SysVR4)
+# DESTMAN=/usr/catman/1l
 EXEEXT=@EXEEXT@
 FTPAREA=/usr/spool/ftp
 
+BUILD_CATALOGS = @BUILD_CATALOGS@
+
 ASSRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
 	sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
 	sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
@@ -330,9 +414,9 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin
 	host.defs gethost.c tcsh.man2html configure.in configure config.h.in \
 	tests/testsuite.at
 TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \
-	tests/expr.at tests/lexical.at tests/mb-eucjp.at tests/mb-utf8.at \
-	tests/noexec.at tests/syntax.at tests/subst.at tests/variables.at \
-	tests/sh.dol.at
+	tests/expr.at tests/lexical.at tests/mb-eucjp.at \
+	tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \
+	tests/variables.at tests/sh.dol.at
 
 VHSRCS=${PVSRCS} ${AVSRCS}
 
@@ -345,7 +429,7 @@ DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} 
 OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
 
 
-all: ${BUILD}
+all: ${BUILD} catalogs
 
 tcsh$(EXEEXT):$(P) ${OBJS} 
 	rm -f tcsh$(EXEEXT) core
@@ -365,7 +449,7 @@ pure:$(P) ${OBJS} 
 
 gethost:  gethost.c sh.err.h tc.const.h sh.h
 	rm -f gethost
-	${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS}
+	${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c
 
 tc.defs.c:	gethost host.defs
 	@rm -f $@.tmp
@@ -463,7 +547,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co
 	  echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
 	} >$(srcdir)/tests/package.m4
 
-$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES)
+$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir)/tests/testsuite.at $(TESTFILES)
 	autom4te --language=autotest -I $(srcdir)/tests \
 		$(srcdir)/tests/testsuite.at -o $@.tmp
 	mv $@.tmp $@
@@ -511,20 +595,36 @@ vgrind:
 
 install-strip: install
 
-install: tcsh$(EXEEXT) 
+install: tcsh$(EXEEXT) install.catalogs install.man
 	-mkdir -p ${DESTBIN}
 	-mv -f ${DESTBIN}/tcsh$(EXEEXT)  ${DESTBIN}/tcsh.old
 	cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT)
 	-strip ${DESTBIN}/tcsh$(EXEEXT)
 	chmod 755 ${DESTBIN}/tcsh$(EXEEXT)
 
+install.catalogs:
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0
+
 install.man: tcsh.man
 	-mkdir -p ${DESTMAN}
 	-rm -f ${DESTMAN}/tcsh.${MANSECT}
 	cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT}
 	chmod 444 ${DESTMAN}/tcsh.${MANSECT}
 
-install.cygwin: install install.man
+# Amiga Unix
+#install.man: tcsh.man
+#        compress tcsh.man
+#	cp tcsh.man.Z ${DESTMAN}/tcsh.Z
+#	chmod 444 ${DESTMAN}/tcsh.Z
+
+# Apple A/UX
+#install.man: tcsh.man
+#	-rm -f ${DESTMAN}/tcsh.${MANSECT}.Z
+#	nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
+#	chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
+
+install.cygwin: install
+	-gzip ${DESTMAN}/tcsh.${MANSECT}
 	-mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh
 	cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh
 	cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh
@@ -542,24 +642,15 @@ install.cygwin: install install.man
 	cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh
 	cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh
 
-# Amiga Unix
-#install.man: tcsh.man
-#        compress tcsh.man
-#	cp tcsh.man.Z ${DESTMAN}/tcsh.Z
-#	chmod 444 ${DESTMAN}/tcsh.Z
-
-# Apple A/UX
-#install.man: tcsh.man
-#	-rm -f ${DESTMAN}/tcsh.${MANSECT}.Z
-#	nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z
-#	chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z
-
-clean:
+clean: clean.catalogs
 	${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost
 	${RM} -f *.${SUF} *.i *.s
 	${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c
 	${RM} -f tcsh.*.m tcsh.*.cat
 
+clean.catalogs:
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0
+
 veryclean: clean
 	${RM} -f Makefile config.h config_p.h
 	${RM} -f config.status config.cache config.log tcsh.ps
@@ -607,7 +698,7 @@ shar:
 	rm -rf tcsh-${VERSION}
 
 catalogs:
-	@(cd nls; make catalogs)
+	@test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0
 
 tcsh-${VERSION}.tar.Z:
 	rm -rf tcsh-${VERSION} 

Modified: stable/7/contrib/tcsh/Ported
==============================================================================
--- stable/7/contrib/tcsh/Ported	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/contrib/tcsh/Ported	Wed Mar  7 22:19:43 2012	(r232674)
@@ -7,7 +7,7 @@ find it out-of-date, or you have additio
 christos
 
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun3, sun4, sun386i
 COMPILER:	cc, gcc, acc
 CFLAGS	:	normal
@@ -18,7 +18,7 @@ ENVIRON	:	n/a
 NOTES	:	Don't compile with /usr/5bin/cc
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun4, ultra
 COMPILER:	cc, gcc
 CFLAGS	:	normal
@@ -34,18 +34,29 @@ NOTES	:	The sunpro compiler cannot compi
 	:	point failures of programs exec'ed from tcsh.
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	ultra
 COMPILER:	WorkShop cc
 CFLAGS	:	normal
 LIBES	:	-lcurses -lsocket -lnsl
-OS	:	solaris 2.6
+OS	:	solaris 2.6, 2.7, 8
 CONFIG	:	sol26
 ENVIRON	:	n/a
 NOTES	:	none
 VERSION	:	6.08
 
-VENDOR	:	sun
+VENDOR	:	Sun
+MODELS	:	ultra, i686, x86_64
+COMPILER:	Sun Studio cc
+CFLAGS	:	normal
+LIBES	:	-lcurses -lsocket -lnsl
+OS	:	solaris 9, 10
+CONFIG	:	sol29
+ENVIRON	:	n/a
+NOTES	:	none
+VERSION	:	6.18
+
+VENDOR	:	Sun
 MODELS	:	i386
 COMPILER:	cc, gcc
 CFLAGS	:	-D__STDC__=0
@@ -56,7 +67,7 @@ ENVIRON	:	n/a
 NOTES	:	n/a
 VERSION	:	6.04.13
 
-VENDOR	:	sun
+VENDOR	:	Sun
 MODELS	:	sun4
 COMPILER:	gcc
 CFLAGS	:	normal

Modified: stable/7/contrib/tcsh/README
==============================================================================
--- stable/7/contrib/tcsh/README	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/contrib/tcsh/README	Wed Mar  7 22:19:43 2012	(r232674)
@@ -1,4 +1,4 @@
-This is tcsh version 6.17.00.  Tcsh is a version of the Berkeley
+This is tcsh version 6.18.01.  Tcsh is a version of the Berkeley
 C-Shell, with the addition of: a command line editor, command and file
 name completion, listing, etc. and a bunch of small additions to the
 shell itself.
@@ -87,7 +87,7 @@ To install tcsh:
 
 10) Enjoy.
 
-12) PLEASE file any bug reports (and fixes), code for new features at:
+11) PLEASE file any bug reports (and fixes), code for new features at:
 
 	http://bugs.gw.com/
 

Modified: stable/7/contrib/tcsh/WishList
==============================================================================
--- stable/7/contrib/tcsh/WishList	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/contrib/tcsh/WishList	Wed Mar  7 22:19:43 2012	(r232674)
@@ -52,17 +52,6 @@ ey )
    - bhooglan
      _________________________________________________________________
 
-   I'm a long-time faithful user of tcsh, and one thing has always bugged
-   me -- the need to type "rehash" at a prompt when adding a new command.
-   My  suggestions  is  to  change  tcsh  so before printing "Command not
-   found.",  it  first  searches  its  entire  path and rebuilds its hash
-   table.  Only  after doing this, and if the command is still not in the
-   path,  then  print  "Command  not  found.".  I  realize there are some
-   extreme  cases  in  which  this  is suboptimal, but in most cases with
-   normal  users  this  would  be  a big win, and simplify the manual and
-   perhaps even the code.
-     _________________________________________________________________
-
    Wish "tcsh -l" would accept other flags. At least "-c".
 
    Currently I can't get ssh to have the right environment unless it is a

Modified: stable/7/contrib/tcsh/complete.tcsh
==============================================================================
--- stable/7/contrib/tcsh/complete.tcsh	Wed Mar  7 22:09:40 2012	(r232673)
+++ stable/7/contrib/tcsh/complete.tcsh	Wed Mar  7 22:19:43 2012	(r232674)
@@ -1,5 +1,5 @@
 #
-# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $
+# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $
 # example file using the new completion code
 #
 # Debian GNU/Linux
@@ -636,7 +636,7 @@ if ($?_complete) then
     complete nmap	'n@-e@`ifconfig -l`@' 'p/*/$hostnames/'
     complete perldoc 	'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@'
     complete postfix    'n/*/(start stop reload abort flush check)/'
-    complete postmap	'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/'
+    complete postmap	'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/'
     complete rcsdiff	'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@'
     complete X		'c/-/(I a ac allowMouseOpenFail allowNonLocalModInDev \
 			allowNonLocalXvidtune ar1 ar2 audit auth bestRefresh \

Modified: stable/7/contrib/tcsh/config.guess
==============================================================================
--- stable/7/contrib/tcsh/config.guess	Wed Mar  7 22:09:40 2012	(r232673)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 01:10:24 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 96A6C106564A;
	Thu,  8 Mar 2012 01:10:24 +0000 (UTC)
	(envelope-from jhibbits@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 836E08FC08;
	Thu,  8 Mar 2012 01:10:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q281AOww018685;
	Thu, 8 Mar 2012 01:10:24 GMT (envelope-from jhibbits@svn.freebsd.org)
Received: (from jhibbits@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q281AO9X018679;
	Thu, 8 Mar 2012 01:10:24 GMT (envelope-from jhibbits@svn.freebsd.org)
Message-Id: <201203080110.q281AO9X018679@svn.freebsd.org>
From: Justin Hibbits <jhibbits@FreeBSD.org>
Date: Thu, 8 Mar 2012 01:10:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232677 - in stable/9: etc/devd sys/conf
	sys/powerpc/conf sys/powerpc/powermac
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 01:10:24 -0000

Author: jhibbits
Date: Thu Mar  8 01:10:23 2012
New Revision: 232677
URL: http://svn.freebsd.org/changeset/base/232677

Log:
  MFC r232177:
  
  Add backlight control to ATI-graphics PowerBooks and iBooks.
  
  Approved by:	nwhitehorn (mentor)

Added:
  stable/9/sys/powerpc/powermac/atibl.c
     - copied unchanged from r232177, head/sys/powerpc/powermac/atibl.c
Modified:
  stable/9/etc/devd/apple.conf
  stable/9/sys/conf/files.powerpc
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC64
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/etc/devd/apple.conf
==============================================================================
--- stable/9/etc/devd/apple.conf	Wed Mar  7 23:57:49 2012	(r232676)
+++ stable/9/etc/devd/apple.conf	Thu Mar  8 01:10:23 2012	(r232677)
@@ -19,6 +19,26 @@ notify 0 {
 };
 
 
+# The next blocks enable brightness hotkeys that can be found on Apple laptops
+notify 0 {
+	match "system"		"PMU";
+	match "subsystem"	"keys";
+	match "type"		"brightness";
+	match "notify"		"down";
+	action			"sysctl dev.backlight.0.level=\
+		$(expr `sysctl -n dev.backlight.0.level` - 10)";
+};
+
+notify 0 {
+	match "system"		"PMU";
+	match "subsystem"	"keys";
+	match "type"		"brightness";
+	match "notify"		"up";
+	action			"sysctl dev.backlight.0.level=\
+		$(expr `sysctl -n dev.backlight.0.level` + 10)";
+};
+
+
 # The next blocks enable volume hotkeys that can be found on Apple laptops
 notify 0 {
 	match "system"		"PMU";

Modified: stable/9/sys/conf/files.powerpc
==============================================================================
--- stable/9/sys/conf/files.powerpc	Wed Mar  7 23:57:49 2012	(r232676)
+++ stable/9/sys/conf/files.powerpc	Thu Mar  8 01:10:23 2012	(r232677)
@@ -144,6 +144,7 @@ powerpc/ofw/rtas.c		optional	aim
 powerpc/powermac/ata_kauai.c	optional	powermac ata | powermac atamacio
 powerpc/powermac/ata_macio.c	optional	powermac ata | powermac atamacio
 powerpc/powermac/ata_dbdma.c	optional	powermac ata | powermac atamacio
+powerpc/powermac/atibl.c	optional	powermac atibl
 powerpc/powermac/cuda.c		optional	powermac cuda
 powerpc/powermac/cpcht.c	optional	powermac pci
 powerpc/powermac/dbdma.c	optional	powermac pci

Modified: stable/9/sys/powerpc/conf/GENERIC
==============================================================================
--- stable/9/sys/powerpc/conf/GENERIC	Wed Mar  7 23:57:49 2012	(r232676)
+++ stable/9/sys/powerpc/conf/GENERIC	Thu Mar  8 01:10:23 2012	(r232677)
@@ -177,6 +177,7 @@ device		max6690		# PowerMac7,2 temperatu
 device		powermac_nvram	# Open Firmware configuration NVRAM
 device		smu		# Apple System Management Unit
 device		windtunnel	# Apple G4 MDD fan controller
+device		atibl		# ATI-based backlight driver for PowerBooks/iBooks
 
 # ADB support
 device		adb

Modified: stable/9/sys/powerpc/conf/GENERIC64
==============================================================================
--- stable/9/sys/powerpc/conf/GENERIC64	Wed Mar  7 23:57:49 2012	(r232676)
+++ stable/9/sys/powerpc/conf/GENERIC64	Thu Mar  8 01:10:23 2012	(r232677)
@@ -184,6 +184,7 @@ device		fcu		# Apple Fan Control Unit
 device		max6690		# PowerMac7,2 temperature sensor
 device		powermac_nvram	# Open Firmware configuration NVRAM
 device		smu		# Apple System Management Unit
+device		atibl		# ATI-based backlight driver for PowerBooks/iBooks
 
 # ADB support
 device		adb

Copied: stable/9/sys/powerpc/powermac/atibl.c (from r232177, head/sys/powerpc/powermac/atibl.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/9/sys/powerpc/powermac/atibl.c	Thu Mar  8 01:10:23 2012	(r232677, copy of r232177, head/sys/powerpc/powermac/atibl.c)
@@ -0,0 +1,196 @@
+/*-
+ * Copyright (c) 2012 Justin Hibbits
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/systm.h>
+#include <sys/module.h>
+#include <sys/kernel.h>
+#include <sys/rman.h>
+#include <sys/sysctl.h>
+
+#include <machine/bus.h>
+
+#include <dev/ofw/openfirm.h>
+
+/* From the xf86-video-ati driver's radeon_reg.h */
+#define RADEON_LVDS_GEN_CNTL         0x02d0
+#define  RADEON_LVDS_ON               (1   <<  0)
+#define  RADEON_LVDS_DISPLAY_DIS      (1   <<  1)
+#define  RADEON_LVDS_PANEL_TYPE       (1   <<  2)
+#define  RADEON_LVDS_PANEL_FORMAT     (1   <<  3)
+#define  RADEON_LVDS_RST_FM           (1   <<  6)
+#define  RADEON_LVDS_EN               (1   <<  7)
+#define  RADEON_LVDS_BL_MOD_LEVEL_SHIFT 8
+#define  RADEON_LVDS_BL_MOD_LEVEL_MASK (0xff << 8)
+#define  RADEON_LVDS_BL_MOD_EN        (1   << 16)
+#define  RADEON_LVDS_DIGON            (1   << 18)
+#define  RADEON_LVDS_BLON             (1   << 19)
+
+struct atibl_softc {
+	device_t	 dev;
+	struct resource *sc_memr;
+};
+
+static void atibl_identify(driver_t *driver, device_t parent);
+static int atibl_probe(device_t dev);
+static int atibl_attach(device_t dev);
+static int atibl_setlevel(struct atibl_softc *sc, int newlevel);
+static int atibl_getlevel(struct atibl_softc *sc);
+static int atibl_sysctl(SYSCTL_HANDLER_ARGS);
+
+static device_method_t atibl_methods[] = {
+	/* Device interface */
+	DEVMETHOD(device_identify, atibl_identify),
+	DEVMETHOD(device_probe, atibl_probe),
+	DEVMETHOD(device_attach, atibl_attach),
+	{0, 0},
+};
+
+static driver_t	atibl_driver = {
+	"backlight",
+	atibl_methods,
+	sizeof(struct atibl_softc)
+};
+
+static devclass_t atibl_devclass;
+
+DRIVER_MODULE(atibl, vgapci, atibl_driver, atibl_devclass, 0, 0);
+
+static void
+atibl_identify(driver_t *driver, device_t parent)
+{
+	if (device_find_child(parent, "backlight", -1) == NULL)
+		device_add_child(parent, "backlight", -1);
+}
+
+static int
+atibl_probe(device_t dev)
+{
+	char		control[8];
+	phandle_t	handle;
+
+	handle = OF_finddevice("mac-io/backlight");
+
+	if (handle <= 0)
+		return (ENXIO);
+
+	if (OF_getprop(handle, "backlight-control", &control, sizeof(control)) < 0)
+		return (ENXIO);
+
+	if (strcmp(control, "ati") != 0)
+		return (ENXIO);
+
+	device_set_desc(dev, "PowerBook backlight");
+
+	return (0);
+}
+
+static int
+atibl_attach(device_t dev)
+{
+	struct atibl_softc	*sc;
+	struct sysctl_ctx_list *ctx;
+	struct sysctl_oid *tree;
+	int			 rid;
+
+	sc = device_get_softc(dev);
+
+	rid = 0x18;	/* BAR[2], for the MMIO register */
+	sc->sc_memr = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+			RF_ACTIVE | RF_SHAREABLE);
+	if (sc->sc_memr == NULL) {
+		device_printf(dev, "Could not alloc mem resource!\n");
+		return (ENXIO);
+	}
+
+	ctx = device_get_sysctl_ctx(dev);
+	tree = device_get_sysctl_tree(dev);
+
+	SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+			"level", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
+			atibl_sysctl, "I", "Backlight level (0-100)");
+
+	return (0);
+}
+
+static int
+atibl_setlevel(struct atibl_softc *sc, int newlevel)
+{
+	uint32_t lvds_gen_cntl;
+
+	if (newlevel > 100)
+		newlevel = 100;
+
+	if (newlevel < 0)
+		newlevel = 0;
+
+	newlevel = (newlevel * 5) / 2 + 5;
+	lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL);
+	lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN;
+	lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_LEVEL_MASK;
+	lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) &
+		RADEON_LVDS_BL_MOD_LEVEL_MASK;
+	bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
+
+	return (0);
+}
+
+static int
+atibl_getlevel(struct atibl_softc *sc)
+{
+	uint32_t	lvds_gen_cntl;
+	int			level;
+
+	lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL);
+
+	level = ((lvds_gen_cntl & RADEON_LVDS_BL_MOD_LEVEL_MASK) >>
+			RADEON_LVDS_BL_MOD_LEVEL_SHIFT);
+	level = ((level - 5) * 2) / 5;
+
+	return (level);
+}
+
+static int
+atibl_sysctl(SYSCTL_HANDLER_ARGS)
+{
+	struct atibl_softc *sc;
+	int newlevel, error;
+
+	sc = arg1;
+
+	newlevel = atibl_getlevel(sc);
+
+	error = sysctl_handle_int(oidp, &newlevel, 0, req);
+
+	if (error || !req->newptr)
+		return (error);
+
+	return (atibl_setlevel(sc, newlevel));
+}

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 02:27:31 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1000E1065675;
	Thu,  8 Mar 2012 02:27:31 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F1F058FC13;
	Thu,  8 Mar 2012 02:27:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q282RUOU021387;
	Thu, 8 Mar 2012 02:27:30 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q282RUa1021384;
	Thu, 8 Mar 2012 02:27:30 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201203080227.q282RUa1021384@svn.freebsd.org>
From: Rick Macklem <rmacklem@FreeBSD.org>
Date: Thu, 8 Mar 2012 02:27:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232682 - in stable/9/sys: fs/nfsclient i386/conf
	nfsclient
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 02:27:31 -0000

Author: rmacklem
Date: Thu Mar  8 02:27:29 2012
New Revision: 232682
URL: http://svn.freebsd.org/changeset/base/232682

Log:
  MFC: r232327
  Fix the NFS clients so that they use copyin() instead of bcopy(),
  when doing direct I/O. This direct I/O code is not enabled by default.

Modified:
  stable/9/sys/fs/nfsclient/nfs_clbio.c
  stable/9/sys/nfsclient/nfs_bio.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clbio.c	Thu Mar  8 02:00:52 2012	(r232681)
+++ stable/9/sys/fs/nfsclient/nfs_clbio.c	Thu Mar  8 02:27:29 2012	(r232682)
@@ -820,7 +820,21 @@ do_sync:
 			t_uio->uio_segflg = UIO_SYSSPACE;
 			t_uio->uio_rw = UIO_WRITE;
 			t_uio->uio_td = td;
-			bcopy(uiop->uio_iov->iov_base, t_iov->iov_base, size);
+			KASSERT(uiop->uio_segflg == UIO_USERSPACE ||
+			    uiop->uio_segflg == UIO_SYSSPACE,
+			    ("nfs_directio_write: Bad uio_segflg"));
+			if (uiop->uio_segflg == UIO_USERSPACE) {
+				error = copyin(uiop->uio_iov->iov_base,
+				    t_iov->iov_base, size);
+				if (error != 0)
+					goto err_free;
+			} else
+				/*
+				 * UIO_SYSSPACE may never happen, but handle
+				 * it just in case it does.
+				 */
+				bcopy(uiop->uio_iov->iov_base, t_iov->iov_base,
+				    size);
 			bp->b_flags |= B_DIRECT;
 			bp->b_iocmd = BIO_WRITE;
 			if (cred != NOCRED) {
@@ -831,6 +845,7 @@ do_sync:
 			bp->b_caller1 = (void *)t_uio;
 			bp->b_vp = vp;
 			error = ncl_asyncio(nmp, bp, NOCRED, td);
+err_free:
 			if (error) {
 				free(t_iov->iov_base, M_NFSDIRECTIO);
 				free(t_iov, M_NFSDIRECTIO);

Modified: stable/9/sys/nfsclient/nfs_bio.c
==============================================================================
--- stable/9/sys/nfsclient/nfs_bio.c	Thu Mar  8 02:00:52 2012	(r232681)
+++ stable/9/sys/nfsclient/nfs_bio.c	Thu Mar  8 02:27:29 2012	(r232682)
@@ -814,7 +814,21 @@ do_sync:
 			t_uio->uio_segflg = UIO_SYSSPACE;
 			t_uio->uio_rw = UIO_WRITE;
 			t_uio->uio_td = td;
-			bcopy(uiop->uio_iov->iov_base, t_iov->iov_base, size);
+			KASSERT(uiop->uio_segflg == UIO_USERSPACE ||
+			    uiop->uio_segflg == UIO_SYSSPACE,
+			    ("nfs_directio_write: Bad uio_segflg"));
+			if (uiop->uio_segflg == UIO_USERSPACE) {
+				error = copyin(uiop->uio_iov->iov_base,
+				    t_iov->iov_base, size);
+				if (error != 0)
+					goto err_free;
+			} else
+				/*
+				 * UIO_SYSSPACE may never happen, but handle
+				 * it just in case it does.
+				 */
+				bcopy(uiop->uio_iov->iov_base, t_iov->iov_base,
+				    size);
 			bp->b_flags |= B_DIRECT;
 			bp->b_iocmd = BIO_WRITE;
 			if (cred != NOCRED) {
@@ -825,6 +839,7 @@ do_sync:
 			bp->b_caller1 = (void *)t_uio;
 			bp->b_vp = vp;
 			error = nfs_asyncio(nmp, bp, NOCRED, td);
+err_free:
 			if (error) {
 				free(t_iov->iov_base, M_NFSDIRECTIO);
 				free(t_iov, M_NFSDIRECTIO);

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 03:02:49 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 817D71065674;
	Thu,  8 Mar 2012 03:02:49 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F9B68FC16;
	Thu,  8 Mar 2012 03:02:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2832nIO022684;
	Thu, 8 Mar 2012 03:02:49 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2832nH4022682;
	Thu, 8 Mar 2012 03:02:49 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201203080302.q2832nH4022682@svn.freebsd.org>
From: Rick Macklem <rmacklem@FreeBSD.org>
Date: Thu, 8 Mar 2012 03:02:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232683 - in stable/9/sys: fs/nfsserver i386/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 03:02:49 -0000

Author: rmacklem
Date: Thu Mar  8 03:02:48 2012
New Revision: 232683
URL: http://svn.freebsd.org/changeset/base/232683

Log:
  MFC: r2323467
  The name caching changes of r230394 exposed an intermittent bug
  in the new NFS server for NFSv4, where it would report ENOENT
  when the file actually existed on the server. This turned out
  to be caused by not initializing ni_topdir before calling lookup()
  and there was a rare case where the value on the stack location
  assigned to ni_topdir happened to be a pointer to a ".." entry,
  such that "dp == ndp->ni_topdir" succeeded in lookup().
  This patch initializes ni_topdir to fix the problem.

Modified:
  stable/9/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/9/sys/fs/nfsserver/nfs_nfsdport.c	Thu Mar  8 02:27:29 2012	(r232682)
+++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c	Thu Mar  8 03:02:48 2012	(r232683)
@@ -395,6 +395,7 @@ nfsvno_namei(struct nfsrv_descript *nd, 
 	cnp->cn_thread = p;
 	ndp->ni_startdir = dp;
 	ndp->ni_rootdir = rootvnode;
+	ndp->ni_topdir = NULL;
 
 	if (!lockleaf)
 		cnp->cn_flags |= LOCKLEAF;

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 09:55:18 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF6691065675;
	Thu,  8 Mar 2012 09:55:18 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 999F28FC15;
	Thu,  8 Mar 2012 09:55:18 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q289tI8r036433;
	Thu, 8 Mar 2012 09:55:18 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q289tIYE036431;
	Thu, 8 Mar 2012 09:55:18 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201203080955.q289tIYE036431@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Thu, 8 Mar 2012 09:55:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232686 - stable/9/lib/libc/uuid
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 09:55:18 -0000

Author: ae
Date: Thu Mar  8 09:55:18 2012
New Revision: 232686
URL: http://svn.freebsd.org/changeset/base/232686

Log:
  MFC r232339:
    Note that memory should be freed after uuid_to_string(3) call.
  
  PR:		docs/161808

Modified:
  stable/9/lib/libc/uuid/uuid.3
Directory Properties:
  stable/9/lib/libc/uuid/   (props changed)

Modified: stable/9/lib/libc/uuid/uuid.3
==============================================================================
--- stable/9/lib/libc/uuid/uuid.3	Thu Mar  8 09:20:00 2012	(r232685)
+++ stable/9/lib/libc/uuid/uuid.3	Thu Mar  8 09:55:18 2012	(r232686)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 13, 2008
+.Dd March 1, 2012
 .Dt UUID 3
 .Os
 .Sh NAME
@@ -84,6 +84,15 @@ A 16-bit hash value can be obtained by c
 .Fn uuid_hash .
 .Pp
 The
+.Fn uuid_to_string
+function set
+.Fa *str
+to be a pointer to a buffer sufficiently large to hold the string.
+This pointer should be passed to
+.Xr free 3
+to release the allocated storage when it is no longer needed.
+.Pp
+The
 .Fn uuid_enc_le
 and
 .Fn uuid_enc_be
@@ -116,7 +125,7 @@ The UUID does not have a known version.
 .It Dv uuid_s_invalid_string_uuid
 The string representation of an UUID is not valid.
 .It Dv uuid_s_no_memory
-The meaning of the code escaped the writers mind.
+The function can not allocate memory to store an UUID representation.
 .El
 .Sh SEE ALSO
 .Xr uuidgen 1 ,

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 09:55:48 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1BC8F106564A;
	Thu,  8 Mar 2012 09:55:48 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 05A138FC18;
	Thu,  8 Mar 2012 09:55:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q289tltB036486;
	Thu, 8 Mar 2012 09:55:47 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q289tlp4036484;
	Thu, 8 Mar 2012 09:55:47 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201203080955.q289tlp4036484@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Thu, 8 Mar 2012 09:55:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232687 - stable/8/lib/libc/uuid
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 09:55:48 -0000

Author: ae
Date: Thu Mar  8 09:55:47 2012
New Revision: 232687
URL: http://svn.freebsd.org/changeset/base/232687

Log:
  MFC r232339:
    Note that memory should be freed after uuid_to_string(3) call.
  
  PR:		docs/161808

Modified:
  stable/8/lib/libc/uuid/uuid.3
Directory Properties:
  stable/8/lib/libc/uuid/   (props changed)

Modified: stable/8/lib/libc/uuid/uuid.3
==============================================================================
--- stable/8/lib/libc/uuid/uuid.3	Thu Mar  8 09:55:18 2012	(r232686)
+++ stable/8/lib/libc/uuid/uuid.3	Thu Mar  8 09:55:47 2012	(r232687)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 13, 2008
+.Dd March 1, 2012
 .Dt UUID 3
 .Os
 .Sh NAME
@@ -84,6 +84,15 @@ A 16-bit hash value can be obtained by c
 .Fn uuid_hash .
 .Pp
 The
+.Fn uuid_to_string
+function set
+.Fa *str
+to be a pointer to a buffer sufficiently large to hold the string.
+This pointer should be passed to
+.Xr free 3
+to release the allocated storage when it is no longer needed.
+.Pp
+The
 .Fn uuid_enc_le
 and
 .Fn uuid_enc_be
@@ -117,7 +126,7 @@ The UUID does not have a known version.
 .It Dv uuid_s_invalid_string_uuid
 The string representation of an UUID is not valid.
 .It Dv uuid_s_no_memory
-The meaning of the code escaped the writers mind.
+The function can not allocate memory to store an UUID representation.
 .El
 .Sh SEE ALSO
 .Xr uuidgen 1 ,

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 09:56:07 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D19C31065677;
	Thu,  8 Mar 2012 09:56:07 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BBF1A8FC23;
	Thu,  8 Mar 2012 09:56:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q289u7V6036539;
	Thu, 8 Mar 2012 09:56:07 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q289u7dn036537;
	Thu, 8 Mar 2012 09:56:07 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201203080956.q289u7dn036537@svn.freebsd.org>
From: "Andrey V. Elsukov" <ae@FreeBSD.org>
Date: Thu, 8 Mar 2012 09:56:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232688 - stable/7/lib/libc/uuid
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 09:56:07 -0000

Author: ae
Date: Thu Mar  8 09:56:07 2012
New Revision: 232688
URL: http://svn.freebsd.org/changeset/base/232688

Log:
  MFC r232339:
    Note that memory should be freed after uuid_to_string(3) call.
  
  PR:		docs/161808

Modified:
  stable/7/lib/libc/uuid/uuid.3
Directory Properties:
  stable/7/lib/libc/uuid/   (props changed)

Modified: stable/7/lib/libc/uuid/uuid.3
==============================================================================
--- stable/7/lib/libc/uuid/uuid.3	Thu Mar  8 09:55:47 2012	(r232687)
+++ stable/7/lib/libc/uuid/uuid.3	Thu Mar  8 09:56:07 2012	(r232688)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 13, 2008
+.Dd March 1, 2012
 .Dt UUID 3
 .Os
 .Sh NAME
@@ -84,6 +84,15 @@ A 16-bit hash value can be obtained by c
 .Fn uuid_hash .
 .Pp
 The
+.Fn uuid_to_string
+function set
+.Fa *str
+to be a pointer to a buffer sufficiently large to hold the string.
+This pointer should be passed to
+.Xr free 3
+to release the allocated storage when it is no longer needed.
+.Pp
+The
 .Fn uuid_enc_le
 and
 .Fn uuid_enc_be
@@ -117,7 +126,7 @@ The UUID does not have a known version.
 .It Dv uuid_s_invalid_string_uuid
 The string representation of an UUID is not valid.
 .It Dv uuid_s_no_memory
-The meaning of the code escaped the writers mind.
+The function can not allocate memory to store an UUID representation.
 .El
 .Sh SEE ALSO
 .Xr uuidgen 1 ,

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 10:40:14 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C2AA0106564A;
	Thu,  8 Mar 2012 10:40:14 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AD4088FC08;
	Thu,  8 Mar 2012 10:40:14 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28AeEDg041611;
	Thu, 8 Mar 2012 10:40:14 GMT (envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28AeE2J041609;
	Thu, 8 Mar 2012 10:40:14 GMT (envelope-from brueffer@svn.freebsd.org)
Message-Id: <201203081040.q28AeE2J041609@svn.freebsd.org>
From: Christian Brueffer <brueffer@FreeBSD.org>
Date: Thu, 8 Mar 2012 10:40:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232690 - stable/9/tools/regression/security/cap_test
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 10:40:14 -0000

Author: brueffer
Date: Thu Mar  8 10:40:14 2012
New Revision: 232690
URL: http://svn.freebsd.org/changeset/base/232690

Log:
  MFC: r232312
  
  Fix order of arguments to lseek().

Modified:
  stable/9/tools/regression/security/cap_test/cap_test_capmode.c
Directory Properties:
  stable/9/tools/regression/security/cap_test/   (props changed)

Modified: stable/9/tools/regression/security/cap_test/cap_test_capmode.c
==============================================================================
--- stable/9/tools/regression/security/cap_test/cap_test_capmode.c	Thu Mar  8 09:58:17 2012	(r232689)
+++ stable/9/tools/regression/security/cap_test/cap_test_capmode.c	Thu Mar  8 10:40:14 2012	(r232690)
@@ -117,7 +117,7 @@ test_capmode(void)
 	CHECK_SYSCALL_SUCCEEDS(close, fd_close);
 	CHECK_SYSCALL_SUCCEEDS(dup, fd_file);
 	CHECK_SYSCALL_SUCCEEDS(fstat, fd_file, &sb);
-	CHECK_SYSCALL_SUCCEEDS(lseek, fd_file, SEEK_SET, 0);
+	CHECK_SYSCALL_SUCCEEDS(lseek, fd_file, 0, SEEK_SET);
 	CHECK_SYSCALL_SUCCEEDS(msync, &fd_file, 8192, MS_ASYNC);
 	CHECK_SYSCALL_SUCCEEDS(profil, NULL, 0, 0, 0);
 	CHECK_SYSCALL_SUCCEEDS(read, fd_file, &ch, sizeof(ch));

From owner-svn-src-stable@FreeBSD.ORG  Thu Mar  8 12:54:27 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 38DA1106564A;
	Thu,  8 Mar 2012 12:54:27 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 21D678FC0A;
	Thu,  8 Mar 2012 12:54:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28CsQfm045846;
	Thu, 8 Mar 2012 12:54:26 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28CsQQc045841;
	Thu, 8 Mar 2012 12:54:26 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201203081254.q28CsQQc045841@svn.freebsd.org>
From: Konstantin Belousov <kib@FreeBSD.org>
Date: Thu, 8 Mar 2012 12:54:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232693 - in stable/9/sys: kern sys
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Mar 2012 12:54:27 -0000

Author: kib
Date: Thu Mar  8 12:54:26 2012
New Revision: 232693
URL: http://svn.freebsd.org/changeset/base/232693

Log:
  MFC r232048:
  Allow the parent to gather the exit status of the children reparented
  to the debugger.  When reparenting for debugging, keep the child in
  the new orphan list of old parent.  When looping over the children in
  kern_wait(), iterate over both children list and orphan list to search
  for the process by pid.
  
  MFC r232104:
  Restore the return statement erronously removed in the r232048.
  
  In order to keep stable/9 KBI, the p_dbg_child member of struct proc
  was replaced with padding.

Modified:
  stable/9/sys/kern/kern_exit.c
  stable/9/sys/kern/kern_fork.c
  stable/9/sys/kern/sys_process.c
  stable/9/sys/sys/proc.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/kern_exit.c
==============================================================================
--- stable/9/sys/kern/kern_exit.c	Thu Mar  8 12:49:08 2012	(r232692)
+++ stable/9/sys/kern/kern_exit.c	Thu Mar  8 12:54:26 2012	(r232693)
@@ -720,7 +720,6 @@ proc_reap(struct thread *td, struct proc
 	if (p->p_oppid && (t = pfind(p->p_oppid)) != NULL) {
 		PROC_LOCK(p);
 		proc_reparent(p, t);
-		p->p_pptr->p_dbg_child--;
 		p->p_oppid = 0;
 		PROC_UNLOCK(p);
 		pksignal(t, SIGCHLD, p->p_ksi);
@@ -739,6 +738,10 @@ proc_reap(struct thread *td, struct proc
 	LIST_REMOVE(p, p_list);	/* off zombproc */
 	sx_xunlock(&allproc_lock);
 	LIST_REMOVE(p, p_sibling);
+	if (p->p_flag & P_ORPHAN) {
+		LIST_REMOVE(p, p_orphan);
+		p->p_flag &= ~P_ORPHAN;
+	}
 	leavepgrp(p);
 #ifdef PROCDESC
 	if (p->p_procdesc != NULL)
@@ -803,12 +806,53 @@ proc_reap(struct thread *td, struct proc
 	sx_xunlock(&allproc_lock);
 }
 
+static int
+proc_to_reap(struct thread *td, struct proc *p, pid_t pid, int *status,
+    int options, struct rusage *rusage)
+{
+	struct proc *q;
+
+	q = td->td_proc;
+	PROC_LOCK(p);
+	if (pid != WAIT_ANY && p->p_pid != pid && p->p_pgid != -pid) {
+		PROC_UNLOCK(p);
+		return (0);
+	}
+	if (p_canwait(td, p)) {
+		PROC_UNLOCK(p);
+		return (0);
+	}
+
+	/*
+	 * This special case handles a kthread spawned by linux_clone
+	 * (see linux_misc.c).  The linux_wait4 and linux_waitpid
+	 * functions need to be able to distinguish between waiting
+	 * on a process and waiting on a thread.  It is a thread if
+	 * p_sigparent is not SIGCHLD, and the WLINUXCLONE option
+	 * signifies we want to wait for threads and not processes.
+	 */
+	if ((p->p_sigparent != SIGCHLD) ^
+	    ((options & WLINUXCLONE) != 0)) {
+		PROC_UNLOCK(p);
+		return (0);
+	}
+
+	PROC_SLOCK(p);
+	if (p->p_state == PRS_ZOMBIE) {
+		proc_reap(td, p, status, options, rusage);
+		return (-1);
+	}
+	PROC_SUNLOCK(p);
+	PROC_UNLOCK(p);
+	return (1);
+}
+
 int
 kern_wait(struct thread *td, pid_t pid, int *status, int options,
     struct rusage *rusage)
 {
 	struct proc *p, *q;
-	int error, nfound;
+	int error, nfound, ret;
 
 	AUDIT_ARG_PID(pid);
 	AUDIT_ARG_VALUE(options);
@@ -831,37 +875,16 @@ loop:
 	nfound = 0;
 	sx_xlock(&proctree_lock);
 	LIST_FOREACH(p, &q->p_children, p_sibling) {
-		PROC_LOCK(p);
-		if (pid != WAIT_ANY &&
-		    p->p_pid != pid && p->p_pgid != -pid) {
-			PROC_UNLOCK(p);
-			continue;
-		}
-		if (p_canwait(td, p)) {
-			PROC_UNLOCK(p);
+		ret = proc_to_reap(td, p, pid, status, options, rusage);
+		if (ret == 0)
 			continue;
-		}
-
-		/*
-		 * This special case handles a kthread spawned by linux_clone
-		 * (see linux_misc.c).  The linux_wait4 and linux_waitpid
-		 * functions need to be able to distinguish between waiting
-		 * on a process and waiting on a thread.  It is a thread if
-		 * p_sigparent is not SIGCHLD, and the WLINUXCLONE option
-		 * signifies we want to wait for threads and not processes.
-		 */
-		if ((p->p_sigparent != SIGCHLD) ^
-		    ((options & WLINUXCLONE) != 0)) {
-			PROC_UNLOCK(p);
-			continue;
-		}
+		else if (ret == 1)
+			nfound++;
+		else
+			return (0);
 
-		nfound++;
+		PROC_LOCK(p);
 		PROC_SLOCK(p);
-		if (p->p_state == PRS_ZOMBIE) {
-			proc_reap(td, p, status, options, rusage);
-			return (0);
-		}
 		if ((p->p_flag & P_STOPPED_SIG) &&
 		    (p->p_suspcount == p->p_numthreads) &&
 		    (p->p_flag & P_WAITED) == 0 &&
@@ -897,12 +920,31 @@ loop:
 		}
 		PROC_UNLOCK(p);
 	}
+
+	/*
+	 * Look in the orphans list too, to allow the parent to
+	 * collect it's child exit status even if child is being
+	 * debugged.
+	 *
+	 * Debugger detaches from the parent upon successful
+	 * switch-over from parent to child.  At this point due to
+	 * re-parenting the parent loses the child to debugger and a
+	 * wait4(2) call would report that it has no children to wait
+	 * for.  By maintaining a list of orphans we allow the parent
+	 * to successfully wait until the child becomes a zombie.
+	 */
+	LIST_FOREACH(p, &q->p_orphans, p_orphan) {
+		ret = proc_to_reap(td, p, pid, status, options, rusage);
+		if (ret == 0)
+			continue;
+		else if (ret == 1)
+			nfound++;
+		else
+			return (0);
+	}
 	if (nfound == 0) {
 		sx_xunlock(&proctree_lock);
-		if (td->td_proc->p_dbg_child)
-			return (0);
-		else
-			return (ECHILD);
+		return (ECHILD);
 	}
 	if (options & WNOHANG) {
 		sx_xunlock(&proctree_lock);
@@ -940,5 +982,15 @@ proc_reparent(struct proc *child, struct
 	PROC_UNLOCK(child->p_pptr);
 	LIST_REMOVE(child, p_sibling);
 	LIST_INSERT_HEAD(&parent->p_children, child, p_sibling);
+
+	if (child->p_flag & P_ORPHAN) {
+		LIST_REMOVE(child, p_orphan);
+		child->p_flag &= ~P_ORPHAN;
+	}
+	if (child->p_flag & P_TRACED) {
+		LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, p_orphan);
+		child->p_flag |= P_ORPHAN;
+	}
+
 	child->p_pptr = parent;
 }

Modified: stable/9/sys/kern/kern_fork.c
==============================================================================
--- stable/9/sys/kern/kern_fork.c	Thu Mar  8 12:49:08 2012	(r232692)
+++ stable/9/sys/kern/kern_fork.c	Thu Mar  8 12:54:26 2012	(r232693)
@@ -590,6 +590,7 @@ do_fork(struct thread *td, int flags, st
 	LIST_INSERT_AFTER(p1, p2, p_pglist);
 	PGRP_UNLOCK(p1->p_pgrp);
 	LIST_INIT(&p2->p_children);
+	LIST_INIT(&p2->p_orphans);
 
 	callout_init(&p2->p_itcallout, CALLOUT_MPSAFE);
 

Modified: stable/9/sys/kern/sys_process.c
==============================================================================
--- stable/9/sys/kern/sys_process.c	Thu Mar  8 12:49:08 2012	(r232692)
+++ stable/9/sys/kern/sys_process.c	Thu Mar  8 12:54:26 2012	(r232693)
@@ -841,8 +841,6 @@ kern_ptrace(struct thread *td, int req, 
 		p->p_flag |= P_TRACED;
 		p->p_oppid = p->p_pptr->p_pid;
 		if (p->p_pptr != td->td_proc) {
-			/* Remember that a child is being debugged(traced). */
-			p->p_pptr->p_dbg_child++;
 			proc_reparent(p, td->td_proc);
 		}
 		data = SIGSTOP;
@@ -931,7 +929,6 @@ kern_ptrace(struct thread *td, int req, 
 					PROC_UNLOCK(pp);
 				PROC_LOCK(p);
 				proc_reparent(p, pp);
-				p->p_pptr->p_dbg_child--;
 				if (pp == initproc)
 					p->p_sigparent = SIGCHLD;
 			}

Modified: stable/9/sys/sys/proc.h
==============================================================================
--- stable/9/sys/sys/proc.h	Thu Mar  8 12:49:08 2012	(r232692)
+++ stable/9/sys/sys/proc.h	Thu Mar  8 12:54:26 2012	(r232693)
@@ -506,8 +506,7 @@ struct proc {
 /* The following fields are all zeroed upon creation in fork. */
 #define	p_startzero	p_oppid
 	pid_t		p_oppid;	/* (c + e) Save ppid in ptrace. XXX */
-	int		p_dbg_child;	/* (c + e) # of debugged children in
-							ptrace. */
+	int		p_pad_dbg_child;
 	struct vmspace	*p_vmspace;	/* (b) Address space. */
 	u_int		p_swtick;	/* (c) Tick when swapped in or out. */
 	struct itimerval p_realtimer;	/* (c) Alarm timer. */
@@ -575,6 +574,14 @@ struct proc {
 					   after fork. */
 	uint64_t	p_prev_runtime;	/* (c) Resource usage accounting. */
 	struct racct	*p_racct;	/* (b) Resource accounting. */
+	/*
+	 * An orphan is the child that has beed re-parented to the
+	 * debugger as a result of attaching to it.  Need to keep
+	 * track of them for parent to be able to collect the exit
+	 * status of what used to be children.
+	 */
+	LIST_ENTRY(proc) p_orphan;	/* (e) List of orphan processes. */
+	LIST_HEAD(, proc) p_orphans;	/* (e) Pointer to list of orphans. */
 };
 
 #define	p_session	p_pgrp->pg_session
@@ -613,6 +620,7 @@ struct proc {
 #define	P_HWPMC		0x800000 /* Process is using HWPMCs */
 
 #define	P_JAILED	0x1000000 /* Process is in jail. */
+#define	P_ORPHAN	0x2000000 /* Orphaned. */
 #define	P_INEXEC	0x4000000 /* Process is in execve(). */
 #define	P_STATCHILD	0x8000000 /* Child process stopped or exited. */
 #define	P_INMEM		0x10000000 /* Loaded into memory. */

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  9 05:37:55 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7E7AF106566C;
	Fri,  9 Mar 2012 05:37:55 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CE858FC0C;
	Fri,  9 Mar 2012 05:37:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q295btlm081503;
	Fri, 9 Mar 2012 05:37:55 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q295btTg081501;
	Fri, 9 Mar 2012 05:37:55 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201203090537.q295btTg081501@svn.freebsd.org>
From: Alexander Motin <mav@FreeBSD.org>
Date: Fri, 9 Mar 2012 05:37:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232715 - stable/9/release/doc/en_US.ISO8859-1/hardware
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Mar 2012 05:37:55 -0000

Author: mav
Date: Fri Mar  9 05:37:55 2012
New Revision: 232715
URL: http://svn.freebsd.org/changeset/base/232715

Log:
  MFC r232376:
  Add ahci(4) and siis(4) to the hardware notes.

Modified:
  stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml
Directory Properties:
  stable/9/release/doc/en_US.ISO8859-1/hardware/   (props changed)

Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml
==============================================================================
--- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml	Fri Mar  9 02:23:03 2012	(r232714)
+++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml	Fri Mar  9 05:37:55 2012	(r232715)
@@ -748,6 +748,8 @@
 
       &hwlist.ahc;
 
+      &hwlist.ahci;
+
       &hwlist.ahd;
 
       &hwlist.aic;
@@ -820,6 +822,8 @@
 
       &hwlist.pst;
 
+      &hwlist.siis;
+
       &hwlist.stg;
 
       &hwlist.sym;

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  9 05:43:08 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89F2F106566B;
	Fri,  9 Mar 2012 05:43:08 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 770288FC17;
	Fri,  9 Mar 2012 05:43:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q295h89M081717;
	Fri, 9 Mar 2012 05:43:08 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q295h8W5081710;
	Fri, 9 Mar 2012 05:43:08 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201203090543.q295h8W5081710@svn.freebsd.org>
From: Alexander Motin <mav@FreeBSD.org>
Date: Fri, 9 Mar 2012 05:43:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232716 - in stable/9: share/man/man4 sys/dev/ahci
	sys/dev/ata sys/dev/ata/chipsets
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Mar 2012 05:43:08 -0000

Author: mav
Date: Fri Mar  9 05:43:08 2012
New Revision: 232716
URL: http://svn.freebsd.org/changeset/base/232716

Log:
  MFC r232380:
  Fix names of some Marvell SATA chips. It looks like chips with proprietary
  interface supported by mvs(4) are 88SX, while AHCI-like chips are 88SE.
  
  PR:		kern/165271

Modified:
  stable/9/share/man/man4/ahci.4
  stable/9/share/man/man4/ata.4
  stable/9/sys/dev/ahci/ahci.c
  stable/9/sys/dev/ata/ata-pci.h
  stable/9/sys/dev/ata/chipsets/ata-ahci.c
  stable/9/sys/dev/ata/chipsets/ata-marvell.c
Directory Properties:
  stable/9/share/man/man4/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/share/man/man4/ahci.4
==============================================================================
--- stable/9/share/man/man4/ahci.4	Fri Mar  9 05:37:55 2012	(r232715)
+++ stable/9/share/man/man4/ahci.4	Fri Mar  9 05:43:08 2012	(r232716)
@@ -146,7 +146,7 @@ subclass 6 (SATA) and programming interf
 .Pp
 Also, in cooperation with atamarvell and atajmicron drivers of ata(4),
 it supports AHCI part of legacy-PATA + AHCI-SATA combined controllers,
-such as JMicron JMB36x and Marvell 88SX61xx.
+such as JMicron JMB36x and Marvell 88SE61xx.
 .Sh FILES
 .Bl -tag -width /dev/led/ahcich*.locate
 .It Pa /dev/led/ahcich*.act

Modified: stable/9/share/man/man4/ata.4
==============================================================================
--- stable/9/share/man/man4/ata.4	Fri Mar  9 05:37:55 2012	(r232715)
+++ stable/9/share/man/man4/ata.4	Fri Mar  9 05:43:08 2012	(r232716)
@@ -193,8 +193,8 @@ IT8211F, IT8212F, IT8213F.
 .It JMicron:
 JMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
 .It Marvell
-88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SX6101,
-88SX6102, 88SX6111, 88SX6121, 88SX6141, 88SX6145, 88SX7042.
+88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101,
+88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042.
 .It National:
 SC1100.
 .It NetCell:

Modified: stable/9/sys/dev/ahci/ahci.c
==============================================================================
--- stable/9/sys/dev/ahci/ahci.c	Fri Mar  9 05:37:55 2012	(r232715)
+++ stable/9/sys/dev/ahci/ahci.c	Fri Mar  9 05:43:08 2012	(r232716)
@@ -186,13 +186,13 @@ static struct {
 	{0x2365197b, 0x00, "JMicron JMB365",	AHCI_Q_NOFORCE},
 	{0x2366197b, 0x00, "JMicron JMB366",	AHCI_Q_NOFORCE},
 	{0x2368197b, 0x00, "JMicron JMB368",	AHCI_Q_NOFORCE},
-	{0x611111ab, 0x00, "Marvell 88SX6111",	AHCI_Q_NOFORCE | AHCI_Q_1CH |
+	{0x611111ab, 0x00, "Marvell 88SE6111",	AHCI_Q_NOFORCE | AHCI_Q_1CH |
 	    AHCI_Q_EDGEIS},
-	{0x612111ab, 0x00, "Marvell 88SX6121",	AHCI_Q_NOFORCE | AHCI_Q_2CH |
+	{0x612111ab, 0x00, "Marvell 88SE6121",	AHCI_Q_NOFORCE | AHCI_Q_2CH |
 	    AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT},
-	{0x614111ab, 0x00, "Marvell 88SX6141",	AHCI_Q_NOFORCE | AHCI_Q_4CH |
+	{0x614111ab, 0x00, "Marvell 88SE6141",	AHCI_Q_NOFORCE | AHCI_Q_4CH |
 	    AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT},
-	{0x614511ab, 0x00, "Marvell 88SX6145",	AHCI_Q_NOFORCE | AHCI_Q_4CH |
+	{0x614511ab, 0x00, "Marvell 88SE6145",	AHCI_Q_NOFORCE | AHCI_Q_4CH |
 	    AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT},
 	{0x91201b4b, 0x00, "Marvell 88SE912x",	AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES},
 	{0x91231b4b, 0x11, "Marvell 88SE912x",	AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG},

Modified: stable/9/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/9/sys/dev/ata/ata-pci.h	Fri Mar  9 05:37:55 2012	(r232715)
+++ stable/9/sys/dev/ata/ata-pci.h	Fri Mar  9 05:43:08 2012	(r232716)
@@ -278,12 +278,12 @@ struct ata_pci_controller {
 #define ATA_M88SX6042           0x604211ab
 #define ATA_M88SX6081           0x608111ab
 #define ATA_M88SX7042           0x704211ab
-#define ATA_M88SX6101           0x610111ab
-#define ATA_M88SX6102           0x610211ab
-#define ATA_M88SX6111           0x611111ab
-#define ATA_M88SX6121           0x612111ab
-#define ATA_M88SX6141           0x614111ab
-#define ATA_M88SX6145           0x614511ab
+#define ATA_M88SE6101           0x610111ab
+#define ATA_M88SE6102           0x610211ab
+#define ATA_M88SE6111           0x611111ab
+#define ATA_M88SE6121           0x612111ab
+#define ATA_M88SE6141           0x614111ab
+#define ATA_M88SE6145           0x614511ab
 #define ATA_MARVELL2_ID         0x1b4b
 
 #define ATA_MICRON_ID           0x1042

Modified: stable/9/sys/dev/ata/chipsets/ata-ahci.c
==============================================================================
--- stable/9/sys/dev/ata/chipsets/ata-ahci.c	Fri Mar  9 05:37:55 2012	(r232715)
+++ stable/9/sys/dev/ata/chipsets/ata-ahci.c	Fri Mar  9 05:43:08 2012	(r232716)
@@ -180,12 +180,12 @@ ata_ahci_chipinit(device_t dev)
     ctlr->ichannels = ATA_INL(ctlr->r_res2, ATA_AHCI_PI);
     ctlr->channels = MAX(flsl(ctlr->ichannels),
 	    (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_NPMASK) + 1);
-    if (pci_get_devid(dev) == ATA_M88SX6111)
+    if (pci_get_devid(dev) == ATA_M88SE6111)
 	    ctlr->channels = 1;
-    else if (pci_get_devid(dev) == ATA_M88SX6121)
+    else if (pci_get_devid(dev) == ATA_M88SE6121)
 	    ctlr->channels = 2;
-    else if (pci_get_devid(dev) == ATA_M88SX6141 ||
-	pci_get_devid(dev) == ATA_M88SX6145)
+    else if (pci_get_devid(dev) == ATA_M88SE6141 ||
+	pci_get_devid(dev) == ATA_M88SE6145)
 	    ctlr->channels = 4;
 
     ctlr->reset = ata_ahci_reset;

Modified: stable/9/sys/dev/ata/chipsets/ata-marvell.c
==============================================================================
--- stable/9/sys/dev/ata/chipsets/ata-marvell.c	Fri Mar  9 05:37:55 2012	(r232715)
+++ stable/9/sys/dev/ata/chipsets/ata-marvell.c	Fri Mar  9 05:43:08 2012	(r232716)
@@ -108,12 +108,12 @@ ata_marvell_probe(device_t dev)
      { ATA_M88SX6042, 0, 4, MV_6042, ATA_SA300, "88SX6042" },
      { ATA_M88SX6081, 0, 8, MV_60XX, ATA_SA300, "88SX6081" },
      { ATA_M88SX7042, 0, 4, MV_7042, ATA_SA300, "88SX7042" },
-     { ATA_M88SX6101, 0, 0, MV_61XX, ATA_UDMA6, "88SX6101" },
-     { ATA_M88SX6102, 0, 0, MV_61XX, ATA_UDMA6, "88SX6102" },
-     { ATA_M88SX6111, 0, 1, MV_61XX, ATA_UDMA6, "88SX6111" },
-     { ATA_M88SX6121, 0, 2, MV_61XX, ATA_UDMA6, "88SX6121" },
-     { ATA_M88SX6141, 0, 4, MV_61XX, ATA_UDMA6, "88SX6141" },
-     { ATA_M88SX6145, 0, 4, MV_61XX, ATA_UDMA6, "88SX6145" },
+     { ATA_M88SE6101, 0, 0, MV_61XX, ATA_UDMA6, "88SE6101" },
+     { ATA_M88SE6102, 0, 0, MV_61XX, ATA_UDMA6, "88SE6102" },
+     { ATA_M88SE6111, 0, 1, MV_61XX, ATA_UDMA6, "88SE6111" },
+     { ATA_M88SE6121, 0, 2, MV_61XX, ATA_UDMA6, "88SE6121" },
+     { ATA_M88SE6141, 0, 4, MV_61XX, ATA_UDMA6, "88SE6141" },
+     { ATA_M88SE6145, 0, 4, MV_61XX, ATA_UDMA6, "88SE6145" },
      { 0x91a41b4b,    0, 0, MV_91XX, ATA_UDMA6, "88SE912x" },
      { 0, 0, 0, 0, 0, 0}};
 

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  9 13:06:25 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 37B64106564A;
	Fri,  9 Mar 2012 13:06:25 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 22F0F8FC19;
	Fri,  9 Mar 2012 13:06:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29D6O7p008096;
	Fri, 9 Mar 2012 13:06:24 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29D6OAA008094;
	Fri, 9 Mar 2012 13:06:24 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201203091306.q29D6OAA008094@svn.freebsd.org>
From: Jaakko Heinonen <jh@FreeBSD.org>
Date: Fri, 9 Mar 2012 13:06:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232722 - stable/9/share/man/man9
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Mar 2012 13:06:25 -0000

Author: jh
Date: Fri Mar  9 13:06:24 2012
New Revision: 232722
URL: http://svn.freebsd.org/changeset/base/232722

Log:
  MFC r232350:
  
  Since r199137 namei() returns EINVAL for DELETE and RENAME operations if
  the last component of the pathname is ".".

Modified:
  stable/9/share/man/man9/namei.9
Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/namei.9
==============================================================================
--- stable/9/share/man/man9/namei.9	Fri Mar  9 11:48:56 2012	(r232721)
+++ stable/9/share/man/man9/namei.9	Fri Mar  9 13:06:24 2012	(r232722)
@@ -33,7 +33,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 21, 2005
+.Dd March 1, 2012
 .Dt NAMEI 9
 .Os
 .Sh NAME
@@ -344,6 +344,13 @@ permissions.
 Too many symbolic links were encountered in translating the pathname.
 .It Bq Er EISDIR
 An attempt is made to open a directory with write mode specified.
+.It Bq Er EINVAL
+The last component of the pathname specified for a
+.Dv DELETE
+or
+.Dv RENAME
+operation is
+.Ql \&. .
 .It Bq Er EROFS
 An attempt is made to modify a file or directory on a read-only file system.
 .El

From owner-svn-src-stable@FreeBSD.ORG  Fri Mar  9 16:17:47 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 95A2F1065672;
	Fri,  9 Mar 2012 16:17:47 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B5038FC13;
	Fri,  9 Mar 2012 16:17:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29GHlq9014883;
	Fri, 9 Mar 2012 16:17:47 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29GHlFb014867;
	Fri, 9 Mar 2012 16:17:47 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201203091617.q29GHlFb014867@svn.freebsd.org>
From: Martin Matuska <mm@FreeBSD.org>
Date: Fri, 9 Mar 2012 16:17:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232728 - in stable/9: lib/libjail share/man/man5
	sys/cddl/contrib/opensolaris/uts/common/fs/zfs
	sys/compat/linprocfs sys/compat/linsysfs sys/fs/devfs
	sys/fs/nullfs sys/fs/procfs sys/fs...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 09 Mar 2012 16:17:47 -0000

Author: mm
Date: Fri Mar  9 16:17:46 2012
New Revision: 232728
URL: http://svn.freebsd.org/changeset/base/232728

Log:
  Jail-mount MFC:	r231265,r231267,r231269,r232059,r232186,r232247,
  		r232278,r232307,r232342
  
  MFC r231265:
  Introduce the "ruleset=number" option for devfs(5) mounts.
  Add support for updating the devfs mount (currently only changing the
  ruleset number is supported).
  Check mnt_optnew with vfs_filteropt(9).
  
  This new option sets the specified ruleset number as the active ruleset
  of the new devfs mount and applies all its rules at mount time. If the
  specified ruleset doesn't exist, a new empty ruleset is created.
  
  MFC r231267 [1]:
  Add support for mounting devfs inside jails.
  
  A new jail(8) option "devfs_ruleset" defines the ruleset enforcement for
  mounting devfs inside jails. A value of -1 disables mounting devfs in
  jails, a value of zero means no restrictions. Nested jails can only
  have mounting devfs disabled or inherit parent's enforcement as jails are
  not allowed to view or manipulate devfs(8) rules.
  
  Utilizes new functions introduced in r231265.
  
  MFC r231269:
  Allow mounting nullfs(5) inside jails.
  
  This is now possible thanks to r230129.
  
  MFC r232059 [1]:
  To improve control over the use of mount(8) inside a jail(8), introduce
  a new jail parameter node with the following parameters:
  
  allow.mount.devfs:
  	allow mounting the devfs filesystem inside a jail
  
  allow.mount.nullfs:
  	allow mounting the nullfs filesystem inside a jail
  
  Both parameters are disabled by default (equals the behavior before
  devfs and nullfs in jails). Administrators have to explicitly allow
  mounting devfs and nullfs for each jail. The value "-1" of the
  devfs_ruleset parameter is removed in favor of the new allow setting.
  
  MFC r232186:
  Analogous to r232059, add a parameter for the ZFS file system:
  
  allow.mount.zfs:
  	allow mounting the zfs filesystem inside a jail
  
  This way the permssions for mounting all current VFCF_JAIL filesystems
  inside a jail are controlled wia allow.mount.* jail parameters.
  
  Update sysctl descriptions.
  Update jail(8) and zfs(8) manpages.
  
  MFC r232247:
  mdoc(7) stype - start new sentences on new line
  
  MFC r232278 [1]:
  Add procfs to jail-mountable filesystems.
  
  MFC r232291:
  Bump .Dd to reflect latest update
  
  MFC r232307:
  Add "export" to devfs_opts[] and return EOPNOTSUPP if called with it.
  Fixes mountd warnings.
  
  MFC r232342 (jamie) [2]:
  Handle the case where a boolean parameter is also a node.
  
  PR:	bin/165515 [2]
  Reviewed by:	jamie [1]

Modified:
  stable/9/lib/libjail/jail.c
  stable/9/share/man/man5/devfs.5
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  stable/9/sys/compat/linprocfs/linprocfs.c
  stable/9/sys/compat/linsysfs/linsysfs.c
  stable/9/sys/fs/devfs/devfs.h
  stable/9/sys/fs/devfs/devfs_rule.c
  stable/9/sys/fs/devfs/devfs_vfsops.c
  stable/9/sys/fs/nullfs/null_vfsops.c
  stable/9/sys/fs/procfs/procfs.c
  stable/9/sys/fs/pseudofs/pseudofs.h
  stable/9/sys/kern/kern_jail.c
  stable/9/sys/sys/jail.h
  stable/9/sys/sys/param.h
  stable/9/usr.sbin/jail/jail.8
Directory Properties:
  stable/9/lib/libjail/   (props changed)
  stable/9/share/man/man5/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/usr.sbin/jail/   (props changed)

Modified: stable/9/lib/libjail/jail.c
==============================================================================
--- stable/9/lib/libjail/jail.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/lib/libjail/jail.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -885,36 +885,20 @@ jailparam_type(struct jailparam *jp)
 		 * the "no" counterpart to a boolean.
 		 */
 		nname = nononame(jp->jp_name);
-		if (nname != NULL) {
-			snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", nname);
-			free(nname);
-			miblen = sizeof(mib) - 2 * sizeof(int);
-			if (sysctl(mib, 2, mib + 2, &miblen, desc.s,
-			    strlen(desc.s)) >= 0) {
-				mib[1] = 4;
-				desclen = sizeof(desc);
-				if (sysctl(mib, (miblen / sizeof(int)) + 2,
-				    &desc, &desclen, NULL, 0) < 0) {
-					snprintf(jail_errmsg,
-					    JAIL_ERRMSGLEN,
-					    "sysctl(0.4.%s): %s", desc.s,
-					    strerror(errno));
-					return (-1);
-				}
-				if ((desc.i & CTLTYPE) == CTLTYPE_INT &&
-				    desc.s[0] == 'B') {
-					jp->jp_ctltype = desc.i;
-					jp->jp_flags |= JP_NOBOOL;
-					jp->jp_valuelen = sizeof(int);
-					return (0);
-				}
-			}
+		if (nname == NULL) {
+		unknown_parameter:
+			snprintf(jail_errmsg, JAIL_ERRMSGLEN,
+			    "unknown parameter: %s", jp->jp_name);
+			errno = ENOENT;
+			return (-1);
 		}
-	unknown_parameter:
-		snprintf(jail_errmsg, JAIL_ERRMSGLEN,
-		    "unknown parameter: %s", jp->jp_name);
-		errno = ENOENT;
-		return (-1);
+		snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", nname);
+		free(nname);
+		miblen = sizeof(mib) - 2 * sizeof(int);
+		if (sysctl(mib, 2, mib + 2, &miblen, desc.s,
+		    strlen(desc.s)) < 0)
+			goto unknown_parameter;
+		jp->jp_flags |= JP_NOBOOL;
 	}
  mib_desc:
 	mib[1] = 4;
@@ -925,6 +909,16 @@ jailparam_type(struct jailparam *jp)
 		    "sysctl(0.4.%s): %s", jp->jp_name, strerror(errno));
 		return (-1);
 	}
+	jp->jp_ctltype = desc.i;
+	/* If this came from removing a "no", it better be a boolean. */
+	if (jp->jp_flags & JP_NOBOOL) {
+		if ((desc.i & CTLTYPE) == CTLTYPE_INT && desc.s[0] == 'B') {
+			jp->jp_valuelen = sizeof(int);
+			return (0);
+		}
+		else if ((desc.i & CTLTYPE) != CTLTYPE_NODE)
+			goto unknown_parameter;
+	}
 	/* See if this is an array type. */
 	p = strchr(desc.s, '\0');
 	isarray  = 0;
@@ -935,7 +929,6 @@ jailparam_type(struct jailparam *jp)
 		p[-2] = 0;
 	}
 	/* Look for types we understand. */
-	jp->jp_ctltype = desc.i;
 	switch (desc.i & CTLTYPE) {
 	case CTLTYPE_INT:
 		if (desc.s[0] == 'B')

Modified: stable/9/share/man/man5/devfs.5
==============================================================================
--- stable/9/share/man/man5/devfs.5	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/share/man/man5/devfs.5	Fri Mar  9 16:17:46 2012	(r232728)
@@ -38,7 +38,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 18, 2010
+.Dd February 9, 2012
 .Dt DEVFS 5
 .Os
 .Sh NAME
@@ -90,6 +90,30 @@ and
 .Pa 2 .
 .Xr fdescfs 5
 creates files for all open descriptors.
+.Pp
+The options are as follows:
+.Bl -tag -width indent
+.It Fl o Ar options
+Use the specified mount
+.Ar options ,
+as described in
+.Xr mount 8 .
+The following devfs file system-specific options are available:
+.Bl -tag -width indent
+.It Cm ruleset Ns No = Ns Ar ruleset
+Set ruleset number
+.Ar ruleset
+as the current ruleset for the mount-point and apply all its rules.
+If the ruleset number
+.Ar ruleset
+does not exist, an empty ruleset with the number
+.Ar ruleset
+is created.
+See
+.Xr devfs 8
+for more information on working with devfs rulesets.
+.El
+.El
 .Sh FILES
 .Bl -tag -width /dev/XXXX -compact
 .It Pa /dev

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -60,6 +60,7 @@
 #include <sys/dmu_objset.h>
 #include <sys/spa_boot.h>
 #include <sys/sa.h>
+#include <sys/jail.h>
 #include "zfs_comutil.h"
 
 struct mtx zfs_debug_mtx;
@@ -1533,6 +1534,9 @@ zfs_mount(vfs_t *vfsp)
 	int		error = 0;
 	int		canwrite;
 
+	if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_ZFS))
+		return (EPERM);
+
 	if (vfs_getopt(vfsp->mnt_optnew, "from", (void **)&osname, NULL))
 		return (EINVAL);
 

Modified: stable/9/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- stable/9/sys/compat/linprocfs/linprocfs.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/compat/linprocfs/linprocfs.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -1460,7 +1460,7 @@ linprocfs_uninit(PFS_INIT_ARGS)
 	return (0);
 }
 
-PSEUDOFS(linprocfs, 1);
+PSEUDOFS(linprocfs, 1, 0);
 MODULE_DEPEND(linprocfs, linux, 1, 1, 1);
 MODULE_DEPEND(linprocfs, procfs, 1, 1, 1);
 MODULE_DEPEND(linprocfs, sysvmsg, 1, 1, 1);

Modified: stable/9/sys/compat/linsysfs/linsysfs.c
==============================================================================
--- stable/9/sys/compat/linsysfs/linsysfs.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/compat/linsysfs/linsysfs.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -280,5 +280,5 @@ linsysfs_uninit(PFS_INIT_ARGS)
 	return (0);
 }
 
-PSEUDOFS(linsysfs, 1);
+PSEUDOFS(linsysfs, 1, 0);
 MODULE_DEPEND(linsysfs, linux, 1, 1, 1);

Modified: stable/9/sys/fs/devfs/devfs.h
==============================================================================
--- stable/9/sys/fs/devfs/devfs.h	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/fs/devfs/devfs.h	Fri Mar  9 16:17:46 2012	(r232728)
@@ -182,6 +182,8 @@ void	devfs_rules_apply(struct devfs_moun
 void	devfs_rules_cleanup(struct devfs_mount *);
 int	devfs_rules_ioctl(struct devfs_mount *, u_long, caddr_t,
 	    struct thread *);
+void	devfs_ruleset_set(devfs_rsnum rsnum, struct devfs_mount *dm);
+void	devfs_ruleset_apply(struct devfs_mount *dm);
 int	devfs_allocv(struct devfs_dirent *, struct mount *, int,
 	    struct vnode **);
 char	*devfs_fqpn(char *, struct devfs_mount *, struct devfs_dirent *,

Modified: stable/9/sys/fs/devfs/devfs_rule.c
==============================================================================
--- stable/9/sys/fs/devfs/devfs_rule.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/fs/devfs/devfs_rule.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -771,3 +771,38 @@ devfs_rules_cleanup(struct devfs_mount *
 		devfs_ruleset_reap(ds);
 	}
 }
+
+/*
+ * Make rsnum the active ruleset for dm (locked)
+ */
+void
+devfs_ruleset_set(devfs_rsnum rsnum, struct devfs_mount *dm)
+{
+
+	sx_assert(&dm->dm_lock, SX_XLOCKED);
+
+	sx_xlock(&sx_rules);
+	devfs_ruleset_use(rsnum, dm);
+	sx_xunlock(&sx_rules);
+}
+
+/*
+ * Apply the current active ruleset on a mount
+ */
+void
+devfs_ruleset_apply(struct devfs_mount *dm)
+{
+	struct devfs_ruleset *ds;
+
+	sx_assert(&dm->dm_lock, SX_XLOCKED);
+
+	sx_xlock(&sx_rules);
+	if (dm->dm_ruleset == 0) {
+		sx_xunlock(&sx_rules);
+		return;
+	}
+	ds = devfs_ruleset_bynum(dm->dm_ruleset);
+	if (ds != NULL)
+		devfs_ruleset_applydm(ds, dm);
+	sx_xunlock(&sx_rules);
+}

Modified: stable/9/sys/fs/devfs/devfs_vfsops.c
==============================================================================
--- stable/9/sys/fs/devfs/devfs_vfsops.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/fs/devfs/devfs_vfsops.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -44,6 +44,7 @@
 #include <sys/sx.h>
 #include <sys/vnode.h>
 #include <sys/limits.h>
+#include <sys/jail.h>
 
 #include <fs/devfs/devfs.h>
 
@@ -56,6 +57,10 @@ static vfs_unmount_t	devfs_unmount;
 static vfs_root_t	devfs_root;
 static vfs_statfs_t	devfs_statfs;
 
+static const char *devfs_opts[] = {
+	"from", "export", "ruleset", NULL
+};
+
 /*
  * Mount the filesystem
  */
@@ -65,15 +70,60 @@ devfs_mount(struct mount *mp)
 	int error;
 	struct devfs_mount *fmp;
 	struct vnode *rvp;
+	struct thread *td = curthread;
+	int injail, rsnum;
 
 	if (devfs_unr == NULL)
 		devfs_unr = new_unrhdr(0, INT_MAX, NULL);
 
 	error = 0;
 
-	if (mp->mnt_flag & (MNT_UPDATE | MNT_ROOTFS))
+	if (mp->mnt_flag & MNT_ROOTFS)
 		return (EOPNOTSUPP);
 
+	if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_DEVFS))
+		return (EPERM);
+
+	rsnum = 0;
+	injail = jailed(td->td_ucred);
+
+	if (mp->mnt_optnew != NULL) {
+		if (vfs_filteropt(mp->mnt_optnew, devfs_opts))
+			return (EINVAL);
+
+		if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0))
+			return (EOPNOTSUPP);
+
+		if (vfs_getopt(mp->mnt_optnew, "ruleset", NULL, NULL) == 0 &&
+		    (vfs_scanopt(mp->mnt_optnew, "ruleset", "%d",
+		    &rsnum) != 1 || rsnum < 0 || rsnum > 65535)) {
+			vfs_mount_error(mp, "%s",
+			    "invalid ruleset specification");
+			return (EINVAL);
+		}
+
+		if (injail && rsnum != 0 &&
+		    rsnum != td->td_ucred->cr_prison->pr_devfs_rsnum)
+			return (EPERM);
+	}
+
+	/* jails enforce their ruleset */
+	if (injail)
+		rsnum = td->td_ucred->cr_prison->pr_devfs_rsnum;
+
+	if (mp->mnt_flag & MNT_UPDATE) {
+		if (rsnum != 0) {
+			fmp = mp->mnt_data;
+			if (fmp != NULL) {
+				sx_xlock(&fmp->dm_lock);
+				devfs_ruleset_set((devfs_rsnum)rsnum, fmp);
+				devfs_ruleset_apply(fmp);
+				sx_xunlock(&fmp->dm_lock);
+			}
+		}
+		return (0);
+	}
+
 	fmp = malloc(sizeof *fmp, M_DEVFS, M_WAITOK | M_ZERO);
 	fmp->dm_idx = alloc_unr(devfs_unr);
 	sx_init(&fmp->dm_lock, "devfsmount");
@@ -101,6 +151,12 @@ devfs_mount(struct mount *mp)
 		return (error);
 	}
 
+	if (rsnum != 0) {
+		sx_xlock(&fmp->dm_lock);
+		devfs_ruleset_set((devfs_rsnum)rsnum, fmp);
+		sx_xunlock(&fmp->dm_lock);
+	}
+
 	VOP_UNLOCK(rvp, 0);
 
 	vfs_mountedfrom(mp, "devfs");
@@ -186,4 +242,4 @@ static struct vfsops devfs_vfsops = {
 	.vfs_unmount =		devfs_unmount,
 };
 
-VFS_SET(devfs_vfsops, devfs, VFCF_SYNTHETIC);
+VFS_SET(devfs_vfsops, devfs, VFCF_SYNTHETIC | VFCF_JAIL);

Modified: stable/9/sys/fs/nullfs/null_vfsops.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_vfsops.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/fs/nullfs/null_vfsops.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -50,6 +50,7 @@
 #include <sys/namei.h>
 #include <sys/proc.h>
 #include <sys/vnode.h>
+#include <sys/jail.h>
 
 #include <fs/nullfs/null.h>
 
@@ -75,12 +76,16 @@ nullfs_mount(struct mount *mp)
 	struct vnode *lowerrootvp, *vp;
 	struct vnode *nullm_rootvp;
 	struct null_mount *xmp;
+	struct thread *td = curthread;
 	char *target;
 	int isvnunlocked = 0, len;
 	struct nameidata nd, *ndp = &nd;
 
 	NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp);
 
+	if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_NULLFS))
+		return (EPERM);
+
 	if (mp->mnt_flag & MNT_ROOTFS)
 		return (EOPNOTSUPP);
 	/*
@@ -364,4 +369,4 @@ static struct vfsops null_vfsops = {
 	.vfs_vget =		nullfs_vget,
 };
 
-VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK);
+VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK | VFCF_JAIL);

Modified: stable/9/sys/fs/procfs/procfs.c
==============================================================================
--- stable/9/sys/fs/procfs/procfs.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/fs/procfs/procfs.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -209,4 +209,4 @@ procfs_uninit(PFS_INIT_ARGS)
 	return (0);
 }
 
-PSEUDOFS(procfs, 1);
+PSEUDOFS(procfs, 1, PR_ALLOW_MOUNT_PROCFS);

Modified: stable/9/sys/fs/pseudofs/pseudofs.h
==============================================================================
--- stable/9/sys/fs/pseudofs/pseudofs.h	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/fs/pseudofs/pseudofs.h	Fri Mar  9 16:17:46 2012	(r232728)
@@ -31,6 +31,8 @@
 #ifndef _PSEUDOFS_H_INCLUDED
 #define _PSEUDOFS_H_INCLUDED
 
+#include <sys/jail.h>
+
 /*
  * Opaque structures
  */
@@ -271,7 +273,7 @@ int		 pfs_destroy	(struct pfs_node *pn);
 /*
  * Now for some initialization magic...
  */
-#define PSEUDOFS(name, version)						\
+#define PSEUDOFS(name, version, jflag)					\
 									\
 static struct pfs_info name##_info = {					\
 	#name,								\
@@ -281,6 +283,8 @@ static struct pfs_info name##_info = {		
 									\
 static int								\
 _##name##_mount(struct mount *mp) {					\
+        if (jflag && !prison_allow(curthread->td_ucred, jflag))		\
+                return (EPERM);						\
 	return pfs_mount(&name##_info, mp);				\
 }									\
 									\
@@ -303,7 +307,7 @@ static struct vfsops name##_vfsops = {		
 	.vfs_uninit =		_##name##_uninit,			\
 	.vfs_unmount =		pfs_unmount,				\
 };									\
-VFS_SET(name##_vfsops, name, VFCF_SYNTHETIC);				\
+VFS_SET(name##_vfsops, name, VFCF_SYNTHETIC | (jflag ? VFCF_JAIL : 0));	\
 MODULE_VERSION(name, version);						\
 MODULE_DEPEND(name, pseudofs, 1, 1, 1);
 

Modified: stable/9/sys/kern/kern_jail.c
==============================================================================
--- stable/9/sys/kern/kern_jail.c	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/kern/kern_jail.c	Fri Mar  9 16:17:46 2012	(r232728)
@@ -103,6 +103,7 @@ struct prison prison0 = {
 	.pr_uref	= 1,
 	.pr_path	= "/",
 	.pr_securelevel	= -1,
+	.pr_devfs_rsnum = 0,
 	.pr_childmax	= JAIL_MAX,
 	.pr_hostuuid	= DEFAULT_HOSTUUID,
 	.pr_children	= LIST_HEAD_INITIALIZER(prison0.pr_children),
@@ -200,6 +201,10 @@ static char *pr_allow_names[] = {
 	"allow.mount",
 	"allow.quotas",
 	"allow.socket_af",
+	"allow.mount.devfs",
+	"allow.mount.nullfs",
+	"allow.mount.zfs",
+	"allow.mount.procfs",
 };
 const size_t pr_allow_names_size = sizeof(pr_allow_names);
 
@@ -211,13 +216,19 @@ static char *pr_allow_nonames[] = {
 	"allow.nomount",
 	"allow.noquotas",
 	"allow.nosocket_af",
+	"allow.mount.nodevfs",
+	"allow.mount.nonullfs",
+	"allow.mount.nozfs",
+	"allow.mount.noprocfs",
 };
 const size_t pr_allow_nonames_size = sizeof(pr_allow_nonames);
 
 #define	JAIL_DEFAULT_ALLOW		PR_ALLOW_SET_HOSTNAME
 #define	JAIL_DEFAULT_ENFORCE_STATFS	2
+#define	JAIL_DEFAULT_DEVFS_RSNUM	0
 static unsigned jail_default_allow = JAIL_DEFAULT_ALLOW;
 static int jail_default_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS;
+static int jail_default_devfs_rsnum = JAIL_DEFAULT_DEVFS_RSNUM;
 #if defined(INET) || defined(INET6)
 static unsigned jail_max_af_ips = 255;
 #endif
@@ -529,9 +540,9 @@ kern_jail_set(struct thread *td, struct 
 	unsigned long hid;
 	size_t namelen, onamelen;
 	int created, cuflags, descend, enforce, error, errmsg_len, errmsg_pos;
-	int gotchildmax, gotenforce, gothid, gotslevel;
+	int gotchildmax, gotenforce, gothid, gotrsnum, gotslevel;
 	int fi, jid, jsys, len, level;
-	int childmax, slevel, vfslocked;
+	int childmax, rsnum, slevel, vfslocked;
 	int fullpath_disabled;
 #if defined(INET) || defined(INET6)
 	int ii, ij;
@@ -612,6 +623,14 @@ kern_jail_set(struct thread *td, struct 
 	} else
 		gotenforce = 1;
 
+	error = vfs_copyopt(opts, "devfs_ruleset", &rsnum, sizeof(rsnum));
+	if (error == ENOENT)
+		gotrsnum = 0;
+	else if (error != 0)
+		goto done_free;
+	else
+		gotrsnum = 1;
+
 	pr_flags = ch_flags = 0;
 	for (fi = 0; fi < sizeof(pr_flag_names) / sizeof(pr_flag_names[0]);
 	    fi++) {
@@ -1268,6 +1287,7 @@ kern_jail_set(struct thread *td, struct 
 		pr->pr_securelevel = ppr->pr_securelevel;
 		pr->pr_allow = JAIL_DEFAULT_ALLOW & ppr->pr_allow;
 		pr->pr_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS;
+		pr->pr_devfs_rsnum = ppr->pr_devfs_rsnum;
 
 		LIST_INIT(&pr->pr_children);
 		mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF | MTX_DUPOK);
@@ -1346,6 +1366,25 @@ kern_jail_set(struct thread *td, struct 
 			goto done_deref_locked;
 		}
 	}
+	if (gotrsnum) {
+		/*
+		 * devfs_rsnum is a uint16_t
+		 */
+		if (rsnum < 0 || rsnum > 65535) {
+			error = EINVAL;
+			goto done_deref_locked;
+		}
+		/*
+		 * Nested jails always inherit parent's devfs ruleset
+		 */
+		if (jailed(td->td_ucred)) {
+			if (rsnum > 0 && rsnum != ppr->pr_devfs_rsnum) {
+				error = EPERM;
+				goto done_deref_locked;
+			} else
+				rsnum = ppr->pr_devfs_rsnum;
+		}
+	}
 #ifdef INET
 	if (ip4s > 0) {
 		if (ppr->pr_flags & PR_IP4) {
@@ -1586,6 +1625,12 @@ kern_jail_set(struct thread *td, struct 
 			if (tpr->pr_enforce_statfs < enforce)
 				tpr->pr_enforce_statfs = enforce;
 	}
+	if (gotrsnum) {
+		pr->pr_devfs_rsnum = rsnum;
+		/* Pass this restriction on to the children. */
+		FOREACH_PRISON_DESCENDANT_LOCKED(pr, tpr, descend)
+			tpr->pr_devfs_rsnum = rsnum;
+	}
 	if (name != NULL) {
 		if (ppr == &prison0)
 			strlcpy(pr->pr_name, name, sizeof(pr->pr_name));
@@ -2020,6 +2065,10 @@ kern_jail_get(struct thread *td, struct 
 	    sizeof(pr->pr_enforce_statfs));
 	if (error != 0 && error != ENOENT)
 		goto done_deref;
+	error = vfs_setopt(opts, "devfs_ruleset", &pr->pr_devfs_rsnum,
+	    sizeof(pr->pr_devfs_rsnum));
+	if (error != 0 && error != ENOENT)
+		goto done_deref;
 	for (fi = 0; fi < sizeof(pr_flag_names) / sizeof(pr_flag_names[0]);
 	    fi++) {
 		if (pr_flag_names[fi] == NULL)
@@ -4151,6 +4200,22 @@ SYSCTL_PROC(_security_jail, OID_AUTO, mo
     CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
     NULL, PR_ALLOW_MOUNT, sysctl_jail_default_allow, "I",
     "Processes in jail can mount/unmount jail-friendly file systems");
+SYSCTL_PROC(_security_jail, OID_AUTO, mount_devfs_allowed,
+    CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+    NULL, PR_ALLOW_MOUNT_DEVFS, sysctl_jail_default_allow, "I",
+    "Processes in jail can mount the devfs file system");
+SYSCTL_PROC(_security_jail, OID_AUTO, mount_nullfs_allowed,
+    CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+    NULL, PR_ALLOW_MOUNT_NULLFS, sysctl_jail_default_allow, "I",
+    "Processes in jail can mount the nullfs file system");
+SYSCTL_PROC(_security_jail, OID_AUTO, mount_procfs_allowed,
+    CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+    NULL, PR_ALLOW_MOUNT_PROCFS, sysctl_jail_default_allow, "I",
+    "Processes in jail can mount the procfs file system");
+SYSCTL_PROC(_security_jail, OID_AUTO, mount_zfs_allowed,
+    CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+    NULL, PR_ALLOW_MOUNT_ZFS, sysctl_jail_default_allow, "I",
+    "Processes in jail can mount the zfs file system");
 
 static int
 sysctl_jail_default_level(SYSCTL_HANDLER_ARGS)
@@ -4173,6 +4238,12 @@ SYSCTL_PROC(_security_jail, OID_AUTO, en
     sysctl_jail_default_level, "I",
     "Processes in jail cannot see all mounted file systems");
 
+SYSCTL_PROC(_security_jail, OID_AUTO, devfs_ruleset,
+    CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE,
+    &jail_default_devfs_rsnum, offsetof(struct prison, pr_devfs_rsnum),
+    sysctl_jail_default_level, "I",
+    "Ruleset for the devfs filesystem in jail");
+
 /*
  * Nodes to describe jail parameters.  Maximum length of string parameters
  * is returned in the string itself, and the other parameters exist merely
@@ -4221,6 +4292,8 @@ SYSCTL_JAIL_PARAM(, securelevel, CTLTYPE
     "I", "Jail secure level");
 SYSCTL_JAIL_PARAM(, enforce_statfs, CTLTYPE_INT | CTLFLAG_RW,
     "I", "Jail cannot see all mounted file systems");
+SYSCTL_JAIL_PARAM(, devfs_ruleset, CTLTYPE_INT | CTLFLAG_RW,
+    "I", "Ruleset for in-jail devfs mounts");
 SYSCTL_JAIL_PARAM(, persist, CTLTYPE_INT | CTLFLAG_RW,
     "B", "Jail persistence");
 #ifdef VIMAGE
@@ -4277,13 +4350,23 @@ SYSCTL_JAIL_PARAM(_allow, raw_sockets, C
     "B", "Jail may create raw sockets");
 SYSCTL_JAIL_PARAM(_allow, chflags, CTLTYPE_INT | CTLFLAG_RW,
     "B", "Jail may alter system file flags");
-SYSCTL_JAIL_PARAM(_allow, mount, CTLTYPE_INT | CTLFLAG_RW,
-    "B", "Jail may mount/unmount jail-friendly file systems");
 SYSCTL_JAIL_PARAM(_allow, quotas, CTLTYPE_INT | CTLFLAG_RW,
     "B", "Jail may set file quotas");
 SYSCTL_JAIL_PARAM(_allow, socket_af, CTLTYPE_INT | CTLFLAG_RW,
     "B", "Jail may create sockets other than just UNIX/IPv4/IPv6/route");
 
+SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags");
+SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW,
+    "B", "Jail may mount/unmount jail-friendly file systems in general");
+SYSCTL_JAIL_PARAM(_allow_mount, devfs, CTLTYPE_INT | CTLFLAG_RW,
+    "B", "Jail may mount the devfs file system");
+SYSCTL_JAIL_PARAM(_allow_mount, nullfs, CTLTYPE_INT | CTLFLAG_RW,
+    "B", "Jail may mount the nullfs file system");
+SYSCTL_JAIL_PARAM(_allow_mount, procfs, CTLTYPE_INT | CTLFLAG_RW,
+    "B", "Jail may mount the procfs file system");
+SYSCTL_JAIL_PARAM(_allow_mount, zfs, CTLTYPE_INT | CTLFLAG_RW,
+    "B", "Jail may mount the zfs file system");
+
 void
 prison_racct_foreach(void (*callback)(struct racct *racct,
     void *arg2, void *arg3), void *arg2, void *arg3)
@@ -4413,6 +4496,7 @@ db_show_prison(struct prison *pr)
 #endif
 	db_printf(" root            = %p\n", pr->pr_root);
 	db_printf(" securelevel     = %d\n", pr->pr_securelevel);
+	db_printf(" devfs_rsnum     = %d\n", pr->pr_devfs_rsnum);
 	db_printf(" children.max    = %d\n", pr->pr_childmax);
 	db_printf(" children.cur    = %d\n", pr->pr_childcount);
 	db_printf(" child           = %p\n", LIST_FIRST(&pr->pr_children));

Modified: stable/9/sys/sys/jail.h
==============================================================================
--- stable/9/sys/sys/jail.h	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/sys/jail.h	Fri Mar  9 16:17:46 2012	(r232728)
@@ -176,7 +176,8 @@ struct prison {
 	unsigned	 pr_allow;			/* (p) PR_ALLOW_* flags */
 	int		 pr_securelevel;		/* (p) securelevel */
 	int		 pr_enforce_statfs;		/* (p) statfs permission */
-	int		 pr_spare[5];
+	int		 pr_devfs_rsnum;		/* (p) devfs ruleset */
+	int		 pr_spare[4];
 	unsigned long	 pr_hostid;			/* (p) jail hostid */
 	char		 pr_name[MAXHOSTNAMELEN];	/* (p) admin jail name */
 	char		 pr_path[MAXPATHLEN];		/* (c) chroot path */
@@ -222,7 +223,11 @@ struct prison_racct {
 #define	PR_ALLOW_MOUNT			0x0010
 #define	PR_ALLOW_QUOTAS			0x0020
 #define	PR_ALLOW_SOCKET_AF		0x0040
-#define	PR_ALLOW_ALL			0x007f
+#define	PR_ALLOW_MOUNT_DEVFS		0x0080
+#define	PR_ALLOW_MOUNT_NULLFS		0x0100
+#define	PR_ALLOW_MOUNT_ZFS		0x0200
+#define	PR_ALLOW_MOUNT_PROCFS		0x0400
+#define	PR_ALLOW_ALL			0x07ff
 
 /*
  * OSD methods
@@ -337,6 +342,8 @@ SYSCTL_DECL(_security_jail_param);
 	sysctl_jail_param, fmt, descr)
 #define	SYSCTL_JAIL_PARAM_NODE(module, descr)				\
     SYSCTL_NODE(_security_jail_param, OID_AUTO, module, 0, 0, descr)
+#define	SYSCTL_JAIL_PARAM_SUBNODE(parent, module, descr)		\
+    SYSCTL_NODE(_security_jail_param_##parent, OID_AUTO, module, 0, 0, descr)
 #define	SYSCTL_JAIL_PARAM_SYS_NODE(module, access, descr)		\
     SYSCTL_JAIL_PARAM_NODE(module, descr);				\
     SYSCTL_JAIL_PARAM(_##module, , CTLTYPE_INT | (access), "E,jailsys",	\

Modified: stable/9/sys/sys/param.h
==============================================================================
--- stable/9/sys/sys/param.h	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/sys/sys/param.h	Fri Mar  9 16:17:46 2012	(r232728)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 900503	/* Master, propagated to newvers */
+#define __FreeBSD_version 900504	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

Modified: stable/9/usr.sbin/jail/jail.8
==============================================================================
--- stable/9/usr.sbin/jail/jail.8	Fri Mar  9 16:05:11 2012	(r232727)
+++ stable/9/usr.sbin/jail/jail.8	Fri Mar  9 16:17:46 2012	(r232728)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 23, 2011
+.Dd February 29, 2012
 .Dt JAIL 8
 .Os
 .Sh NAME
@@ -301,6 +301,19 @@ A jail never has a lower securelevel tha
 setting this parameter it may have a higher one.
 If the system securelevel is changed, any jail securelevels will be at
 least as secure.
+.It Va devfs_ruleset
+The number of the devfs ruleset that is enforced for mounting devfs in
+this jail.
+A value of zero (default) means no ruleset is enforced.
+Descendant jails inherit the parent jail's devfs ruleset enforcement.
+Mounting devfs inside a jail is possible only if the
+.Va allow.mount
+and
+.Va allow.mount.devfs
+permissions are effective and
+.Va enforce_statfs
+is set to a value lower than 2.
+Devfs rules and rulesets cannot be viewed or modified from inside a jail.
 .It Va children.max
 The number of child jails allowed to be created by this jail (or by
 other jails under this jail).
@@ -396,6 +409,45 @@ within a jail.
 This permission is effective only if
 .Va enforce_statfs
 is set to a value lower than 2.
+.It Va allow.mount.devfs
+privileged users inside the jail will be able to mount and unmount the
+devfs file system.
+This permission is effective only together with
+.Va allow.mount
+and if
+.Va enforce_statfs
+is set to a value lower than 2.
+Please consider restricting the devfs ruleset with the
+.Va devfs_ruleset
+option.
+.It Va allow.mount.nullfs
+privileged users inside the jail will be able to mount and unmount the
+nullfs file system.
+This permission is effective only together with
+.Va allow.mount
+and if
+.Va enforce_statfs
+is set to a value lower than 2.
+.It Va allow.mount.procfs
+privileged users inside the jail will be able to mount and unmount the
+procfs file system.
+This permission is effective only together with
+.Va allow.mount
+and if
+.Va enforce_statfs
+is set to a value lower than 2.
+.It Va allow.mount.zfs
+privileged users inside the jail will be able to mount and unmount the
+ZFS file system.
+This permission is effective only together with
+.Va allow.mount
+and if
+.Va enforce_statfs
+is set to a value lower than 2.
+See
+.Xr zfs 8
+for information on how to configure the ZFS filesystem to operate from
+within a jail.
 .It Va allow.quotas
 The prison root may administer quotas on the jail's filesystem(s).
 This includes filesystems that the jail may share with other jails or

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 02:26:12 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D655B106566B;
	Sat, 10 Mar 2012 02:26:12 +0000 (UTC)
	(envelope-from rstone@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C50358FC12;
	Sat, 10 Mar 2012 02:26:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A2QCfK035329;
	Sat, 10 Mar 2012 02:26:12 GMT (envelope-from rstone@svn.freebsd.org)
Received: (from rstone@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A2QCkL035327;
	Sat, 10 Mar 2012 02:26:12 GMT (envelope-from rstone@svn.freebsd.org)
Message-Id: <201203100226.q2A2QCkL035327@svn.freebsd.org>
From: Ryan Stone <rstone@FreeBSD.org>
Date: Sat, 10 Mar 2012 02:26:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232756 - stable/9/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 02:26:13 -0000

Author: rstone
Date: Sat Mar 10 02:26:12 2012
New Revision: 232756
URL: http://svn.freebsd.org/changeset/base/232756

Log:
  MFC r230984:
  
   Whenever a new kernel thread is spawned, explicitly clear any CPU affinity
   set on the new thread.  This prevents the thread from inadvertently
   inheriting affinity from a random sibling.

Modified:
  stable/9/sys/kern/kern_kthread.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/kern_kthread.c
==============================================================================
--- stable/9/sys/kern/kern_kthread.c	Sat Mar 10 01:36:42 2012	(r232755)
+++ stable/9/sys/kern/kern_kthread.c	Sat Mar 10 02:26:12 2012	(r232756)
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/cpuset.h>
 #include <sys/kthread.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
@@ -117,6 +118,9 @@ kproc_create(void (*func)(void *), void 
 
 	/* call the processes' main()... */
 	cpu_set_fork_handler(td, func, arg);
+
+	/* Avoid inheriting affinity from a random parent. */
+	cpuset_setthread(td->td_tid, cpuset_root);
 	thread_lock(td);
 	TD_SET_CAN_RUN(td);
 	sched_prio(td, PVM);
@@ -299,6 +303,9 @@ kthread_add(void (*func)(void *), void *
 
 	tidhash_add(newtd);
 
+	/* Avoid inheriting affinity from a random parent. */
+	cpuset_setthread(newtd->td_tid, cpuset_root);
+
 	/* Delay putting it on the run queue until now. */
 	if (!(flags & RFSTOPPED)) {
 		thread_lock(newtd);

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 02:27:05 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10A09106567B;
	Sat, 10 Mar 2012 02:27:05 +0000 (UTC)
	(envelope-from rstone@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ED05E8FC1A;
	Sat, 10 Mar 2012 02:27:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A2R4eU035392;
	Sat, 10 Mar 2012 02:27:04 GMT (envelope-from rstone@svn.freebsd.org)
Received: (from rstone@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A2R4GN035390;
	Sat, 10 Mar 2012 02:27:04 GMT (envelope-from rstone@svn.freebsd.org)
Message-Id: <201203100227.q2A2R4GN035390@svn.freebsd.org>
From: Ryan Stone <rstone@FreeBSD.org>
Date: Sat, 10 Mar 2012 02:27:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232757 - stable/8/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 02:27:05 -0000

Author: rstone
Date: Sat Mar 10 02:27:04 2012
New Revision: 232757
URL: http://svn.freebsd.org/changeset/base/232757

Log:
  MFC r230984:
   Whenever a new kernel thread is spawned, explicitly clear any CPU affinity
   set on the new thread.  This prevents the thread from inadvertently
   inheriting affinity from a random sibling.

Modified:
  stable/8/sys/kern/kern_kthread.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/kern/kern_kthread.c
==============================================================================
--- stable/8/sys/kern/kern_kthread.c	Sat Mar 10 02:26:12 2012	(r232756)
+++ stable/8/sys/kern/kern_kthread.c	Sat Mar 10 02:27:04 2012	(r232757)
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/cpuset.h>
 #include <sys/kthread.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
@@ -116,6 +117,9 @@ kproc_create(void (*func)(void *), void 
 
 	/* call the processes' main()... */
 	cpu_set_fork_handler(td, func, arg);
+
+	/* Avoid inheriting affinity from a random parent. */
+	cpuset_setthread(td->td_tid, cpuset_root);
 	thread_lock(td);
 	TD_SET_CAN_RUN(td);
 	sched_prio(td, PVM);
@@ -300,6 +304,9 @@ kthread_add(void (*func)(void *), void *
 	PROC_UNLOCK(p);
 
 
+	/* Avoid inheriting affinity from a random parent. */
+	cpuset_setthread(newtd->td_tid, cpuset_root);
+
 	/* Delay putting it on the run queue until now. */
 	if (!(flags & RFSTOPPED)) {
 		thread_lock(newtd);

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 08:25:49 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DB8E8106564A;
	Sat, 10 Mar 2012 08:25:49 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CA3E08FC0A;
	Sat, 10 Mar 2012 08:25:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A8Pn9B047309;
	Sat, 10 Mar 2012 08:25:49 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A8PndK047307;
	Sat, 10 Mar 2012 08:25:49 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201203100825.q2A8PndK047307@svn.freebsd.org>
From: Jaakko Heinonen <jh@FreeBSD.org>
Date: Sat, 10 Mar 2012 08:25:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232774 - stable/9/usr.sbin/wake
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 08:25:50 -0000

Author: jh
Date: Sat Mar 10 08:25:49 2012
New Revision: 232774
URL: http://svn.freebsd.org/changeset/base/232774

Log:
  MFC r232101: style(9).

Modified:
  stable/9/usr.sbin/wake/wake.c
Directory Properties:
  stable/9/usr.sbin/wake/   (props changed)

Modified: stable/9/usr.sbin/wake/wake.c
==============================================================================
--- stable/9/usr.sbin/wake/wake.c	Sat Mar 10 07:54:41 2012	(r232773)
+++ stable/9/usr.sbin/wake/wake.c	Sat Mar 10 08:25:49 2012	(r232774)
@@ -78,7 +78,7 @@ wake(int bpf, const char *host)
 	if (get_ether(host, &macaddr) == -1)
 		return (-1);
 
-	return send_wakeup(bpf, &macaddr);
+	return (send_wakeup(bpf, &macaddr));
 }
 
 static int
@@ -111,10 +111,10 @@ find_ether(char *dst, size_t len)
 	int nifs;
 
 	if (dst == NULL || len == 0)
-		return 0;
+		return (0);
 
 	if (getifaddrs(&ifap) != 0)
-		return -1;
+		return (-1);
 
 	/* XXX also check the link state */
 	for (nifs = 0, ifa = ifap; ifa; ifa = ifa->ifa_next)
@@ -128,7 +128,7 @@ find_ether(char *dst, size_t len)
 		}
 
 	freeifaddrs(ifap);
-	return nifs == 1 ? 0 : -1;
+	return (nifs == 1 ? 0 : -1);
 }
 
 static int

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 08:27:38 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 014E8106564A;
	Sat, 10 Mar 2012 08:27:38 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E43CA8FC0C;
	Sat, 10 Mar 2012 08:27:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A8RbTx047412;
	Sat, 10 Mar 2012 08:27:37 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A8Rbwi047410;
	Sat, 10 Mar 2012 08:27:37 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201203100827.q2A8Rbwi047410@svn.freebsd.org>
From: Jaakko Heinonen <jh@FreeBSD.org>
Date: Sat, 10 Mar 2012 08:27:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232775 - stable/9/usr.sbin/wake
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 08:27:38 -0000

Author: jh
Date: Sat Mar 10 08:27:37 2012
New Revision: 232775
URL: http://svn.freebsd.org/changeset/base/232775

Log:
  MFC r232102: Exit with proper status when wake() fails.
  
  PR:		bin/153527

Modified:
  stable/9/usr.sbin/wake/wake.c
Directory Properties:
  stable/9/usr.sbin/wake/   (props changed)

Modified: stable/9/usr.sbin/wake/wake.c
==============================================================================
--- stable/9/usr.sbin/wake/wake.c	Sat Mar 10 08:25:49 2012	(r232774)
+++ stable/9/usr.sbin/wake/wake.c	Sat Mar 10 08:27:37 2012	(r232775)
@@ -183,7 +183,7 @@ send_wakeup(int bpf, struct ether_addr c
 int
 main(int argc, char *argv[])
 {
-	int bpf, n;
+	int bpf, n, rval;
 	char ifname[IF_NAMESIZE];
 
 	if (argc < 2)
@@ -204,10 +204,13 @@ main(int argc, char *argv[])
 
 	if (n >= argc)
 		usage();
-	for (; n < argc; n++)
-		if (wake(bpf, argv[n]))
+	rval = 0;
+	for (; n < argc; n++) {
+		if (wake(bpf, argv[n]) != 0) {
+			rval = 1;
 			warn("Cannot send Wake on LAN frame over `%s' to `%s'",
 			    ifname, argv[n]);
-
-	return (0);
+		}
+	}
+	exit(rval);
 }

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 17:47:44 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 516A9106566B;
	Sat, 10 Mar 2012 17:47:44 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 38F208FC08;
	Sat, 10 Mar 2012 17:47:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AHliID066534;
	Sat, 10 Mar 2012 17:47:44 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AHlhiM066523;
	Sat, 10 Mar 2012 17:47:43 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201203101747.q2AHlhiM066523@svn.freebsd.org>
From: Gavin Atkinson <gavin@FreeBSD.org>
Date: Sat, 10 Mar 2012 17:47:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232786 - in stable/9: sbin/ifconfig sbin/ipfw
	share/man/man4 sys/conf sys/dev/ath sys/dev/siba
	sys/ia64/ia64 sys/mips/rt305x
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 17:47:44 -0000

Author: gavin
Date: Sat Mar 10 17:47:43 2012
New Revision: 232786
URL: http://svn.freebsd.org/changeset/base/232786

Log:
  Merge r232250 from head:
  
    Correct capitalization of "Hz" in user-visible text (manpages, printf(),
    etc).

Modified:
  stable/9/sbin/ifconfig/ifconfig.8
  stable/9/sbin/ipfw/ipfw.8
  stable/9/share/man/man4/ath.4
  stable/9/share/man/man4/net80211.4
  stable/9/sys/conf/NOTES
  stable/9/sys/dev/ath/if_ath_sysctl.c
  stable/9/sys/dev/siba/siba_core.c
  stable/9/sys/ia64/ia64/machdep.c
  stable/9/sys/mips/rt305x/rt305x_sysctl.c
Directory Properties:
  stable/9/sbin/ifconfig/   (props changed)
  stable/9/sbin/ipfw/   (props changed)
  stable/9/share/man/man4/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)

Modified: stable/9/sbin/ifconfig/ifconfig.8
==============================================================================
--- stable/9/sbin/ifconfig/ifconfig.8	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/sbin/ifconfig/ifconfig.8	Sat Mar 10 17:47:43 2012	(r232786)
@@ -1036,7 +1036,7 @@ Enable Dynamic Frequency Selection (DFS)
 DFS embodies several facilities including detection of overlapping
 radar signals, dynamic transmit power control, and channel selection
 according to a least-congested criteria.
-DFS support is mandatory for some 5Ghz frequencies in certain
+DFS support is mandatory for some 5GHz frequencies in certain
 locales (e.g. ETSI).
 By default DFS is enabled according to the regulatory definitions
 specified in /etc/regdomain.xml and the current country code, regdomain,

Modified: stable/9/sbin/ipfw/ipfw.8
==============================================================================
--- stable/9/sbin/ipfw/ipfw.8	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/sbin/ipfw/ipfw.8	Sat Mar 10 17:47:43 2012	(r232786)
@@ -2233,7 +2233,7 @@ specifies the scheduling algorithm to us
 is just a FIFO scheduler (which means that all packets
 are stored in the same queue as they arrive to the scheduler).
 FIFO has O(1) per-packet time complexity, with very low
-constants (estimate 60-80ns on a 2Ghz desktop machine)
+constants (estimate 60-80ns on a 2GHz desktop machine)
 but gives no service guarantees.
 .It Cm wf2qp
 implements the WF2Q+ algorithm, which is a Weighted Fair Queueing

Modified: stable/9/share/man/man4/ath.4
==============================================================================
--- stable/9/share/man/man4/ath.4	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/share/man/man4/ath.4	Sat Mar 10 17:47:43 2012	(r232786)
@@ -95,8 +95,8 @@ with transmit speeds appropriate to each
 AR5416-class devices are capable of 802.11n operation
 but are supported only in legacy modes (802.11a, 11b, 11g).
 Most chips also support an Atheros Turbo Mode (TM) that operates in
-the 5Ghz frequency range with 2x the transmit speeds.
-Some chips also support Turbo mode in the 2.4Ghz range with 802.11g
+the 5GHz frequency range with 2x the transmit speeds.
+Some chips also support Turbo mode in the 2.4GHz range with 802.11g
 though this support is not presently available due to regulatory requirements.
 (Note that Turbo modes are, however,
 only interoperable with other Atheros-based devices.)

Modified: stable/9/share/man/man4/net80211.4
==============================================================================
--- stable/9/share/man/man4/net80211.4	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/share/man/man4/net80211.4	Sat Mar 10 17:47:43 2012	(r232786)
@@ -280,7 +280,7 @@ Return whether or not Dynamic Frequency 
 DFS embodies several facilities including detection of overlapping
 radar signals, dynamic transmit power control, and channel selection
 according to a least-congested criteria.
-DFS support is mandatory for some 5Ghz frequencies in certain
+DFS support is mandatory for some 5GHz frequencies in certain
 locales (e.g. ETSI).
 By default DFS is enabled according to the regulatory definitions
 and the current country code, regdomain, and channel.

Modified: stable/9/sys/conf/NOTES
==============================================================================
--- stable/9/sys/conf/NOTES	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/sys/conf/NOTES	Sat Mar 10 17:47:43 2012	(r232786)
@@ -2406,11 +2406,11 @@ device		cmx
 # or
 # options 	BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC
 # Specifies the default video capture mode.
-# This is required for Dual Crystal (28&35Mhz) boards where PAL is used
+# This is required for Dual Crystal (28&35MHz) boards where PAL is used
 # to prevent hangs during initialisation, e.g. VideoLogic Captivator PCI.
 #
 # options 	BKTR_USE_PLL
-# This is required for PAL or SECAM boards with a 28Mhz crystal and no 35Mhz
+# This is required for PAL or SECAM boards with a 28MHz crystal and no 35MHz
 # crystal, e.g. some new Bt878 cards.
 #
 # options 	BKTR_GPIO_ACCESS

Modified: stable/9/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- stable/9/sys/dev/ath/if_ath_sysctl.c	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/sys/dev/ath/if_ath_sysctl.c	Sat Mar 10 17:47:43 2012	(r232786)
@@ -756,7 +756,7 @@ ath_sysctl_hal_attach(struct ath_softc *
 	sc->sc_ah->ah_config.ah_ar5416_biasadj = 0;
 	SYSCTL_ADD_INT(ctx, child, OID_AUTO, "ar5416_biasadj", CTLFLAG_RW,
 	    &sc->sc_ah->ah_config.ah_ar5416_biasadj, 0,
-	    "Enable 2ghz AR5416 direction sensitivity bias adjust");
+	    "Enable 2GHz AR5416 direction sensitivity bias adjust");
 
 	sc->sc_ah->ah_config.ah_dma_beacon_response_time = 2;
 	SYSCTL_ADD_INT(ctx, child, OID_AUTO, "dma_brt", CTLFLAG_RW,

Modified: stable/9/sys/dev/siba/siba_core.c
==============================================================================
--- stable/9/sys/dev/siba/siba_core.c	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/sys/dev/siba/siba_core.c	Sat Mar 10 17:47:43 2012	(r232786)
@@ -1207,7 +1207,7 @@ siba_cc_pmu0_pll0_init(struct siba_cc *s
 	if (((pmu & SIBA_CC_PMUCTL_XF) >> 2) == e->xf)
 		return;
 
-	DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u mhz\n",
+	DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u MHz\n",
 	    (xtalfreq / 1000), (xtalfreq % 1000));
 
 	KASSERT(siba->siba_chipid == 0x4328 || siba->siba_chipid == 0x5354,

Modified: stable/9/sys/ia64/ia64/machdep.c
==============================================================================
--- stable/9/sys/ia64/ia64/machdep.c	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/sys/ia64/ia64/machdep.c	Sat Mar 10 17:47:43 2012	(r232786)
@@ -245,7 +245,7 @@ identifycpu(void)
 
 	printf("CPU: %s (", model_name);
 	if (cpu_freq)
-		printf("%u Mhz ", cpu_freq);
+		printf("%u MHz ", cpu_freq);
 	printf("%s)\n", family_name);
 	printf("  Origin = \"%s\"  Revision = %d\n", vendor, revision);
 	printf("  Features = 0x%b\n", (u_int32_t) features,

Modified: stable/9/sys/mips/rt305x/rt305x_sysctl.c
==============================================================================
--- stable/9/sys/mips/rt305x/rt305x_sysctl.c	Sat Mar 10 17:08:57 2012	(r232785)
+++ stable/9/sys/mips/rt305x/rt305x_sysctl.c	Sat Mar 10 17:47:43 2012	(r232786)
@@ -84,7 +84,7 @@ rt305x_sysctl_dump_config(device_t dev)
 	if ( val & SYSCTL_SYSCFG_BIG_ENDIAN)
 		printf("\tBig Endian\n");
 	if ( val & SYSCTL_SYSCFG_CPU_CLK_SEL_384MHZ)
-		printf("\tClock is 384Mhz\n");
+		printf("\tClock is 384MHz\n");
 	printf("\tBoot from %u\n",
 	    ((val & SYSCTL_SYSCFG_BOOT_FROM_MASK) >> 
 		SYSCTL_SYSCFG_BOOT_FROM_SHIFT));
@@ -109,7 +109,7 @@ rt305x_sysctl_dump_config(device_t dev)
 		printf("\tI2S clock is enabled\n");
 	printf("\tI2S clock is %s\n", 
 	    (val & SYSCTL_CLKCFG1_I2S_CLK_SEL_EXT)?
-		"external":"internal 15.625Mhz");
+		"external":"internal 15.625MHz");
 	printf("\tI2S clock divider %u\n",
 	    ((val & SYSCTL_CLKCFG1_I2S_CLK_DIV_MASK) >> 
 		SYSCTL_CLKCFG1_I2S_CLK_DIV_SHIFT));
@@ -118,7 +118,7 @@ rt305x_sysctl_dump_config(device_t dev)
 
 	printf("\tPCM clock is %s\n", 
 	    (val & SYSCTL_CLKCFG1_PCM_CLK_SEL_EXT)?
-		"external":"internal 15.625Mhz");
+		"external":"internal 15.625MHz");
 	printf("\tPCM clock divider %u\n",
 	    ((val & SYSCTL_CLKCFG1_PCM_CLK_DIV_MASK) >> 
 		SYSCTL_CLKCFG1_PCM_CLK_DIV_SHIFT));

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 17:55:59 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7FF01106566B;
	Sat, 10 Mar 2012 17:55:59 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5FC728FC12;
	Sat, 10 Mar 2012 17:55:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AHtxw7066882;
	Sat, 10 Mar 2012 17:55:59 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AHtxSF066874;
	Sat, 10 Mar 2012 17:55:59 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201203101755.q2AHtxSF066874@svn.freebsd.org>
From: Gavin Atkinson <gavin@FreeBSD.org>
Date: Sat, 10 Mar 2012 17:55:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232787 - in stable/8: sbin/ifconfig sbin/ipfw
	share/man/man4 sys/conf sys/dev/siba sys/ia64/ia64
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 17:55:59 -0000

Author: gavin
Date: Sat Mar 10 17:55:58 2012
New Revision: 232787
URL: http://svn.freebsd.org/changeset/base/232787

Log:
  Merge r232250 from head:
  
    Correct capitalization of "Hz" in user-visible text (manpages, printf(),
    etc).

Modified:
  stable/8/sbin/ifconfig/ifconfig.8
  stable/8/sbin/ipfw/ipfw.8
  stable/8/share/man/man4/ath.4
  stable/8/share/man/man4/net80211.4
  stable/8/sys/conf/NOTES
  stable/8/sys/dev/siba/siba_core.c
  stable/8/sys/ia64/ia64/machdep.c
Directory Properties:
  stable/8/sbin/ifconfig/   (props changed)
  stable/8/sbin/ipfw/   (props changed)
  stable/8/share/man/man4/   (props changed)
  stable/8/sys/   (props changed)

Modified: stable/8/sbin/ifconfig/ifconfig.8
==============================================================================
--- stable/8/sbin/ifconfig/ifconfig.8	Sat Mar 10 17:47:43 2012	(r232786)
+++ stable/8/sbin/ifconfig/ifconfig.8	Sat Mar 10 17:55:58 2012	(r232787)
@@ -993,7 +993,7 @@ Enable Dynamic Frequency Selection (DFS)
 DFS embodies several facilities including detection of overlapping
 radar signals, dynamic transmit power control, and channel selection
 according to a least-congested criteria.
-DFS support is mandatory for some 5Ghz frequencies in certain
+DFS support is mandatory for some 5GHz frequencies in certain
 locales (e.g. ETSI).
 By default DFS is enabled according to the regulatory definitions
 specified in /etc/regdomain.xml and the curent country code, regdomain,

Modified: stable/8/sbin/ipfw/ipfw.8
==============================================================================
--- stable/8/sbin/ipfw/ipfw.8	Sat Mar 10 17:47:43 2012	(r232786)
+++ stable/8/sbin/ipfw/ipfw.8	Sat Mar 10 17:55:58 2012	(r232787)
@@ -2219,7 +2219,7 @@ specifies the scheduling algorithm to us
 is just a FIFO scheduler (which means that all packets
 are stored in the same queue as they arrive to the scheduler).
 FIFO has O(1) per-packet time complexity, with very low
-constants (estimate 60-80ns on a 2Ghz desktop machine)
+constants (estimate 60-80ns on a 2GHz desktop machine)
 but gives no service guarantees.
 .It Cm wf2qp
 implements the WF2Q+ algorithm, which is a Weighted Fair Queueing

Modified: stable/8/share/man/man4/ath.4
==============================================================================
--- stable/8/share/man/man4/ath.4	Sat Mar 10 17:47:43 2012	(r232786)
+++ stable/8/share/man/man4/ath.4	Sat Mar 10 17:55:58 2012	(r232787)
@@ -80,8 +80,8 @@ with transmit speeds appropriate to each
 AR5416-class devices are capable of 802.11n operation
 but are supported only in legacy modes (802.11a, 11b, 11g).
 Most chips also support an Atheros Turbo Mode (TM) that operates in
-the 5Ghz frequency range with 2x the transmit speeds.
-Some chips also support Turbo mode in the 2.4Ghz range with 802.11g
+the 5GHz frequency range with 2x the transmit speeds.
+Some chips also support Turbo mode in the 2.4GHz range with 802.11g
 though this support is not presently available due to regulatory requirements.
 (Note that Turbo modes are, however,
 only interoperable with other Atheros-based devices.)

Modified: stable/8/share/man/man4/net80211.4
==============================================================================
--- stable/8/share/man/man4/net80211.4	Sat Mar 10 17:47:43 2012	(r232786)
+++ stable/8/share/man/man4/net80211.4	Sat Mar 10 17:55:58 2012	(r232787)
@@ -280,7 +280,7 @@ Return whether or not Dynamic Frequency 
 DFS embodies several facilities including detection of overlapping
 radar signals, dynamic transmit power control, and channel selection
 according to a least-congested criteria.
-DFS support is mandatory for some 5Ghz frequencies in certain
+DFS support is mandatory for some 5GHz frequencies in certain
 locales (e.g. ETSI).
 By default DFS is enabled according to the regulatory definitions
 and the curent country code, regdomain, and channel.

Modified: stable/8/sys/conf/NOTES
==============================================================================
--- stable/8/sys/conf/NOTES	Sat Mar 10 17:47:43 2012	(r232786)
+++ stable/8/sys/conf/NOTES	Sat Mar 10 17:55:58 2012	(r232787)
@@ -2339,11 +2339,11 @@ device		cmx
 # or
 # options 	BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC
 # Specifies the default video capture mode.
-# This is required for Dual Crystal (28&35Mhz) boards where PAL is used
+# This is required for Dual Crystal (28&35MHz) boards where PAL is used
 # to prevent hangs during initialisation, e.g. VideoLogic Captivator PCI.
 #
 # options 	BKTR_USE_PLL
-# This is required for PAL or SECAM boards with a 28Mhz crystal and no 35Mhz
+# This is required for PAL or SECAM boards with a 28MHz crystal and no 35MHz
 # crystal, e.g. some new Bt878 cards.
 #
 # options 	BKTR_GPIO_ACCESS

Modified: stable/8/sys/dev/siba/siba_core.c
==============================================================================
--- stable/8/sys/dev/siba/siba_core.c	Sat Mar 10 17:47:43 2012	(r232786)
+++ stable/8/sys/dev/siba/siba_core.c	Sat Mar 10 17:55:58 2012	(r232787)
@@ -1215,7 +1215,7 @@ siba_cc_pmu0_pll0_init(struct siba_cc *s
 	if (((pmu & SIBA_CC_PMUCTL_XF) >> 2) == e->xf)
 		return;
 
-	DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u mhz\n",
+	DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u MHz\n",
 	    (xtalfreq / 1000), (xtalfreq % 1000));
 
 	KASSERT(siba->siba_chipid == 0x4328 || siba->siba_chipid == 0x5354,

Modified: stable/8/sys/ia64/ia64/machdep.c
==============================================================================
--- stable/8/sys/ia64/ia64/machdep.c	Sat Mar 10 17:47:43 2012	(r232786)
+++ stable/8/sys/ia64/ia64/machdep.c	Sat Mar 10 17:55:58 2012	(r232787)
@@ -242,7 +242,7 @@ identifycpu(void)
 
 	printf("CPU: %s (", model_name);
 	if (cpu_freq)
-		printf("%u Mhz ", cpu_freq);
+		printf("%u MHz ", cpu_freq);
 	printf("%s)\n", family_name);
 	printf("  Origin = \"%s\"  Revision = %d\n", vendor, revision);
 	printf("  Features = 0x%b\n", (u_int32_t) features,

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 18:26:26 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 3433A1065673;
	Sat, 10 Mar 2012 18:26:26 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1ED0C8FC08;
	Sat, 10 Mar 2012 18:26:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIQPeB069805;
	Sat, 10 Mar 2012 18:26:25 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIQPVV069802;
	Sat, 10 Mar 2012 18:26:25 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203101826.q2AIQPVV069802@svn.freebsd.org>
From: Eitan Adler <eadler@FreeBSD.org>
Date: Sat, 10 Mar 2012 18:26:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232788 - stable/8/sys/dev/acpica
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 18:26:26 -0000

Author: eadler
Date: Sat Mar 10 18:26:25 2012
New Revision: 232788
URL: http://svn.freebsd.org/changeset/base/232788

Log:
  MFC r227626, r227642:
  	- be more precise about the unit of measurement
  
  Approved by:	cperciva

Modified:
  stable/8/sys/dev/acpica/acpi_thermal.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/dev/acpica/acpi_thermal.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi_thermal.c	Sat Mar 10 17:55:58 2012	(r232787)
+++ stable/8/sys/dev/acpica/acpi_thermal.c	Sat Mar 10 18:26:25 2012	(r232788)
@@ -246,7 +246,7 @@ acpi_tz_attach(device_t dev)
 	SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
 		       SYSCTL_CHILDREN(acpi_tz_sysctl_tree),
 		       OID_AUTO, "polling_rate", CTLFLAG_RW,
-		       &acpi_tz_polling_rate, 0, "monitor polling rate");
+		       &acpi_tz_polling_rate, 0, "monitor polling interval in seconds");
 	SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx,
 		       SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO,
 		       "user_override", CTLFLAG_RW, &acpi_tz_override, 0,

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 18:36:13 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 82EAC1065686;
	Sat, 10 Mar 2012 18:36:13 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6DCA08FC13;
	Sat, 10 Mar 2012 18:36:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIaDWV070747;
	Sat, 10 Mar 2012 18:36:13 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIaD9E070745;
	Sat, 10 Mar 2012 18:36:13 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203101836.q2AIaD9E070745@svn.freebsd.org>
From: Eitan Adler <eadler@FreeBSD.org>
Date: Sat, 10 Mar 2012 18:36:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232790 - stable/9/usr.bin/indent
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 18:36:13 -0000

Author: eadler
Date: Sat Mar 10 18:36:12 2012
New Revision: 232790
URL: http://svn.freebsd.org/changeset/base/232790

Log:
  MFC r232471:
  	Document the [n]eei and [n]bacc options
  
  PR:		docs/165009
  Approved by:	bcr

Modified:
  stable/9/usr.bin/indent/indent.1
Directory Properties:
  stable/9/usr.bin/indent/   (props changed)

Modified: stable/9/usr.bin/indent/indent.1
==============================================================================
--- stable/9/usr.bin/indent/indent.1	Sat Mar 10 18:35:38 2012	(r232789)
+++ stable/9/usr.bin/indent/indent.1	Sat Mar 10 18:36:12 2012	(r232790)
@@ -34,7 +34,7 @@
 .\"	@(#)indent.1	8.1 (Berkeley) 7/1/93
 .\" $FreeBSD$
 .\"
-.Dd June 29, 2004
+.Dd March 3, 2012
 .Dt INDENT 1
 .Os
 .Sh NAME
@@ -43,9 +43,12 @@
 .Sh SYNOPSIS
 .Nm
 .Op Ar input-file Op Ar output-file
+.Op Fl bacc | Fl nbacc
 .Op Fl bad | Fl nbad
 .Op Fl bap | Fl nbap
 .Bk -words
+.Op Fl ei | Fl ei
+.Op Fl eei | Fl eei
 .Op Fl bbb | Fl nbbb
 .Ek
 .Op Fl \&bc | Fl nbc
@@ -126,6 +129,15 @@ checks to make sure that it is different
 The options listed below control the formatting style imposed by
 .Nm .
 .Bl -tag -width Op
+.It Fl bacc , nbacc
+If
+.Fl bacc
+is specified, a blank line is forced around every conditional
+compilation block.
+For example, in front of every #ifdef and after every #endif.
+Other blank lines surrounding such blocks will be swallowed.
+Default:
+.Fl nbacc  .
 .It Fl bad , nbad
 If
 .Fl bad
@@ -267,6 +279,16 @@ will have the same indentation as the pr
 statement.
 The default is
 .Fl ei .
+.It Fl eei , neei
+Enables (disables) extra indentation on continuation lines of
+the expression part of
+.Ic if
+and
+.Ic while
+statements.
+These continuation lines will be indented one extra level.
+The default is
+.Fl neei .
 .It Fl fbs , nfbs
 Enables (disables) splitting the function declaration and opening brace
 across two lines.

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 18:36:40 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 93C2E1065680;
	Sat, 10 Mar 2012 18:36:40 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7EB5C8FC12;
	Sat, 10 Mar 2012 18:36:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIae0N070815;
	Sat, 10 Mar 2012 18:36:40 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIaeLi070813;
	Sat, 10 Mar 2012 18:36:40 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203101836.q2AIaeLi070813@svn.freebsd.org>
From: Eitan Adler <eadler@FreeBSD.org>
Date: Sat, 10 Mar 2012 18:36:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232791 - stable/8/usr.bin/indent
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 18:36:40 -0000

Author: eadler
Date: Sat Mar 10 18:36:40 2012
New Revision: 232791
URL: http://svn.freebsd.org/changeset/base/232791

Log:
  MFC r232471:
  	Document the [n]eei and [n]bacc options
  
  PR:		docs/165009
  Approved by:	bcr

Modified:
  stable/8/usr.bin/indent/indent.1
Directory Properties:
  stable/8/usr.bin/indent/   (props changed)

Modified: stable/8/usr.bin/indent/indent.1
==============================================================================
--- stable/8/usr.bin/indent/indent.1	Sat Mar 10 18:36:12 2012	(r232790)
+++ stable/8/usr.bin/indent/indent.1	Sat Mar 10 18:36:40 2012	(r232791)
@@ -34,7 +34,7 @@
 .\"	@(#)indent.1	8.1 (Berkeley) 7/1/93
 .\" $FreeBSD$
 .\"
-.Dd June 29, 2004
+.Dd March 3, 2012
 .Dt INDENT 1
 .Os
 .Sh NAME
@@ -43,9 +43,12 @@
 .Sh SYNOPSIS
 .Nm
 .Op Ar input-file Op Ar output-file
+.Op Fl bacc | Fl nbacc
 .Op Fl bad | Fl nbad
 .Op Fl bap | Fl nbap
 .Bk -words
+.Op Fl ei | Fl ei
+.Op Fl eei | Fl eei
 .Op Fl bbb | Fl nbbb
 .Ek
 .Op Fl \&bc | Fl nbc
@@ -126,6 +129,15 @@ checks to make sure that it is different
 The options listed below control the formatting style imposed by
 .Nm .
 .Bl -tag -width Op
+.It Fl bacc , nbacc
+If
+.Fl bacc
+is specified, a blank line is forced around every conditional
+compilation block.
+For example, in front of every #ifdef and after every #endif.
+Other blank lines surrounding such blocks will be swallowed.
+Default:
+.Fl nbacc  .
 .It Fl bad , nbad
 If
 .Fl bad
@@ -267,6 +279,16 @@ will have the same indentation as the pr
 statement.
 The default is
 .Fl ei .
+.It Fl eei , neei
+Enables (disables) extra indentation on continuation lines of
+the expression part of
+.Ic if
+and
+.Ic while
+statements.
+These continuation lines will be indented one extra level.
+The default is
+.Fl neei .
 .It Fl fbs , nfbs
 Enables (disables) splitting the function declaration and opening brace
 across two lines.

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 18:37:01 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BE1DB1065686;
	Sat, 10 Mar 2012 18:37:01 +0000 (UTC)
	(envelope-from eadler@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A80338FC17;
	Sat, 10 Mar 2012 18:37:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIb14n070888;
	Sat, 10 Mar 2012 18:37:01 GMT (envelope-from eadler@svn.freebsd.org)
Received: (from eadler@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIb1Jq070886;
	Sat, 10 Mar 2012 18:37:01 GMT (envelope-from eadler@svn.freebsd.org)
Message-Id: <201203101837.q2AIb1Jq070886@svn.freebsd.org>
From: Eitan Adler <eadler@FreeBSD.org>
Date: Sat, 10 Mar 2012 18:37:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232792 - stable/7/usr.bin/indent
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 18:37:01 -0000

Author: eadler
Date: Sat Mar 10 18:37:01 2012
New Revision: 232792
URL: http://svn.freebsd.org/changeset/base/232792

Log:
  MFC r232471:
  	Document the [n]eei and [n]bacc options
  
  PR:		docs/165009
  Approved by:	bcr

Modified:
  stable/7/usr.bin/indent/indent.1
Directory Properties:
  stable/7/usr.bin/indent/   (props changed)

Modified: stable/7/usr.bin/indent/indent.1
==============================================================================
--- stable/7/usr.bin/indent/indent.1	Sat Mar 10 18:36:40 2012	(r232791)
+++ stable/7/usr.bin/indent/indent.1	Sat Mar 10 18:37:01 2012	(r232792)
@@ -34,7 +34,7 @@
 .\"	@(#)indent.1	8.1 (Berkeley) 7/1/93
 .\" $FreeBSD$
 .\"
-.Dd June 29, 2004
+.Dd March 3, 2012
 .Dt INDENT 1
 .Os
 .Sh NAME
@@ -43,9 +43,12 @@
 .Sh SYNOPSIS
 .Nm
 .Op Ar input-file Op Ar output-file
+.Op Fl bacc | Fl nbacc
 .Op Fl bad | Fl nbad
 .Op Fl bap | Fl nbap
 .Bk -words
+.Op Fl ei | Fl ei
+.Op Fl eei | Fl eei
 .Op Fl bbb | Fl nbbb
 .Ek
 .Op Fl \&bc | Fl nbc
@@ -126,6 +129,15 @@ checks to make sure that it is different
 The options listed below control the formatting style imposed by
 .Nm .
 .Bl -tag -width Op
+.It Fl bacc , nbacc
+If
+.Fl bacc
+is specified, a blank line is forced around every conditional
+compilation block.
+For example, in front of every #ifdef and after every #endif.
+Other blank lines surrounding such blocks will be swallowed.
+Default:
+.Fl nbacc  .
 .It Fl bad , nbad
 If
 .Fl bad
@@ -267,6 +279,16 @@ will have the same indentation as the pr
 statement.
 The default is
 .Fl ei .
+.It Fl eei , neei
+Enables (disables) extra indentation on continuation lines of
+the expression part of
+.Ic if
+and
+.Ic while
+statements.
+These continuation lines will be indented one extra level.
+The default is
+.Fl neei .
 .It Fl fbs , nfbs
 Enables (disables) splitting the function declaration and opening brace
 across two lines.

From owner-svn-src-stable@FreeBSD.ORG  Sat Mar 10 21:58:09 2012
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0351E106564A;
	Sat, 10 Mar 2012 21:58:09 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DE3A08FC0A;
	Sat, 10 Mar 2012 21:58:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ALw80E080435;
	Sat, 10 Mar 2012 21:58:08 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ALw89R080428;
	Sat, 10 Mar 2012 21:58:08 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201203102158.q2ALw89R080428@svn.freebsd.org>
From: Alexander Motin <mav@FreeBSD.org>
Date: Sat, 10 Mar 2012 21:58:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r232798 - in stable/9: share/man/man4 sys/conf
	sys/dev/sound/pci/hda sys/dev/sound/pcm sys/modules/sound/driver/hda
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	<svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>, 
	<mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
	<mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Mar 2012 21:58:09 -0000

Author: mav
Date: Sat Mar 10 21:58:08 2012
New Revision: 232798
URL: http://svn.freebsd.org/changeset/base/232798

Log:
  MFC r230130, r230181, r230312, r230326, r230331, r230451, r230465, r230488,
  r230507, r230511, r230513, r230532, r230537, r230551, r230554, r230571,
  r230574, r230585, r230641, r230768, r230807, r231024:
  Sync snd_hda(4) driver with HEAD.
  
  This includes major code refactoring, HDMI support, new volume control,
  automatic recording source selection, runtime reconfigureation, support
  for more then 4 PCM devices on controller, multichannel recording,
  additional playback/record streams, higher bandwidths support, more
  informative device names and many other things.
  
  Sponsored by:	iXsystems, Inc.

Added:
  stable/9/sys/dev/sound/pci/hda/hdaa.c
     - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdaa.c
  stable/9/sys/dev/sound/pci/hda/hdaa.h
     - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdaa.h
  stable/9/sys/dev/sound/pci/hda/hdaa_patches.c
     - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdaa_patches.c
  stable/9/sys/dev/sound/pci/hda/hdac_if.m
     - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdac_if.m
  stable/9/sys/dev/sound/pci/hda/hdacc.c
     - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdacc.c
Modified:
  stable/9/share/man/man4/snd_hda.4
  stable/9/sys/conf/files
  stable/9/sys/conf/kmod.mk
  stable/9/sys/dev/sound/pci/hda/hda_reg.h
  stable/9/sys/dev/sound/pci/hda/hdac.c
  stable/9/sys/dev/sound/pci/hda/hdac.h
  stable/9/sys/dev/sound/pci/hda/hdac_private.h
  stable/9/sys/dev/sound/pci/hda/hdac_reg.h
  stable/9/sys/dev/sound/pcm/channel.c
  stable/9/sys/modules/sound/driver/hda/Makefile
Directory Properties:
  stable/9/share/man/man4/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)

Modified: stable/9/share/man/man4/snd_hda.4
==============================================================================
--- stable/9/share/man/man4/snd_hda.4	Sat Mar 10 21:08:07 2012	(r232797)
+++ stable/9/share/man/man4/snd_hda.4	Sat Mar 10 21:58:08 2012	(r232798)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 22, 2010
+.Dd January 25, 2012
 .Dt SND_HDA 4
 .Os
 .Sh NAME
@@ -53,8 +53,9 @@ support for several logical audio device
 .Pp
 The
 .Nm
-driver is a HDA bus controller driver and HDA codecs audio functions bridge
-driver that allows the generic audio driver,
+driver includes HDA bus controller driver (hdac), HDA codec driver (hdacc)
+and HDA codecs audio functions bridge driver (hdaa) that allows
+the generic audio driver,
 .Xr sound 4 ,
 to be used with this hardware.
 Only audio functions are supported by
@@ -77,7 +78,9 @@ For example, one device for main rear 7.
 for independent headset connectors at front and one device for SPDIF or
 HDMI audio input/output.
 The assignment of audio inputs and outputs may be tuned with
-.Xr device.hints 5 .
+.Xr device.hints 5
+or
+.Xr sysctl 8 .
 The driver's verbose boot messages provide a lot of information about
 the operation of the driver and present audio setup.
 .Pp
@@ -92,19 +95,26 @@ The following variables are available at
 file:
 .Bl -tag -width ".Va hint.hdac.%d.config"-offset indent
 .It Va hint.hdac.%d.config
-Configures a range of possible options.
+Configures a range of possible controller options.
 Possible values are:
+.Dq Li 64bit ,
 .Dq Li dmapos ,
+.Dq Li msi .
+An option prefixed with
+.Dq Li no ,
+such as
+.Dq Li nomsi ,
+will do the opposite and takes precedence.
+Options can be separated by whitespace and commas.
+.It Va hint.hdac.%d.msi
+Controls MSI (Message Signaled Interrupts) support.
+.It Va hint.hdac.%d.cad%d.nid%d.config
+Same as
+.Va hint.hdaa.%d.nid%d.config
+.It Va hint.hdaa.%d.config
+Configures a range of possible audio function options.
+Possible values are:
 .Dq Li eapdinv ,
-.Dq Li gpio0 ,
-.Dq Li gpio1 ,
-.Dq Li gpio2 ,
-.Dq Li gpio3 ,
-.Dq Li gpio4 ,
-.Dq Li gpio5 ,
-.Dq Li gpio6 ,
-.Dq Li gpio7 ,
-.Dq Li gpioflush ,
 .Dq Li ivref ,
 .Dq Li ivref50 ,
 .Dq Li ivref80 ,
@@ -126,27 +136,64 @@ such as
 will do the opposite and takes precedence.
 Options can be separated by whitespace and commas.
 .Pp
+The
+.Dq Li eapdinv
+option inverts External Amplifier Power Down signal.
+The
+.Dq Li fixedrate
+denies all sampling rates except 48KHz.
+The
+.Dq Li forcestereo
+denies mono playback/recording.
+The
+.Dq Li senseinv
+option inverts jack sensing logic.
+The
+.Dq Li ivref Ns Ar X
+and
+.Dq Li ovref Ns Ar X
+options control the voltage used to power external microphones.
+.It Va hint.hdaa.%d.gpio_config
+Overrides audio function GPIO pins configuration set by BIOS.
+May be specified as a set of space-separated
+.Dq Ar num Ns = Ns Ar value
+pairs, where
+.Ar num
+is GPIO line number, and
+.Ar value
+is one of:
+.Dq Li keep ,
+.Dq Li set ,
+.Dq Li clear ,
+.Dq Li disable
+and
+.Dq Li input .
+.Pp
 .Dq Li GPIO Ns s
 are a codec's General Purpose I/O pins which system integrators sometimes
 use to control external muters, amplifiers and so on.
 If you have no sound, or sound volume is not adequate, you may have to
 experiment a bit with the GPIO setup to find the optimal setup for your
 system.
-.Pp
-The
-.Dq Li ivref Ns Ar X
-and
-.Dq Li ovref Ns Ar X
-options control the voltage used to power external microphones.
-.It Va hint.hdac.%d.msi
-Controls MSI (Message Signaled Interrupts) support.
-.It Va hint.hdac.%d.cad%d.nid%d.config
-Overrides codec pin configuration set by BIOS.
+.It Va hint.hdaa.%d.nid%d.config
+Overrides audio function pin configuration set by BIOS.
 May be specified as a 32-bit hexadecimal value with a leading
 .Dq 0x ,
 or as a set of space-separated
 .Dq Ar option Ns = Ns Ar value
 pairs.
+.It Va hint.pcm.%d.rec.autosrc
+Controls automatic recording source feature:
+.Bl -tag -compact
+.It 0
+disabled,
+.It 1
+once on attach,
+.It 2
+enabled.
+.El
+When enabled, driver will automatically set recording source of the mixer to
+connected input using jack presence detection statuses.
 .El
 .Pp
 Pin configuration is the UAA driver's main source of information about codec
@@ -165,7 +212,7 @@ The following options are supported:
 Association number.
 Associations are used to group individual pins to form a complex multi-pin
 device.
-For example, to group 4 connectors for 7.1 output, or to treat several
+For example, to group 4 connectors for 7.1 input/output, or to treat several
 input connectors as sources for the same input device.
 Association numbers can be specified as numeric values from 0 to 15.
 A value of 0 means disabled pin.
@@ -180,16 +227,22 @@ A unique, per-association number used to
 particular association.
 Sequence numbers can be specified as numeric values from 0 to 15.
 .Pp
-For output assotiations sequence numbers encode speaker pairs positions:
-0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
-Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro;
-(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1.
-.Pp
 The sequence number 15 has a special meaning for output associations.
 Output pins with this number and device type
 .Dq Ar Headphones
 will duplicate (with automatic mute if jack detection is supported) the
 first pin in that association.
+.Pp
+The sequence numbers 14 and 15 has a special meaning for input associations.
+Their presence in association defines it as multiplexed or mixed respectively.
+If none of them present and there are more then one pin in association,
+the association will provide multichannel input.
+.Pp
+For multichannel input/output assotiations sequence numbers encode
+channel pairs positions:
+0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
+Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro;
+(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1.
 .It Va device
 Device type.
 Can be specified as a number from 0 to 15 or as a name:
@@ -278,7 +331,11 @@ The following
 variables are available in addition to those available to all
 .Xr sound 4
 devices:
-.Bl -tag -width ".Va dev.hdac.%d.polling" -offset indent
+.Bl -tag -width ".Va dev.hdaa.%d.nid%d_original" -offset indent
+.It Va dev.hdac.%d.pindump
+Setting this to a non-zero value dumps the current pin configuration, main
+capabilities and jack sense status of all audio functions on the controller
+to console and syslog.
 .It Va dev.hdac.%d.polling
 Enables polling mode.
 In this mode the driver operates by querying the device state on timer
@@ -288,11 +345,40 @@ instead of interrupts.
 Polling is disabled by default.
 Do not enable it unless you are facing weird interrupt problems or if the
 device cannot generate interrupts at all.
-.It Va dev.hdac.%d.polling_interval
-Controller/Jack Sense polling interval (1-1000 ms)
-.It Va dev.hdac.%d.pindump
-Setting this to a non-zero value dumps the current pin configuration, main
-capabilities and jack sense status to console and syslog.
+.It Va dev.hdaa.%d.config
+Run-time equivalent of the
+.Va hint.hdaa.%d.config
+tunable.
+.It Va dev.hdaa.%d.gpi_state
+Current state of GPI lines.
+.It Va dev.hdaa.%d.gpio_state
+Current state of GPIO lines.
+.It Va dev.hdaa.%d.gpio_config
+Run-time equivalent of the
+.Va hint.hdaa.%d.gpio.config
+tunable.
+.It Va dev.hdaa.%d.gpo_state
+Current state of GPO lines.
+.It Va dev.hdaa.%d.nid%d_config
+Run-time equivalent of the
+.Va hint.hdaa.%d.nid%d.config
+tunable.
+.It Va dev.hdaa.%d.nid%d_original
+Original pin configuration written by BIOS.
+.It Va dev.hdaa.%d.reconfig
+Setting this to a non-zero value makes driver to destroy existing pcm devices
+and process new pins configuration set via
+.Va dev.hdaa.%d.nid%d_config.
+.It Va dev.pcm.%d.play.32bit , dev.pcm.%d.rec.32bit
+HDA controller uses 32bit representation for all samples of more then 16 bits.
+These variables allow to specify how many bits of these 32 should be
+used by CODEC.
+Depending on codec capabilities, possible values are 20, 24 and 32 bit.
+The default value is 24.
+.It Va dev.pcm.%d.rec.autosrc
+Run-time equivalent of the
+.Va hint.pcm.%d.rec.autosrc
+tunable.
 .El
 .Sh EXAMPLES
 Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example.
@@ -307,22 +393,23 @@ So high codec uniformity and flexibility
 different ways, depending on requested pins usage described by pins configuration.
 The driver reports such default pin configuration when verbose messages enabled:
 .Bd -literal
-hdac0: nid 20 0x01014020 as  2 seq  0   Line-out  Jack jack 1 loc  1 color   Green misc 0
-hdac0: nid 21 0x99130110 as  1 seq  0    Speaker Fixed jack 3 loc 25 color Unknown misc 1
-hdac0: nid 22 0x411111f0 as 15 seq  0    Speaker  None jack 1 loc  1 color   Black misc 1
-hdac0: nid 23 0x411111f0 as 15 seq  0    Speaker  None jack 1 loc  1 color   Black misc 1
-hdac0: nid 24 0x01a19830 as  3 seq  0        Mic  Jack jack 1 loc  1 color    Pink misc 8
-hdac0: nid 25 0x02a1983f as  3 seq 15        Mic  Jack jack 1 loc  2 color    Pink misc 8
-hdac0: nid 26 0x01813031 as  3 seq  1    Line-in  Jack jack 1 loc  1 color    Blue misc 0
-hdac0: nid 27 0x0221401f as  1 seq 15 Headphones  Jack jack 1 loc  2 color   Green misc 0
-hdac0: nid 28 0x411111f0 as 15 seq  0    Speaker  None jack 1 loc  1 color   Black misc 1
-hdac0: nid 30 0x411111f0 as 15 seq  0    Speaker  None jack 1 loc  1 color   Black misc 1
-hdac0: nid 31 0x411111f0 as 15 seq  0    Speaker  None jack 1 loc  1 color   Black misc 1
+hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
+hdaa0: 20 01014020 2  0  Line-out      Jack  1/8     Rear       Green   0
+hdaa0: 21 99130110 1  0  Speaker       Fixed ATAPI   Onboard    Unknown 1
+hdaa0: 22 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
+hdaa0: 23 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
+hdaa0: 24 01a19830 3  0  Mic           Jack  1/8     Rear       Pink    8
+hdaa0: 25 02a1983f 3  15 Mic           Jack  1/8     Front      Pink    8
+hdaa0: 26 01813031 3  1  Line-in       Jack  1/8     Rear       Blue    0
+hdaa0: 27 0221401f 1  15 Headphones    Jack  1/8     Front      Green   0
+hdaa0: 28 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
+hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
+hdaa0: 31 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
 .Ed
 .Pp
 Here we can see, that the nodes with ID (nid) 25 and 27 are front panel
-connectors (Jack, loc 2), nids 20, 24 and 26 are rear panel connectors
-(Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25).
+connectors (Jack, Front), nids 20, 24 and 26 are rear panel connectors
+(Jack, Rear) and nid 21 is a built-in speaker (Fixed, Onboard).
 Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None"
 connectivity. So the pin count and description matches to connectors that
 we have.
@@ -330,15 +417,15 @@ we have.
 Using association (as) and sequence (seq) fields values pins are grouped into
 3 associations:
 .Bd -literal
-hdac0: Association 0 (1) out:
-hdac0:   Pin nid=21 seq=0
-hdac0:   Pin nid=27 seq=15
-hdac0: Association 1 (2) out:
-hdac0:   Pin nid=20 seq=0
-hdac0: Association 2 (3) in:
-hdac0:   Pin nid=24 seq=0
-hdac0:   Pin nid=26 seq=1
-hdac0:   Pin nid=25 seq=15
+hdaa0: Association 0 (1) out:
+hdaa0:   Pin nid=21 seq=0
+hdaa0:   Pin nid=27 seq=15
+hdaa0: Association 1 (2) out:
+hdaa0:   Pin nid=20 seq=0
+hdaa0: Association 2 (3) in:
+hdaa0:   Pin nid=24 seq=0
+hdaa0:   Pin nid=26 seq=1
+hdaa0:   Pin nid=25 seq=15
 .Ed
 .Pp
 Each
@@ -497,148 +584,14 @@ Most of controls use logarithmic scale.
 .Sh HARDWARE
 The
 .Nm
-driver supports many Intel HDA compatible audio chipsets including the
-following:
+driver supports controllers having PCI class 4 (multimedia) and
+subclass 3 (HDA), compatible with Intel HDA specification.
 .Pp
-.Bl -bullet -compact
-.It
-ATI SB450
-.It
-ATI SB600
-.It
-Intel 631x/632xESB
-.It
-Intel 82801F (ICH6)
-.It
-Intel 82801G (ICH7)
-.It
-Intel 82801H (ICH8)
-.It
-Intel 82801I (ICH9)
-.It
-Intel 82801J (ICH10)
-.It
-Intel US15W (SCH)
-.It
-nVidia MCP51
-.It
-nVidia MCP55
-.It
-nVidia MCP61A
-.It
-nVidia MCP61B
-.It
-nVidia MCP63
-.It
-nVidia MCP65A
-.It
-nVidia MCP65B
-.It
-nVidia MCP67A
-.It
-nVidia MCP67B
-.It
-nVidia MCP68
-.It
-nVidia MCP69
-.It
-nVidia MCP73
-.It
-nVidia MCP78
-.It
-nVidia MCP79
-.It
-nVidia MCP89
-.It
-SiS 966
-.It
-VIA VT8251/8237A
-.El
-.Pp
-The following and many other codecs have been verified to work:
-.Pp
-.Bl -bullet -compact
-.It
-Analog Devices AD1981HD
-.It
-Analog Devices AD1983
-.It
-Analog Devices AD1984
-.It
-Analog Devices AD1986A
-.It
-Analog Devices AD1988
-.It
-Analog Devices AD1988B
-.It
-CMedia CMI9880
-.It
-Conexant CX20549 (Venice)
-.It
-Conexant CX20551 (Waikiki)
-.It
-Conexant CX20561 (Hermosa)
-.It
-Realtek ALC260
-.It
-Realtek ALC262
-.It
-Realtek ALC268
-.It
-Realtek ALC660
-.It
-Realtek ALC861
-.It
-Realtek ALC861VD
-.It
-Realtek ALC880
-.It
-Realtek ALC882
-.It
-Realtek ALC883
-.It
-Realtek ALC885
-.It
-Realtek ALC888
-.It
-Realtek ALC889
-.It
-Sigmatel STAC9205
-.It
-Sigmatel STAC9220
-.It
-Sigmatel STAC9220D / 9223D
-.It
-Sigmatel STAC9221
-.It
-Sigmatel STAC9221D
-.It
-Sigmatel STAC9227D
-.It
-Sigmatel STAC9227X
-.It
-Sigmatel STAC9228D
-.It
-Sigmatel STAC9228X
-.It
-Sigmatel STAC9229D
-.It
-Sigmatel STAC9229X
-.It
-Sigmatel STAC9230D
-.It
-Sigmatel STAC9230X
-.It
-Sigmatel STAC9271D
-.It
-Sigmatel STAC9872AK
-.It
-VIA VT1708
-.It
-VIA VT1708B
-.It
-VIA VT1709
-.El
+The
+.Nm
+driver supports more then two hundred different controllers and CODECs.
+There is no sense to list all of them here, as in most cases specific CODEC
+configuration and wiring are more important then type of the CODEC itself.
 .Sh SEE ALSO
 .Xr sound 4 ,
 .Xr snd_ich 4 ,
@@ -665,19 +618,17 @@ This manual page was written by
 and
 .An Giorgos Keramidas Aq keramida@FreeBSD.org .
 .Sh BUGS
-A few Hardware/OEM vendors tend to screw up BIOS settings, thus
-rendering the
-.Nm
-driver useless.
-This usually results in a state where the
+Some Hardware/OEM vendors tend to screw up BIOS settings or use custom
+unusual CODEC wiring that create problems to the driver.
+This may result in missing pcm devices, or a state where the
 .Nm
 driver seems to attach and work, but no sound is played.
 Some cases can be solved by tuning
 .Pa loader.conf
 variables.
-Before trying to fix problem that way, make sure that there really is a problem
-and that the PCM audio device in use really corresponds to the expected
-audio connector.
+But before trying to fix problem that way, make sure that there really is
+a problem and that the PCM audio device in use really corresponds to the
+expected audio connector.
 .Pp
 Some vendors use non-standardized General Purpose I/O (GPIO) pins of the codec
 to control external amplifiers.

Modified: stable/9/sys/conf/files
==============================================================================
--- stable/9/sys/conf/files	Sat Mar 10 21:08:07 2012	(r232797)
+++ stable/9/sys/conf/files	Sat Mar 10 21:58:08 2012	(r232798)
@@ -1749,7 +1749,11 @@ dev/sound/pci/t4dwave.c		optional snd_t4
 dev/sound/pci/via8233.c		optional snd_via8233 pci
 dev/sound/pci/via82c686.c	optional snd_via82c686 pci
 dev/sound/pci/vibes.c		optional snd_vibes pci
+dev/sound/pci/hda/hdaa.c	optional snd_hda pci
+dev/sound/pci/hda/hdaa_patches.c	optional snd_hda pci
 dev/sound/pci/hda/hdac.c	optional snd_hda pci
+dev/sound/pci/hda/hdac_if.m	optional snd_hda pci
+dev/sound/pci/hda/hdacc.c	optional snd_hda pci
 dev/sound/pcm/ac97.c		optional sound
 dev/sound/pcm/ac97_if.m		optional sound
 dev/sound/pcm/ac97_patch.c	optional sound

Modified: stable/9/sys/conf/kmod.mk
==============================================================================
--- stable/9/sys/conf/kmod.mk	Sat Mar 10 21:08:07 2012	(r232797)
+++ stable/9/sys/conf/kmod.mk	Sat Mar 10 21:58:08 2012	(r232798)
@@ -348,6 +348,7 @@ MFILES?= dev/acpica/acpi_if.m dev/acpi_s
 	dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \
 	dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \
 	dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \
+	dev/sound/pci/hda/hdac_if.m \
 	dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \
 	dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m \
 	dev/sound/midi/mpu_if.m dev/sound/midi/mpufoi_if.m \

Modified: stable/9/sys/dev/sound/pci/hda/hda_reg.h
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hda_reg.h	Sat Mar 10 21:08:07 2012	(r232797)
+++ stable/9/sys/dev/sound/pci/hda/hda_reg.h	Sat Mar 10 21:58:08 2012	(r232798)
@@ -400,7 +400,7 @@
     HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG_SHIFT)
 
 #define HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE		0x80
-#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK	0x1f
+#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK	0x3f
 #define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_SHIFT	0
 
 #define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG(param)			\
@@ -418,14 +418,11 @@
     (HDA_CMD_12BIT((cad), (nid),					\
     HDA_CMD_VERB_SET_PIN_SENSE, (payload)))
 
-#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_MASK	0x80000000
-#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_SHIFT	31
+#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT		0x80000000
+#define HDA_CMD_GET_PIN_SENSE_ELD_VALID			0x40000000
 #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK		0x7fffffff
 #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT		0
 
-#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(rsp)			\
-    (((rsp) & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_MASK) >>		\
-    HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_SHIFT)
 #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE(rsp)				\
     (((rsp) & HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK) >>			\
     HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT)
@@ -679,17 +676,47 @@
     HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload)))
 
 #define HDA_CMD_VERB_GET_HDMI_DIP_SIZE			0xf2e 
+
+#define HDA_CMD_GET_HDMI_DIP_SIZE(cad, nid, arg)			\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_GET_HDMI_DIP_SIZE, (arg)))
+
 #define HDA_CMD_VERB_GET_HDMI_ELDD			0xf2f 
 
+#define HDA_CMD_GET_HDMI_ELDD(cad, nid, off)				\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_GET_HDMI_ELDD, (off)))
+
 #define HDA_CMD_VERB_GET_HDMI_DIP_INDEX			0xf30 
 #define HDA_CMD_VERB_SET_HDMI_DIP_INDEX			0x730 
 
+#define HDA_CMD_GET_HDMI_DIP_INDEX(cad, nid)				\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_GET_HDMI_DIP_INDEX, 0x0))
+#define HDA_CMD_SET_HDMI_DIP_INDEX(cad, nid, payload)			\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_SET_HDMI_DIP_INDEX, (payload)))
+
 #define HDA_CMD_VERB_GET_HDMI_DIP_DATA			0xf31 
 #define HDA_CMD_VERB_SET_HDMI_DIP_DATA			0x731 
 
+#define HDA_CMD_GET_HDMI_DIP_DATA(cad, nid)				\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_GET_HDMI_DIP_DATA, 0x0))
+#define HDA_CMD_SET_HDMI_DIP_DATA(cad, nid, payload)			\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_SET_HDMI_DIP_DATA, (payload)))
+
 #define HDA_CMD_VERB_GET_HDMI_DIP_XMIT			0xf32 
 #define HDA_CMD_VERB_SET_HDMI_DIP_XMIT			0x732 
 
+#define HDA_CMD_GET_HDMI_DIP_XMIT(cad, nid)				\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_GET_HDMI_DIP_XMIT, 0x0))
+#define HDA_CMD_SET_HDMI_DIP_XMIT(cad, nid, payload)			\
+    (HDA_CMD_12BIT((cad), (nid),					\
+    HDA_CMD_VERB_SET_HDMI_DIP_XMIT, (payload)))
+
 #define HDA_CMD_VERB_GET_HDMI_CP_CTRL			0xf33 
 #define HDA_CMD_VERB_SET_HDMI_CP_CTRL			0x733 
 
@@ -703,6 +730,23 @@
     (HDA_CMD_12BIT((cad), (nid),					\
     HDA_CMD_VERB_SET_HDMI_CHAN_SLOT, (payload)))
 
+#define	HDA_HDMI_CODING_TYPE_REF_STREAM_HEADER		0
+#define	HDA_HDMI_CODING_TYPE_LPCM			1
+#define	HDA_HDMI_CODING_TYPE_AC3			2
+#define	HDA_HDMI_CODING_TYPE_MPEG1			3
+#define	HDA_HDMI_CODING_TYPE_MP3			4
+#define	HDA_HDMI_CODING_TYPE_MPEG2			5
+#define	HDA_HDMI_CODING_TYPE_AACLC			6
+#define	HDA_HDMI_CODING_TYPE_DTS			7
+#define	HDA_HDMI_CODING_TYPE_ATRAC			8
+#define	HDA_HDMI_CODING_TYPE_SACD			9
+#define	HDA_HDMI_CODING_TYPE_EAC3			10
+#define	HDA_HDMI_CODING_TYPE_DTS_HD			11
+#define	HDA_HDMI_CODING_TYPE_MLP			12
+#define	HDA_HDMI_CODING_TYPE_DST			13
+#define	HDA_HDMI_CODING_TYPE_WMAPRO			14
+#define	HDA_HDMI_CODING_TYPE_REF_CTX			15
+
 /* Function Reset */
 #define HDA_CMD_VERB_FUNCTION_RESET			0x7ff
 

Copied and modified: stable/9/sys/dev/sound/pci/hda/hdaa.c (from r230130, head/sys/dev/sound/pci/hda/hdaa.c)
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa.c	Sun Jan 15 13:21:36 2012	(r230130, copy source)
+++ stable/9/sys/dev/sound/pci/hda/hdaa.c	Sat Mar 10 21:58:08 2012	(r232798)
@@ -74,17 +74,6 @@ static const struct {
 #define HDAA_QUIRKS_TAB_LEN	\
 		(sizeof(hdaa_quirks_tab) / sizeof(hdaa_quirks_tab[0]))
 
-#define HDA_BDL_MIN	2
-#define HDA_BDL_MAX	256
-#define HDA_BDL_DEFAULT	HDA_BDL_MIN
-
-#define HDA_BLK_MIN	HDA_DMA_ALIGNMENT
-#define HDA_BLK_ALIGN	(~(HDA_BLK_MIN - 1))
-
-#define HDA_BUFSZ_MIN		4096
-#define HDA_BUFSZ_MAX		65536
-#define HDA_BUFSZ_DEFAULT	16384
-
 #define HDA_PARSE_MAXDEPTH	10
 
 MALLOC_DEFINE(M_HDAA, "hdaa", "HDA Audio");
@@ -116,6 +105,12 @@ const char *HDA_LOCS[64] = {
 const char *HDA_GPIO_ACTIONS[8] = {
     "keep", "set", "clear", "disable", "input", "0x05", "0x06", "0x07"};
 
+const char *HDA_HDMI_CODING_TYPES[18] = {
+    "undefined", "LPCM", "AC-3", "MPEG1", "MP3", "MPEG2", "AAC-LC", "DTS",
+    "ATRAC", "DSD", "E-AC-3", "DTS-HD", "MLP", "DST", "WMAPro", "HE-AAC",
+    "HE-AACv2", "MPEG-Surround"
+};
+
 /* Default */
 static uint32_t hdaa_fmt[] = {
 	SND_FORMAT(AFMT_S16_LE, 2, 0),
@@ -169,6 +164,8 @@ static const struct {
 };
 #define HDA_RATE_TAB_LEN (sizeof(hda_rate_tab) / sizeof(hda_rate_tab[0]))
 
+const static char *ossnames[] = SOUND_DEVICE_NAMES;
+
 /****************************************************************************
  * Function prototypes
  ****************************************************************************/
@@ -187,7 +184,6 @@ static void	hdaa_dump_pin_config(struct 
 static char *
 hdaa_audio_ctl_ossmixer_mask2allname(uint32_t mask, char *buf, size_t len)
 {
-	static char *ossname[] = SOUND_DEVICE_NAMES;
 	int i, first = 1;
 
 	bzero(buf, len);
@@ -195,7 +191,7 @@ hdaa_audio_ctl_ossmixer_mask2allname(uin
 		if (mask & (1 << i)) {
 			if (first == 0)
 				strlcat(buf, ", ", len);
-			strlcat(buf, ossname[i], len);
+			strlcat(buf, ossnames[i], len);
 			first = 0;
 		}
 	}
@@ -243,49 +239,30 @@ hdaa_audio_ctl_amp_get(struct hdaa_devin
 }
 
 /*
- * Jack detection (Speaker/HP redirection) event handler.
+ * Headphones redirection change handler.
  */
 static void
-hdaa_hp_switch_handler(struct hdaa_devinfo *devinfo, int asid)
+hdaa_hpredir_handler(struct hdaa_widget *w)
 {
-	struct hdaa_audio_as *as;
-	struct hdaa_widget *w;
+	struct hdaa_devinfo *devinfo = w->devinfo;
+	struct hdaa_audio_as *as = &devinfo->as[w->bindas];
+	struct hdaa_widget *w1;
 	struct hdaa_audio_ctl *ctl;
-	uint32_t val, res;
-	int j;
-
-	as = &devinfo->as[asid];
-	if (as->hpredir < 0)
-		return;
-
-	w = hdaa_widget_get(devinfo, as->pins[15]);
-	if (w == NULL || w->enable == 0 || w->type !=
-	    HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
-		return;
-
-	res = hda_command(devinfo->dev,
-	    HDA_CMD_GET_PIN_SENSE(0, as->pins[15]));
-
-	HDA_BOOTVERBOSE(
-		device_printf(devinfo->dev,
-		    "Pin sense: nid=%d sence=0x%08x",
-		    as->pins[15], res);
-	);
-
-	res = (res & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT) != 0;
-	if (devinfo->quirks & HDAA_QUIRK_SENSEINV)
-		res ^= 1;
+	uint32_t val;
+	int j, connected = w->wclass.pin.connected;
 
 	HDA_BOOTVERBOSE(
-		printf(" %sconnected\n", res == 0 ? "dis" : "");
+		device_printf((as->pdevinfo && as->pdevinfo->dev) ?
+		    as->pdevinfo->dev : devinfo->dev,
+		    "Redirect output to: %s\n",
+		    connected ? "headphones": "main");
 	);
-
 	/* (Un)Mute headphone pin. */
 	ctl = hdaa_audio_ctl_amp_get(devinfo,
-	    as->pins[15], HDAA_CTL_IN, -1, 1);
+	    w->nid, HDAA_CTL_IN, -1, 1);
 	if (ctl != NULL && ctl->mute) {
 		/* If pin has muter - use it. */
-		val = (res != 0) ? 0 : 1;
+		val = connected ? 0 : 1;
 		if (val != ctl->forcemute) {
 			ctl->forcemute = val;
 			hdaa_audio_ctl_amp_set(ctl,
@@ -294,21 +271,17 @@ hdaa_hp_switch_handler(struct hdaa_devin
 		}
 	} else {
 		/* If there is no muter - disable pin output. */
-		w = hdaa_widget_get(devinfo, as->pins[15]);
-		if (w != NULL && w->type ==
-		    HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
-			if (res != 0)
-				val = w->wclass.pin.ctrl |
-				    HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
-			else
-				val = w->wclass.pin.ctrl &
-				    ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
-			if (val != w->wclass.pin.ctrl) {
-				w->wclass.pin.ctrl = val;
-				hda_command(devinfo->dev,
-				    HDA_CMD_SET_PIN_WIDGET_CTRL(0,
-				    w->nid, w->wclass.pin.ctrl));
-			}
+		if (connected)
+			val = w->wclass.pin.ctrl |
+			    HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
+		else
+			val = w->wclass.pin.ctrl &
+			    ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
+		if (val != w->wclass.pin.ctrl) {
+			w->wclass.pin.ctrl = val;
+			hda_command(devinfo->dev,
+			    HDA_CMD_SET_PIN_WIDGET_CTRL(0,
+			    w->nid, w->wclass.pin.ctrl));
 		}
 	}
 	/* (Un)Mute other pins. */
@@ -319,7 +292,7 @@ hdaa_hp_switch_handler(struct hdaa_devin
 		    as->pins[j], HDAA_CTL_IN, -1, 1);
 		if (ctl != NULL && ctl->mute) {
 			/* If pin has muter - use it. */
-			val = (res != 0) ? 1 : 0;
+			val = connected ? 1 : 0;
 			if (val == ctl->forcemute)
 				continue;
 			ctl->forcemute = val;
@@ -329,32 +302,142 @@ hdaa_hp_switch_handler(struct hdaa_devin
 			continue;
 		}
 		/* If there is no muter - disable pin output. */
-		w = hdaa_widget_get(devinfo, as->pins[j]);
-		if (w != NULL && w->type ==
-		    HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
-			if (res != 0)
-				val = w->wclass.pin.ctrl &
+		w1 = hdaa_widget_get(devinfo, as->pins[j]);
+		if (w1 != NULL) {
+			if (connected)
+				val = w1->wclass.pin.ctrl &
 				    ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
 			else
-				val = w->wclass.pin.ctrl |
+				val = w1->wclass.pin.ctrl |
 				    HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE;
-			if (val != w->wclass.pin.ctrl) {
-				w->wclass.pin.ctrl = val;
+			if (val != w1->wclass.pin.ctrl) {
+				w1->wclass.pin.ctrl = val;
 				hda_command(devinfo->dev,
 				    HDA_CMD_SET_PIN_WIDGET_CTRL(0,
-				    w->nid, w->wclass.pin.ctrl));
+				    w1->nid, w1->wclass.pin.ctrl));
 			}
 		}
 	}
 }
 
 /*
- * Callback for poll based jack detection.
+ * Recording source change handler.
+ */
+static void
+hdaa_autorecsrc_handler(struct hdaa_audio_as *as, struct hdaa_widget *w)
+{
+	struct hdaa_pcm_devinfo *pdevinfo = as->pdevinfo;
+	struct hdaa_devinfo *devinfo;
+	struct hdaa_widget *w1;
+	int i, mask, fullmask, prio, bestprio;
+	char buf[128];
+
+	if (!as->mixed || pdevinfo == NULL || pdevinfo->mixer == NULL)
+		return;
+	/* Don't touch anything if we asked not to. */
+	if (pdevinfo->autorecsrc == 0 ||
+	    (pdevinfo->autorecsrc == 1 && w != NULL))
+		return;
+	/* Don't touch anything if "mix" or "speaker" selected. */
+	if (pdevinfo->recsrc & (SOUND_MASK_IMIX | SOUND_MASK_SPEAKER))
+		return;
+	/* Don't touch anything if several selected. */
+	if (ffs(pdevinfo->recsrc) != fls(pdevinfo->recsrc))
+		return;
+	devinfo = pdevinfo->devinfo;
+	mask = fullmask = 0;
+	bestprio = 0;
+	for (i = 0; i < 16; i++) {
+		if (as->pins[i] <= 0)
+			continue;
+		w1 = hdaa_widget_get(devinfo, as->pins[i]);
+		if (w1 == NULL || w1->enable == 0)
+			continue;
+		if (w1->wclass.pin.connected == 0)
+			continue;
+		prio = (w1->wclass.pin.connected == 1) ? 2 : 1;
+		if (prio < bestprio)
+			continue;
+		if (prio > bestprio) {
+			mask = 0;
+			bestprio = prio;
+		}
+		mask |= (1 << w1->ossdev);
+		fullmask |= (1 << w1->ossdev);
+	}
+	if (mask == 0)
+		return;
+	/* Prefer newly connected input. */
+	if (w != NULL && (mask & (1 << w->ossdev)))
+		mask = (1 << w->ossdev);
+	/* Prefer previously selected input */
+	if (mask & pdevinfo->recsrc)
+		mask &= pdevinfo->recsrc;
+	/* Prefer mic. */
+	if (mask & SOUND_MASK_MIC)
+		mask = SOUND_MASK_MIC;
+	/* Prefer monitor (2nd mic). */
+	if (mask & SOUND_MASK_MONITOR)
+		mask = SOUND_MASK_MONITOR;
+	/* Just take first one. */
+	mask = (1 << (ffs(mask) - 1));
+	HDA_BOOTVERBOSE(
+		hdaa_audio_ctl_ossmixer_mask2allname(mask, buf, sizeof(buf));
+		device_printf(pdevinfo->dev,
+		    "Automatically set rec source to: %s\n", buf);
+	);
+	hdaa_unlock(devinfo);
+	mix_setrecsrc(pdevinfo->mixer, mask);
+	hdaa_lock(devinfo);
+}
+
+/*
+ * Jack presence detection event handler.
+ */
+static void
+hdaa_presence_handler(struct hdaa_widget *w)
+{
+	struct hdaa_devinfo *devinfo = w->devinfo;
+	struct hdaa_audio_as *as;
+	uint32_t res;
+	int connected;
+
+	if (w->enable == 0 || w->type !=
+	    HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+		return;
+
+	if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 ||
+	    (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0)
+		return;
+
+	res = hda_command(devinfo->dev, HDA_CMD_GET_PIN_SENSE(0, w->nid));
+	connected = (res & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT) != 0;
+	if (devinfo->quirks & HDAA_QUIRK_SENSEINV)
+		connected = !connected;
+	if (connected == w->wclass.pin.connected)
+		return;
+	w->wclass.pin.connected = connected;
+	HDA_BOOTVERBOSE(
+		device_printf(devinfo->dev,
+		    "Pin sense: nid=%d sence=0x%08x (%sconnected)\n",
+		    w->nid, res, !w->wclass.pin.connected ? "dis" : "");
+	);
+
+	as = &devinfo->as[w->bindas];
+	if (as->hpredir >= 0 && as->pins[15] == w->nid)
+		hdaa_hpredir_handler(w);
+	if (as->dir == HDAA_CTL_IN)
+		hdaa_autorecsrc_handler(as, w);
+}
+
+/*
+ * Callback for poll based presence detection.
  */
 static void
 hdaa_jack_poll_callback(void *arg)
 {
 	struct hdaa_devinfo *devinfo = arg;
+	struct hdaa_widget *w;
 	int i;
 
 	hdaa_lock(devinfo);
@@ -365,56 +448,203 @@ hdaa_jack_poll_callback(void *arg)
 	for (i = 0; i < devinfo->ascnt; i++) {
 		if (devinfo->as[i].hpredir < 0)
 			continue;
-		hdaa_hp_switch_handler(devinfo, i);
+		w = hdaa_widget_get(devinfo, devinfo->as[i].pins[15]);
+		if (w == NULL || w->enable == 0 || w->type !=
+		    HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX)
+			continue;
+		hdaa_presence_handler(w);
 	}
 	callout_reset(&devinfo->poll_jack, devinfo->poll_ival,
 	    hdaa_jack_poll_callback, devinfo);
 	hdaa_unlock(devinfo);
 }
 
+static void
+hdaa_eld_dump(struct hdaa_widget *w)
+{
+	struct hdaa_devinfo *devinfo = w->devinfo;
+	device_t dev = devinfo->dev;
+	uint8_t *sad;
+	int len, mnl, i, sadc, fmt;
+
+	if (w->eld == NULL || w->eld_len < 4)
+		return;
+	device_printf(dev,
+	    "ELD nid=%d: ELD_Ver=%u Baseline_ELD_Len=%u\n",
+	    w->nid, w->eld[0] >> 3, w->eld[2]);
+	if ((w->eld[0] >> 3) != 0x02)
+		return;
+	len = min(w->eld_len, (u_int)w->eld[2] * 4);
+	mnl = w->eld[4] & 0x1f;
+	device_printf(dev,
+	    "ELD nid=%d: CEA_EDID_Ver=%u MNL=%u\n",
+	    w->nid, w->eld[4] >> 5, mnl);
+	sadc = w->eld[5] >> 4;
+	device_printf(dev,
+	    "ELD nid=%d: SAD_Count=%u Conn_Type=%u S_AI=%u HDCP=%u\n",
+	    w->nid, sadc, (w->eld[5] >> 2) & 0x3,
+	    (w->eld[5] >> 1) & 0x1, w->eld[5] & 0x1);
+	device_printf(dev,
+	    "ELD nid=%d: Aud_Synch_Delay=%ums\n",
+	    w->nid, w->eld[6] * 2);
+	device_printf(dev,
+	    "ELD nid=%d: Channels=0x%b\n",
+	    w->nid, w->eld[7],
+	    "\020\07RLRC\06FLRC\05RC\04RLR\03FC\02LFE\01FLR");
+	device_printf(dev,
+	    "ELD nid=%d: Port_ID=0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
+	    w->nid, w->eld[8], w->eld[9], w->eld[10], w->eld[11],
+	    w->eld[12], w->eld[13], w->eld[14], w->eld[15]);
+	device_printf(dev,
+	    "ELD nid=%d: Manufacturer_Name=0x%02x%02x\n",
+	    w->nid, w->eld[16], w->eld[17]);
+	device_printf(dev,
+	    "ELD nid=%d: Product_Code=0x%02x%02x\n",
+	    w->nid, w->eld[18], w->eld[19]);
+	device_printf(dev,
+	    "ELD nid=%d: Monitor_Name_String='%.*s'\n",
+	    w->nid, mnl, &w->eld[20]);
+	for (i = 0; i < sadc; i++) {
+		sad = &w->eld[20 + mnl + i * 3];
+		fmt = (sad[0] >> 3) & 0x0f;
+		if (fmt == HDA_HDMI_CODING_TYPE_REF_CTX) {
+			fmt = (sad[2] >> 3) & 0x1f;
+			if (fmt < 1 || fmt > 3)
+				fmt = 0;
+			else
+				fmt += 14;
+		}
+		device_printf(dev,
+		    "ELD nid=%d: %s %dch freqs=0x%b",

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***