Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 May 2011 01:44:13 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r222156 - in projects/largeSMP: bin/sh contrib/top share/man/man4 share/mk sys/dev/atkbdc sys/dev/gem sys/dev/vge sys/net sys/netinet sys/netinet6 sys/vm tools/regression/bin/sh/builtin...
Message-ID:  <201105210144.p4L1iDMT009353@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Sat May 21 01:44:13 2011
New Revision: 222156
URL: http://svn.freebsd.org/changeset/base/222156

Log:
  MFC

Added:
  projects/largeSMP/tools/regression/bin/sh/builtins/cd3.0
     - copied unchanged from r222155, head/tools/regression/bin/sh/builtins/cd3.0
  projects/largeSMP/tools/regression/bin/sh/builtins/cd4.0
     - copied unchanged from r222155, head/tools/regression/bin/sh/builtins/cd4.0
  projects/largeSMP/tools/regression/bin/sh/parser/heredoc11.0
     - copied unchanged from r222155, head/tools/regression/bin/sh/parser/heredoc11.0
Modified:
  projects/largeSMP/bin/sh/cd.c
  projects/largeSMP/bin/sh/parser.c
  projects/largeSMP/bin/sh/sh.1
  projects/largeSMP/share/man/man4/atkbd.4
  projects/largeSMP/sys/dev/atkbdc/atkbd.c
  projects/largeSMP/sys/dev/atkbdc/atkbdreg.h
  projects/largeSMP/sys/dev/gem/if_gem.c
  projects/largeSMP/sys/dev/vge/if_vge.c
  projects/largeSMP/sys/net/if_llatbl.c
  projects/largeSMP/sys/net/if_llatbl.h
  projects/largeSMP/sys/netinet/in.c
  projects/largeSMP/sys/netinet/in_var.h
  projects/largeSMP/sys/netinet/raw_ip.c
  projects/largeSMP/sys/netinet6/in6.c
  projects/largeSMP/sys/vm/uma_int.h
  projects/largeSMP/usr.bin/top/machine.c
  projects/largeSMP/usr.sbin/tzsetup/tzsetup.8
  projects/largeSMP/usr.sbin/tzsetup/tzsetup.c
Directory Properties:
  projects/largeSMP/   (props changed)
  projects/largeSMP/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/contrib/bind9/   (props changed)
  projects/largeSMP/contrib/binutils/   (props changed)
  projects/largeSMP/contrib/bzip2/   (props changed)
  projects/largeSMP/contrib/dialog/   (props changed)
  projects/largeSMP/contrib/ee/   (props changed)
  projects/largeSMP/contrib/expat/   (props changed)
  projects/largeSMP/contrib/file/   (props changed)
  projects/largeSMP/contrib/gcc/   (props changed)
  projects/largeSMP/contrib/gdb/   (props changed)
  projects/largeSMP/contrib/gdtoa/   (props changed)
  projects/largeSMP/contrib/gnu-sort/   (props changed)
  projects/largeSMP/contrib/groff/   (props changed)
  projects/largeSMP/contrib/less/   (props changed)
  projects/largeSMP/contrib/libpcap/   (props changed)
  projects/largeSMP/contrib/libstdc++/   (props changed)
  projects/largeSMP/contrib/llvm/   (props changed)
  projects/largeSMP/contrib/llvm/tools/clang/   (props changed)
  projects/largeSMP/contrib/ncurses/   (props changed)
  projects/largeSMP/contrib/netcat/   (props changed)
  projects/largeSMP/contrib/ntp/   (props changed)
  projects/largeSMP/contrib/one-true-awk/   (props changed)
  projects/largeSMP/contrib/openbsm/   (props changed)
  projects/largeSMP/contrib/openpam/   (props changed)
  projects/largeSMP/contrib/pf/   (props changed)
  projects/largeSMP/contrib/sendmail/   (props changed)
  projects/largeSMP/contrib/tcpdump/   (props changed)
  projects/largeSMP/contrib/tcsh/   (props changed)
  projects/largeSMP/contrib/top/   (props changed)
  projects/largeSMP/contrib/top/install-sh   (props changed)
  projects/largeSMP/contrib/tzcode/stdtime/   (props changed)
  projects/largeSMP/contrib/tzcode/zic/   (props changed)
  projects/largeSMP/contrib/tzdata/   (props changed)
  projects/largeSMP/contrib/wpa/   (props changed)
  projects/largeSMP/contrib/xz/   (props changed)
  projects/largeSMP/crypto/openssh/   (props changed)
  projects/largeSMP/crypto/openssl/   (props changed)
  projects/largeSMP/gnu/lib/   (props changed)
  projects/largeSMP/gnu/usr.bin/binutils/   (props changed)
  projects/largeSMP/gnu/usr.bin/cc/cc_tools/   (props changed)
  projects/largeSMP/gnu/usr.bin/gdb/   (props changed)
  projects/largeSMP/lib/libc/   (props changed)
  projects/largeSMP/lib/libc/stdtime/   (props changed)
  projects/largeSMP/lib/libutil/   (props changed)
  projects/largeSMP/lib/libz/   (props changed)
  projects/largeSMP/sbin/   (props changed)
  projects/largeSMP/sbin/ipfw/   (props changed)
  projects/largeSMP/share/mk/bsd.arch.inc.mk   (props changed)
  projects/largeSMP/share/zoneinfo/   (props changed)
  projects/largeSMP/sys/   (props changed)
  projects/largeSMP/sys/amd64/include/xen/   (props changed)
  projects/largeSMP/sys/boot/   (props changed)
  projects/largeSMP/sys/boot/i386/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/ski/   (props changed)
  projects/largeSMP/sys/boot/powerpc/boot1.chrp/   (props changed)
  projects/largeSMP/sys/boot/powerpc/ofw/   (props changed)
  projects/largeSMP/sys/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/sys/conf/   (props changed)
  projects/largeSMP/sys/contrib/dev/acpica/   (props changed)
  projects/largeSMP/sys/contrib/octeon-sdk/   (props changed)
  projects/largeSMP/sys/contrib/pf/   (props changed)
  projects/largeSMP/sys/contrib/x86emu/   (props changed)
  projects/largeSMP/usr.bin/calendar/   (props changed)
  projects/largeSMP/usr.bin/csup/   (props changed)
  projects/largeSMP/usr.bin/procstat/   (props changed)
  projects/largeSMP/usr.sbin/ndiscvt/   (props changed)
  projects/largeSMP/usr.sbin/zic/   (props changed)

