Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2010 13:38:40 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r214417 - in projects/sv: contrib/top contrib/tzcode/stdtime contrib/tzcode/zic lib/libthr/thread sbin/geom/class/eli share/man/man4 share/man/man5 share/misc share/mk sys/cddl/contrib/...
Message-ID:  <201010271338.o9RDce5S008035@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Wed Oct 27 13:38:40 2010
New Revision: 214417
URL: http://svn.freebsd.org/changeset/base/214417

Log:
  MFC @ 214416

Modified:
  projects/sv/contrib/tzcode/stdtime/asctime.c
  projects/sv/contrib/tzcode/stdtime/localtime.c
  projects/sv/contrib/tzcode/zic/zic.8
  projects/sv/contrib/tzcode/zic/zic.c
  projects/sv/lib/libthr/thread/thr_attr.c
  projects/sv/lib/libthr/thread/thr_mutex.c
  projects/sv/sbin/geom/class/eli/geom_eli.c
  projects/sv/share/man/man4/acpi.4
  projects/sv/share/man/man4/ada.4
  projects/sv/share/man/man5/nsmb.conf.5
  projects/sv/share/misc/committers-ports.dot
  projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  projects/sv/sys/dev/acpica/acpi.c
  projects/sv/sys/fs/nfs/nfsclstate.h
  projects/sv/sys/fs/nfsclient/nfs_clstate.c
  projects/sv/sys/x86/x86/dump_machdep.c
  projects/sv/usr.sbin/mfiutil/mfi_config.c
  projects/sv/usr.sbin/mfiutil/mfi_drive.c
  projects/sv/usr.sbin/mfiutil/mfi_evt.c
  projects/sv/usr.sbin/mfiutil/mfi_flash.c
  projects/sv/usr.sbin/mfiutil/mfi_patrol.c
  projects/sv/usr.sbin/mfiutil/mfi_show.c
  projects/sv/usr.sbin/mfiutil/mfi_volume.c
Directory Properties:
  projects/sv/   (props changed)
  projects/sv/cddl/contrib/opensolaris/   (props changed)
  projects/sv/contrib/bind9/   (props changed)
  projects/sv/contrib/binutils/   (props changed)
  projects/sv/contrib/bzip2/   (props changed)
  projects/sv/contrib/ee/   (props changed)
  projects/sv/contrib/expat/   (props changed)
  projects/sv/contrib/file/   (props changed)
  projects/sv/contrib/gdb/   (props changed)
  projects/sv/contrib/gdtoa/   (props changed)
  projects/sv/contrib/gnu-sort/   (props changed)
  projects/sv/contrib/groff/   (props changed)
  projects/sv/contrib/less/   (props changed)
  projects/sv/contrib/libpcap/   (props changed)
  projects/sv/contrib/llvm/   (props changed)
  projects/sv/contrib/llvm/tools/clang/   (props changed)
  projects/sv/contrib/ncurses/   (props changed)
  projects/sv/contrib/netcat/   (props changed)
  projects/sv/contrib/ntp/   (props changed)
  projects/sv/contrib/one-true-awk/   (props changed)
  projects/sv/contrib/openbsm/   (props changed)
  projects/sv/contrib/openpam/   (props changed)
  projects/sv/contrib/pf/   (props changed)
  projects/sv/contrib/sendmail/   (props changed)
  projects/sv/contrib/tcpdump/   (props changed)
  projects/sv/contrib/tcsh/   (props changed)
  projects/sv/contrib/top/   (props changed)
  projects/sv/contrib/top/install-sh   (props changed)
  projects/sv/contrib/tzcode/stdtime/   (props changed)
  projects/sv/contrib/tzcode/zic/   (props changed)
  projects/sv/contrib/tzdata/   (props changed)
  projects/sv/contrib/wpa/   (props changed)
  projects/sv/contrib/xz/   (props changed)
  projects/sv/crypto/openssh/   (props changed)
  projects/sv/crypto/openssl/   (props changed)
  projects/sv/lib/libc/   (props changed)
  projects/sv/lib/libc/stdtime/   (props changed)
  projects/sv/lib/libutil/   (props changed)
  projects/sv/lib/libz/   (props changed)
  projects/sv/sbin/   (props changed)
  projects/sv/sbin/ipfw/   (props changed)
  projects/sv/share/mk/bsd.arch.inc.mk   (props changed)
  projects/sv/share/zoneinfo/   (props changed)
  projects/sv/sys/   (props changed)
  projects/sv/sys/amd64/include/xen/   (props changed)
  projects/sv/sys/cddl/contrib/opensolaris/   (props changed)
  projects/sv/sys/contrib/dev/acpica/   (props changed)
  projects/sv/sys/contrib/pf/   (props changed)
  projects/sv/sys/contrib/x86emu/   (props changed)
  projects/sv/sys/dev/xen/xenpci/   (props changed)
  projects/sv/usr.bin/calendar/   (props changed)
  projects/sv/usr.bin/csup/   (props changed)
  projects/sv/usr.bin/procstat/   (props changed)
  projects/sv/usr.sbin/zic/   (props changed)

Modified: projects/sv/contrib/tzcode/stdtime/asctime.c
==============================================================================
--- projects/sv/contrib/tzcode/stdtime/asctime.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/contrib/tzcode/stdtime/asctime.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -12,7 +12,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] __unused = "@(#)asctime.c	8.2";
+static char	elsieid[] __unused = "@(#)asctime.c	8.5";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 __FBSDID("$FreeBSD$");
@@ -95,6 +95,10 @@ char *			buf;
 	char			year[INT_STRLEN_MAXIMUM(int) + 2];
 	char			result[MAX_ASCTIME_BUF_SIZE];
 
+	if (timeptr == NULL) {
+		errno = EINVAL;
+		return strcpy(buf, "??? ??? ?? ??:??:?? ????\n");
+	}
 	if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK)
 		wn = "???";
 	else	wn = wday_name[timeptr->tm_wday];
