svn commit: r225690 - in user/attilio/vmcontention: contrib/smbfs/mount_smbfs contrib/top contrib/tzcode/stdtime etc/rc.d lib/libc/iconv lib/libusb sbin/ifconfig share/man/man5 share/mk sys/dev/cor...

Attilio Rao attilio at FreeBSD.org
Tue Sep 20 08:01:44 UTC 2011


Author: attilio
Date: Tue Sep 20 08:01:43 2011
New Revision: 225690
URL: http://svn.freebsd.org/changeset/base/225690

Log:
  MFC

Modified:
  user/attilio/vmcontention/contrib/smbfs/mount_smbfs/mount_smbfs.8
  user/attilio/vmcontention/contrib/tzcode/stdtime/localtime.c
  user/attilio/vmcontention/etc/rc.d/NETWORKING
  user/attilio/vmcontention/etc/rc.d/bridge
  user/attilio/vmcontention/etc/rc.d/resolv
  user/attilio/vmcontention/lib/libc/iconv/citrus_none.c
  user/attilio/vmcontention/lib/libusb/Makefile
  user/attilio/vmcontention/lib/libusb/libusb.3
  user/attilio/vmcontention/lib/libusb/libusb.h
  user/attilio/vmcontention/lib/libusb/libusb10.c
  user/attilio/vmcontention/lib/libusb/libusb20.3
  user/attilio/vmcontention/lib/libusb/libusb20.c
  user/attilio/vmcontention/lib/libusb/libusb20.h
  user/attilio/vmcontention/sbin/ifconfig/ifconfig.8
  user/attilio/vmcontention/share/man/man5/rc.conf.5
  user/attilio/vmcontention/sys/dev/coretemp/coretemp.c
  user/attilio/vmcontention/sys/dev/e1000/if_lem.c
  user/attilio/vmcontention/sys/dev/iwn/if_iwn.c
  user/attilio/vmcontention/sys/kern/kern_exit.c
  user/attilio/vmcontention/sys/kern/kern_fork.c
  user/attilio/vmcontention/sys/netinet/sctp_bsd_addr.c
  user/attilio/vmcontention/sys/netinet/sctp_structs.h
  user/attilio/vmcontention/sys/netinet/sctputil.c
  user/attilio/vmcontention/sys/netinet6/ip6_output.c
  user/attilio/vmcontention/sys/sparc64/sparc64/machdep.c
  user/attilio/vmcontention/sys/sparc64/sparc64/pmap.c
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend-partmanager/create-part.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-disk.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-localize.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-newfs.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-parse.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions-unmount.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/functions.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/backend/parseconfig.sh
  user/attilio/vmcontention/usr.sbin/pc-sysinstall/examples/README
  user/attilio/vmcontention/usr.sbin/rtadvd/rtadvd.c
Directory Properties:
  user/attilio/vmcontention/   (props changed)
  user/attilio/vmcontention/cddl/contrib/opensolaris/   (props changed)
  user/attilio/vmcontention/contrib/bind9/   (props changed)
  user/attilio/vmcontention/contrib/binutils/   (props changed)
  user/attilio/vmcontention/contrib/bzip2/   (props changed)
  user/attilio/vmcontention/contrib/compiler-rt/   (props changed)
  user/attilio/vmcontention/contrib/dialog/   (props changed)
  user/attilio/vmcontention/contrib/ee/   (props changed)
  user/attilio/vmcontention/contrib/expat/   (props changed)
  user/attilio/vmcontention/contrib/file/   (props changed)
  user/attilio/vmcontention/contrib/gcc/   (props changed)
  user/attilio/vmcontention/contrib/gdb/   (props changed)
  user/attilio/vmcontention/contrib/gdtoa/   (props changed)
  user/attilio/vmcontention/contrib/gnu-sort/   (props changed)
  user/attilio/vmcontention/contrib/groff/   (props changed)
  user/attilio/vmcontention/contrib/less/   (props changed)
  user/attilio/vmcontention/contrib/libpcap/   (props changed)
  user/attilio/vmcontention/contrib/libstdc++/   (props changed)
  user/attilio/vmcontention/contrib/llvm/   (props changed)
  user/attilio/vmcontention/contrib/llvm/tools/clang/   (props changed)
  user/attilio/vmcontention/contrib/ncurses/   (props changed)
  user/attilio/vmcontention/contrib/netcat/   (props changed)
  user/attilio/vmcontention/contrib/ntp/   (props changed)
  user/attilio/vmcontention/contrib/one-true-awk/   (props changed)
  user/attilio/vmcontention/contrib/openbsm/   (props changed)
  user/attilio/vmcontention/contrib/openpam/   (props changed)
  user/attilio/vmcontention/contrib/openresolv/   (props changed)
  user/attilio/vmcontention/contrib/pf/   (props changed)
  user/attilio/vmcontention/contrib/sendmail/   (props changed)
  user/attilio/vmcontention/contrib/tcpdump/   (props changed)
  user/attilio/vmcontention/contrib/tcsh/   (props changed)
  user/attilio/vmcontention/contrib/tnftp/   (props changed)
  user/attilio/vmcontention/contrib/top/   (props changed)
  user/attilio/vmcontention/contrib/top/install-sh   (props changed)
  user/attilio/vmcontention/contrib/tzcode/stdtime/   (props changed)
  user/attilio/vmcontention/contrib/tzcode/zic/   (props changed)
  user/attilio/vmcontention/contrib/tzdata/   (props changed)
  user/attilio/vmcontention/contrib/wpa/   (props changed)
  user/attilio/vmcontention/contrib/xz/   (props changed)
  user/attilio/vmcontention/crypto/openssh/   (props changed)
  user/attilio/vmcontention/crypto/openssl/   (props changed)
  user/attilio/vmcontention/gnu/lib/   (props changed)
  user/attilio/vmcontention/gnu/usr.bin/binutils/   (props changed)
  user/attilio/vmcontention/gnu/usr.bin/cc/cc_tools/   (props changed)
  user/attilio/vmcontention/gnu/usr.bin/gdb/   (props changed)
  user/attilio/vmcontention/lib/libc/   (props changed)
  user/attilio/vmcontention/lib/libc/stdtime/   (props changed)
  user/attilio/vmcontention/lib/libutil/   (props changed)
  user/attilio/vmcontention/lib/libz/   (props changed)
  user/attilio/vmcontention/sbin/   (props changed)
  user/attilio/vmcontention/sbin/ipfw/   (props changed)
  user/attilio/vmcontention/share/mk/bsd.arch.inc.mk   (props changed)
  user/attilio/vmcontention/share/zoneinfo/   (props changed)
  user/attilio/vmcontention/sys/   (props changed)
  user/attilio/vmcontention/sys/amd64/include/xen/   (props changed)
  user/attilio/vmcontention/sys/boot/   (props changed)
  user/attilio/vmcontention/sys/boot/i386/efi/   (props changed)
  user/attilio/vmcontention/sys/boot/ia64/efi/   (props changed)
  user/attilio/vmcontention/sys/boot/ia64/ski/   (props changed)
  user/attilio/vmcontention/sys/boot/powerpc/boot1.chrp/   (props changed)
  user/attilio/vmcontention/sys/boot/powerpc/ofw/   (props changed)
  user/attilio/vmcontention/sys/cddl/contrib/opensolaris/   (props changed)
  user/attilio/vmcontention/sys/conf/   (props changed)
  user/attilio/vmcontention/sys/contrib/dev/acpica/   (props changed)
  user/attilio/vmcontention/sys/contrib/octeon-sdk/   (props changed)
  user/attilio/vmcontention/sys/contrib/pf/   (props changed)
  user/attilio/vmcontention/sys/contrib/x86emu/   (props changed)
  user/attilio/vmcontention/usr.bin/calendar/   (props changed)
  user/attilio/vmcontention/usr.bin/csup/   (props changed)
  user/attilio/vmcontention/usr.bin/procstat/   (props changed)
  user/attilio/vmcontention/usr.sbin/ndiscvt/   (props changed)
  user/attilio/vmcontention/usr.sbin/rtadvctl/   (props changed)
  user/attilio/vmcontention/usr.sbin/rtadvd/   (props changed)
  user/attilio/vmcontention/usr.sbin/rtsold/   (props changed)
  user/attilio/vmcontention/usr.sbin/zic/   (props changed)

