Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jan 2012 00:12:52 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r230794 - in user/jimharris/isci: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid cddl/contrib/opensolaris/lib/libzpool/common/sys contrib/libarchive/libarchive etc/devd etc/r...
Message-ID:  <201201310012.q0V0Cq0n008880@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Tue Jan 31 00:12:51 2012
New Revision: 230794
URL: http://svn.freebsd.org/changeset/base/230794

Log:
  Rebase user/jimharris/isci branch from head.

Added:
  user/jimharris/isci/share/man/man4/xnb.4
     - copied unchanged from r230792, head/share/man/man4/xnb.4
  user/jimharris/isci/share/man/man9/buf_ring.9
     - copied unchanged from r230792, head/share/man/man9/buf_ring.9
  user/jimharris/isci/share/man/man9/drbr.9
     - copied unchanged from r230792, head/share/man/man9/drbr.9
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_82598.h
     - copied unchanged from r230792, head/sys/dev/ixgbe/ixgbe_82598.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_82599.h
     - copied unchanged from r230792, head/sys/dev/ixgbe/ixgbe_82599.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_x540.c
     - copied unchanged from r230792, head/sys/dev/ixgbe/ixgbe_x540.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_x540.h
     - copied unchanged from r230792, head/sys/dev/ixgbe/ixgbe_x540.h
  user/jimharris/isci/sys/dev/mps/mps_config.c
     - copied unchanged from r230792, head/sys/dev/mps/mps_config.c
  user/jimharris/isci/sys/dev/mps/mps_mapping.c
     - copied unchanged from r230792, head/sys/dev/mps/mps_mapping.c
  user/jimharris/isci/sys/dev/mps/mps_mapping.h
     - copied unchanged from r230792, head/sys/dev/mps/mps_mapping.h
  user/jimharris/isci/sys/dev/mps/mps_sas.h
     - copied unchanged from r230792, head/sys/dev/mps/mps_sas.h
  user/jimharris/isci/sys/dev/mps/mps_sas_lsi.c
     - copied unchanged from r230792, head/sys/dev/mps/mps_sas_lsi.c
  user/jimharris/isci/sys/dev/xen/netback/netback_unit_tests.c
     - copied unchanged from r230792, head/sys/dev/xen/netback/netback_unit_tests.c