Modified: projects/largeSMP/bin/sh/cd.c
==============================================================================
--- projects/largeSMP/bin/sh/cd.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/bin/sh/cd.c	Sat May 21 01:44:13 2011	(r222156)
@@ -84,12 +84,16 @@ cdcmd(int argc, char **argv)
 	const char *path;
 	char *p;
 	struct stat statb;
-	int ch, phys, print = 0;
+	int ch, phys, print = 0, getcwderr = 0;
+	int rc;
 
 	optreset = 1; optind = 1; opterr = 0; /* initialize getopt */
 	phys = Pflag;
-	while ((ch = getopt(argc, argv, "LP")) != -1) {
+	while ((ch = getopt(argc, argv, "eLP")) != -1) {
 		switch (ch) {
+		case 'e':
+			getcwderr = 1;
+			break;
 		case 'L':
 			phys = 0;
 			break;
@@ -131,8 +135,9 @@ cdcmd(int argc, char **argv)
 				else
 					print = strcmp(p, dest);
 			}
-			if (docd(p, print, phys) >= 0)
-				return 0;
+			rc = docd(p, print, phys);
+			if (rc >= 0)
+				return getcwderr ? rc : 0;
 		}
 	}
 	error("can't cd to %s", dest);
@@ -148,17 +153,18 @@ cdcmd(int argc, char **argv)
 static int
 docd(char *dest, int print, int phys)
 {
+	int rc;
 
 	TRACE(("docd(\"%s\", %d, %d) called\n", dest, print, phys));
 
 	/* If logical cd fails, fall back to physical. */
-	if ((phys || cdlogical(dest) < 0) && cdphysical(dest) < 0)
+	if ((phys || (rc = cdlogical(dest)) < 0) && (rc = cdphysical(dest)) < 0)
 		return (-1);
 
 	if (print && iflag && curdir)
 		out1fmt("%s\n", curdir);
 
-	return 0;
+	return (rc);
 }
 
 static int