Modified: user/attilio/vmcontention/contrib/smbfs/mount_smbfs/mount_smbfs.8
==============================================================================
--- user/attilio/vmcontention/contrib/smbfs/mount_smbfs/mount_smbfs.8	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/contrib/smbfs/mount_smbfs/mount_smbfs.8	Tue Sep 20 08:01:43 2011	(r225690)
@@ -1,6 +1,6 @@
 .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $
 .\" $FreeBSD$
-.Dd January 21, 2008
+.Dd September 17, 2011
 .Dt MOUNT_SMBFS 8
 .Os
 .Sh NAME
@@ -157,11 +157,11 @@ mount_smbfs -I samba.mydomain.com //gues
 mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest at samba/tmp /smb/tmp
 .Ed
 .Pp
-It is possible to use
+It is also possible to use
 .Xr fstab 5
-for smbfs mounts:
+for smbfs mounts (the example below doesn't prompt for a password):
 .Pp
-.Dl "//guest at samba/public    /smb/public     smbfs  rw,noauto 0   0"
+.Dl "//guest at samba/public    /smb/public     smbfs  rw,noauto,-N 0   0"
 .Sh AUTHORS
 .An Boris Popov Aq bp at butya.kz ,
 .Aq bp at FreeBSD.org

Modified: user/attilio/vmcontention/contrib/tzcode/stdtime/localtime.c
==============================================================================
--- user/attilio/vmcontention/contrib/tzcode/stdtime/localtime.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/contrib/tzcode/stdtime/localtime.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -380,13 +380,16 @@ register const int	doextend;
 	int		fid;
 	int		stored;
 	int		nread;
+	int		res;
 	union {
 		struct tzhead	tzhead;
 		char		buf[2 * sizeof(struct tzhead) +
 					2 * sizeof *sp +
 					4 * TZ_MAX_TIMES];
-	} u;
+	} *u;
 
+	u = NULL;
+	res = -1;
 	sp->goback = sp->goahead = FALSE;
 
 	/* XXX The following is from OpenBSD, and I'm not sure it is correct */
@@ -406,16 +409,24 @@ register const int	doextend;
 		** to hold the longest file name string that the implementation
 		** guarantees can be opened."
 		*/
-		char		fullname[FILENAME_MAX + 1];
+		char		*fullname;
+
+		fullname = malloc(FILENAME_MAX + 1);
+		if (fullname == NULL)
+			goto out;
 
 		if (name[0] == ':')
 			++name;
 		doaccess = name[0] == '/';
 		if (!doaccess) {
-			if ((p = TZDIR) == NULL)
+			if ((p = TZDIR) == NULL) {
+				free(fullname);
 				return -1;
-			if ((strlen(p) + 1 + strlen(name) + 1) >= sizeof fullname)
+			}
+			if (strlen(p) + 1 + strlen(name) >= FILENAME_MAX) {
+				free(fullname);
 				return -1;
+			}
 			(void) strcpy(fullname, p);
 			(void) strcat(fullname, "/");
 			(void) strcat(fullname, name);
@@ -426,37 +437,45 @@ register const int	doextend;
 				doaccess = TRUE;
 			name = fullname;
 		}
-		if (doaccess && access(name, R_OK) != 0)
+		if (doaccess && access(name, R_OK) != 0) {
+			free(fullname);
 		     	return -1;
-		if ((fid = _open(name, OPEN_MODE)) == -1)
+		}
+		if ((fid = _open(name, OPEN_MODE)) == -1) {
+			free(fullname);
 			return -1;
+		}
 		if ((_fstat(fid, &stab) < 0) || !S_ISREG(stab.st_mode)) {
+			free(fullname);
 			_close(fid);
 			return -1;
 		}
 	}