Modified:
  user/jimharris/isci/Makefile.inc1
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe   (contents, props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
  user/jimharris/isci/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
  user/jimharris/isci/etc/devd/apple.conf
  user/jimharris/isci/etc/rc.d/netif
  user/jimharris/isci/games/pom/pom.c
  user/jimharris/isci/lib/libc/sys/fcntl.2
  user/jimharris/isci/lib/libc/sys/mmap.2
  user/jimharris/isci/lib/libutil/libutil.h
  user/jimharris/isci/libexec/rtld-elf/map_object.c
  user/jimharris/isci/libexec/rtld-elf/rtld.c
  user/jimharris/isci/libexec/rtld-elf/rtld.h
  user/jimharris/isci/sbin/camcontrol/Makefile
  user/jimharris/isci/sbin/camcontrol/camcontrol.c
  user/jimharris/isci/sbin/mdconfig/mdconfig.c
  user/jimharris/isci/sbin/mount_ntfs/mount_ntfs.c
  user/jimharris/isci/share/man/man4/Makefile
  user/jimharris/isci/share/man/man4/carp.4
  user/jimharris/isci/share/man/man4/ciss.4
  user/jimharris/isci/share/man/man4/inet.4
  user/jimharris/isci/share/man/man4/inet6.4
  user/jimharris/isci/share/man/man4/lo.4
  user/jimharris/isci/share/man/man4/netintro.4
  user/jimharris/isci/share/man/man4/tap.4
  user/jimharris/isci/share/man/man4/txp.4
  user/jimharris/isci/share/man/man4/umass.4
  user/jimharris/isci/share/man/man9/Makefile
  user/jimharris/isci/share/man/man9/ifnet.9
  user/jimharris/isci/share/man/man9/malloc.9
  user/jimharris/isci/share/man/man9/vm_page_alloc.9
  user/jimharris/isci/sys/amd64/acpica/acpi_wakecode.S
  user/jimharris/isci/sys/amd64/amd64/fpu.c
  user/jimharris/isci/sys/amd64/amd64/minidump_machdep.c
  user/jimharris/isci/sys/amd64/amd64/uma_machdep.c
  user/jimharris/isci/sys/amd64/include/cpufunc.h
  user/jimharris/isci/sys/amd64/include/signal.h
  user/jimharris/isci/sys/cam/cam_ccb.h
  user/jimharris/isci/sys/cam/cam_xpt.c
  user/jimharris/isci/sys/cam/cam_xpt_internal.h
  user/jimharris/isci/sys/cam/scsi/scsi_all.c
  user/jimharris/isci/sys/cam/scsi/scsi_all.h
  user/jimharris/isci/sys/cam/scsi/scsi_da.c
  user/jimharris/isci/sys/cam/scsi/scsi_xpt.c
  user/jimharris/isci/sys/cddl/compat/opensolaris/sys/kmem.h
  user/jimharris/isci/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
  user/jimharris/isci/sys/conf/files
  user/jimharris/isci/sys/dev/ata/chipsets/ata-acerlabs.c
  user/jimharris/isci/sys/dev/ata/chipsets/ata-siliconimage.c
  user/jimharris/isci/sys/dev/ath/ath_dfs/null/dfs_null.c
  user/jimharris/isci/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c
  user/jimharris/isci/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c
  user/jimharris/isci/sys/dev/ath/ath_hal/ar5212/ar5212.h
  user/jimharris/isci/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
  user/jimharris/isci/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  user/jimharris/isci/sys/dev/ath/if_ath.c
  user/jimharris/isci/sys/dev/ath/if_athdfs.h
  user/jimharris/isci/sys/dev/ciss/ciss.c
  user/jimharris/isci/sys/dev/e1000/README
  user/jimharris/isci/sys/dev/fe/if_fe.c
  user/jimharris/isci/sys/dev/firewire/sbp_targ.c
  user/jimharris/isci/sys/dev/hwpmc/hwpmc_x86.c
  user/jimharris/isci/sys/dev/iwn/if_iwn.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_82598.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_82599.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_api.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_api.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_common.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_common.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_mbx.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_mbx.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_osdep.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_phy.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_phy.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_type.h
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_vf.c
  user/jimharris/isci/sys/dev/ixgbe/ixgbe_vf.h
  user/jimharris/isci/sys/dev/ixgbe/ixv.c
  user/jimharris/isci/sys/dev/ixgbe/ixv.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_cnfg.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_hbd.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_history.txt
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_init.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_ioc.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_ra.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_raid.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_sas.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_targ.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_tool.h
  user/jimharris/isci/sys/dev/mps/mpi/mpi2_type.h
  user/jimharris/isci/sys/dev/mps/mps.c
  user/jimharris/isci/sys/dev/mps/mps_ioctl.h
  user/jimharris/isci/sys/dev/mps/mps_pci.c
  user/jimharris/isci/sys/dev/mps/mps_sas.c
  user/jimharris/isci/sys/dev/mps/mps_table.c
  user/jimharris/isci/sys/dev/mps/mps_user.c
  user/jimharris/isci/sys/dev/mps/mpsvar.h
  user/jimharris/isci/sys/dev/netmap/ixgbe_netmap.h
  user/jimharris/isci/sys/dev/netmap/netmap.c
  user/jimharris/isci/sys/dev/netmap/netmap_kern.h
  user/jimharris/isci/sys/dev/ofw/openfirm.c
  user/jimharris/isci/sys/dev/pccbb/pccbb.c
  user/jimharris/isci/sys/dev/pci/pcireg.h
  user/jimharris/isci/sys/dev/sound/pci/csa.c
  user/jimharris/isci/sys/dev/sound/pci/csareg.h
  user/jimharris/isci/sys/dev/sound/pci/hda/hdaa.c
  user/jimharris/isci/sys/dev/sound/pci/hda/hdac.c
  user/jimharris/isci/sys/dev/sound/pci/hda/hdac.h
  user/jimharris/isci/sys/dev/sound/pci/hda/hdacc.c
  user/jimharris/isci/sys/dev/usb/usb_transfer.c
  user/jimharris/isci/sys/dev/wi/if_wi.c
  user/jimharris/isci/sys/dev/xen/blkback/blkback.c
  user/jimharris/isci/sys/dev/xen/netback/netback.c
  user/jimharris/isci/sys/fs/nfsclient/nfs_clbio.c
  user/jimharris/isci/sys/fs/nfsclient/nfs_clnode.c
  user/jimharris/isci/sys/fs/nfsclient/nfs_clport.c
  user/jimharris/isci/sys/fs/nfsclient/nfs_clvfsops.c
  user/jimharris/isci/sys/geom/geom_bsd.c
  user/jimharris/isci/sys/geom/geom_mbr.c
  user/jimharris/isci/sys/geom/geom_pc98.c
  user/jimharris/isci/sys/geom/mountver/g_mountver.c
  user/jimharris/isci/sys/i386/i386/initcpu.c
  user/jimharris/isci/sys/i386/include/signal.h
  user/jimharris/isci/sys/kern/imgact_elf.c
  user/jimharris/isci/sys/kern/kern_shutdown.c
  user/jimharris/isci/sys/kern/subr_scanf.c
  user/jimharris/isci/sys/kern/subr_syscall.c
  user/jimharris/isci/sys/kern/uipc_mbuf.c
  user/jimharris/isci/sys/kern/vfs_aio.c
  user/jimharris/isci/sys/kern/vfs_vnops.c
  user/jimharris/isci/sys/modules/ixgbe/Makefile
  user/jimharris/isci/sys/modules/mps/Makefile
  user/jimharris/isci/sys/net/flowtable.c
  user/jimharris/isci/sys/net/if_llatbl.c
  user/jimharris/isci/sys/net80211/ieee80211_hwmp.c
  user/jimharris/isci/sys/netinet/ipfw/dn_sched_qfq.c
  user/jimharris/isci/sys/netinet6/in6.h
  user/jimharris/isci/sys/nfsclient/nfs_bio.c
  user/jimharris/isci/sys/nfsclient/nfs_vfsops.c
  user/jimharris/isci/sys/powerpc/aim/mmu_oea64.c
  user/jimharris/isci/sys/powerpc/booke/machdep.c
  user/jimharris/isci/sys/sparc64/include/clock.h
  user/jimharris/isci/sys/sparc64/include/cpu.h
  user/jimharris/isci/sys/sparc64/include/ofw_machdep.h
  user/jimharris/isci/sys/sparc64/include/vmparam.h
  user/jimharris/isci/sys/sparc64/pci/schizo.c
  user/jimharris/isci/sys/sparc64/pci/schizovar.h
  user/jimharris/isci/sys/sparc64/sparc64/cache.c
  user/jimharris/isci/sys/sparc64/sparc64/clock.c
  user/jimharris/isci/sys/sparc64/sparc64/machdep.c
  user/jimharris/isci/sys/sparc64/sparc64/ofw_machdep.c
  user/jimharris/isci/sys/sparc64/sparc64/pmap.c
  user/jimharris/isci/sys/sparc64/sparc64/support.S
  user/jimharris/isci/sys/sys/elf_common.h
  user/jimharris/isci/sys/sys/malloc.h
  user/jimharris/isci/sys/sys/param.h
  user/jimharris/isci/sys/sys/proc.h
  user/jimharris/isci/sys/sys/systm.h
  user/jimharris/isci/sys/vm/uma.h
  user/jimharris/isci/sys/vm/uma_core.c
  user/jimharris/isci/sys/vm/vm_contig.c
  user/jimharris/isci/sys/vm/vm_kern.c
  user/jimharris/isci/sys/vm/vm_page.c
  user/jimharris/isci/sys/vm/vm_page.h
  user/jimharris/isci/sys/xen/interface/io/netif.h
  user/jimharris/isci/tools/regression/sbin/mdconfig/mdconfig.test
  user/jimharris/isci/usr.bin/hexdump/parse.c
  user/jimharris/isci/usr.bin/procstat/procstat_auxv.c
  user/jimharris/isci/usr.bin/tip/tip/tip.c
  user/jimharris/isci/usr.bin/tip/tip/tipout.c
  user/jimharris/isci/usr.sbin/cron/crontab/crontab.5
  user/jimharris/isci/usr.sbin/ifmcstat/ifmcstat.c
  user/jimharris/isci/usr.sbin/mixer/mixer.c
  user/jimharris/isci/usr.sbin/mptutil/mpt_cam.c
Directory Properties:
  user/jimharris/isci/   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe   (props changed)
  user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe   (props changed)
  user/jimharris/isci/contrib/libarchive/   (props changed)
  user/jimharris/isci/contrib/libarchive/libarchive/   (props changed)
  user/jimharris/isci/lib/libc/   (props changed)
  user/jimharris/isci/lib/libutil/   (props changed)
  user/jimharris/isci/sbin/   (props changed)
  user/jimharris/isci/sys/   (props changed)
  user/jimharris/isci/sys/cddl/contrib/opensolaris/   (props changed)
  user/jimharris/isci/sys/conf/   (props changed)
  user/jimharris/isci/usr.bin/procstat/   (props changed)

Modified: user/jimharris/isci/Makefile.inc1
==============================================================================
--- user/jimharris/isci/Makefile.inc1	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/Makefile.inc1	Tue Jan 31 00:12:51 2012	(r230794)
@@ -19,6 +19,7 @@
 #	    list
 #	TARGET="machine" to crossbuild world for a different machine type
 #	TARGET_ARCH= may be required when a TARGET supports multiple endians
+#	BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh)
 
 #
 # The intended user-driven targets are:
@@ -108,6 +109,8 @@ CLEANDIR=	cleandir
 
 LOCAL_TOOL_DIRS?=
 
+BUILDENV_SHELL?=/bin/sh
+
 CVS?=		cvs
 CVSFLAGS?=	-A -P -d -I!
 SVN?=		svn
@@ -558,7 +561,7 @@ buildenvvars:
 
 buildenv:
 	@echo Entering world for ${TARGET_ARCH}:${TARGET}
-	@cd ${.CURDIR} && env ${WMAKEENV} sh || true
+	@cd ${.CURDIR} && env ${WMAKEENV} ${BUILDENV_SHELL} || true
 
 TOOLCHAIN_TGTS=	${WMAKE_TGTS:N_depend:Neverything:Nbuild32}
 toolchain: ${TOOLCHAIN_TGTS}
@@ -832,6 +835,7 @@ buildkernel:
 	@echo ">>> stage 2.3: build tools"
 	@echo "--------------------------------------------------------------"
 	cd ${KRNLOBJDIR}/${_kernel}; \
+	    PATH=${BPATH}:${PATH} \
 	    MAKESRCPATH=${KERNSRCDIR}/dev/aic7xxx/aicasm \
 	    ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF \
 	    -f ${KERNSRCDIR}/dev/aic7xxx/aicasm/Makefile
@@ -839,6 +843,7 @@ buildkernel:
 .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists(${KERNSRCDIR}/modules)
 .for target in obj depend all
 	cd ${KERNSRCDIR}/modules/aic7xxx/aicasm; \
+	    PATH=${BPATH}:${PATH} \
 	    MAKEOBJDIRPREFIX=${KRNLOBJDIR}/${_kernel}/modules \
 	    ${MAKE} SSP_CFLAGS= -DNO_CPU_CFLAGS -DNO_CTF ${target}
 .endfor

Modified: user/jimharris/isci/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_CREATEFAIL.many.exe
==============================================================================
Binary file (source and/or target). No diff available.

Modified: user/jimharris/isci/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
==============================================================================
--- user/jimharris/isci/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h	Tue Jan 31 00:12:51 2012	(r230794)
@@ -331,6 +331,7 @@ extern void cv_broadcast(kcondvar_t *cv)
 #define	KM_NOSLEEP		UMEM_DEFAULT
 #define	KMC_NODEBUG		UMC_NODEBUG
 #define	KMC_NOTOUCH		0	/* not needed for userland caches */
+#define	KM_NODEBUG		0
 #define	kmem_alloc(_s, _f)	umem_alloc(_s, _f)
 #define	kmem_zalloc(_s, _f)	umem_zalloc(_s, _f)
 #define	kmem_free(_b, _s)	umem_free(_b, _s)

Modified: user/jimharris/isci/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
==============================================================================
--- user/jimharris/isci/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c	Tue Jan 31 00:12:51 2012	(r230794)
@@ -1778,6 +1778,19 @@ parse_file_info(struct archive_read *a, 
 				free(file);
 				return (NULL);
 			}
+			/*
+			 * A file size of symbolic link files in ISO images
+			 * made by makefs is not zero and its location is
+			 * the same as those of next regular file. That is
+			 * the same as hard like file and it causes unexpected
+			 * error. 
+			 */
+			if (file->size > 0 &&
+			    (file->mode & AE_IFMT) == AE_IFLNK) {
+				file->size = 0;
+				file->number = -1;
+				file->offset = -1;
+			}
 		} else
 			/* If there isn't SUSP, disable parsing
 			 * rock ridge extensions. */