@@ -117,10 +121,9 @@ char *			buf;
 		timeptr->tm_mday, timeptr->tm_hour,
 		timeptr->tm_min, timeptr->tm_sec,
 		year);
-	if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime) {
-		(void) strcpy(buf, result);
-		return buf;
-	} else {
+	if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime)
+		return strcpy(buf, result);
+	else {
 #ifdef EOVERFLOW
 		errno = EOVERFLOW;
 #else /* !defined EOVERFLOW */

Modified: projects/sv/contrib/tzcode/stdtime/localtime.c
==============================================================================
--- projects/sv/contrib/tzcode/stdtime/localtime.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/contrib/tzcode/stdtime/localtime.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -6,7 +6,7 @@
 #include <sys/cdefs.h>
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] __unused = "@(#)localtime.c	8.9";
+static char	elsieid[] __unused = "@(#)localtime.c	8.14";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 __FBSDID("$FreeBSD$");
@@ -315,34 +315,26 @@ settzname(void)
 		return;
 	}
 #endif /* defined ALL_STATE */
+	/*
+	** And to get the latest zone names into tzname. . .
+	*/
 	for (i = 0; i < sp->typecnt; ++i) {
-		const struct ttinfo * const	ttisp = &sp->ttis[i];
+		const struct ttinfo * const ttisp = &sp->ttis[sp->types[i]];
 
 		tzname[ttisp->tt_isdst] =
 			&sp->chars[ttisp->tt_abbrind];
 #ifdef USG_COMPAT
 		if (ttisp->tt_isdst)
 			daylight = 1;
-		if (i == 0 || !ttisp->tt_isdst)
+		if (!ttisp->tt_isdst)
 			timezone = -(ttisp->tt_gmtoff);
 #endif /* defined USG_COMPAT */
 #ifdef ALTZONE
-		if (i == 0 || ttisp->tt_isdst)
+		if (ttisp->tt_isdst)
 			altzone = -(ttisp->tt_gmtoff);
 #endif /* defined ALTZONE */
 	}
 	/*
-	** And to get the latest zone names into tzname. . .
-	*/
-	for (i = 0; i < sp->timecnt; ++i) {
-		const struct ttinfo * const	ttisp =
-							&sp->ttis[
-								sp->types[i]];
-
-		tzname[ttisp->tt_isdst] =
-			&sp->chars[ttisp->tt_abbrind];
-	}
-	/*
 	** Finally, scrub the abbreviations.
 	** First, replace bogus characters.
 	*/
@@ -395,6 +387,8 @@ register const int	doextend;
 					4 * TZ_MAX_TIMES];
 	} u;
 
+	sp->goback = sp->goahead = FALSE;
+
 	/* XXX The following is from OpenBSD, and I'm not sure it is correct */
 	if (name != NULL && issetugid() != 0)
 		if ((name[0] == ':' && name[1] == '/') || 
@@ -610,7 +604,6 @@ register const int	doextend;
 					sp->ttis[sp->typecnt++] = ts.ttis[1];
 			}
 	}