-	nread = _read(fid, u.buf, sizeof u.buf);
+	u = malloc(sizeof(*u));
+	if (u == NULL)
+		goto out;
+	nread = _read(fid, u->buf, sizeof u->buf);
 	if (_close(fid) < 0 || nread <= 0)
-		return -1;
+		goto out;
 	for (stored = 4; stored <= 8; stored *= 2) {
 		int		ttisstdcnt;
 		int		ttisgmtcnt;
 
-		ttisstdcnt = (int) detzcode(u.tzhead.tzh_ttisstdcnt);
-		ttisgmtcnt = (int) detzcode(u.tzhead.tzh_ttisgmtcnt);
-		sp->leapcnt = (int) detzcode(u.tzhead.tzh_leapcnt);
-		sp->timecnt = (int) detzcode(u.tzhead.tzh_timecnt);
-		sp->typecnt = (int) detzcode(u.tzhead.tzh_typecnt);
-		sp->charcnt = (int) detzcode(u.tzhead.tzh_charcnt);
-		p = u.tzhead.tzh_charcnt + sizeof u.tzhead.tzh_charcnt;
+		ttisstdcnt = (int) detzcode(u->tzhead.tzh_ttisstdcnt);
+		ttisgmtcnt = (int) detzcode(u->tzhead.tzh_ttisgmtcnt);
+		sp->leapcnt = (int) detzcode(u->tzhead.tzh_leapcnt);
+		sp->timecnt = (int) detzcode(u->tzhead.tzh_timecnt);
+		sp->typecnt = (int) detzcode(u->tzhead.tzh_typecnt);
+		sp->charcnt = (int) detzcode(u->tzhead.tzh_charcnt);
+		p = u->tzhead.tzh_charcnt + sizeof u->tzhead.tzh_charcnt;
 		if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS ||
 			sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES ||
 			sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES ||
 			sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS ||
 			(ttisstdcnt != sp->typecnt && ttisstdcnt != 0) ||
 			(ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0))
-				return -1;
-		if (nread - (p - u.buf) <
+				goto out;
+		if (nread - (p - u->buf) <
 			sp->timecnt * stored +		/* ats */
 			sp->timecnt +			/* types */
 			sp->typecnt * 6 +		/* ttinfos */
@@ -464,7 +483,7 @@ register const int	doextend;
 			sp->leapcnt * (stored + 4) +	/* lsinfos */
 			ttisstdcnt +			/* ttisstds */
 			ttisgmtcnt)			/* ttisgmts */
-				return -1;
+				goto out;
 		for (i = 0; i < sp->timecnt; ++i) {
 			sp->ats[i] = (stored == 4) ?
 				detzcode(p) : detzcode64(p);
@@ -473,7 +492,7 @@ register const int	doextend;
 		for (i = 0; i < sp->timecnt; ++i) {
 			sp->types[i] = (unsigned char) *p++;
 			if (sp->types[i] >= sp->typecnt)
-				return -1;
+				goto out;
 		}
 		for (i = 0; i < sp->typecnt; ++i) {
 			struct ttinfo *	ttisp;
@@ -483,11 +502,11 @@ register const int	doextend;
 			p += 4;
 			ttisp->tt_isdst = (unsigned char) *p++;
 			if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1)
-				return -1;
+				goto out;
 			ttisp->tt_abbrind = (unsigned char) *p++;
 			if (ttisp->tt_abbrind < 0 ||
 				ttisp->tt_abbrind > sp->charcnt)
-					return -1;
+					goto out;
 		}
 		for (i = 0; i < sp->charcnt; ++i)
 			sp->chars[i] = *p++;
@@ -512,7 +531,7 @@ register const int	doextend;
 				ttisp->tt_ttisstd = *p++;
 				if (ttisp->tt_ttisstd != TRUE &&
 					ttisp->tt_ttisstd != FALSE)
-						return -1;
+						goto out;
 			}
 		}
 		for (i = 0; i < sp->typecnt; ++i) {
@@ -525,7 +544,7 @@ register const int	doextend;
 				ttisp->tt_ttisgmt = *p++;
 				if (ttisp->tt_ttisgmt != TRUE &&
 					ttisp->tt_ttisgmt != FALSE)
-						return -1;
+						goto out;
 			}
 		}
 		/*
@@ -558,11 +577,11 @@ register const int	doextend;
 		/*
 		** If this is an old file, we're done.
 		*/
-		if (u.tzhead.tzh_version[0] == '\0')
+		if (u->tzhead.tzh_version[0] == '\0')
 			break;
-		nread -= p - u.buf;
+		nread -= p - u->buf;
 		for (i = 0; i < nread; ++i)
-			u.buf[i] = p[i];
+			u->buf[i] = p[i];
 		/*
 		** If this is a narrow integer time_t system, we're done.
 		*/