Modified: user/jimharris/isci/etc/devd/apple.conf
==============================================================================
--- user/jimharris/isci/etc/devd/apple.conf	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/etc/devd/apple.conf	Tue Jan 31 00:12:51 2012	(r230794)
@@ -6,7 +6,6 @@
 notify 0 {
 	match "system"		"PMU";
 	match "subsystem"	"Button";
-	match "notify"		"0x0";
 	action			"shutdown -p now";
 };
 
@@ -16,7 +15,6 @@ notify 0 {
 	match "system"		"PMU";
 	match "subsystem"	"lid";
 	match "type"		"close";
-	match "notify"		"0x0";
 	action			"shutdown -p now";
 };
 

Modified: user/jimharris/isci/etc/rc.d/netif
==============================================================================
--- user/jimharris/isci/etc/rc.d/netif	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/etc/rc.d/netif	Tue Jan 31 00:12:51 2012	(r230794)
@@ -138,10 +138,12 @@ network_common()
 	done
 
 	# inet6 address configuration needs sleep for DAD.
-	if [ -n "${_dadwait}" ]; then
+	case ${_func}:${_dadwait} in
+	ifn_start:1)
 		sleep `${SYSCTL_N} net.inet6.ip6.dad_count`
 		sleep 1
-	fi
+	;;
+	esac
 
 	_str=
 	if [ -n "${_ok}" ]; then

Modified: user/jimharris/isci/games/pom/pom.c
==============================================================================
--- user/jimharris/isci/games/pom/pom.c	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/games/pom/pom.c	Tue Jan 31 00:12:51 2012	(r230794)
@@ -86,6 +86,7 @@ main(int argc, char **argv)
 	double days, today, tomorrow;
 	int ch, cnt, pflag = 0;
 	char *odate = NULL, *otime = NULL;
+	char *progname = argv[0];
 
 	while ((ch = getopt(argc, argv, "d:pt:")) != -1)
 		switch (ch) {
@@ -99,14 +100,14 @@ main(int argc, char **argv)
 			otime = optarg;
 			break;
 		default:
-			usage(argv[0]);
+			usage(progname);
 		}
 
         argc -= optind;
 	argv += optind;
 
 	if (argc)
-		usage(argv[0]);
+		usage(progname);
 
 	/* Adjust based on users preferences */
 	time(&tt);

Modified: user/jimharris/isci/lib/libc/sys/fcntl.2
==============================================================================
--- user/jimharris/isci/lib/libc/sys/fcntl.2	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/lib/libc/sys/fcntl.2	Tue Jan 31 00:12:51 2012	(r230794)
@@ -28,7 +28,7 @@
 .\"     @(#)fcntl.2	8.2 (Berkeley) 1/12/94
 .\" $FreeBSD$
 .\"