@@ -216,6 +222,7 @@ static int
 cdphysical(char *dest)
 {
 	char *p;
+	int rc = 0;
 
 	INTOFF;
 	if (chdir(dest) < 0) {
@@ -223,11 +230,13 @@ cdphysical(char *dest)
 		return (-1);
 	}
 	p = findcwd(NULL);
-	if (p == NULL)
+	if (p == NULL) {
 		warning("warning: failed to get name of current directory");
+		rc = 1;
+	}
 	updatepwd(p);
 	INTON;
-	return (0);
+	return (rc);
 }
 
 /*

Modified: projects/largeSMP/bin/sh/parser.c
==============================================================================
--- projects/largeSMP/bin/sh/parser.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/bin/sh/parser.c	Sat May 21 01:44:13 2011	(r222156)
@@ -1513,10 +1513,12 @@ checkend: {
 
 				p = line;
 				for (q = eofmark + 1 ; *q && *p == *q ; p++, q++);
-				if (*p == '\n' && *q == '\0') {
+				if ((*p == '\0' || *p == '\n') && *q == '\0') {
 					c = PEOF;
-					plinno++;
-					needprompt = doprompt;
+					if (*p == '\n') {
+						plinno++;
+						needprompt = doprompt;
+					}
 				} else {
 					pushstring(line, strlen(line), NULL);
 				}

Modified: projects/largeSMP/bin/sh/sh.1
==============================================================================
--- projects/largeSMP/bin/sh/sh.1	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/bin/sh/sh.1	Sat May 21 01:44:13 2011	(r222156)
@@ -32,7 +32,7 @@
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd May 8, 2011
+.Dd May 20, 2011
 .Dt SH 1
 .Os
 .Sh NAME
@@ -1729,7 +1729,7 @@ Execute the specified built-in command,
 .Ar cmd .
 This is useful when the user wishes to override a shell function
 with the same name as a built-in command.
-.It Ic cd Oo Fl L | P Oc Op Ar directory
+.It Ic cd Oo Fl L | P Oc Oo Fl e Oc Op Ar directory
 Switch to the specified
 .Ar directory ,
 or to the directory specified in the
@@ -1778,6 +1778,15 @@ option is specified,
 .Pa ..
 is handled logically.
 This is the default.
+.Pp
+The
+.Fl e
+option causes
+.Ic cd
+to return exit status 1 if the full pathname of the new directory
+cannot be determined reliably or at all.
+Normally this is not considered an error,
+although a warning is printed.
 .It Ic chdir
 A synonym for the
 .Ic cd

Modified: projects/largeSMP/share/man/man4/atkbd.4
==============================================================================
--- projects/largeSMP/share/man/man4/atkbd.4	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/share/man/man4/atkbd.4	Sat May 21 01:44:13 2011	(r222156)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 29, 2008
+.Dd May 20, 2011
 .Dt ATKBD 4
 .Os
 .Sh NAME
@@ -176,6 +176,11 @@ When this option is given, the
 .Nm
 driver will not test the keyboard port during the probe routine.
 Some machines hang during boot when this test is performed.
+.It bit 4 (PROBE_TYPEMATIC)
+When this option is given, the
+.Nm
+driver will try to probe the keyboard typematic rate on boot.
+Some machines hang during boot when this test is performed.
 .El
 .\".Sh FILES
 .Sh EXAMPLES

Modified: projects/largeSMP/sys/dev/atkbdc/atkbd.c
==============================================================================
--- projects/largeSMP/sys/dev/atkbdc/atkbd.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/dev/atkbdc/atkbd.c	Sat May 21 01:44:13 2011	(r222156)
@@ -1097,6 +1097,9 @@ get_typematic(keyboard_t *kbd)
 	x86regs_t regs;
 	uint8_t *p;
 
+	if (!(kbd->kb_config & KB_CONF_PROBE_TYPEMATIC))
+		return (ENODEV);
+
 	if (x86bios_get_intr(0x15) == 0 || x86bios_get_intr(0x16) == 0)
 		return (ENODEV);
 

Modified: projects/largeSMP/sys/dev/atkbdc/atkbdreg.h
==============================================================================
--- projects/largeSMP/sys/dev/atkbdc/atkbdreg.h	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/dev/atkbdc/atkbdreg.h	Sat May 21 01:44:13 2011	(r222156)
@@ -36,6 +36,7 @@
 #define KB_CONF_NO_RESET	(1 << 1) /* don't reset the keyboard */
 #define KB_CONF_ALT_SCANCODESET	(1 << 2) /* assume the XT type keyboard */
 #define	KB_CONF_NO_PROBE_TEST	(1 << 3) /* don't test keyboard during probe */
+#define	KB_CONF_PROBE_TYPEMATIC	(1 << 4) /* probe keyboard typematic */
 
 #ifdef _KERNEL
 

Modified: projects/largeSMP/sys/dev/gem/if_gem.c
==============================================================================
--- projects/largeSMP/sys/dev/gem/if_gem.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/dev/gem/if_gem.c	Sat May 21 01:44:13 2011	(r222156)
@@ -739,8 +739,10 @@ gem_reset_rxdma(struct gem_softc *sc)
 {
 	int i;
 
-	if (gem_reset_rx(sc) != 0)
+	if (gem_reset_rx(sc) != 0) {
+		sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 		return (gem_init_locked(sc));
+	}
 	for (i = 0; i < GEM_NRXDESC; i++)
 		if (sc->sc_rxsoft[i].rxs_mbuf != NULL)
 			GEM_UPDATE_RXDESC(sc, i);
@@ -924,6 +926,9 @@ gem_init_locked(struct gem_softc *sc)
 
 	GEM_LOCK_ASSERT(sc, MA_OWNED);
 
+	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+		return;
+
 #ifdef GEM_DEBUG
 	CTR2(KTR_GEM, "%s: %s: calling stop", device_get_name(sc->sc_dev),
 	    __func__);
@@ -1762,6 +1767,7 @@ gem_intr(void *v)
 		if ((status2 &
 		    (GEM_MAC_TX_UNDERRUN | GEM_MAC_TX_PKT_TOO_LONG)) != 0) {
 			sc->sc_ifp->if_oerrors++;
+			sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 			gem_init_locked(sc);
 		}
 	}