@@ -570,39 +589,43 @@ register const int	doextend;
 			break;
 	}
 	if (doextend && nread > 2 &&
-		u.buf[0] == '\n' && u.buf[nread - 1] == '\n' &&
+		u->buf[0] == '\n' && u->buf[nread - 1] == '\n' &&
 		sp->typecnt + 2 <= TZ_MAX_TYPES) {
-			struct state	ts;
+			struct state	*ts;
 			register int	result;
 
-			u.buf[nread - 1] = '\0';
-			result = tzparse(&u.buf[1], &ts, FALSE);
-			if (result == 0 && ts.typecnt == 2 &&
-				sp->charcnt + ts.charcnt <= TZ_MAX_CHARS) {
+			ts = malloc(sizeof(*ts));
+			if (ts == NULL)
+				goto out;
+			u->buf[nread - 1] = '\0';
+			result = tzparse(&u->buf[1], ts, FALSE);
+			if (result == 0 && ts->typecnt == 2 &&
+				sp->charcnt + ts->charcnt <= TZ_MAX_CHARS) {
 					for (i = 0; i < 2; ++i)
-						ts.ttis[i].tt_abbrind +=
+						ts->ttis[i].tt_abbrind +=
 							sp->charcnt;
-					for (i = 0; i < ts.charcnt; ++i)
+					for (i = 0; i < ts->charcnt; ++i)
 						sp->chars[sp->charcnt++] =
-							ts.chars[i];
+							ts->chars[i];
 					i = 0;
-					while (i < ts.timecnt &&
-						ts.ats[i] <=
+					while (i < ts->timecnt &&
+						ts->ats[i] <=
 						sp->ats[sp->timecnt - 1])
 							++i;
-					while (i < ts.timecnt &&
+					while (i < ts->timecnt &&
 					    sp->timecnt < TZ_MAX_TIMES) {
 						sp->ats[sp->timecnt] =
-							ts.ats[i];
+							ts->ats[i];
 						sp->types[sp->timecnt] =
 							sp->typecnt +
-							ts.types[i];
+							ts->types[i];
 						++sp->timecnt;
 						++i;
 					}
-					sp->ttis[sp->typecnt++] = ts.ttis[0];
-					sp->ttis[sp->typecnt++] = ts.ttis[1];
+					sp->ttis[sp->typecnt++] = ts->ttis[0];
+					sp->ttis[sp->typecnt++] = ts->ttis[1];
 			}
+			free(ts);
 	}
 	if (sp->timecnt > 1) {
 		for (i = 1; i < sp->timecnt; ++i)
@@ -620,7 +643,10 @@ register const int	doextend;
 					break;
 		}
 	}
-	return 0;
+	res = 0;
+out:
+	free(u);
+	return (res);
 }
 
 static int

Modified: user/attilio/vmcontention/etc/rc.d/NETWORKING
==============================================================================
--- user/attilio/vmcontention/etc/rc.d/NETWORKING	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/etc/rc.d/NETWORKING	Tue Sep 20 08:01:43 2011	(r225690)
@@ -5,7 +5,7 @@
 
 # PROVIDE: NETWORKING NETWORK
 # REQUIRE: netif netoptions routing ppp ipfw stf faith
-# REQUIRE: defaultroute routed mrouted route6d mroute6d resolv
+# REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge
 
 #	This is a dummy dependency, for services which require networking
 #	to be operational before starting.

Modified: user/attilio/vmcontention/etc/rc.d/bridge
==============================================================================
--- user/attilio/vmcontention/etc/rc.d/bridge	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/etc/rc.d/bridge	Tue Sep 20 08:01:43 2011	(r225690)
@@ -26,7 +26,7 @@
 #
 
 # PROVIDE: bridge
-# REQUIRE: netif
+# REQUIRE: netif faith ppp stf
 # KEYWORD: nojail
 
 . /etc/rc.subr

Modified: user/attilio/vmcontention/etc/rc.d/resolv
==============================================================================
--- user/attilio/vmcontention/etc/rc.d/resolv	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/etc/rc.d/resolv	Tue Sep 20 08:01:43 2011	(r225690)
@@ -28,7 +28,7 @@
 #
 
 # PROVIDE: resolv
-# REQUIRE: netif
+# REQUIRE: netif var
 # KEYWORD: nojail
 
 . /etc/rc.subr
@@ -41,17 +41,17 @@ load_rc_config $name
 # if the info is available via dhcp/kenv
 # build the resolv.conf
 #
-if [ ! -e /etc/resolv.conf -a \
-    -n "`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" ]; then
-	> /etc/resolv.conf
-
+if [ -n "`/bin/kenv dhcp.domain-name-servers 2> /dev/null`" ]; then
+	interface="`/bin/kenv boot.netif.name`"
+	(
 	if [ -n "`/bin/kenv dhcp.domain-name 2> /dev/null`" ]; then
-		echo domain `/bin/kenv dhcp.domain-name` > /etc/resolv.conf
+		echo domain `/bin/kenv dhcp.domain-name`
 	fi
 
 	set -- `/bin/kenv dhcp.domain-name-servers`
 	for ns in `IFS=','; echo $*`; do
-		echo nameserver $ns >> /etc/resolv.conf;
+		echo nameserver $ns
 	done
+	) | /sbin/resolvconf -a ${interface}:dhcp4
 fi
 

Modified: user/attilio/vmcontention/lib/libc/iconv/citrus_none.c
==============================================================================
--- user/attilio/vmcontention/lib/libc/iconv/citrus_none.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libc/iconv/citrus_none.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -190,7 +190,6 @@ _citrus_NONE_stdenc_wctomb(struct _citru
     void * __restrict pspriv __unused, size_t * __restrict nresult,
     struct iconv_hooks *hooks __unused)
 {
-	int ret;
 
 	if ((wc & ~0xFFU) != 0) {
 		*nresult = (size_t)-1;
@@ -198,7 +197,7 @@ _citrus_NONE_stdenc_wctomb(struct _citru
 	}
 	if (n == 0) {
 		*nresult = (size_t)-1;
-		ret = E2BIG;
+		return (E2BIG);
 	}
 
 	*nresult = 1;

Modified: user/attilio/vmcontention/lib/libusb/Makefile
==============================================================================
--- user/attilio/vmcontention/lib/libusb/Makefile	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libusb/Makefile	Tue Sep 20 08:01:43 2011	(r225690)
@@ -40,6 +40,7 @@ CFLAGS+=	-DCOMPAT_32BIT
 MLINKS += libusb.3 libusb_init.3
 MLINKS += libusb.3 libusb_exit.3
 MLINKS += libusb.3 libusb_strerror.3
+MLINKS += libusb.3 libusb_error_name.3
 MLINKS += libusb.3 libusb_set_debug.3
 MLINKS += libusb.3 libusb_get_device_list.3
 MLINKS += libusb.3 libusb_free_device_list.3
@@ -210,3 +211,5 @@ MLINKS += libusb20.3 libusb20_me_get_2.3
 MLINKS += libusb20.3 libusb20_me_encode.3
 MLINKS += libusb20.3 libusb20_me_decode.3
 MLINKS += libusb20.3 libusb20_desc_foreach.3
+MLINKS += libusb20.3 libusb20_strerror.3
+MLINKS += libusb20.3 libusb20_error_name.3

Modified: user/attilio/vmcontention/lib/libusb/libusb.3
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb.3	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libusb/libusb.3	Tue Sep 20 08:01:43 2011	(r225690)
@@ -63,6 +63,14 @@ Other libusb routines may not be called 
 Get the ASCII representation of the error given by the
 .Fa code
 argument.
+This function does not return NULL.
+.Pp
+.Ft const char *
+.Fn libusb_error_name "int code"
+Get the ASCII representation of the error enum given by the
+.Fa code
+argument.
+This function does not return NULL.
 .Pp
 .Ft void
 .Fn libusb_set_debug "libusb_context *ctx" "int level"
@@ -502,7 +510,8 @@ The library is also compliant with LibUS
 .Sh SEE ALSO
 .Xr libusb20 3 ,
 .Xr usb 4 ,
-.Xr usbconfig 8
+.Xr usbconfig 8 ,
+.Xr usbdump 8
 .Pp
 .Pa http://libusb.sourceforge.net/
 .Sh HISTORY

Modified: user/attilio/vmcontention/lib/libusb/libusb.h
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb.h	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libusb/libusb.h	Tue Sep 20 08:01:43 2011	(r225690)
@@ -303,6 +303,7 @@ typedef struct libusb_transfer {
 
 void	libusb_set_debug(libusb_context * ctx, int level);
 const char *libusb_strerror(int code);
+const char *libusb_error_name(int code);
 int	libusb_init(libusb_context ** context);
 void	libusb_exit(struct libusb_context *ctx);
 

Modified: user/attilio/vmcontention/lib/libusb/libusb10.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb10.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libusb/libusb10.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -1449,6 +1449,73 @@ libusb_le16_to_cpu(uint16_t x)
 const char *
 libusb_strerror(int code)
 {
-	/* TODO */
-	return ("Unknown error");
+	switch (code) {
+	case LIBUSB_SUCCESS:
+		return ("Success");
+	case LIBUSB_ERROR_IO:
+		return ("I/O error");
+	case LIBUSB_ERROR_INVALID_PARAM:
+		return ("Invalid parameter");
+	case LIBUSB_ERROR_ACCESS:
+		return ("Permissions error");
+	case LIBUSB_ERROR_NO_DEVICE:
+		return ("No device");
+	case LIBUSB_ERROR_NOT_FOUND:
+		return ("Not found");
+	case LIBUSB_ERROR_BUSY:
+		return ("Device busy");
+	case LIBUSB_ERROR_TIMEOUT:
+		return ("Timeout");
+	case LIBUSB_ERROR_OVERFLOW:
+		return ("Overflow");
+	case LIBUSB_ERROR_PIPE:
+		return ("Pipe error");
+	case LIBUSB_ERROR_INTERRUPTED:
+		return ("Interrupted");
+	case LIBUSB_ERROR_NO_MEM:
+		return ("Out of memory");
+	case LIBUSB_ERROR_NOT_SUPPORTED:
+		return ("Not supported");
+	case LIBUSB_ERROR_OTHER:
+		return ("Other error");
+	default:
+		return ("Unknown error");
+	}
+}
+
+const char *
+libusb_error_name(int code)
+{
+	switch (code) {
+	case LIBUSB_SUCCESS:
+		return ("LIBUSB_SUCCESS");
+	case LIBUSB_ERROR_IO:
+		return ("LIBUSB_ERROR_IO");
+	case LIBUSB_ERROR_INVALID_PARAM:
+		return ("LIBUSB_ERROR_INVALID_PARAM");
+	case LIBUSB_ERROR_ACCESS:
+		return ("LIBUSB_ERROR_ACCESS");
+	case LIBUSB_ERROR_NO_DEVICE:
+		return ("LIBUSB_ERROR_NO_DEVICE");
+	case LIBUSB_ERROR_NOT_FOUND:
+		return ("LIBUSB_ERROR_NOT_FOUND");
+	case LIBUSB_ERROR_BUSY:
+		return ("LIBUSB_ERROR_BUSY");
+	case LIBUSB_ERROR_TIMEOUT:
+		return ("LIBUSB_ERROR_TIMEOUT");
+	case LIBUSB_ERROR_OVERFLOW:
+		return ("LIBUSB_ERROR_OVERFLOW");
+	case LIBUSB_ERROR_PIPE:
+		return ("LIBUSB_ERROR_PIPE");
+	case LIBUSB_ERROR_INTERRUPTED:
+		return ("LIBUSB_ERROR_INTERRUPTED");
+	case LIBUSB_ERROR_NO_MEM:
+		return ("LIBUSB_ERROR_NO_MEM");
+	case LIBUSB_ERROR_NOT_SUPPORTED:
+		return ("LIBUSB_ERROR_NOT_SUPPORTED");
+	case LIBUSB_ERROR_OTHER:
+		return ("LIBUSB_ERROR_OTHER");
+	default:
+		return ("LIBUSB_ERROR_UNKNOWN");
+	}
 }

Modified: user/attilio/vmcontention/lib/libusb/libusb20.3
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20.3	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libusb/libusb20.3	Tue Sep 20 08:01:43 2011	(r225690)
@@ -212,6 +212,10 @@ USB access library (libusb -lusb)
 .Fn libusb20_me_decode "const void *pdata" "uint16_t len" "void *pdecoded"
 .Ft "const uint8_t *"
 .Fn libusb20_desc_foreach "const struct libusb20_me_struct *me" "const uint8_t *pdesc"
+.Ft "const char *"
+.Fn libusb20_strerror "int code"
+.Ft "const char *"
+.Fn libusb20_error_name "int code"
 .
 .
 .Sh DESCRIPTION
@@ -996,6 +1000,22 @@ The total decoded length is returned.
 The buffer pointer cannot be NULL.
 .
 .
+.Sh USB DEBUGGING
+.Pp
+.Ft const char *
+.Fn libusb20_strerror "int code"
+Get the ASCII representation of the error given by the
+.Fa code
+argument.
+This function does not return NULL.
+.Pp
+.Ft const char *
+.Fn libusb20_error_name "int code"
+Get the ASCII representation of the error enum given by the
+.Fa code
+argument.
+This function does not return NULL.
+.
 .Sh FILES
 .
 .
@@ -1003,7 +1023,8 @@ The buffer pointer cannot be NULL.
 .Sh SEE ALSO
 .Xr usb 4 ,
 .Xr libusb 3 ,
-.Xr usbconfig 8
+.Xr usbconfig 8 ,
+.Xr usbdump 8
 .
 .
 .Sh HISTORY

Modified: user/attilio/vmcontention/lib/libusb/libusb20.c
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libusb/libusb20.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -1244,3 +1244,77 @@ libusb20_be_dequeue_device(struct libusb
 {
 	TAILQ_REMOVE(&(pbe->usb_devs), pdev, dev_entry);
 }
+
+const char *
+libusb20_strerror(int code)
+{
+	switch (code) {
+	case LIBUSB20_SUCCESS:
+		return ("Success");
+	case LIBUSB20_ERROR_IO:
+		return ("I/O error");
+	case LIBUSB20_ERROR_INVALID_PARAM:
+		return ("Invalid parameter");
+	case LIBUSB20_ERROR_ACCESS:
+		return ("Permissions error");
+	case LIBUSB20_ERROR_NO_DEVICE:
+		return ("No device");
+	case LIBUSB20_ERROR_NOT_FOUND:
+		return ("Not found");
+	case LIBUSB20_ERROR_BUSY:
+		return ("Device busy");
+	case LIBUSB20_ERROR_TIMEOUT:
+		return ("Timeout");
+	case LIBUSB20_ERROR_OVERFLOW:
+		return ("Overflow");
+	case LIBUSB20_ERROR_PIPE:
+		return ("Pipe error");
+	case LIBUSB20_ERROR_INTERRUPTED:
+		return ("Interrupted");
+	case LIBUSB20_ERROR_NO_MEM:
+		return ("Out of memory");
+	case LIBUSB20_ERROR_NOT_SUPPORTED:
+		return ("Not supported");
+	case LIBUSB20_ERROR_OTHER:
+		return ("Other error");
+	default:
+		return ("Unknown error");
+	}
+}
+
+const char *
+libusb20_error_name(int code)
+{
+	switch (code) {
+	case LIBUSB20_SUCCESS:
+		return ("LIBUSB20_SUCCESS");
+	case LIBUSB20_ERROR_IO:
+		return ("LIBUSB20_ERROR_IO");
+	case LIBUSB20_ERROR_INVALID_PARAM:
+		return ("LIBUSB20_ERROR_INVALID_PARAM");
+	case LIBUSB20_ERROR_ACCESS:
+		return ("LIBUSB20_ERROR_ACCESS");
+	case LIBUSB20_ERROR_NO_DEVICE:
+		return ("LIBUSB20_ERROR_NO_DEVICE");
+	case LIBUSB20_ERROR_NOT_FOUND:
+		return ("LIBUSB20_ERROR_NOT_FOUND");
+	case LIBUSB20_ERROR_BUSY:
+		return ("LIBUSB20_ERROR_BUSY");
+	case LIBUSB20_ERROR_TIMEOUT:
+		return ("LIBUSB20_ERROR_TIMEOUT");
+	case LIBUSB20_ERROR_OVERFLOW:
+		return ("LIBUSB20_ERROR_OVERFLOW");
+	case LIBUSB20_ERROR_PIPE:
+		return ("LIBUSB20_ERROR_PIPE");
+	case LIBUSB20_ERROR_INTERRUPTED:
+		return ("LIBUSB20_ERROR_INTERRUPTED");
+	case LIBUSB20_ERROR_NO_MEM:
+		return ("LIBUSB20_ERROR_NO_MEM");
+	case LIBUSB20_ERROR_NOT_SUPPORTED:
+		return ("LIBUSB20_ERROR_NOT_SUPPORTED");
+	case LIBUSB20_ERROR_OTHER:
+		return ("LIBUSB20_ERROR_OTHER");
+	default:
+		return ("LIBUSB20_ERROR_UNKNOWN");
+	}
+}

Modified: user/attilio/vmcontention/lib/libusb/libusb20.h
==============================================================================
--- user/attilio/vmcontention/lib/libusb/libusb20.h	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/lib/libusb/libusb20.h	Tue Sep 20 08:01:43 2011	(r225690)
@@ -293,6 +293,11 @@ void	libusb20_be_dequeue_device(struct l
 void	libusb20_be_enqueue_device(struct libusb20_backend *pbe, struct libusb20_device *pdev);
 void	libusb20_be_free(struct libusb20_backend *pbe);
 
+/* USB debugging */
+
+const char *libusb20_strerror(int);
+const char *libusb20_error_name(int);
+
 #if 0
 {					/* style */
 #endif

Modified: user/attilio/vmcontention/sbin/ifconfig/ifconfig.8
==============================================================================
--- user/attilio/vmcontention/sbin/ifconfig/ifconfig.8	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/sbin/ifconfig/ifconfig.8	Tue Sep 20 08:01:43 2011	(r225690)
@@ -28,7 +28,7 @@
 .\"     From: @(#)ifconfig.8	8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd July 3, 2011
+.Dd September 13, 2011
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -626,12 +626,37 @@ is needed for them:
 .Bl -tag -width indent
 .It Cm accept_rtadv
 Set a flag to enable accepting ICMPv6 Router Advertisement messages.
+The
+.Xr sysctl 8
+variable
+.Va net.inet6.ip6.accept_rtadv
+controls whether this flag is set by default or not.
 .It Cm -accept_rtadv
 Clear a flag
 .Cm accept_rtadv .
+.It Cm no_radr
+Set a flag to control whether routers from which the system accepts
+Router Advertisement messages will be added to the Default Router List
+or not.
+When the
+.Cm accept_rtadv
+flag is disabled, this flag has no effect.
+The
+.Xr sysctl 8
+variable
+.Va net.inet6.ip6.no_radr
+controls whether this flag is set by default or not.
+.It Cm -no_radr
+Clear a flag
+.Cm no_radr .
 .It Cm auto_linklocal
 Set a flag to perform automatic link-local address configuration when
 the interface becomes available.
+The
+.Xr sysctl 8
+variable
+.Va net.inet6.ip6.auto_linklocal
+controls whether this flag is set by default or not.
 .It Cm -auto_linklocal
 Clear a flag
 .Cm auto_linklocal .

Modified: user/attilio/vmcontention/share/man/man5/rc.conf.5
==============================================================================
--- user/attilio/vmcontention/share/man/man5/rc.conf.5	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/share/man/man5/rc.conf.5	Tue Sep 20 08:01:43 2011	(r225690)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 19, 2011
+.Dd September 13, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -1282,6 +1282,13 @@ ifconfig_ed0_name="net0"
 ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00"
 .Ed
 .It Va ipv6_enable
+This variable is deprecated.
+Use
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
+and
+.Va ipv6_activate_all_interfaces
+if necessary.
+.Pp
 .Pq Vt bool
 If the variable is
 .Dq Li YES ,
@@ -1292,13 +1299,12 @@ and the
 .Va ipv6_activate_all_interfaces
 is defined as
 .Dq Li YES .
-.Pp
-This variable is deprecated.  Use
-.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
-and
-.Va ipv6_activate_all_interfaces
-if necessary.
 .It Va ipv6_prefer
+This variable is deprecated.
+Use
+.Va ip6addrctl_policy
+instead.
+.Pp
 .Pq Vt bool
 If the variable is
 .Dq Li YES ,
@@ -1311,19 +1317,45 @@ If the variable is
 the default address selection policy table set by
 .Xr ip6addrctl 8
 will be IPv4-preferred.
-.Pp
-This variable is deprecated.  Use
-.Va ip6addrctl_policy
-instead.
 .It Va ipv6_activate_all_interfaces
+.Pq Vt bool
+This controls initial configuration on IPv6-capable
+interfaces with no corresponding
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
+variable.
+Note that it is not always necessary to set this variable to
+.Dq YES
+to use IPv6 functionality on
+.Fx .
+In most cases, just configuring
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
+variables works.
+.Pp
 If the variable is
 .Dq Li NO ,
-all of interfaces which do not have the corrsponding
+all interfaces which do not have a corresponding
 .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
 variable will be marked as
 .Dq Li IFDISABLED
-for security reason.  This means only IPv6 functionality on that interface
-is completely disabled.  For more details of
+at creation.
+This means that all of IPv6 functionality on that interface
+is completely disabled to enforce a security policy.
+If the variable is set to
+.Dq YES ,
+the flag will be cleared on all of the interfaces.
+.Pp
+In most cases, just defining an
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
+for an IPv6-capable interface should be sufficient.
+However, if an interface is added dynamically
+.Pq by some tunneling protocols such as PPP, for example ,
+it is often difficult to define the variable in advance.
+In such a case, configuring the
+.Dq Li IFDISABLED
+flag can be disabled by setting this variable to
+.Dq YES .
+.Pp
+For more details of the
 .Dq Li IFDISABLED
 flag and keywords
 .Dq Li inet6 ifdisabled ,
@@ -1344,6 +1376,47 @@ This is the IPv6 equivalent of
 .Va network_interfaces .
 Normally manual configuration of this variable is not needed.
 .Pp
+.It Va ipv6_cpe_wanif
+.Pq Vt str
+If the variable is set to an interface name,
+the
+.Xr ifconfig 8
+options
+.Dq inet6 -no_radr accept_rtadv
+will be added to the specified interface automatically before evaluating
+.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 ,
+and two
+.Xr sysctl 8
+variables
+.Va net.inet6.ip6.rfc6204w3
+and
+.Va net.inet6.ip6.no_radr
+will be set to 1.
+.Pp
+This means the specified interface will accept ICMPv6 Router
+Advertisement messages on that link and add the discovered
+routers into the Default Router List.
+While the other interfaces can still accept RA messages if the
+.Dq inet6 accept_rtadv
+option is specified, adding
+routes into the Default Router List will be disabled by
+.Dq inet6 no_radr
+option by default.
+See
+.Xr ifconfig 8
+for more details.
+.Pp
+Note that ICMPv6 Router Advertisement messages will be
+accepted even when
+.Va net.inet6.ip6.forwarding
+is 1
+.Pq packet fowarding is enabled
+when
+.Va net.inet6.ip6.rfc6204w3
+is set to 1.
+.Pp
+Default is
+.Dq Li NO .
 .It Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
 .Pq Vt str
 IPv6 functionality on an interface should be configured by
@@ -1360,16 +1433,37 @@ ifconfig_ed0_ipv6="inet6 2001:db8:1::1 p
 ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64"
 .Ed
 .Pp
+Note that a link-local address will be automatically configured in
+addition to the configured global-scope addresses because the IPv6
+specifications require it on each link.
+The address is calculated from the MAC address by using an algorithm
+defined in
+.Rs
+.%T "RFC 4862"
+.%O "Section 5.3"
+.Re
+.Pp
+If only a link-local address is needed on the interface,
+the following configuration can be used:
+.Bd -literal
+ifconfig_ed0_ipv6="inet6 auto_linklocal"
+.Ed
+.Pp
+A link-local address can also be configured manually.
+This is useful for the default router address of an IPv6 router
+so that it does not change when the network interface
+card is replaced.
+For example:
+.Bd -literal
+ifconfig_ed0_ipv6="inet6 fe80::1 prefixlen 64"
+.Ed
+.Pp
 Interfaces that have an
 .Dq Li inet6 accept_rtadv
 keyword in
 .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6
 setting will be automatically configured by
 .Xr rtsol 8 .
-Note that this automatic configuration is disabled if the
-.Va ipv6_gateway_enable
-is set to
-.Dq Li YES .
 .It Va ipv6_prefix_ Ns Aq Ar interface
 .Pq Vt str
 If one or more prefixes are defined in
@@ -2628,16 +2722,12 @@ If set to
 run the
 .Xr rtadvd 8
 daemon at boot time.
-.Xr rtadvd 8
-will only run if
-.Va ipv6_gateway_enable
-is also set to
-.Dq Li YES .
 The
 .Xr rtadvd 8
-utility sends router advertisement packets to the interfaces specified in
-.Va rtadvd_interfaces
-and should only be enabled with great care.
+utility sends ICMPv6 Router Advertisement messages to
+the interfaces specified in
+.Va rtadvd_interfaces .
+This should only be enabled with great care.
 You may want to fine-tune
 .Xr rtadvd.conf 5 .
 .It Va rtadvd_interfaces

Modified: user/attilio/vmcontention/sys/dev/coretemp/coretemp.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/coretemp/coretemp.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/sys/dev/coretemp/coretemp.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -384,6 +384,7 @@ coretemp_get_val_sysctl(SYSCTL_HANDLER_A
 	}
 
 	if (msr & THERM_STATUS_LOG) {
+		coretemp_clear_thermal_msr(device_get_unit(dev));
 		sc->sc_throttle_log = 1;
 
 		/*
@@ -424,8 +425,10 @@ coretemp_throttle_log_sysctl(SYSCTL_HAND
 	msr = coretemp_get_thermal_msr(device_get_unit(dev));
 	sc = device_get_softc(dev);
 
-	if (msr & THERM_STATUS_LOG)
+	if (msr & THERM_STATUS_LOG) {
+		coretemp_clear_thermal_msr(device_get_unit(dev));
 		sc->sc_throttle_log = 1;
+	}
 
 	val = sc->sc_throttle_log;
 

Modified: user/attilio/vmcontention/sys/dev/e1000/if_lem.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/e1000/if_lem.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/sys/dev/e1000/if_lem.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -2654,6 +2654,7 @@ lem_setup_transmit_structures(struct ada
 	}
 
 	/* Reset state */
+	adapter->last_hw_offload = 0;
 	adapter->next_avail_tx_desc = 0;
 	adapter->next_tx_to_clean = 0;
 	adapter->num_tx_desc_avail = adapter->num_tx_desc;

Modified: user/attilio/vmcontention/sys/dev/iwn/if_iwn.c
==============================================================================
--- user/attilio/vmcontention/sys/dev/iwn/if_iwn.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/sys/dev/iwn/if_iwn.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -6952,12 +6952,24 @@ iwn_set_channel(struct ieee80211com *ic)
 	const struct ieee80211_channel *c = ic->ic_curchan;
 	struct ifnet *ifp = ic->ic_ifp;
 	struct iwn_softc *sc = ifp->if_softc;
+	int error;
 
 	IWN_LOCK(sc);
 	sc->sc_rxtap.wr_chan_freq = htole16(c->ic_freq);
 	sc->sc_rxtap.wr_chan_flags = htole16(c->ic_flags);
 	sc->sc_txtap.wt_chan_freq = htole16(c->ic_freq);
 	sc->sc_txtap.wt_chan_flags = htole16(c->ic_flags);
+
+	/*
+	 * Only need to set the channel in Monitor mode. AP scanning and auth
+	 * are already taken care of by their respective firmware commands.
+	 */
+	if (ic->ic_opmode == IEEE80211_M_MONITOR) {
+		error = iwn_config(sc);
+		if (error != 0)
+		device_printf(sc->sc_dev,
+		    "%s: error %d settting channel\n", __func__, error);
+	}
 	IWN_UNLOCK(sc);
 }
 

Modified: user/attilio/vmcontention/sys/kern/kern_exit.c
==============================================================================
--- user/attilio/vmcontention/sys/kern/kern_exit.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/sys/kern/kern_exit.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -765,12 +765,12 @@ proc_reap(struct thread *td, struct proc
 	/*
 	 * Destroy resource accounting information associated with the process.
 	 */
-	racct_proc_exit(p);
 #ifdef RACCT
-	PROC_LOCK(p->p_pptr);
-	racct_sub(p->p_pptr, RACCT_NPROC, 1);
-	PROC_UNLOCK(p->p_pptr);
+	PROC_LOCK(p);
+	racct_sub(p, RACCT_NPROC, 1);
+	PROC_UNLOCK(p);
 #endif
+	racct_proc_exit(p);
 
 	/*
 	 * Free credentials, arguments, and sigacts.
@@ -929,25 +929,13 @@ loop:
 void
 proc_reparent(struct proc *child, struct proc *parent)
 {
-#ifdef RACCT
-	int locked;
-#endif
 
 	sx_assert(&proctree_lock, SX_XLOCKED);
 	PROC_LOCK_ASSERT(child, MA_OWNED);
 	if (child->p_pptr == parent)
 		return;
 
-#ifdef RACCT
-	locked = PROC_LOCKED(parent);
-	if (!locked)
-		PROC_LOCK(parent);
-	racct_add_force(parent, RACCT_NPROC, 1);
-	if (!locked)
-		PROC_UNLOCK(parent);
-#endif
 	PROC_LOCK(child->p_pptr);
-	racct_sub(child->p_pptr, RACCT_NPROC, 1);
 	sigqueue_take(child->p_ksi);
 	PROC_UNLOCK(child->p_pptr);
 	LIST_REMOVE(child, p_sibling);

Modified: user/attilio/vmcontention/sys/kern/kern_fork.c
==============================================================================
--- user/attilio/vmcontention/sys/kern/kern_fork.c	Tue Sep 20 07:19:39 2011	(r225689)
+++ user/attilio/vmcontention/sys/kern/kern_fork.c	Tue Sep 20 08:01:43 2011	(r225690)
@@ -806,14 +806,6 @@ fork1(struct thread *td, int flags, int 
 		return (fork_norfproc(td, flags));
 	}
 
-#ifdef RACCT
-	PROC_LOCK(p1);
-	error = racct_add(p1, RACCT_NPROC, 1);
-	PROC_UNLOCK(p1);
-	if (error != 0)
-		return (EAGAIN);
-#endif
-
 #ifdef PROCDESC
 	/*
 	 * If required, create a process descriptor in the parent first; we
@@ -822,14 +814,8 @@ fork1(struct thread *td, int flags, int 
 	 */
 	if (flags & RFPROCDESC) {
 		error = falloc(td, &fp_procdesc, procdescp, 0);
-		if (error != 0) {
-#ifdef RACCT

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


More information about the svn-src-user mailing list