-.Dd September 28, 2009
+.Dd January 28, 2012
 .Dt FCNTL 2
 .Os
 .Sh NAME
@@ -143,6 +143,22 @@ process groups are specified by supplyin
 as negative, otherwise
 .Fa arg
 is interpreted as a process ID.
+.It Dv F_READAHEAD
+Set or clear the read ahead amount for sequential access to the third
+argument,
+.Fa arg ,
+which is rounded up to the nearest block size.
+A zero value in
+.Fa arg
+turns off read ahead.
+.It Dv F_RDAHEAD
+Equivalent to Darwin counterpart which sets read ahead amount of 128KB
+when the third argument,
+.Fa arg
+is non-zero.
+A zero value in
+.Fa arg
+turns off read ahead.
 .El
 .Pp
 The flags for the
@@ -241,22 +257,6 @@ will be interrupted if the signal handle
 .Dv SA_RESTART
 (see
 .Xr sigaction 2 ) .
-.It Dv F_READAHEAD
-Set or clear the read ahead amount for sequential access to the third
-argument,
-.Fa arg ,
-which is rounded up to the nearest block size.
-A zero value in
-.Fa arg
-turns off read ahead.
-.It Dv F_RDAHEAD
-Equivalent to Darwin counterpart which sets read ahead amount of 128KB
-when the third argument,
-.Fa arg
-is non-zero.
-A zero value in
-.Fa arg
-turns off read ahead.
 .El
 .Pp
 When a shared lock has been set on a segment of a file,

Modified: user/jimharris/isci/lib/libc/sys/mmap.2
==============================================================================
--- user/jimharris/isci/lib/libc/sys/mmap.2	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/lib/libc/sys/mmap.2	Tue Jan 31 00:12:51 2012	(r230794)
@@ -356,8 +356,7 @@ was specified and insufficient memory wa
 .Xr msync 2 ,
 .Xr munlock 2 ,
 .Xr munmap 2 ,
-.Xr getpagesize 3 ,
-.Xr make.conf 5
+.Xr getpagesize 3
 .Sh BUGS
 The
 .Fa len

Modified: user/jimharris/isci/lib/libutil/libutil.h
==============================================================================
--- user/jimharris/isci/lib/libutil/libutil.h	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/lib/libutil/libutil.h	Tue Jan 31 00:12:51 2012	(r230794)
@@ -71,14 +71,14 @@ typedef	__uid_t		uid_t;
 #define	PROPERTY_MAX_NAME	64
 #define	PROPERTY_MAX_VALUE	512
 
-/* for properties.c */
+/* For properties.c. */
 typedef struct _property {
 	struct _property *next;
 	char	*name;
 	char	*value;
 } *properties;
 
-/* Avoid pulling in all the include files for no need */
+/* Avoid pulling in all the include files for no need. */
 struct in_addr;
 struct pidfh;
 struct sockaddr;
@@ -132,7 +132,11 @@ int	uu_lock(const char *_ttyname);
 int	uu_unlock(const char *_ttyname);
 int	uu_lock_txfr(const char *_ttyname, pid_t _pid);
 
-#ifdef _STDIO_H_	/* avoid adding new includes */
+/*
+ * Conditionally prototype the following functions if the include
+ * files upon which they depend have been included.
+ */
+#ifdef _STDIO_H_
 char	*fparseln(FILE *_fp, size_t *_len, size_t *_lineno,
 	    const char _delim[3], int _flags);
 #endif
@@ -150,26 +154,26 @@ char	*pw_make(const struct passwd *_pw);
 char	*pw_make_v7(const struct passwd *_pw);
 int	pw_mkdb(const char *_user);
 int	pw_lock(void);
-struct passwd
-	*pw_scan(const char *_line, int _flags);
-const char
-	*pw_tempname(void);
+struct passwd *
+	pw_scan(const char *_line, int _flags);
+const char *
+	pw_tempname(void);
 int	pw_tmp(int _mfd);
 #endif
 
 #ifdef _GRP_H_
 int 	gr_copy(int __ffd, int _tfd, const struct group *_gr,
 	    struct group *_old_gr);
-struct group
-	*gr_dup(const struct group *_gr);
+struct group *
+	gr_dup(const struct group *_gr);
 int	gr_equal(const struct group *_gr1, const struct group *_gr2);
 void	gr_fini(void);
 int	gr_init(const char *_dir, const char *_master);
 int	gr_lock(void);
 char	*gr_make(const struct group *_gr);
 int	gr_mkdb(void);
-struct group
-	*gr_scan(const char *_line);
+struct group *
+	gr_scan(const char *_line);
 int	gr_tmp(int _mdf);
 #endif
 
@@ -209,18 +213,18 @@ __END_DECLS
 #define	HD_OMIT_HEX		(1 << 17)
 #define	HD_OMIT_CHARS		(1 << 18)
 
-/* Flags for humanize_number(3) flags. */
+/* Values for humanize_number(3)'s flags parameter. */
 #define	HN_DECIMAL		0x01
 #define	HN_NOSPACE		0x02
 #define	HN_B			0x04
 #define	HN_DIVISOR_1000		0x08
 #define	HN_IEC_PREFIXES		0x10
 
-/* Flags for humanize_number(3) scale. */
+/* Values for humanize_number(3)'s scale parameter. */
 #define	HN_GETSCALE		0x10
 #define	HN_AUTOSCALE		0x20
 
-/* return values from realhostname(). */
+/* Return values from realhostname(). */
 #define	HOSTNAME_FOUND		0
 #define	HOSTNAME_INCORRECTNAME	1
 #define	HOSTNAME_INVALIDADDR	2
@@ -233,12 +237,12 @@ __END_DECLS
 /* Return values from uu_lock(). */
 #define	UU_LOCK_INUSE		1
 #define	UU_LOCK_OK		0
-#define	UU_LOCK_OPEN_ERR	-1
-#define	UU_LOCK_READ_ERR	-2
-#define	UU_LOCK_CREAT_ERR	-3
-#define	UU_LOCK_WRITE_ERR	-4
-#define	UU_LOCK_LINK_ERR	-5
-#define	UU_LOCK_TRY_ERR		-6
-#define	UU_LOCK_OWNER_ERR	-7
+#define	UU_LOCK_OPEN_ERR	(-1)
+#define	UU_LOCK_READ_ERR	(-2)
+#define	UU_LOCK_CREAT_ERR	(-3)
+#define	UU_LOCK_WRITE_ERR	(-4)
+#define	UU_LOCK_LINK_ERR	(-5)
+#define	UU_LOCK_TRY_ERR		(-6)
+#define	UU_LOCK_OWNER_ERR	(-7)
 
 #endif /* !_LIBUTIL_H_ */