@@ -1814,6 +1820,7 @@ gem_watchdog(struct gem_softc *sc)
 	++ifp->if_oerrors;
 
 	/* Try to get more packets going. */
+	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	gem_init_locked(sc);
 	gem_start_locked(ifp);
 	return (EJUSTRETURN);

Modified: projects/largeSMP/sys/dev/vge/if_vge.c
==============================================================================
--- projects/largeSMP/sys/dev/vge/if_vge.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/dev/vge/if_vge.c	Sat May 21 01:44:13 2011	(r222156)
@@ -685,7 +685,18 @@ vge_dma_alloc(struct vge_softc *sc)
 	bus_addr_t lowaddr, tx_ring_end, rx_ring_end;
 	int error, i;
 
-	lowaddr = BUS_SPACE_MAXADDR;
+	/*
+	 * It seems old PCI controllers do not support DAC.  DAC
+	 * configuration can be enabled by accessing VGE_CHIPCFG3
+	 * register but honor EEPROM configuration instead of
+	 * blindly overriding DAC configuration.  PCIe based
+	 * controllers are supposed to support 64bit DMA so enable
+	 * 64bit DMA on these controllers.
+	 */
+	if ((sc->vge_flags & VGE_FLAG_PCIE) != 0)
+		lowaddr = BUS_SPACE_MAXADDR;
+	else
+		lowaddr = BUS_SPACE_MAXADDR_32BIT;
 
 again:
 	/* Create parent ring tag. */
@@ -802,10 +813,14 @@ again:
 		goto again;
 	}
 
+	if ((sc->vge_flags & VGE_FLAG_PCIE) != 0)
+		lowaddr = VGE_BUF_DMA_MAXADDR;
+	else
+		lowaddr = BUS_SPACE_MAXADDR_32BIT;
 	/* Create parent buffer tag. */
 	error = bus_dma_tag_create(bus_get_dma_tag(sc->vge_dev),/* parent */
 	    1, 0,			/* algnmnt, boundary */
-	    VGE_BUF_DMA_MAXADDR,	/* lowaddr */
+	    lowaddr,			/* lowaddr */
 	    BUS_SPACE_MAXADDR,		/* highaddr */
 	    NULL, NULL,			/* filter, filterarg */
 	    BUS_SPACE_MAXSIZE_32BIT,	/* maxsize */

Modified: projects/largeSMP/sys/net/if_llatbl.c
==============================================================================
--- projects/largeSMP/sys/net/if_llatbl.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/net/if_llatbl.c	Sat May 21 01:44:13 2011	(r222156)
@@ -228,7 +228,8 @@ lltable_drain(int af)
 #endif
 
 void
-lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask)
+lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask,
+	    u_int flags)
 {
 	struct lltable *llt;
 
@@ -237,7 +238,7 @@ lltable_prefix_free(int af, struct socka
 		if (llt->llt_af != af)
 			continue;
 
-		llt->llt_prefix_free(llt, prefix, mask);
+		llt->llt_prefix_free(llt, prefix, mask, flags);
 	}
 	LLTABLE_RUNLOCK();
 }

Modified: projects/largeSMP/sys/net/if_llatbl.h
==============================================================================
--- projects/largeSMP/sys/net/if_llatbl.h	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/net/if_llatbl.h	Sat May 21 01:44:13 2011	(r222156)
@@ -155,7 +155,8 @@ struct lltable {
 	void			(*llt_free)(struct lltable *, struct llentry *);
 	void			(*llt_prefix_free)(struct lltable *,
 				    const struct sockaddr *prefix,
-				    const struct sockaddr *mask);
+				    const struct sockaddr *mask,
+				    u_int flags);
 	struct llentry *	(*llt_lookup)(struct lltable *, u_int flags,
 				    const struct sockaddr *l3addr);
 	int			(*llt_rtcheck)(struct ifnet *, u_int flags,
@@ -184,7 +185,7 @@ MALLOC_DECLARE(M_LLTABLE);
 struct lltable *lltable_init(struct ifnet *, int);
 void		lltable_free(struct lltable *);
 void		lltable_prefix_free(int, struct sockaddr *, 
-                       struct sockaddr *);
+                       struct sockaddr *, u_int);
 #if 0
 void		lltable_drain(int);
 #endif

Modified: projects/largeSMP/sys/netinet/in.c
==============================================================================
--- projects/largeSMP/sys/netinet/in.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/netinet/in.c	Sat May 21 01:44:13 2011	(r222156)
@@ -70,7 +70,7 @@ static int in_lifaddr_ioctl(struct socke
 	struct ifnet *, struct thread *);
 
 static int	in_addprefix(struct in_ifaddr *, int);