-	sp->goback = sp->goahead = FALSE;
 	if (sp->timecnt > 1) {
 		for (i = 1; i < sp->timecnt; ++i)
 			if (typesequiv(sp, sp->types[i], sp->types[0]) &&
@@ -1221,7 +1214,7 @@ tzsetwall_basic(int rdlocked)
 
 #ifdef ALL_STATE
 	if (lclptr == NULL) {
-		lclptr = (struct state *) malloc(sizeof *lclptr);
+		lclptr = (struct state *) calloc(1, sizeof *lclptr);
 		if (lclptr == NULL) {
 			settzname();	/* all we can do */
 			_RWLOCK_UNLOCK(&lcl_rwlock);
@@ -1273,7 +1266,7 @@ tzset_basic(int rdlocked)
 
 #ifdef ALL_STATE
 	if (lclptr == NULL) {
-		lclptr = (struct state *) malloc(sizeof *lclptr);
+		lclptr = (struct state *) calloc(1, sizeof *lclptr);
 		if (lclptr == NULL) {
 			settzname();	/* all we can do */
 			_RWLOCK_UNLOCK(&lcl_rwlock);
@@ -1471,7 +1464,7 @@ gmt_init(void)
 {
 
 #ifdef ALL_STATE
-	gmtptr = (struct state *) malloc(sizeof *gmtptr);
+	gmtptr = (struct state *) calloc(1, sizeof *gmtptr);
 	if (gmtptr != NULL)
 #endif /* defined ALL_STATE */
 		gmtload(gmtptr);
@@ -2054,6 +2047,11 @@ const long		offset;
 	int				types[TZ_MAX_TYPES];
 	int				okay;
 
+	if (tmp == NULL) {
+		errno = EINVAL;
+		return WRONG;
+	}
+
 	if (tmp->tm_isdst > 1)
 		tmp->tm_isdst = 1;
 	t = time2(tmp, funcp, offset, &okay);
@@ -2129,7 +2127,8 @@ time_t
 timelocal(tmp)
 struct tm * const	tmp;
 {
-	tmp->tm_isdst = -1;	/* in case it wasn't initialized */
+	if (tmp != NULL)
+		tmp->tm_isdst = -1;	/* in case it wasn't initialized */
 	return mktime(tmp);
 }
 
@@ -2137,7 +2136,8 @@ time_t
 timegm(tmp)
 struct tm * const	tmp;
 {
-	tmp->tm_isdst = 0;
+	if (tmp != NULL)
+		tmp->tm_isdst = 0;
 	return time1(tmp, gmtsub, 0L);
 }
 
@@ -2146,7 +2146,8 @@ timeoff(tmp, offset)
 struct tm * const	tmp;
 const long		offset;
 {
-	tmp->tm_isdst = 0;
+	if (tmp != NULL)
+		tmp->tm_isdst = 0;
 	return time1(tmp, gmtsub, offset);
 }
 

Modified: projects/sv/contrib/tzcode/zic/zic.8
==============================================================================
--- projects/sv/contrib/tzcode/zic/zic.8	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/contrib/tzcode/zic/zic.8	Wed Oct 27 13:38:40 2010	(r214417)
@@ -119,6 +119,9 @@ Any line that is blank (after comment st
 Non-blank lines are expected to be of one of three types:
 rule lines, zone lines, and link lines.
 .Pp
+Names (such as month names) must be in English and are case insensitive.
+Abbreviations, if used, must be unambiguous in context.
+.Pp
 A rule line has the form:
 .Dl "Rule	NAME	FROM	TO	TYPE	IN	ON		AT	SAVE	LETTER/S"
 For example:
@@ -460,6 +463,6 @@ standard directory used for created file
 .Xr ctime 3 ,
 .Xr tzfile 5 ,
 .Xr zdump 8
-.\" @(#)zic.8	8.5
+.\" @(#)zic.8	8.6
 .\" This file is in the public domain, so clarified as of
 .\" 2009-05-17 by Arthur David Olson.

Modified: projects/sv/contrib/tzcode/zic/zic.c
==============================================================================
--- projects/sv/contrib/tzcode/zic/zic.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/contrib/tzcode/zic/zic.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -3,7 +3,7 @@
 ** 2006-07-17 by Arthur David Olson.
 */
 
-static const char	elsieid[] = "@(#)zic.c	8.20";
+static const char	elsieid[] = "@(#)zic.c	8.22";
 
 #ifndef lint
 static const char rcsid[] =
@@ -1588,6 +1588,53 @@ const char * const	string;
 			if (thistimei == 0)
 				writetype[0] = TRUE;
 		}
+#ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH
+		/*
+		** For some pre-2011 systems: if the last-to-be-written
+		** standard (or daylight) type has an offset different from the
+		** most recently used offset,
+		** append an (unused) copy of the most recently used type
+		** (to help get global "altzone" and "timezone" variables
+		** set correctly).
+		*/
+		{
+			register int	mrudst, mrustd, hidst, histd, type;
+
+			hidst = histd = mrudst = mrustd = -1;
+			for (i = thistimei; i < thistimelim; ++i)
+				if (isdsts[types[i]])
+					mrudst = types[i];
+				else	mrustd = types[i];
+			for (i = 0; i < typecnt; ++i)
+				if (writetype[i]) {
+					if (isdsts[i])
+						hidst = i;
+					else	histd = i;
+				}
+			if (hidst >= 0 && mrudst >= 0 && hidst != mrudst &&
+				gmtoffs[hidst] != gmtoffs[mrudst]) {
+					isdsts[mrudst] = -1;
+					type = addtype(gmtoffs[mrudst],
+						&chars[abbrinds[mrudst]],
+						TRUE,
+						ttisstds[mrudst],
+						ttisgmts[mrudst]);
+					isdsts[mrudst] = TRUE;
+					writetype[type] = TRUE;
+			}
+			if (histd >= 0 && mrustd >= 0 && histd != mrustd &&
+				gmtoffs[histd] != gmtoffs[mrustd]) {
+					isdsts[mrustd] = -1;
+					type = addtype(gmtoffs[mrustd],
+						&chars[abbrinds[mrustd]],
+						FALSE,
+						ttisstds[mrustd],
+						ttisgmts[mrustd]);
+					isdsts[mrustd] = FALSE;
+					writetype[type] = TRUE;
+			}
+		}
+#endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */
 		thistypecnt = 0;
 		for (i = 0; i < typecnt; ++i)
 			typemap[i] = writetype[i] ?  thistypecnt++ : -1;

Modified: projects/sv/lib/libthr/thread/thr_attr.c
==============================================================================
--- projects/sv/lib/libthr/thread/thr_attr.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/lib/libthr/thread/thr_attr.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -141,19 +141,14 @@ _pthread_attr_get_np(pthread_t pthread, 
 	struct pthread *curthread;
 	struct pthread_attr attr, *dst;
 	int	ret;
-	size_t	cpusetsize;
+	size_t	kern_size;
 
 	if (pthread == NULL || dstattr == NULL || (dst = *dstattr) == NULL)
 		return (EINVAL);
-	cpusetsize = _get_kern_cpuset_size();
-	if (dst->cpusetsize < cpusetsize) {
-		char *newset = realloc(dst->cpuset, cpusetsize);
-		if (newset == NULL)
-			return (errno);
-		memset(newset + dst->cpusetsize, 0, cpusetsize -
-			dst->cpusetsize);
-		dst->cpuset = (cpuset_t *)newset;
-		dst->cpusetsize = cpusetsize;
+	kern_size = _get_kern_cpuset_size();
+	if (dst->cpuset == NULL) {
+		dst->cpuset = calloc(1, kern_size);
+		dst->cpusetsize = kern_size;
 	}
 	curthread = _get_curthread();
 	if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) != 0)
@@ -574,13 +569,14 @@ _get_kern_cpuset_size(void)
 
 	if (kern_cpuset_size == 0) {
 		size_t len;
+		int maxcpus;
 
-		len = sizeof(kern_cpuset_size);
-		if (sysctlbyname("kern.smp.maxcpus", &kern_cpuset_size,
-		    &len, NULL, 0))
+		len = sizeof(maxcpus);
+		if (sysctlbyname("kern.smp.maxcpus", &maxcpus, &len, NULL, 0))
 			PANIC("failed to get sysctl kern.smp.maxcpus");
-
-		kern_cpuset_size = (kern_cpuset_size + 7) / 8;
+		int nbits_long = sizeof(long) * NBBY;
+		int num_long = (maxcpus + nbits_long - 1) / nbits_long;
+		kern_cpuset_size = num_long * sizeof(long);
 	}
 
 	return (kern_cpuset_size);
@@ -605,27 +601,25 @@ _pthread_attr_setaffinity_np(pthread_att
 			}
 			return (0);
 		}
-			
-		if (cpusetsize > attr->cpusetsize) {
-			size_t kern_size = _get_kern_cpuset_size();
-			if (cpusetsize > kern_size) {
-				size_t i;
-				for (i = kern_size; i < cpusetsize; ++i) {
-					if (((char *)cpusetp)[i])
-						return (EINVAL);
-				}
+		size_t kern_size = _get_kern_cpuset_size();
+		/* Kernel rejects small set, we check it here too. */ 
+		if (cpusetsize < kern_size)
+			return (ERANGE);
+		if (cpusetsize > kern_size) {
+			/* Kernel checks invalid bits, we check it here too. */
+			size_t i;
+			for (i = kern_size; i < cpusetsize; ++i) {
+				if (((char *)cpusetp)[i])
+					return (EINVAL);
 			}
-			void *newset = realloc(attr->cpuset, cpusetsize);
-       			if (newset == NULL)
-		            return (ENOMEM);
-			attr->cpuset = newset;
-			attr->cpusetsize = cpusetsize;
-		} else {
-			memset(((char *)attr->cpuset) + cpusetsize, 0,
-				attr->cpusetsize - cpusetsize);
-			attr->cpusetsize = cpusetsize;
 		}
-		memcpy(attr->cpuset, cpusetp, cpusetsize);
+		if (attr->cpuset == NULL) {
+			attr->cpuset = calloc(1, kern_size);
+			if (attr->cpuset == NULL)
+				return (errno);
+			attr->cpusetsize = kern_size;
+		}
+		memcpy(attr->cpuset, cpusetp, kern_size);
 		ret = 0;
 	}
 	return (ret);
@@ -641,16 +635,18 @@ _pthread_attr_getaffinity_np(const pthre
 
 	if (pattr == NULL || (attr = (*pattr)) == NULL)
 		ret = EINVAL;
-	else if (attr->cpuset != NULL) {
-		memcpy(cpusetp, attr->cpuset, MIN(cpusetsize, attr->cpusetsize));
-		if (cpusetsize > attr->cpusetsize)
-			memset(((char *)cpusetp) + attr->cpusetsize, 0, 
-				cpusetsize - attr->cpusetsize);
-	} else {
+	else {
+		/* Kernel rejects small set, we check it here too. */ 
 		size_t kern_size = _get_kern_cpuset_size();
-		memset(cpusetp, -1, MIN(cpusetsize, kern_size));
+		if (cpusetsize < kern_size)
+			return (ERANGE);
+		if (attr->cpuset != NULL)
+			memcpy(cpusetp, attr->cpuset, MIN(cpusetsize,
+			   attr->cpusetsize));
+		else
+			memset(cpusetp, -1, kern_size);
 		if (cpusetsize > kern_size)
-			memset(((char *)cpusetp) + kern_size, 0,
+			memset(((char *)cpusetp) + kern_size, 0, 
 				cpusetsize - kern_size);
 	}
 	return (ret);

Modified: projects/sv/lib/libthr/thread/thr_mutex.c
==============================================================================
--- projects/sv/lib/libthr/thread/thr_mutex.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/lib/libthr/thread/thr_mutex.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -257,10 +257,8 @@ _mutex_fork(struct pthread *curthread)
 int
 _pthread_mutex_destroy(pthread_mutex_t *mutex)
 {
-	struct pthread *curthread = _get_curthread();
 	pthread_mutex_t m;
-	uint32_t id;
-	int ret = 0;
+	int ret;
 
 	m = *mutex;
 	if (m < THR_MUTEX_DESTROYED) {
@@ -268,34 +266,13 @@ _pthread_mutex_destroy(pthread_mutex_t *
 	} else if (m == THR_MUTEX_DESTROYED) {
 		ret = EINVAL;
 	} else {
-		id = TID(curthread);
-
-		/*
-		 * Try to lock the mutex structure, we only need to
-		 * try once, if failed, the mutex is in used.
-		 */
-		ret = _thr_umutex_trylock(&m->m_lock, id);
-		if (ret)
-			return (ret);
-		/*
-		 * Check mutex other fields to see if this mutex is
-		 * in use. Mostly for prority mutex types, or there
-		 * are condition variables referencing it.
-		 */
 		if (m->m_owner != NULL || m->m_refcount != 0) {
-			if (m->m_lock.m_flags & UMUTEX_PRIO_PROTECT)
-				set_inherited_priority(curthread, m);
-			_thr_umutex_unlock(&m->m_lock, id);
 			ret = EBUSY;
 		} else {
 			*mutex = THR_MUTEX_DESTROYED;
-
-			if (m->m_lock.m_flags & UMUTEX_PRIO_PROTECT)
-				set_inherited_priority(curthread, m);
-			_thr_umutex_unlock(&m->m_lock, id);
-
 			MUTEX_ASSERT_NOT_OWNED(m);
 			free(m);
+			ret = 0;
 		}
 	}
 

Modified: projects/sv/sbin/geom/class/eli/geom_eli.c
==============================================================================
--- projects/sv/sbin/geom/class/eli/geom_eli.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sbin/geom/class/eli/geom_eli.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -749,8 +749,8 @@ eli_init(struct gctl_req *req)
 			return;
 		}
 		if (val > sysconf(_SC_PAGE_SIZE)) {
-			gctl_error(req, "warning: Using sectorsize bigger than "
-			    "the page size!");
+			fprintf(stderr,
+			    "warning: Using sectorsize bigger than the page size!\n");
 		}
 		md.md_sectorsize = val;
 	}

Modified: projects/sv/share/man/man4/acpi.4
==============================================================================
--- projects/sv/share/man/man4/acpi.4	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/share/man/man4/acpi.4	Wed Oct 27 13:38:40 2010	(r214417)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 12, 2010
+.Dd October 26, 2010
 .Dt ACPI 4
 .Os
 .Sh NAME
@@ -224,6 +224,26 @@ Try increasing this number if you get th
 .Qq Li AE_NO_HARDWARE_RESPONSE .
 .It Va hw.acpi.host_mem_start
 Override the assumed memory starting address for PCI host bridges.
+.It Va hw.acpi.install_interface , hw.acpi.remove_interface
+Install or remove OS interface(s) to control return value of
+.Ql _OSI
+query method.  When an OS interface is specified in
+.Va hw.acpi.install_interface ,
+.Li _OSI
+query for the interface returns it is
+.Em supported .
+Conversely, when an OS interface is specified in
+.Va hw.acpi.remove_interface ,
+.Li _OSI
+query returns it is
+.Em not supported .
+Multiple interfaces can be specified in a comma-separated list and
+any leading white spaces will be ignored.  For example,
+.Qq Li FreeBSD, Linux
+is a valid list of two interfaces
+.Qq Li FreeBSD
+and
+.Qq Li Linux .
 .It Va hw.acpi.reset_video
 Enables calling the VESA reset BIOS vector on the resume path.
 This can fix some graphics cards that have problems such as LCD white-out

Modified: projects/sv/share/man/man4/ada.4
==============================================================================
--- projects/sv/share/man/man4/ada.4	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/share/man/man4/ada.4	Wed Oct 27 13:38:40 2010	(r214417)
@@ -121,6 +121,8 @@ seconds.
 .It kern.cam.ada.spindown_shutdown
 .Pp
 This variable determines whether to spin-down disks when shutting down.
+Set to 1 to enable spin-down, 0 to disable.  
+The default is currently enabled.
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /dev/ada*" -compact

Modified: projects/sv/share/man/man5/nsmb.conf.5
==============================================================================
--- projects/sv/share/man/man5/nsmb.conf.5	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/share/man/man5/nsmb.conf.5	Wed Oct 27 13:38:40 2010	(r214417)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 30, 2003
+.Dd October 19, 2010
 .Dt NSMB.CONF 5
 .Os
 .Sh NAME
@@ -87,7 +87,7 @@ Possible keywords may include:
 .It Va nbns        Ta "+ + - -" Ta "address of NetBIOS name server (WINS)"
 .It Va nbscope     Ta "+ + - -" Ta "NetBIOS scope"
 .It Va nbtimeout   Ta "+ + - -" Ta "timeout for NetBIOS name servers"
-.It Va password    Ta "- - + +" Ta "plain text password used to access the given share"
+.It Va password    Ta "- - + +" Ta "plain text or simple encrypted password used to access the given share"
 .It Va retry_count Ta "+ + - -" Ta "number of retries before connection is marked as broken"
 .It Va timeout     Ta "+ + - -" Ta "SMB request timeout"
 .It Va workgroup   Ta "+ + + +" Ta "workgroup name"
@@ -96,6 +96,9 @@ Possible keywords may include:
 .Bl -tag -width ".Pa /etc/nsmb.conf"
 .It Pa /etc/nsmb.conf
 The default remote mount-point configuration file.
+.Pa "~/nsmb.conf"
+.It Pa ~/nsmb.conf
+The user specific remote mount-point configuration file.
 .El
 .Sh EXAMPLES
 What follows is a sample configuration file which may,
@@ -108,6 +111,9 @@ workgroup=SALES
 [FSERVER]
 charsets=koi8-r:cp866
 addr=fserv.example.com
+# User specific data for FSERVER
+[FSERVER:MYUSER]
+password=$$16144562c293a0314e6e1
 .Ed
 .Pp
 All lines which begin with the
@@ -124,6 +130,18 @@ required when Cyrillic characters are no
 The hostname value,
 .Dq Li fserv.example.com ,
 is also assigned in this section.
+.Dq Li FSERVER:USER ,
+defines the user settings and is useful for saving the password used
+during a specific connection.
+The password may be plaintext or obfuscated using simple encryption.  
+The simple encrypted password starts with the `$$1' symbols.
+Warning: the encryption function is very weak and intended only to hide
+clear text passwords.
+If the use of simple encryption is desired, the following command may be
+used on a password:
+.Bd -literal -offset indent
+smbutil crypt
+.Ed 
 .Sh COMPATIBILITY
 At the time of this writing, the
 .Tn IPX

Modified: projects/sv/share/misc/committers-ports.dot
==============================================================================
--- projects/sv/share/misc/committers-ports.dot	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/share/misc/committers-ports.dot	Wed Oct 27 13:38:40 2010	(r214417)
@@ -261,6 +261,8 @@ itetcu -> araujo
 itetcu -> dryice
 itetcu -> sahil
 
+jadawin -> bapt
+
 joerg -> netchild
 
 knu -> daichi
@@ -365,6 +367,7 @@ steve -> netchild
 tabthorpe -> ashish
 tabthorpe -> avilla
 tabthorpe -> avl
+tabthorpe -> bapt
 tabthorpe -> fluffy
 tabthorpe -> jacula
 tabthorpe -> jadawin

Modified: projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
==============================================================================
--- projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -192,7 +192,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn,
 
 	ASSERT(length <= DMU_MAX_ACCESS);
 
-	dbuf_flags = DB_RF_CANFAIL | DB_RF_NEVERWAIT;
+	dbuf_flags = DB_RF_CANFAIL | DB_RF_NEVERWAIT | DB_RF_HAVESTRUCT;
 	if (flags & DMU_READ_NO_PREFETCH || length > zfetch_array_rd_sz)
 		dbuf_flags |= DB_RF_NOPREFETCH;
 
@@ -209,6 +209,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn,
 			    os_dsl_dataset->ds_object,
 			    (longlong_t)dn->dn_object, dn->dn_datablksz,
 			    (longlong_t)offset, (longlong_t)length);
+			rw_exit(&dn->dn_struct_rwlock);
 			return (EIO);
 		}
 		nblks = 1;
@@ -231,9 +232,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn,
 		}
 		/* initiate async i/o */
 		if (read) {
-			rw_exit(&dn->dn_struct_rwlock);
 			(void) dbuf_read(db, zio, dbuf_flags);
-			rw_enter(&dn->dn_struct_rwlock, RW_READER);
 		}
 		dbp[i] = &db->db;
 	}
@@ -540,7 +539,7 @@ dmu_read(objset_t *os, uint64_t object, 
 {
 	dnode_t *dn;
 	dmu_buf_t **dbp;
-	int numbufs, i, err;
+	int numbufs, err;
 
 	err = dnode_hold(os->os, object, FTAG, &dn);
 	if (err)
@@ -551,7 +550,7 @@ dmu_read(objset_t *os, uint64_t object, 
 	 * block.  If we ever do the tail block optimization, we will need to
 	 * handle that here as well.
 	 */
-	if (dn->dn_datablkshift == 0) {
+	if (dn->dn_maxblkid == 0) {
 		int newsz = offset > dn->dn_datablksz ? 0 :
 		    MIN(size, dn->dn_datablksz - offset);
 		bzero((char *)buf + newsz, size - newsz);
@@ -560,6 +559,7 @@ dmu_read(objset_t *os, uint64_t object, 
 
 	while (size > 0) {
 		uint64_t mylen = MIN(size, DMU_MAX_ACCESS / 2);
+		int i;
 
 		/*
 		 * NB: we could do this block-at-a-time, but it's nice

Modified: projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -1031,6 +1031,10 @@ zfs_get_done(dmu_buf_t *db, void *vzgd)
 	VFS_UNLOCK_GIANT(vfslocked);
 }
 
+#ifdef DEBUG
+static int zil_fault_io = 0;
+#endif
+
 /*
  * Get data to generate a TX_WRITE intent log record.
  */
@@ -1112,7 +1116,21 @@ zfs_get_data(void *arg, lr_write_t *lr, 
 		zgd->zgd_rl = rl;
 		zgd->zgd_zilog = zfsvfs->z_log;
 		zgd->zgd_bp = &lr->lr_blkptr;
-		VERIFY(0 == dmu_buf_hold(os, lr->lr_foid, boff, zgd, &db));
+#ifdef DEBUG
+		if (zil_fault_io) {
+			error = EIO;
+			zil_fault_io = 0;
+		} else {
+			error = dmu_buf_hold(os, lr->lr_foid, boff, zgd, &db);
+		}
+#else
+		error = dmu_buf_hold(os, lr->lr_foid, boff, zgd, &db);
+#endif
+		if (error != 0) {
+			kmem_free(zgd, sizeof (zgd_t));
+			goto out;
+		}
+
 		ASSERT(boff == db->db_offset);
 		lr->lr_blkoff = off - boff;
 		error = dmu_sync(zio, db, &lr->lr_blkptr,

Modified: projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
==============================================================================
--- projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -933,6 +933,10 @@ zil_lwb_commit(zilog_t *zilog, itx_t *it
 			}
 			error = zilog->zl_get_data(
 			    itx->itx_private, lr, dbuf, lwb->lwb_zio);
+			if (error == EIO) {
+				txg_wait_synced(zilog->zl_dmu_pool, txg);
+				return (lwb);
+			}
 			if (error) {
 				ASSERT(error == ENOENT || error == EEXIST ||
 				    error == EALREADY);

Modified: projects/sv/sys/dev/acpica/acpi.c
==============================================================================
--- projects/sv/sys/dev/acpica/acpi.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sys/dev/acpica/acpi.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -86,6 +86,11 @@ static struct cdevsw acpi_cdevsw = {
 	.d_name =	"acpi",
 };
 
+struct acpi_interface {
+	ACPI_STRING	*data;
+	int		num;
+};
+
 /* Global mutex for locking access to the ACPI subsystem. */
 struct mtx	acpi_mutex;
 
@@ -163,6 +168,7 @@ static void	acpi_enable_pcie(void);
 #endif
 static void	acpi_hint_device_unit(device_t acdev, device_t child,
 		    const char *name, int *unitp);
+static void	acpi_reset_interfaces(device_t dev);
 
 static device_method_t acpi_methods[] = {
     /* Device interface */
@@ -232,6 +238,16 @@ SYSCTL_STRING(_debug_acpi, OID_AUTO, acp
 	      acpi_ca_version, 0, "Version of Intel ACPI-CA");
 
 /*
+ * Allow overriding _OSI methods.
+ */
+static char acpi_install_interface[256];
+TUNABLE_STR("hw.acpi.install_interface", acpi_install_interface,
+    sizeof(acpi_install_interface));
+static char acpi_remove_interface[256];
+TUNABLE_STR("hw.acpi.remove_interface", acpi_remove_interface,
+    sizeof(acpi_remove_interface));
+
+/*
  * Allow override of whether methods execute in parallel or not.
  * Enable this for serial behavior, which fixes "AE_ALREADY_EXISTS"
  * errors for AML that really can't handle parallel method execution.
@@ -467,6 +483,9 @@ acpi_attach(device_t dev)
 	goto out;
     }
 
+    /* Override OS interfaces if the user requested. */
+    acpi_reset_interfaces(dev);
+
     /* Load ACPI name space. */
     status = AcpiLoadTables();
     if (ACPI_FAILURE(status)) {
@@ -3473,6 +3492,93 @@ acpi_debug_objects_sysctl(SYSCTL_HANDLER
 }
 
 static int
+acpi_parse_interfaces(char *str, struct acpi_interface *iface)
+{
+	char *p;
+	size_t len;
+	int i, j;
+
+	p = str;
+	while (isspace(*p) || *p == ',')
+		p++;
+	len = strlen(p);
+	if (len == 0)
+		return (0);
+	p = strdup(p, M_TEMP);
+	for (i = 0; i < len; i++)
+		if (p[i] == ',')
+			p[i] = '\0';
+	i = j = 0;
+	while (i < len)
+		if (isspace(p[i]) || p[i] == '\0')
+			i++;
+		else {
+			i += strlen(p + i) + 1;
+			j++;
+		}
+	if (j == 0) {
+		free(p, M_TEMP);
+		return (0);
+	}
+	iface->data = malloc(sizeof(*iface->data) * j, M_TEMP, M_WAITOK);
+	iface->num = j;
+	i = j = 0;
+	while (i < len)
+		if (isspace(p[i]) || p[i] == '\0')
+			i++;
+		else {
+			iface->data[j] = p + i;
+			i += strlen(p + i) + 1;
+			j++;
+		}
+
+	return (j);
+}
+
+static void
+acpi_free_interfaces(struct acpi_interface *iface)
+{
+
+	free(iface->data[0], M_TEMP);
+	free(iface->data, M_TEMP);
+}
+
+static void
+acpi_reset_interfaces(device_t dev)
+{
+	struct acpi_interface list;
+	ACPI_STATUS status;
+	int i;
+
+	if (acpi_parse_interfaces(acpi_install_interface, &list) > 0) {
+		for (i = 0; i < list.num; i++) {
+			status = AcpiInstallInterface(list.data[i]);
+			if (ACPI_FAILURE(status))
+				device_printf(dev,
+				    "failed to install _OSI(\"%s\"): %s\n",
+				    list.data[i], AcpiFormatException(status));
+			else if (bootverbose)
+				device_printf(dev, "installed _OSI(\"%s\")\n",
+				    list.data[i]);
+		}
+		acpi_free_interfaces(&list);
+	}
+	if (acpi_parse_interfaces(acpi_remove_interface, &list) > 0) {
+		for (i = 0; i < list.num; i++) {
+			status = AcpiRemoveInterface(list.data[i]);
+			if (ACPI_FAILURE(status))
+				device_printf(dev,
+				    "failed to remove _OSI(\"%s\"): %s\n",
+				    list.data[i], AcpiFormatException(status));
+			else if (bootverbose)
+				device_printf(dev, "removed _OSI(\"%s\")\n",
+				    list.data[i]);
+		}
+		acpi_free_interfaces(&list);
+	}
+}
+
+static int
 acpi_pm_func(u_long cmd, void *arg, ...)
 {
 	int	state, acpi_state;

Modified: projects/sv/sys/fs/nfs/nfsclstate.h
==============================================================================
--- projects/sv/sys/fs/nfs/nfsclstate.h	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sys/fs/nfs/nfsclstate.h	Wed Oct 27 13:38:40 2010	(r214417)
@@ -118,6 +118,7 @@ struct nfscldeleg {
 #define	NFSCLDL_NEEDRECLAIM	0x08
 #define	NFSCLDL_ZAPPED		0x10
 #define	NFSCLDL_MODTIMESET	0x20
+#define	NFSCLDL_DELEGRET	0x40
 
 /*
  * MALLOC'd to the correct length to accommodate the file handle.

Modified: projects/sv/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- projects/sv/sys/fs/nfsclient/nfs_clstate.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sys/fs/nfsclient/nfs_clstate.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -929,8 +929,10 @@ nfscl_getbytelock(vnode_t vp, u_int64_t 
 		ldp = dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh,
 		    np->n_fhp->nfh_len);
 		/* Just sanity check for correct type of delegation */
-		if (dp != NULL && ((dp->nfsdl_flags & NFSCLDL_RECALL) ||
-		    (type == F_WRLCK && !(dp->nfsdl_flags & NFSCLDL_WRITE))))
+		if (dp != NULL && ((dp->nfsdl_flags &
+		    (NFSCLDL_RECALL | NFSCLDL_DELEGRET)) != 0 ||
+		     (type == F_WRLCK &&
+		      (dp->nfsdl_flags & NFSCLDL_WRITE) == 0)))
 			dp = NULL;
 	}
 	if (dp != NULL) {
@@ -2495,8 +2497,8 @@ tryagain:
 		    if (dp->nfsdl_rwlock.nfslock_usecnt == 0 &&
 			dp->nfsdl_rwlock.nfslock_lock == 0 &&
 			dp->nfsdl_timestamp < NFSD_MONOSEC &&
-			!(dp->nfsdl_flags & (NFSCLDL_RECALL | NFSCLDL_ZAPPED |
-			  NFSCLDL_NEEDRECLAIM))) {
+			(dp->nfsdl_flags & (NFSCLDL_RECALL | NFSCLDL_ZAPPED |
+			  NFSCLDL_NEEDRECLAIM | NFSCLDL_DELEGRET)) == 0) {
 			clearok = 1;
 			LIST_FOREACH(owp, &dp->nfsdl_owner, nfsow_list) {
 			    op = LIST_FIRST(&owp->nfsow_open);
@@ -3086,7 +3088,8 @@ nfscl_docb(struct nfsrv_descript *nd, NF
 				if (clp != NULL) {
 					dp = nfscl_finddeleg(clp, nfhp->nfh_fh,
 					    nfhp->nfh_len);
-					if (dp != NULL) {
+					if (dp != NULL && (dp->nfsdl_flags &
+					    NFSCLDL_DELEGRET) == 0) {
 						dp->nfsdl_flags |=
 						    NFSCLDL_RECALL;
 						wakeup((caddr_t)clp);
@@ -3338,7 +3341,6 @@ nfscl_recalldeleg(struct nfsclclient *cl
 		np = VTONFS(vp);
 	}
 	dp->nfsdl_flags &= ~NFSCLDL_MODTIMESET;
-	NFSINVALATTRCACHE(np);
 
 	/*
 	 * Ok, if it's a write delegation, flush data to the server, so
@@ -3347,21 +3349,14 @@ nfscl_recalldeleg(struct nfsclclient *cl
 	ret = 0;
 	NFSLOCKNODE(np);
 	if ((dp->nfsdl_flags & NFSCLDL_WRITE) && (np->n_flag & NMODIFIED)) {
-#ifdef APPLE
-		OSBitOrAtomic((u_int32_t)NDELEGRECALL, (UInt32 *)&np->n_flag);
-#else
 		np->n_flag |= NDELEGRECALL;
-#endif
 		NFSUNLOCKNODE(np);
 		ret = ncl_flush(vp, MNT_WAIT, cred, p, 1,
 		    called_from_renewthread);
 		NFSLOCKNODE(np);
-#ifdef APPLE
-		OSBitAndAtomic((int32_t)~(NMODIFIED | NDELEGRECALL), (UInt32 *)&np->n_flag);
-#else
-		np->n_flag &= ~(NMODIFIED | NDELEGRECALL);
-#endif
+		np->n_flag &= ~NDELEGRECALL;
 	}
+	NFSINVALATTRCACHE(np);
 	NFSUNLOCKNODE(np);
 	if (ret == EIO && called_from_renewthread != 0) {
 		/*
@@ -3534,8 +3529,10 @@ nfscl_totalrecall(struct nfsclclient *cl
 {
 	struct nfscldeleg *dp;
 
-	TAILQ_FOREACH(dp, &clp->nfsc_deleg, nfsdl_list)
-		dp->nfsdl_flags |= NFSCLDL_RECALL;
+	TAILQ_FOREACH(dp, &clp->nfsc_deleg, nfsdl_list) {
+		if ((dp->nfsdl_flags & NFSCLDL_DELEGRET) == 0)
+			dp->nfsdl_flags |= NFSCLDL_RECALL;
+	}
 }
 
 /*
@@ -3754,8 +3751,9 @@ nfscl_mustflush(vnode_t vp)
 		return (1);
 	}
 	dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len);
-	if (dp != NULL && (dp->nfsdl_flags & (NFSCLDL_WRITE | NFSCLDL_RECALL))
-	     == NFSCLDL_WRITE &&
+	if (dp != NULL && (dp->nfsdl_flags &
+	    (NFSCLDL_WRITE | NFSCLDL_RECALL | NFSCLDL_DELEGRET)) ==
+	     NFSCLDL_WRITE &&
 	    (dp->nfsdl_sizelimit >= np->n_size ||
 	     !NFSHASSTRICT3530(nmp))) {
 		NFSUNLOCKCLSTATE();
@@ -3787,9 +3785,10 @@ nfscl_nodeleg(vnode_t vp, int writedeleg
 		return (1);
 	}
 	dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len);
-	if (dp != NULL && (dp->nfsdl_flags & NFSCLDL_RECALL) == 0 &&
-	    (writedeleg == 0 || (dp->nfsdl_flags & NFSCLDL_WRITE)
-	     == NFSCLDL_WRITE)) {
+	if (dp != NULL &&
+	    (dp->nfsdl_flags & (NFSCLDL_RECALL | NFSCLDL_DELEGRET)) == 0 &&
+	    (writedeleg == 0 || (dp->nfsdl_flags & NFSCLDL_WRITE) ==
+	     NFSCLDL_WRITE)) {
 		NFSUNLOCKCLSTATE();
 		return (0);
 	}
@@ -3860,6 +3859,7 @@ nfscl_removedeleg(vnode_t vp, NFSPROC_T 
 			}
 		    }
 		    if (needsrecall && !triedrecall) {
+			dp->nfsdl_flags |= NFSCLDL_DELEGRET;
 			islept = 0;
 			while (!igotlock) {
 			    igotlock = nfsv4_lock(&clp->nfsc_lock, 1,
@@ -3958,6 +3958,7 @@ nfscl_renamedeleg(vnode_t fvp, nfsv4stat
 			}
 		    }
 		    if (needsrecall && !triedrecall) {
+			dp->nfsdl_flags |= NFSCLDL_DELEGRET;
 			islept = 0;
 			while (!igotlock) {
 			    igotlock = nfsv4_lock(&clp->nfsc_lock, 1,

Modified: projects/sv/sys/x86/x86/dump_machdep.c
==============================================================================
--- projects/sv/sys/x86/x86/dump_machdep.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/sys/x86/x86/dump_machdep.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/kerneldump.h>
 #include <vm/vm.h>
 #include <vm/pmap.h>
-#include <machine/_inttypes.h>
 #include <machine/elf.h>
 #include <machine/md_var.h>
 
@@ -177,8 +176,8 @@ cb_dumpdata(struct md_pa *mdp, int seqnr
 	if (maxdumppgs == 0)	/* seatbelt */
 		maxdumppgs = 1;
 
-	printf("  chunk %d: %"PRIu64"MB (%"PRIu64" pages)", seqnr, PG2MB(pgs),
-	    pgs);
+	printf("  chunk %d: %juMB (%ju pages)", seqnr, (uintmax_t)PG2MB(pgs),
+	    (uintmax_t)pgs);
 
 	while (pgs) {
 		chunk = pgs;
@@ -187,7 +186,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr
 		sz = chunk << PAGE_SHIFT;
 		counter += sz;
 		if (counter >> 24) {
-			printf(" %"PRIu64, PG2MB(pgs));
+			printf(" %ju", (uintmax_t)PG2MB(pgs));
 			counter &= (1<<24) - 1;
 		}
 		for (i = 0; i < chunk; i++) {

Modified: projects/sv/usr.sbin/mfiutil/mfi_config.c
==============================================================================
--- projects/sv/usr.sbin/mfiutil/mfi_config.c	Wed Oct 27 13:16:48 2010	(r214416)
+++ projects/sv/usr.sbin/mfiutil/mfi_config.c	Wed Oct 27 13:38:40 2010	(r214417)
@@ -29,12 +29,12 @@
  * $FreeBSD$
  */
 
-#include <sys/types.h>
+#include <sys/param.h>
 #ifdef DEBUG
 #include <sys/sysctl.h>
 #endif
-#include <sys/errno.h>
 #include <err.h>
+#include <errno.h>
 #include <libutil.h>
 #ifdef DEBUG
 #include <stdint.h>
@@ -52,8 +52,6 @@ static void	dump_config(int fd, struct m
 static int	add_spare(int ac, char **av);
 static int	remove_spare(int ac, char **av);
 
-#define powerof2(x)    ((((x)-1)&(x))==0)

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



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