Modified: user/jimharris/isci/libexec/rtld-elf/map_object.c
==============================================================================
--- user/jimharris/isci/libexec/rtld-elf/map_object.c	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/libexec/rtld-elf/map_object.c	Tue Jan 31 00:12:51 2012	(r230794)
@@ -84,6 +84,8 @@ map_object(int fd, const char *path, con
     Elf_Addr bss_vlimit;
     caddr_t bss_addr;
     Elf_Word stack_flags;
+    Elf_Addr relro_page;
+    size_t relro_size;
 
     hdr = get_elf_header(fd, path);
     if (hdr == NULL)
@@ -100,6 +102,8 @@ map_object(int fd, const char *path, con
     nsegs = -1;
     phdyn = phinterp = phtls = NULL;
     phdr_vaddr = 0;
+    relro_page = 0;
+    relro_size = 0;
     segs = alloca(sizeof(segs[0]) * hdr->e_phnum);
     stack_flags = RTLD_DEFAULT_STACK_PF_EXEC | PF_R | PF_W;
     while (phdr < phlimit) {
@@ -134,6 +138,11 @@ map_object(int fd, const char *path, con
 	case PT_GNU_STACK:
 	    stack_flags = phdr->p_flags;
 	    break;
+
+	case PT_GNU_RELRO:
+	    relro_page = phdr->p_vaddr;
+	    relro_size = phdr->p_memsz;
+	    break;
 	}
 
 	++phdr;
@@ -269,6 +278,9 @@ map_object(int fd, const char *path, con
 	obj->tlsinit = mapbase + phtls->p_vaddr;
     }
     obj->stack_flags = stack_flags;
+    obj->relro_page = obj->relocbase + trunc_page(relro_page);
+    obj->relro_size = round_page(relro_size);
+
     return obj;
 }
 

Modified: user/jimharris/isci/libexec/rtld-elf/rtld.c
==============================================================================
--- user/jimharris/isci/libexec/rtld-elf/rtld.c	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/libexec/rtld-elf/rtld.c	Tue Jan 31 00:12:51 2012	(r230794)
@@ -1114,6 +1114,11 @@ digest_phdr(const Elf_Phdr *phdr, int ph
 	case PT_GNU_STACK:
 	    obj->stack_flags = ph->p_flags;
 	    break;
+
+	case PT_GNU_RELRO:
+	    obj->relro_page = obj->relocbase + trunc_page(ph->p_vaddr);
+	    obj->relro_size = round_page(ph->p_memsz);
+	    break;
 	}
     }
     if (nsegs < 1) {
@@ -2007,6 +2012,14 @@ relocate_objects(Obj_Entry *first, bool 
 	    if (reloc_jmpslots(obj, lockstate) == -1)
 		return -1;
 
+	if (obj->relro_size > 0) {
+	    if (mprotect(obj->relro_page, obj->relro_size, PROT_READ) == -1) {
+		_rtld_error("%s: Cannot enforce relro protection: %s",
+		  obj->path, strerror(errno));
+		return -1;
+	    }
+	}
+
 	/*
 	 * Set up the magic number and version in the Obj_Entry.  These
 	 * were checked in the crt1.o from the original ElfKit, so we

Modified: user/jimharris/isci/libexec/rtld-elf/rtld.h
==============================================================================
--- user/jimharris/isci/libexec/rtld-elf/rtld.h	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/libexec/rtld-elf/rtld.h	Tue Jan 31 00:12:51 2012	(r230794)
@@ -168,6 +168,9 @@ typedef struct Struct_Obj_Entry {
     size_t tlsoffset;		/* Offset of static TLS block for this module */
     size_t tlsalign;		/* Alignment of static TLS block */
 
+    caddr_t relro_page;
+    size_t relro_size;
+
     /* Items from the dynamic section. */
     Elf_Addr *pltgot;		/* PLT or GOT, depending on architecture */
     const Elf_Rel *rel;		/* Relocation entries */

Modified: user/jimharris/isci/sbin/camcontrol/Makefile
==============================================================================
--- user/jimharris/isci/sbin/camcontrol/Makefile	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/sbin/camcontrol/Makefile	Tue Jan 31 00:12:51 2012	(r230794)
@@ -1,9 +1,9 @@
 # $FreeBSD$
 
 PROG=	camcontrol
-SRCS=	camcontrol.c fwdownload.c util.c
+SRCS=	camcontrol.c util.c
 .if !defined(RELEASE_CRUNCH)
-SRCS+=	modeedit.c
+SRCS+=	fwdownload.c modeedit.c
 .else
 CFLAGS+= -DMINIMALISTIC
 .endif

Modified: user/jimharris/isci/sbin/camcontrol/camcontrol.c
==============================================================================
--- user/jimharris/isci/sbin/camcontrol/camcontrol.c	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/sbin/camcontrol/camcontrol.c	Tue Jan 31 00:12:51 2012	(r230794)
@@ -4232,7 +4232,8 @@ scsireadcapacity(struct cam_device *devi
 			      /*lba*/ 0,
 			      /*reladdr*/ 0,
 			      /*pmi*/ 0,
-			      &rcaplong,
+			      /*rcap_buf*/ (uint8_t *)&rcaplong,
+			      /*rcap_buf_len*/ sizeof(rcaplong),
 			      /*sense_len*/ SSD_FULL_SIZE,
 			      /*timeout*/ timeout ? timeout : 5000);
 

Modified: user/jimharris/isci/sbin/mdconfig/mdconfig.c
==============================================================================
--- user/jimharris/isci/sbin/mdconfig/mdconfig.c	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/sbin/mdconfig/mdconfig.c	Tue Jan 31 00:12:51 2012	(r230794)
@@ -1,7 +1,11 @@
 /*-
  * Copyright (c) 2000-2004 Poul-Henning Kamp <phk@FreeBSD.org>
+ * Copyright (c) 2012 The FreeBSD Foundation
  * All rights reserved.
  *
+ * Portions of this software were developed by Edward Tomasz Napierala
+ * under sponsorship from the FreeBSD Foundation.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -49,7 +53,6 @@
 #include <string.h>
 #include <unistd.h>
 
-
 static struct md_ioctl mdio;
 static enum {UNSET, ATTACH, DETACH, LIST} action = UNSET;
 static int nflag;
@@ -72,6 +75,7 @@ static void md_prthumanval(char *length)
 static void
 usage(void)
 {
+
 	fprintf(stderr,
 "usage: mdconfig -a -t type [-n] [-o [no]option] ... [-f file]\n"
 "                [-s size] [-S sectorsize] [-u unit]\n"
@@ -92,8 +96,7 @@ main(int argc, char **argv)
 {
 	int ch, fd, i, vflag;
 	char *p;
-	int cmdline = 0;
-	char *mdunit = NULL;
+	char *fflag = NULL, *tflag = NULL, *uflag = NULL;
 
 	bzero(&mdio, sizeof(mdio));
 	mdio.md_file = malloc(PATH_MAX);
@@ -101,79 +104,59 @@ main(int argc, char **argv)
 		err(1, "could not allocate memory");
 	vflag = 0;
 	bzero(mdio.md_file, PATH_MAX);
+
+	if (argc == 1)
+		usage();
+
 	while ((ch = getopt(argc, argv, "ab:df:lno:s:S:t:u:vx:y:")) != -1) {
 		switch (ch) {
 		case 'a':
-			if (cmdline != 0)
-				usage();
+			if (action != UNSET && action != ATTACH)
+				errx(1,
+				    "-a is mutually exclusive with -d and -l");
 			action = ATTACH;
-			cmdline = 1;
 			break;
 		case 'd':
-			if (cmdline != 0)
-				usage();
+			if (action != UNSET && action != DETACH)
+				errx(1,
+				    "-d is mutually exclusive with -a and -l");
 			action = DETACH;
-			mdio.md_options = MD_AUTOUNIT;
-			cmdline = 3;
+			mdio.md_options |= MD_AUTOUNIT;
 			break;
 		case 'l':
-			if (cmdline != 0)
-				usage();
+			if (action != UNSET && action != LIST)
+				errx(1,
+				    "-l is mutually exclusive with -a and -d");
 			action = LIST;
-			mdio.md_options = MD_AUTOUNIT;
-			cmdline = 3;
+			mdio.md_options |= MD_AUTOUNIT;
 			break;
 		case 'n':
 			nflag = 1;
 			break;
 		case 't':
-			if (cmdline != 1)
-				usage();
+			if (tflag != NULL)
+				errx(1, "-t can be passed only once");
+			tflag = optarg;
 			if (!strcmp(optarg, "malloc")) {
 				mdio.md_type = MD_MALLOC;
-				mdio.md_options = MD_AUTOUNIT | MD_COMPRESS;
+				mdio.md_options |= MD_AUTOUNIT | MD_COMPRESS;
 			} else if (!strcmp(optarg, "preload")) {
 				mdio.md_type = MD_PRELOAD;
-				mdio.md_options = 0;
 			} else if (!strcmp(optarg, "vnode")) {
 				mdio.md_type = MD_VNODE;
-				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
+				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
 			} else if (!strcmp(optarg, "swap")) {
 				mdio.md_type = MD_SWAP;
-				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
-			} else {
-				usage();
-			}
-			cmdline=2;
+				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
+			} else
+				errx(1, "unknown type: %s", optarg);
 			break;
 		case 'f':
-			if (cmdline == 0) {
-				action = ATTACH;
-				cmdline = 1;
-			}
-			if (cmdline == 1) {
-				/* Imply ``-t vnode'' */
-				mdio.md_type = MD_VNODE;
-				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
-				cmdline = 2;
-			}
-			if (cmdline != 2)
-				usage();
-			md_set_file(optarg);
+			if (fflag != NULL)
+				errx(1, "-f can be passed only once");
+			fflag = optarg;
 			break;
 		case 'o':
-			if (action == DETACH) {
-				if (!strcmp(optarg, "force"))
-					mdio.md_options |= MD_FORCE;
-				else if (!strcmp(optarg, "noforce"))
-					mdio.md_options &= ~MD_FORCE;
-				else
-					errx(1, "Unknown option: %s.", optarg);
-				break;
-			}
-
-			if (cmdline != 2)
-				usage();
 			if (!strcmp(optarg, "async"))
 				mdio.md_options |= MD_ASYNC;
 			else if (!strcmp(optarg, "noasync"))
@@ -199,27 +182,12 @@ main(int argc, char **argv)
 			else if (!strcmp(optarg, "noreserve"))
 				mdio.md_options &= ~MD_RESERVE;
 			else
-				errx(1, "Unknown option: %s.", optarg);
+				errx(1, "unknown option: %s", optarg);
 			break;
 		case 'S':
-			if (cmdline != 2)
-				usage();
 			mdio.md_sectorsize = strtoul(optarg, &p, 0);
 			break;
 		case 's':
-			if (cmdline == 0) {
-				/* Imply ``-a'' */
-				action = ATTACH;
-				cmdline = 1;
-			}
-			if (cmdline == 1) {
-				/* Imply ``-t swap'' */
-				mdio.md_type = MD_SWAP;
-				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
-				cmdline = 2;
-			}
-			if (cmdline != 2)
-				usage();
 			mdio.md_mediasize = (off_t)strtoumax(optarg, &p, 0);
 			if (p == NULL || *p == '\0')
 				mdio.md_mediasize *= DEV_BSIZE;
@@ -235,34 +203,22 @@ main(int argc, char **argv)
 				mdio.md_mediasize <<= 30;
 				mdio.md_mediasize <<= 10;
 			} else
-				errx(1, "Unknown suffix on -s argument");
+				errx(1, "unknown suffix on -s argument");
 			break;
 		case 'u':
-			if (cmdline != 2 && cmdline != 3)
-				usage();
 			if (!strncmp(optarg, "/dev/", 5))
 				optarg += 5;
 			if (!strncmp(optarg, MD_NAME, sizeof(MD_NAME) - 1))
 				optarg += sizeof(MD_NAME) - 1;
-			mdio.md_unit = strtoul(optarg, &p, 0);
-			if (mdio.md_unit == (unsigned)ULONG_MAX || *p != '\0')
-				errx(1, "bad unit: %s", optarg);
-			mdunit = optarg;
-			mdio.md_options &= ~MD_AUTOUNIT;
+			uflag = optarg;
 			break;
 		case 'v':
-			if (cmdline != 3)
-				usage();
 			vflag = OPT_VERBOSE;
 			break;
 		case 'x':
-			if (cmdline != 2)
-				usage();
 			mdio.md_fwsectors = strtoul(optarg, &p, 0);
 			break;
 		case 'y':
-			if (cmdline != 2)
-				usage();
 			mdio.md_fwheads = strtoul(optarg, &p, 0);
 			break;
 		default:
@@ -272,14 +228,88 @@ main(int argc, char **argv)
 
 	argc -= optind;
 	argv += optind;
-	if (action == UNSET) {
-		if (argc != 1)
-			usage();
+
+	if (action == UNSET)
 		action = ATTACH;
-		mdio.md_type = MD_VNODE;
-		mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
-		cmdline = 2;
-		md_set_file(*argv);
+
+	if (action == ATTACH) {
+		if (tflag == NULL) {
+			/*
+			 * Try to infer the type based on other arguments.
+			 */
+			if (fflag != NULL || argc > 0) {
+				/* Imply ``-t vnode'' */
+				mdio.md_type = MD_VNODE;
+				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT |
+				    MD_COMPRESS;
+			} else if (mdio.md_mediasize != 0) {
+				/* Imply ``-t swap'' */
+				mdio.md_type = MD_SWAP;
+				mdio.md_options |= MD_CLUSTER | MD_AUTOUNIT |
+				    MD_COMPRESS;
+			} else
+				errx(1, "unable to determine type");
+		}
+
+		if ((fflag != NULL || argc > 0) && mdio.md_type != MD_VNODE)
+			errx(1, "only -t vnode can be used with file name");
+
+		if (mdio.md_type == MD_VNODE) {
+			if (fflag != NULL) {
+				if (argc != 0)
+					usage();
+				md_set_file(fflag);
+			} else {
+				if (argc != 1)
+					usage();
+				md_set_file(*argv);
+			}
+
+			if ((mdio.md_options & MD_READONLY) == 0 &&
+			    access(mdio.md_file, W_OK) < 0 &&
+			    (errno == EACCES || errno == EPERM ||
+			     errno == EROFS)) {
+				warnx("WARNING: opening backing store: %s "
+				    "readonly", mdio.md_file);
+				mdio.md_options |= MD_READONLY;
+			}
+		}
+
+		if ((mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP) &&
+		    mdio.md_mediasize == 0)
+			errx(1, "must specify -s for -t malloc or -t swap");
+		if (mdio.md_type == MD_VNODE && mdio.md_file[0] == '\0')
+			errx(1, "must specify -f for -t vnode");
+	} else {
+		if (mdio.md_sectorsize != 0)
+			errx(1, "-S can only be used with -a");
+		if (mdio.md_mediasize != 0)
+			errx(1, "-s can only be used with -a");
+		if (mdio.md_fwsectors != 0)
+			errx(1, "-x can only be used with -a");
+		if (mdio.md_fwheads != 0)
+			errx(1, "-y can only be used with -a");
+		if (fflag != NULL)
+			errx(1, "-f can only be used with -a");
+		if (tflag != NULL)
+			errx(1, "-t can only be used with -a");
+		if (argc > 0)
+			errx(1, "file can only be used with -a");
+		if (action != DETACH && (mdio.md_options & ~MD_AUTOUNIT) != 0)
+			errx(1, "-o can only be used with -a and -d");
+		if (action == DETACH &&
+		    (mdio.md_options & ~(MD_FORCE | MD_AUTOUNIT)) != 0)
+			errx(1, "only -o [no]force can be used with -d");
+	}
+
+	if (action != LIST && vflag == OPT_VERBOSE)
+		errx(1, "-v can only be used with -l");
+
+	if (uflag != NULL) {
+		mdio.md_unit = strtoul(uflag, &p, 0);
+		if (mdio.md_unit == (unsigned)ULONG_MAX || *p != '\0')
+			errx(1, "bad unit: %s", uflag);
+		mdio.md_options &= ~MD_AUTOUNIT;
 	}
 
 	mdio.md_version = MDIOVERSION;
@@ -290,36 +320,8 @@ main(int argc, char **argv)
 	fd = open("/dev/" MDCTL_NAME, O_RDWR, 0);
 	if (fd < 0)
 		err(1, "open(/dev/%s)", MDCTL_NAME);
-	if (cmdline == 2
-	    && (mdio.md_type == MD_MALLOC || mdio.md_type == MD_SWAP))
-		if (mdio.md_mediasize == 0)
-			errx(1, "must specify -s for -t malloc or -t swap");
-	if (cmdline == 2 && mdio.md_type == MD_VNODE)
-		if (mdio.md_file[0] == '\0')
-			errx(1, "must specify -f for -t vnode");
-	if (mdio.md_type == MD_VNODE &&
-	    (mdio.md_options & MD_READONLY) == 0) {
-		if (access(mdio.md_file, W_OK) < 0 &&
-		    (errno == EACCES || errno == EPERM || errno == EROFS)) {
-			fprintf(stderr,
-			    "WARNING: opening backing store: %s readonly\n",
-			    mdio.md_file);
-			mdio.md_options |= MD_READONLY;
-		}
-	}
-	if (action == LIST) {
-		if (mdio.md_options & MD_AUTOUNIT) {
-			/*
-			 * Listing all devices. This is why we pass NULL
-			 * together with OPT_LIST.
-			 */
-			md_list(NULL, OPT_LIST | vflag);
-		} else {
-			return (md_query(mdunit));
-		}
-	} else if (action == ATTACH) {
-		if (cmdline < 2)
-			usage();
+
+	if (action == ATTACH) {
 		i = ioctl(fd, MDIOCATTACH, &mdio);
 		if (i < 0)
 			err(1, "ioctl(/dev/%s)", MDCTL_NAME);
@@ -327,13 +329,23 @@ main(int argc, char **argv)
 			printf("%s%d\n", nflag ? "" : MD_NAME, mdio.md_unit);
 	} else if (action == DETACH) {
 		if (mdio.md_options & MD_AUTOUNIT)
-			usage();
+			errx(1, "-d requires -u");
 		i = ioctl(fd, MDIOCDETACH, &mdio);
 		if (i < 0)
 			err(1, "ioctl(/dev/%s)", MDCTL_NAME);
+	} else if (action == LIST) {
+		if (mdio.md_options & MD_AUTOUNIT) {
+			/*
+			 * Listing all devices. This is why we pass NULL
+			 * together with OPT_LIST.
+			 */
+			md_list(NULL, OPT_LIST | vflag);
+		} else
+			return (md_query(uflag));
+
 	} else
 		usage();
-	close (fd);
+	close(fd);
 	return (0);
 }
 
@@ -507,5 +519,6 @@ md_prthumanval(char *length)
 int
 md_query(char *name)
 {
+
 	return (md_list(name, OPT_UNIT));
 }

Modified: user/jimharris/isci/sbin/mount_ntfs/mount_ntfs.c
==============================================================================
--- user/jimharris/isci/sbin/mount_ntfs/mount_ntfs.c	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/sbin/mount_ntfs/mount_ntfs.c	Tue Jan 31 00:12:51 2012	(r230794)
@@ -160,7 +160,7 @@ main(int argc, char *argv[])
 	}
 
 	/*
-	 * Resolve the mountpoint with realpath(3) and remove unnecessary 
+	 * Resolve the mountpoint with realpath(3) and remove unnecessary
 	 * slashes from the devicename if there are any.
 	 */
 	if (checkpath(dir, mntpath) != 0)

Modified: user/jimharris/isci/share/man/man4/Makefile
==============================================================================
--- user/jimharris/isci/share/man/man4/Makefile	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/share/man/man4/Makefile	Tue Jan 31 00:12:51 2012	(r230794)
@@ -532,6 +532,7 @@ MAN=	aac.4 \
 	${_xen.4} \
 	xhci.4 \
 	xl.4 \
+	${_xnb.4} \
 	xpt.4 \
 	zero.4 \
 	zyd.4
@@ -732,6 +733,7 @@ _urtw.4=	urtw.4
 _viawd.4=	viawd.4
 _wpi.4=		wpi.4
 _xen.4=		xen.4
+_xnb.4=		xnb.4
 
 MLINKS+=lindev.4 full.4
 .endif

Modified: user/jimharris/isci/share/man/man4/carp.4
==============================================================================
--- user/jimharris/isci/share/man/man4/carp.4	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/share/man/man4/carp.4	Tue Jan 31 00:12:51 2012	(r230794)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 20, 2011
+.Dd January 26, 2012
 .Dt CARP 4
 .Os
 .Sh NAME
@@ -99,24 +99,14 @@ packets.
 Enabled by default.
 .It Va net.inet.carp.preempt
 Allow virtual hosts to preempt each other.
-It is also used to failover
-.Nm
-interfaces as a group.
-When the option is enabled and one of the
-.Nm
-enabled physical interfaces
-goes down,
-.Cm advskew
-is changed to 240 on all
-.Nm
-interfaces.
-See also the first example.
+When enabled, a vhid in a backup state would preempt a master that
+is announcing itself with a lower advskew.
 Disabled by default.
 .It Va net.inet.carp.log
 Value of 0 disables any logging.
 Value of 1 enables logging state changes of
 .Nm
-interfaces.
+vhids.
 Values above 1 enable logging of bad
 .Nm
 packets.
@@ -202,9 +192,9 @@ and 
 section for more information.
 .Sh EXAMPLES
 For firewalls and routers with multiple interfaces, it is desirable to
-failover all of the
+failover all of the addresses running
 .Nm
-interfaces together, when one of the physical interfaces goes down.
+together, when one of the physical interfaces goes down.
 This is achieved by the preempt option.
 Enable it on both host A and B:
 .Pp
@@ -225,14 +215,13 @@ ifconfig em0 vhid 1 advskew 100 pass mek
 ifconfig em1 vhid 2 advskew 100 pass mekmitasdigoat 192.168.2.1/24
 .Ed
 .Pp
-Because of the preempt option, when one of the physical interfaces of
-host A fails,
+When one of the physical interfaces of host A fails,
 .Cm advskew
-is adjusted to 240 on all its
+is demoted to a configured value on all its
 .Nm
-interfaces.
-This will cause host B to preempt on both interfaces instead of
-just the failed one.
+vhids.
+Due to the preempt option, host B would start announcing itself, and thus
+preempt host A on both interfaces instead of just the failed one.
 .\".Pp
 .\"In order to set up an ARP balanced virtual host, it is necessary to configure
 .\"one virtual host for each physical host which would respond to ARP requests

Modified: user/jimharris/isci/share/man/man4/ciss.4
==============================================================================
--- user/jimharris/isci/share/man/man4/ciss.4	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/share/man/man4/ciss.4	Tue Jan 31 00:12:51 2012	(r230794)
@@ -2,7 +2,7 @@
 .\" Written by Tom Rhodes
 .\" This file is in the public domain.
 .\"
-.Dd January 18, 2012
+.Dd January 26, 2012
 .Dt CISS 4
 .Os
 .Sh NAME
@@ -121,6 +121,10 @@ HP Smart Array E200i
 .It
 HP Smart Array P212
 .It
+HP Smart Array P220i
+.It
+HP Smart Array P222
+.It
 HP Smart Array P400
 .It
 HP Smart Array P400i
@@ -133,8 +137,14 @@ HP Smart Array P411
 .It
 HP Smart Array P420
 .It
+HP Smart Array P420i
+.It
+HP Smart Array P421
+.It
 HP Smart Array P600
 .It
+HP Smart Array P721m
+.It
 HP Smart Array P800
 .It
 HP Smart Array P812

Modified: user/jimharris/isci/share/man/man4/inet.4
==============================================================================
--- user/jimharris/isci/share/man/man4/inet.4	Tue Jan 31 00:03:49 2012	(r230793)
+++ user/jimharris/isci/share/man/man4/inet.4	Tue Jan 31 00:12:51 2012	(r230794)
@@ -32,7 +32,7 @@
 .\"     From: @(#)inet.4	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd April 9, 2005
+.Dd January 26, 2012
 .Dt INET 4
 .Os
 .Sh NAME
@@ -130,25 +130,37 @@ The
 .Tn ICMP
 message protocol is accessible from a raw socket.
 .Pp
-The 32-bit Internet address contains both network and host parts.
-However, direct examination of addresses is discouraged.
-For those
-programs which absolutely need to break addresses into their component
-parts, the following
+The
+.Nm
+address on an interface consist of the address itself, the
+netmask, either broadcast address in case of a broadcast
+interface or peers address in case of point-to-point interface.
+The following
 .Xr ioctl 2
-commands are provided for a datagram socket in the Internet domain;
-they have the same form as the
-.Dv SIOCIFADDR
-command (see
-.Xr intro 4 ) .
-.Bl -tag -width SIOCSIFNETMASK
-.It Dv SIOCSIFNETMASK
-Set interface network mask.
-The network mask defines the network part of the address;
-if it contains more of the address than the address type would indicate,
-then subnets are in use.
+commands are provided for a datagram socket in the Internet domain:
+.Pp
+.Bl -tag -width ".Dv SIOCGIFBRDADDR" -offset indent -compact   
+.It Dv SIOCAIFADDR
+Add address to an interface.
+The command requires
+.Ft struct in_aliasreq
+as argument.
+.It Dv SIOCDIFADDR
+Delete address from an interface.
+The command requires
+.Ft struct ifreq
+as argument.
+.It Dv SIOCGIFADDR
+.It Dv SIOCGIFBRDADDR
+.It Dv SIOCGIFDSTADDR
 .It Dv SIOCGIFNETMASK
-Get interface network mask.
+Return address information from interface. The returned value
+is in

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



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