-static int	in_scrubprefix(struct in_ifaddr *);
+static int	in_scrubprefix(struct in_ifaddr *, u_int);
 static void	in_socktrim(struct sockaddr_in *);
 static int	in_ifinit(struct ifnet *,
 	    struct in_ifaddr *, struct sockaddr_in *, int);
@@ -548,7 +548,7 @@ in_control(struct socket *so, u_long cmd
 			 * is the same as before, then the call is 
 			 * un-necessarily executed here.
 			 */
-			in_ifscrub(ifp, ia);
+			in_ifscrub(ifp, ia, 0);
 			ia->ia_sockmask = ifra->ifra_mask;
 			ia->ia_sockmask.sin_family = AF_INET;
 			ia->ia_subnetmask =
@@ -557,7 +557,7 @@ in_control(struct socket *so, u_long cmd
 		}
 		if ((ifp->if_flags & IFF_POINTOPOINT) &&
 		    (ifra->ifra_dstaddr.sin_family == AF_INET)) {
-			in_ifscrub(ifp, ia);
+			in_ifscrub(ifp, ia, 0);
 			ia->ia_dstaddr = ifra->ifra_dstaddr;
 			maskIsNew  = 1; /* We lie; but the effect's the same */
 		}
@@ -585,7 +585,7 @@ in_control(struct socket *so, u_long cmd
 		/*
 		 * in_ifscrub kills the interface route.
 		 */
-		in_ifscrub(ifp, ia);
+		in_ifscrub(ifp, ia, LLE_STATIC);
 
 		/*
 		 * in_ifadown gets rid of all the rest of
@@ -829,10 +829,10 @@ in_lifaddr_ioctl(struct socket *so, u_lo
  * Delete any existing route for an interface.
  */
 void
-in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia)
+in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia, u_int flags)
 {
 
-	in_scrubprefix(ia);
+	in_scrubprefix(ia, flags);
 }
 
 /*
@@ -887,7 +887,7 @@ in_ifinit(struct ifnet *ifp, struct in_i
 	splx(s);
 	if (scrub) {
 		ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr;
-		in_ifscrub(ifp, ia);
+		in_ifscrub(ifp, ia, LLE_STATIC);
 		ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr;
 	}
 	if (IN_CLASSA(i))
@@ -1095,7 +1095,7 @@ extern void arp_ifscrub(struct ifnet *if
  * otherwise.
  */
 static int
-in_scrubprefix(struct in_ifaddr *target)
+in_scrubprefix(struct in_ifaddr *target, u_int flags)
 {
 	struct in_ifaddr *ia;
 	struct in_addr prefix, mask, p;
@@ -1130,13 +1130,15 @@ in_scrubprefix(struct in_ifaddr *target)
 				RT_REMREF(ia_ro.ro_rt);
 			RTFREE_LOCKED(ia_ro.ro_rt);
 		}
-		if (freeit)
+		if (freeit && (flags & LLE_STATIC)) {
 			error = ifa_del_loopback_route((struct ifaddr *)target,
 				       (struct sockaddr *)&target->ia_addr);
-		if (error == 0)
-			target->ia_flags &= ~IFA_RTSELF;
-		/* remove arp cache */
-		arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
+			if (error == 0)
+				target->ia_flags &= ~IFA_RTSELF;
+		}
+		if (flags & LLE_STATIC)
+			/* remove arp cache */
+			arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
 	}
 
 	if (rtinitflags(target))
@@ -1203,7 +1205,7 @@ in_scrubprefix(struct in_ifaddr *target)
 	mask0.sin_family = AF_INET;
 	mask0.sin_addr.s_addr = target->ia_subnetmask;
 	lltable_prefix_free(AF_INET, (struct sockaddr *)&prefix0, 
-			    (struct sockaddr *)&mask0);
+			    (struct sockaddr *)&mask0, flags);
 
 	/*
 	 * As no-one seem to have this prefix, we can remove the route.
@@ -1362,7 +1364,8 @@ in_lltable_free(struct lltable *llt, str
 static void
 in_lltable_prefix_free(struct lltable *llt, 
 		       const struct sockaddr *prefix,
-		       const struct sockaddr *mask)
+		       const struct sockaddr *mask,
+		       u_int flags)
 {
 	const struct sockaddr_in *pfx = (const struct sockaddr_in *)prefix;
 	const struct sockaddr_in *msk = (const struct sockaddr_in *)mask;
@@ -1373,8 +1376,13 @@ in_lltable_prefix_free(struct lltable *l
 	for (i=0; i < LLTBL_HASHTBL_SIZE; i++) {
 		LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) {
 
+		        /* 
+			 * (flags & LLE_STATIC) means deleting all entries
+			 * including static ARP entries
+			 */
 			if (IN_ARE_MASKED_ADDR_EQUAL((struct sockaddr_in *)L3_ADDR(lle), 
-						     pfx, msk)) {
+						     pfx, msk) &&
+			    ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) {
 				int canceled;
 
 				canceled = callout_drain(&lle->la_timer);

Modified: projects/largeSMP/sys/netinet/in_var.h
==============================================================================
--- projects/largeSMP/sys/netinet/in_var.h	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/netinet/in_var.h	Sat May 21 01:44:13 2011	(r222156)
@@ -447,7 +447,7 @@ int	in_control(struct socket *, u_long, 
 void	in_rtqdrain(void);
 void	ip_input(struct mbuf *);
 int	in_ifadown(struct ifaddr *ifa, int);
-void	in_ifscrub(struct ifnet *, struct in_ifaddr *);
+void	in_ifscrub(struct ifnet *, struct in_ifaddr *, u_int);
 struct	mbuf	*ip_fastforward(struct mbuf *);
 void	*in_domifattach(struct ifnet *);
 void	in_domifdetach(struct ifnet *, void *);

Modified: projects/largeSMP/sys/netinet/raw_ip.c
==============================================================================
--- projects/largeSMP/sys/netinet/raw_ip.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/netinet/raw_ip.c	Sat May 21 01:44:13 2011	(r222156)
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
 #include <netinet/in_systm.h>
 #include <netinet/in_pcb.h>
 #include <netinet/in_var.h>
+#include <netinet/if_ether.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
 #include <netinet/ip_mroute.h>
@@ -721,7 +722,7 @@ rip_ctlinput(int cmd, struct sockaddr *s
 				/*
 				 * in_ifscrub kills the interface route.
 				 */
-				in_ifscrub(ia->ia_ifp, ia);
+				in_ifscrub(ia->ia_ifp, ia, 0);
 				/*
 				 * in_ifadown gets rid of all the rest of the
 				 * routes.  This is not quite the right thing
@@ -756,12 +757,18 @@ rip_ctlinput(int cmd, struct sockaddr *s
 		    || (ifp->if_flags & IFF_POINTOPOINT))
 			flags |= RTF_HOST;
 
+		err = ifa_del_loopback_route((struct ifaddr *)ia, sa);
+		if (err == 0)
+			ia->ia_flags &= ~IFA_RTSELF;
+
 		err = rtinit(&ia->ia_ifa, RTM_ADD, flags);
 		if (err == 0)
 			ia->ia_flags |= IFA_ROUTE;
+
 		err = ifa_add_loopback_route((struct ifaddr *)ia, sa);
 		if (err == 0)
 			ia->ia_flags |= IFA_RTSELF;
+
 		ifa_free(&ia->ia_ifa);
 		break;
 	}

Modified: projects/largeSMP/sys/netinet6/in6.c
==============================================================================
--- projects/largeSMP/sys/netinet6/in6.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/netinet6/in6.c	Sat May 21 01:44:13 2011	(r222156)
@@ -2376,19 +2376,25 @@ in6_lltable_free(struct lltable *llt, st
 static void
 in6_lltable_prefix_free(struct lltable *llt, 
 			const struct sockaddr *prefix,
-			const struct sockaddr *mask)
+			const struct sockaddr *mask,
+			u_int flags)
 {
 	const struct sockaddr_in6 *pfx = (const struct sockaddr_in6 *)prefix;
 	const struct sockaddr_in6 *msk = (const struct sockaddr_in6 *)mask;
 	struct llentry *lle, *next;
 	register int i;
 
+	/*
+	 * (flags & LLE_STATIC) means deleting all entries 
+	 * including static ND6 entries
+	 */
 	for (i=0; i < LLTBL_HASHTBL_SIZE; i++) {
 		LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) {
 			if (IN6_ARE_MASKED_ADDR_EQUAL(
 				    &((struct sockaddr_in6 *)L3_ADDR(lle))->sin6_addr, 
 				    &pfx->sin6_addr, 
-				    &msk->sin6_addr)) {
+				    &msk->sin6_addr) &&
+			    ((flags & LLE_STATIC) || !(lle->la_flags & LLE_STATIC))) {
 				int canceled;
 
 				canceled = callout_drain(&lle->la_timer);

Modified: projects/largeSMP/sys/vm/uma_int.h
==============================================================================
--- projects/largeSMP/sys/vm/uma_int.h	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/sys/vm/uma_int.h	Sat May 21 01:44:13 2011	(r222156)
@@ -45,7 +45,7 @@
  *  
  * The uma_slab_t may be embedded in a UMA_SLAB_SIZE chunk of memory or it may
  * be allocated off the page from a special slab zone.  The free list within a
- * slab is managed with a linked list of indexes, which are 8 bit values.  If
+ * slab is managed with a linked list of indices, which are 8 bit values.  If
  * UMA_SLAB_SIZE is defined to be too large I will have to switch to 16bit
  * values.  Currently on alpha you can get 250 or so 32 byte items and on x86
  * you can get 250 or so 16byte items.  For item sizes that would yield more
@@ -56,9 +56,9 @@
  * wasted between items due to alignment problems.  This may yield a much better
  * memory footprint for certain sizes of objects.  Another alternative is to
  * increase the UMA_SLAB_SIZE, or allow for dynamic slab sizes.  I prefer
- * dynamic slab sizes because we could stick with 8 bit indexes and only use
+ * dynamic slab sizes because we could stick with 8 bit indices and only use
  * large slab sizes for zones with a lot of waste per slab.  This may create
- * ineffeciencies in the vm subsystem due to fragmentation in the address space.
+ * inefficiencies in the vm subsystem due to fragmentation in the address space.
  *
  * The only really gross cases, with regards to memory waste, are for those
  * items that are just over half the page size.   You can get nearly 50% waste,

Copied: projects/largeSMP/tools/regression/bin/sh/builtins/cd3.0 (from r222155, head/tools/regression/bin/sh/builtins/cd3.0)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/largeSMP/tools/regression/bin/sh/builtins/cd3.0	Sat May 21 01:44:13 2011	(r222156, copy of r222155, head/tools/regression/bin/sh/builtins/cd3.0)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+# If fully successful, cd -Pe must be like cd -P.
+
+set -e
+
+cd "${TMPDIR:-/tmp}"
+cd -Pe /
+[ "$PWD" = / ]
+[ "$(pwd)" = / ]
+cd "${TMPDIR:-/tmp}"
+cd -eP /
+[ "$PWD" = / ]
+[ "$(pwd)" = / ]
+
+set +e
+
+# If cd -Pe cannot chdir, the exit status must be greater than 1.
+
+v=$( (cd -Pe /var/empty/nonexistent) 2>&1 >/dev/null)
+[ $? -gt 1 ] && [ -n "$v" ]

Copied: projects/largeSMP/tools/regression/bin/sh/builtins/cd4.0 (from r222155, head/tools/regression/bin/sh/builtins/cd4.0)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/largeSMP/tools/regression/bin/sh/builtins/cd4.0	Sat May 21 01:44:13 2011	(r222156, copy of r222155, head/tools/regression/bin/sh/builtins/cd4.0)
@@ -0,0 +1,38 @@
+# $FreeBSD$
+
+# This test assumes that whatever mechanism cd -P uses to determine the
+# pathname to the current directory if it is longer than PATH_MAX requires
+# read permission on all parent directories. It also works if this
+# requirement always applies.
+
+set -e
+L=$(getconf PATH_MAX / 2>/dev/null) || L=4096
+[ "$L" -lt 100000 ] 2>/dev/null || L=4096
+L=$((L+100))
+T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX)
+trap 'chmod u+r ${T}; rm -rf ${T}' 0
+cd -Pe $T
+D=$(pwd)
+chmod u-r "$D"
+if [ -r "$D" ]; then
+	# Running as root, cannot test.
+	exit 0
+fi
+set +e
+while [ ${#D} -lt $L ]; do
+	mkdir veryverylongdirectoryname || exit
+	cd -Pe veryverylongdirectoryname 2>/dev/null
+	r=$?
+	[ $r -gt 1 ] && exit $r
+	if [ $r -eq 1 ]; then
+		# Verify that the directory was changed correctly.
+		cd -Pe .. || exit
+		[ "$(pwd)" = "$D" ] || exit
+		# Verify that omitting -e results in success.
+		cd -P veryverylongdirectoryname 2>/dev/null || exit
+		exit 0
+	fi
+	D=$D/veryverylongdirectoryname
+done
+echo "cd -Pe never returned 1"
+exit 0

Copied: projects/largeSMP/tools/regression/bin/sh/parser/heredoc11.0 (from r222155, head/tools/regression/bin/sh/parser/heredoc11.0)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/largeSMP/tools/regression/bin/sh/parser/heredoc11.0	Sat May 21 01:44:13 2011	(r222156, copy of r222155, head/tools/regression/bin/sh/parser/heredoc11.0)
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+failures=''
+
+check() {
+	if eval "[ $* ]"; then
+		:
+	else
+		echo "Failed: $*"
+		failures=x$failures
+	fi
+}
+
+check '`cat <<EOF
+foo
+EOF` = foo'
+
+check '"`cat <<EOF
+foo
+EOF`" = foo'
+
+check '`eval "cat <<EOF
+foo
+EOF"` = foo'
+
+test "x$failures" = x

Modified: projects/largeSMP/usr.bin/top/machine.c
==============================================================================
--- projects/largeSMP/usr.bin/top/machine.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/usr.bin/top/machine.c	Sat May 21 01:44:13 2011	(r222156)
@@ -35,6 +35,7 @@
 #include <sys/user.h>
 #include <sys/vmmeter.h>
 
+#include <err.h>
 #include <kvm.h>
 #include <math.h>
 #include <nlist.h>

Modified: projects/largeSMP/usr.sbin/tzsetup/tzsetup.8
==============================================================================
--- projects/largeSMP/usr.sbin/tzsetup/tzsetup.8	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/usr.sbin/tzsetup/tzsetup.8	Sat May 21 01:44:13 2011	(r222156)
@@ -23,7 +23,8 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd July 4, 2009
+.\"
+.Dd October 21, 2009
 .Dt TZSETUP 8
 .Os
 .Sh NAME
@@ -32,8 +33,8 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl nrs
-.Op Fl C Ar chroot directory
-.Op Ar zoneinfo file | zoneinfo name
+.Op Fl C Ar chroot_directory
+.Op Ar zoneinfo_file | zoneinfo_name
 .Sh DESCRIPTION
 The
 .Nm
@@ -50,24 +51,25 @@ the hardware clock does not keep
 .Pp
 The following option is available:
 .Bl -tag -offset indent -width Fl
-.It Fl C Ar chroot directory
+.It Fl C Ar chroot_directory
 Open all files and directories relative to
-.Ar chroot directory .
+.Ar chroot_directory .
 .It Fl n
 Do not create or copy files.
 .It Fl r
-Reinstall the zoneinfo file installed last time. The name is obtained from
+Reinstall the zoneinfo file installed last time.
+The name is obtained from
 .Pa /var/db/zoneinfo .
-.It Fl s 
+.It Fl s
 Skip the initial question about adjusting the clock if not set to
 .Tn UTC .
 .El
 .Pp
 It is possible to short-circuit the menu system by specifying the
 location of a
-.Ar zoneinfo file
+.Ar zoneinfo_file
 or the name of the
-.Ar zoneinfo name
+.Ar zoneinfo_name
 on the command line; this is intended mainly for pre-configured installation
 scripts or people who know which zoneinfo they want to install.
 .Sh TIMEZONE DATABASE
@@ -101,38 +103,41 @@ The source code to the database
 contains many additional comments and documentation references for the
 historically minded.
 .Sh FILES
-.Bl -tag -width /usr/share/zoneinfo/zone.tab -compact
+.Bl -tag -width ".Pa /usr/share/zoneinfo/zone.tab" -compact
 .It Pa /etc/localtime
-current time zone file.
+current time zone file
 .It Pa /etc/wall_cmos_clock
 see
-.Xr adjkerntz 8 .
+.Xr adjkerntz 8
 .It Pa /usr/share/misc/iso3166
 mapping of
 .Tn ISO
-3166 territory codes to names.
+3166 territory codes to names
 .It Pa /usr/share/zoneinfo
-directory for zoneinfo files.
+directory for zoneinfo files
 .It Pa /usr/share/zoneinfo/zone.tab
-mapping of timezone file to country and location.
+mapping of timezone file to country and location
 .It Pa /var/db/zoneinfo
-saved name of the timezone file installed last.
+saved name of the timezone file installed last
 .El
 .Sh EXAMPLES
 Normal usage, to select the right zoneinfo file via the dialog-based
 user interface:
-.Dl # tzsetup
+.Dl tzsetup
+.Pp
 Install the file
 .Pa /usr/share/zoneinfo/Australia/Sydney :
-.Dl # tzsetup /usr/share/zoneinfo/Australia/Sydney
+.Dl "tzsetup /usr/share/zoneinfo/Australia/Sydney"
+.Pp
 Install the zoneinfo file for Australia/Sydney, assumed to be located
 in
 .Pa /usr/share/zoneinfo :
-.Dl # tzsetup Australia/Sydney
+.Dl "tzsetup Australia/Sydney"
+.Pp
 After a reinstall of the zoneinfo files, you can reinstall the
-latest installed zoneinfo file: (as specified in
-.Pa /var/db/zoneinfo )
-.Dl # tzsetup -r
+latest installed zoneinfo file (as specified in
+.Pa /var/db/zoneinfo ) :
+.Dl "tzsetup -r"
 .Sh SEE ALSO
 .Xr date 1 ,
 .Xr adjtime 2 ,

Modified: projects/largeSMP/usr.sbin/tzsetup/tzsetup.c
==============================================================================
--- projects/largeSMP/usr.sbin/tzsetup/tzsetup.c	Sat May 21 00:38:43 2011	(r222155)
+++ projects/largeSMP/usr.sbin/tzsetup/tzsetup.c	Sat May 21 01:44:13 2011	(r222156)
@@ -731,7 +731,8 @@ static void
 usage(void)
 {
 
-	fprintf(stderr, "usage: tzsetup [-nrs] [zoneinfo file]\n");
+	fprintf(stderr, "usage: tzsetup [-nrs] [-C chroot_directory]"
+	    " [zoneinfo_file | zoneinfo_name]\n");
 	exit(1);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105210144.p4L1iDMT009353>