svn commit: r203832 - in user/imp/tbemd: bin/ls bin/pkill bin/ps etc/defaults etc/rc.d games/fortune/datfiles games/grdc gnu/usr.bin/groff/tmac lib/libc/nls lib/libc/posix1e lib/libc/stdlib lib/lib...

Warner Losh imp at FreeBSD.org
Sat Feb 13 15:35:54 UTC 2010


Author: imp
Date: Sat Feb 13 15:35:51 2010
New Revision: 203832
URL: http://svn.freebsd.org/changeset/base/203832

Log:
  merge from head.

Added:
  user/imp/tbemd/share/man/man4/alpm.4
     - copied unchanged from r203812, head/share/man/man4/alpm.4
  user/imp/tbemd/share/man/man4/amdpm.4
     - copied unchanged from r203812, head/share/man/man4/amdpm.4
  user/imp/tbemd/share/man/man4/mcd.4
     - copied unchanged from r203812, head/share/man/man4/mcd.4
  user/imp/tbemd/share/man/man4/padlock.4
     - copied unchanged from r203812, head/share/man/man4/padlock.4
  user/imp/tbemd/share/man/man4/pcf.4
     - copied unchanged from r203812, head/share/man/man4/pcf.4
  user/imp/tbemd/share/man/man4/scd.4
     - copied unchanged from r203812, head/share/man/man4/scd.4
  user/imp/tbemd/share/man/man4/viapm.4
     - copied unchanged from r203812, head/share/man/man4/viapm.4
  user/imp/tbemd/sys/mips/conf/SWARM_SMP
     - copied unchanged from r203812, head/sys/mips/conf/SWARM_SMP
  user/imp/tbemd/sys/mips/mips/mpboot.S
     - copied unchanged from r203812, head/sys/mips/mips/mpboot.S
  user/imp/tbemd/tools/regression/usr.bin/pkill/pgrep-q.t
     - copied unchanged from r203812, head/tools/regression/usr.bin/pkill/pgrep-q.t
  user/imp/tbemd/usr.bin/ee/nls/pt_BR.ISO8859-1/
     - copied from r203812, head/usr.bin/ee/nls/pt_BR.ISO8859-1/
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_annotate.c
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_annotate.c
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_annotate.h
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_annotate.h
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_callgraph.c
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_callgraph.c
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_callgraph.h
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_callgraph.h
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_calltree.c
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_calltree.c
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_calltree.h
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_calltree.h
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_gprof.c
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_gprof.c
  user/imp/tbemd/usr.sbin/pmcstat/pmcpl_gprof.h
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcpl_gprof.h
  user/imp/tbemd/usr.sbin/pmcstat/pmcstat_log.h
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcstat_log.h
  user/imp/tbemd/usr.sbin/pmcstat/pmcstat_top.h
     - copied unchanged from r203812, head/usr.sbin/pmcstat/pmcstat_top.h
Deleted:
  user/imp/tbemd/share/man/man4/man4.i386/alpm.4
  user/imp/tbemd/share/man/man4/man4.i386/amdpm.4
  user/imp/tbemd/share/man/man4/man4.i386/mcd.4
  user/imp/tbemd/share/man/man4/man4.i386/padlock.4
  user/imp/tbemd/share/man/man4/man4.i386/pcf.4
  user/imp/tbemd/share/man/man4/man4.i386/scd.4
  user/imp/tbemd/share/man/man4/man4.i386/viapm.4
Modified:
  user/imp/tbemd/bin/ls/ls.c
  user/imp/tbemd/bin/pkill/pkill.1
  user/imp/tbemd/bin/pkill/pkill.c
  user/imp/tbemd/bin/ps/ps.c
  user/imp/tbemd/etc/defaults/rc.conf
  user/imp/tbemd/etc/rc.d/ipfw
  user/imp/tbemd/games/fortune/datfiles/fortunes
  user/imp/tbemd/games/grdc/grdc.c
  user/imp/tbemd/gnu/usr.bin/groff/tmac/mdoc.local
  user/imp/tbemd/lib/libc/nls/msgcat.c
  user/imp/tbemd/lib/libc/posix1e/mac.3
  user/imp/tbemd/lib/libc/stdlib/strfmon.c
  user/imp/tbemd/lib/libc/sys/ptrace.2
  user/imp/tbemd/lib/libefi/libefi.3
  user/imp/tbemd/lib/libufs/cgroup.c
  user/imp/tbemd/lib/libufs/sblock.c
  user/imp/tbemd/lib/libusb/libusb.h
  user/imp/tbemd/lib/libusb/libusb10.c
  user/imp/tbemd/lib/libusb/libusb10_desc.c
  user/imp/tbemd/lib/libusb/libusb10_io.c
  user/imp/tbemd/lib/libusb/libusb20_compat01.c
  user/imp/tbemd/lib/libusb/libusb20_desc.c
  user/imp/tbemd/lib/libusb/libusb20_ugen20.c
  user/imp/tbemd/lib/libusb/usb.h
  user/imp/tbemd/libexec/ftpd/logwtmp.c
  user/imp/tbemd/sbin/growfs/growfs.c
  user/imp/tbemd/sbin/mount/mount.8
  user/imp/tbemd/sbin/newfs/mkfs.c
  user/imp/tbemd/sbin/newfs/newfs.c
  user/imp/tbemd/sbin/newfs/newfs.h
  user/imp/tbemd/sbin/sysctl/sysctl.c
  user/imp/tbemd/sbin/tunefs/tunefs.c
  user/imp/tbemd/share/man/man4/Makefile
  user/imp/tbemd/share/man/man4/acpi_asus.4
  user/imp/tbemd/share/man/man4/acpi_fujitsu.4
  user/imp/tbemd/share/man/man4/acpi_hp.4
  user/imp/tbemd/share/man/man4/acpi_ibm.4
  user/imp/tbemd/share/man/man4/acpi_panasonic.4
  user/imp/tbemd/share/man/man4/acpi_sony.4
  user/imp/tbemd/share/man/man4/acpi_toshiba.4
  user/imp/tbemd/share/man/man4/acpi_wmi.4
  user/imp/tbemd/share/man/man4/io.4
  user/imp/tbemd/share/man/man4/iwn.4
  user/imp/tbemd/share/man/man4/iwnfw.4
  user/imp/tbemd/share/man/man4/linux.4
  user/imp/tbemd/share/man/man4/man4.i386/Makefile
  user/imp/tbemd/share/man/man4/ndis.4
  user/imp/tbemd/share/man/man4/nvram.4
  user/imp/tbemd/share/man/man4/sctp.4
  user/imp/tbemd/share/man/man5/rc.conf.5
  user/imp/tbemd/share/man/man9/VFS.9
  user/imp/tbemd/share/man/man9/alloc_unr.9
  user/imp/tbemd/share/man/man9/locking.9
  user/imp/tbemd/share/man/man9/vnode.9
  user/imp/tbemd/share/zoneinfo/Makefile
  user/imp/tbemd/sys/amd64/conf/GENERIC
  user/imp/tbemd/sys/amd64/conf/NOTES
  user/imp/tbemd/sys/amd64/conf/XENHVM
  user/imp/tbemd/sys/arm/arm/pmap.c
  user/imp/tbemd/sys/arm/conf/AVILA
  user/imp/tbemd/sys/arm/conf/BWCT
  user/imp/tbemd/sys/arm/conf/CAMBRIA
  user/imp/tbemd/sys/arm/conf/CNS11XXNAS
  user/imp/tbemd/sys/arm/conf/CRB
  user/imp/tbemd/sys/arm/conf/DB-78XXX
  user/imp/tbemd/sys/arm/conf/DB-88F5XXX
  user/imp/tbemd/sys/arm/conf/DB-88F6XXX
  user/imp/tbemd/sys/arm/conf/EP80219
  user/imp/tbemd/sys/arm/conf/GUMSTIX
  user/imp/tbemd/sys/arm/conf/HL200
  user/imp/tbemd/sys/arm/conf/IQ31244
  user/imp/tbemd/sys/arm/conf/KB920X
  user/imp/tbemd/sys/arm/conf/NSLU
  user/imp/tbemd/sys/arm/conf/SIMICS
  user/imp/tbemd/sys/arm/conf/SKYEYE
  user/imp/tbemd/sys/arm/xscale/ixp425/cambria_fled.c
  user/imp/tbemd/sys/compat/freebsd32/syscalls.master
  user/imp/tbemd/sys/compat/linux/linux_socket.c
  user/imp/tbemd/sys/compat/svr4/syscalls.master
  user/imp/tbemd/sys/conf/NOTES
  user/imp/tbemd/sys/conf/files.amd64
  user/imp/tbemd/sys/conf/files.i386
  user/imp/tbemd/sys/conf/files.ia64
  user/imp/tbemd/sys/conf/files.mips
  user/imp/tbemd/sys/conf/files.pc98
  user/imp/tbemd/sys/conf/files.sparc64
  user/imp/tbemd/sys/conf/options.mips
  user/imp/tbemd/sys/ddb/db_thread.c
  user/imp/tbemd/sys/dev/aac/aac.c
  user/imp/tbemd/sys/dev/aac/aac_pci.c
  user/imp/tbemd/sys/dev/aac/aacreg.h
  user/imp/tbemd/sys/dev/aac/aacvar.h
  user/imp/tbemd/sys/dev/acpi_support/acpi_asus.c
  user/imp/tbemd/sys/dev/acpica/acpi.c
  user/imp/tbemd/sys/dev/acpica/acpi_cpu.c
  user/imp/tbemd/sys/dev/acpica/acpi_video.c
  user/imp/tbemd/sys/dev/aic7xxx/aic79xx_osm.c
  user/imp/tbemd/sys/dev/ath/ath_hal/ah_eeprom_v14.h
  user/imp/tbemd/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
  user/imp/tbemd/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
  user/imp/tbemd/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  user/imp/tbemd/sys/dev/ath/ath_hal/ar5416/ar5416phy.h
  user/imp/tbemd/sys/dev/ath/ath_hal/ar5416/ar9280.c
  user/imp/tbemd/sys/dev/ath/ath_hal/ar5416/ar9280.h
  user/imp/tbemd/sys/dev/ath/ath_hal/ar5416/ar9280_attach.c
  user/imp/tbemd/sys/dev/ath/if_ath.c
  user/imp/tbemd/sys/dev/ath/if_athvar.h
  user/imp/tbemd/sys/dev/bge/if_bge.c
  user/imp/tbemd/sys/dev/sound/usb/uaudio.c
  user/imp/tbemd/sys/dev/sound/usb/uaudioreg.h
  user/imp/tbemd/sys/dev/usb/controller/ehci.c
  user/imp/tbemd/sys/dev/usb/controller/ehci.h
  user/imp/tbemd/sys/dev/usb/controller/ehci_pci.c
  user/imp/tbemd/sys/i386/conf/GENERIC
  user/imp/tbemd/sys/i386/conf/NOTES
  user/imp/tbemd/sys/i386/conf/XEN
  user/imp/tbemd/sys/i386/ibcs2/syscalls.master
  user/imp/tbemd/sys/ia64/conf/GENERIC
  user/imp/tbemd/sys/kern/kern_umtx.c
  user/imp/tbemd/sys/kern/makesyscalls.sh
  user/imp/tbemd/sys/kern/sys_process.c
  user/imp/tbemd/sys/kern/syscalls.master
  user/imp/tbemd/sys/mips/conf/ADM5120
  user/imp/tbemd/sys/mips/conf/ALCHEMY
  user/imp/tbemd/sys/mips/conf/AR71XX
  user/imp/tbemd/sys/mips/conf/IDT
  user/imp/tbemd/sys/mips/conf/MALTA
  user/imp/tbemd/sys/mips/conf/MALTA64
  user/imp/tbemd/sys/mips/conf/OCTEON1
  user/imp/tbemd/sys/mips/conf/OCTEON1-32
  user/imp/tbemd/sys/mips/conf/QEMU
  user/imp/tbemd/sys/mips/conf/SENTRY5
  user/imp/tbemd/sys/mips/conf/SWARM
  user/imp/tbemd/sys/mips/conf/XLR
  user/imp/tbemd/sys/mips/include/asm.h
  user/imp/tbemd/sys/mips/include/cpu.h
  user/imp/tbemd/sys/mips/include/hwfunc.h
  user/imp/tbemd/sys/mips/include/intr_machdep.h
  user/imp/tbemd/sys/mips/include/pcpu.h
  user/imp/tbemd/sys/mips/include/smp.h
  user/imp/tbemd/sys/mips/mips/exception.S
  user/imp/tbemd/sys/mips/mips/intr_machdep.c
  user/imp/tbemd/sys/mips/mips/machdep.c
  user/imp/tbemd/sys/mips/mips/mp_machdep.c
  user/imp/tbemd/sys/mips/mips/nexus.c
  user/imp/tbemd/sys/mips/mips/pmap.c
  user/imp/tbemd/sys/mips/mips/tick.c
  user/imp/tbemd/sys/mips/rmi/dev/xlr/rge.c
  user/imp/tbemd/sys/mips/sibyte/sb_asm.S
  user/imp/tbemd/sys/mips/sibyte/sb_machdep.c
  user/imp/tbemd/sys/mips/sibyte/sb_scd.c
  user/imp/tbemd/sys/mips/sibyte/sb_scd.h
  user/imp/tbemd/sys/mips/sibyte/sb_zbbus.c
  user/imp/tbemd/sys/mips/sibyte/sb_zbpci.c
  user/imp/tbemd/sys/net/vnet.c
  user/imp/tbemd/sys/net80211/ieee80211_crypto_tkip.c
  user/imp/tbemd/sys/netinet/tcp_hostcache.c
  user/imp/tbemd/sys/nfs/nfs_common.c
  user/imp/tbemd/sys/nfs/nfs_common.h
  user/imp/tbemd/sys/nfsclient/nfs_krpc.c
  user/imp/tbemd/sys/nfsserver/nfs.h
  user/imp/tbemd/sys/nfsserver/nfs_fha.c
  user/imp/tbemd/sys/nfsserver/nfs_srvkrpc.c
  user/imp/tbemd/sys/pc98/conf/GENERIC
  user/imp/tbemd/sys/powerpc/conf/GENERIC
  user/imp/tbemd/sys/powerpc/conf/MPC85XX
  user/imp/tbemd/sys/sparc64/conf/GENERIC
  user/imp/tbemd/sys/sun4v/conf/GENERIC
  user/imp/tbemd/sys/sys/ptrace.h
  user/imp/tbemd/sys/teken/teken_scs.h
  user/imp/tbemd/sys/ufs/ffs/ffs_alloc.c
  user/imp/tbemd/sys/ufs/ffs/ffs_vfsops.c
  user/imp/tbemd/sys/ufs/ffs/fs.h
  user/imp/tbemd/tools/build/mk/OptionalObsoleteFiles.inc
  user/imp/tbemd/tools/regression/bin/sh/parameters/mail2.0
  user/imp/tbemd/tools/regression/file/newfileops_on_fork/newfileops_on_fork.c
  user/imp/tbemd/tools/regression/gaithrstress/gaithrstress.c
  user/imp/tbemd/tools/tools/mctest/mctest.cc
  user/imp/tbemd/tools/tools/netrate/http/http.c
  user/imp/tbemd/tools/tools/netrate/httpd/httpd.c
  user/imp/tbemd/tools/tools/netrate/juggle/juggle.c
  user/imp/tbemd/usr.bin/Makefile
  user/imp/tbemd/usr.bin/ee/Makefile
  user/imp/tbemd/usr.bin/elf2aout/elf2aout.1
  user/imp/tbemd/usr.bin/elf2aout/elf2aout.c
  user/imp/tbemd/usr.bin/find/Makefile
  user/imp/tbemd/usr.bin/find/extern.h
  user/imp/tbemd/usr.bin/find/function.c
  user/imp/tbemd/usr.bin/find/getdate.y
  user/imp/tbemd/usr.bin/uname/uname.1
  user/imp/tbemd/usr.bin/uname/uname.c
  user/imp/tbemd/usr.bin/w/w.c
  user/imp/tbemd/usr.sbin/pmcstat/Makefile
  user/imp/tbemd/usr.sbin/pmcstat/pmcstat.8
  user/imp/tbemd/usr.sbin/pmcstat/pmcstat.c
  user/imp/tbemd/usr.sbin/pmcstat/pmcstat.h
  user/imp/tbemd/usr.sbin/pmcstat/pmcstat_log.c
  user/imp/tbemd/usr.sbin/rpcbind/rpcbind.c
  user/imp/tbemd/usr.sbin/rpcbind/rpcbind.h
  user/imp/tbemd/usr.sbin/rpcbind/util.c
  user/imp/tbemd/usr.sbin/sysinstall/package.c
  user/imp/tbemd/usr.sbin/wake/Makefile
  user/imp/tbemd/usr.sbin/wake/wake.8
  user/imp/tbemd/usr.sbin/wake/wake.c
Directory Properties:
  user/imp/tbemd/   (props changed)

Modified: user/imp/tbemd/bin/ls/ls.c
==============================================================================
--- user/imp/tbemd/bin/ls/ls.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/bin/ls/ls.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -113,6 +113,7 @@ static int f_listdir;		/* list actual di
 static int f_listdot;		/* list files beginning with . */
 static int f_noautodot;		/* do not automatically enable -A for root */
        int f_longform;		/* long listing format */
+static int f_nofollow;		/* don't follow symbolic link arguments */
        int f_nonprint;		/* show unprintables as ? */
 static int f_nosort;		/* don't sort output */
        int f_notabs;		/* don't use tab-separated multi-col output */
@@ -234,6 +235,7 @@ main(int argc, char *argv[])
 			break;
 		case 'H':
 			fts_options |= FTS_COMFOLLOW;
+			f_nofollow = 0;
 			break;
 		case 'G':
 			setenv("CLICOLOR", "", 1);
@@ -241,11 +243,13 @@ main(int argc, char *argv[])
 		case 'L':
 			fts_options &= ~FTS_PHYSICAL;
 			fts_options |= FTS_LOGICAL;
+			f_nofollow = 0;
 			break;
 		case 'P':
 			fts_options &= ~FTS_COMFOLLOW;
 			fts_options &= ~FTS_LOGICAL;
 			fts_options |= FTS_PHYSICAL;
+			f_nofollow = 1;
 			break;
 		case 'R':
 			f_recursive = 1;
@@ -396,10 +400,10 @@ main(int argc, char *argv[])
 		fts_options |= FTS_NOSTAT;
 
 	/*
-	 * If not -F, -d or -l options, follow any symbolic links listed on
+	 * If not -F, -P, -d or -l options, follow any symbolic links listed on
 	 * the command line.
 	 */
-	if (!f_longform && !f_listdir && (!f_type || f_slash))
+	if (!f_nofollow && !f_longform && !f_listdir && (!f_type || f_slash))
 		fts_options |= FTS_COMFOLLOW;
 
 	/*

Modified: user/imp/tbemd/bin/pkill/pkill.1
==============================================================================
--- user/imp/tbemd/bin/pkill/pkill.1	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/bin/pkill/pkill.1	Sat Feb 13 15:35:51 2010	(r203832)
@@ -36,7 +36,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 16, 2009
+.Dd February 11, 2010
 .Dt PKILL 1
 .Os
 .Sh NAME
@@ -44,7 +44,7 @@
 .Nd find or signal processes by name
 .Sh SYNOPSIS
 .Nm pgrep
-.Op Fl LSafilnovx
+.Op Fl LSafilnoqvx
 .Op Fl F Ar pidfile
 .Op Fl G Ar gid
 .Op Fl M Ar core
@@ -175,6 +175,8 @@ command.
 Select only the newest (most recently started) of the matching processes.
 .It Fl o
 Select only the oldest (least recently started) of the matching processes.
+.It Fl q
+Do not write anything to standard output.
 .It Fl s Ar sid
 Restrict matches to processes with a session ID in the comma-separated
 list

Modified: user/imp/tbemd/bin/pkill/pkill.c
==============================================================================
--- user/imp/tbemd/bin/pkill/pkill.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/bin/pkill/pkill.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/time.h>
 #include <sys/user.h>
 
+#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
@@ -110,6 +111,7 @@ static int	matchargs;
 static int	fullmatch;
 static int	kthreads;
 static int	cflags = REG_EXTENDED;
+static int	quiet;
 static kvm_t	*kd;
 static pid_t	mypid;
 
@@ -180,9 +182,11 @@ main(int argc, char **argv)
 	debug_opt = 0;
 	pidfile = NULL;
 	pidfilelock = 0;
-	execf = coref = _PATH_DEVNULL;
+	quiet = 0;
+	execf = NULL;
+	coref = _PATH_DEVNULL;
 
-	while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnos:t:u:vx")) != -1)
+	while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnoqs:t:u:vx")) != -1)
 		switch (ch) {
 		case 'D':
 			debug_opt++;
@@ -257,6 +261,11 @@ main(int argc, char **argv)
 			oldest = 1;
 			criteria = 1;
 			break;
+		case 'q':
+			if (!pgrep)
+				usage();
+			quiet = 1;
+			break;
 		case 's':
 			makelist(&sidlist, LT_SID, optarg);
 			criteria = 1;
@@ -548,7 +557,7 @@ usage(void)
 	const char *ustr;
 
 	if (pgrep)
-		ustr = "[-LSfilnovx] [-d delim]";
+		ustr = "[-LSfilnoqvx] [-d delim]";
 	else
 		ustr = "[-signal] [-ILfinovx]";
 
@@ -566,6 +575,10 @@ show_process(const struct kinfo_proc *kp
 {
 	char **argv;
 
+	if (quiet) {
+		assert(pgrep);
+		return;
+	}
 	if ((longfmt || !pgrep) && matchargs &&
 	    (argv = kvm_getargv(kd, kp, 0)) != NULL) {
 		printf("%d ", (int)kp->ki_pid);
@@ -622,7 +635,8 @@ grepact(const struct kinfo_proc *kp)
 {
 
 	show_process(kp);
-	printf("%s", delim);
+	if (!quiet)
+		printf("%s", delim);
 	return (1);
 }
 

Modified: user/imp/tbemd/bin/ps/ps.c
==============================================================================
--- user/imp/tbemd/bin/ps/ps.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/bin/ps/ps.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -212,7 +212,8 @@ main(int argc, char *argv[])
 	init_list(&sesslist, addelem_pid, sizeof(pid_t), "session id");
 	init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty");
 	init_list(&uidlist, addelem_uid, sizeof(uid_t), "user");
-	memf = nlistf = _PATH_DEVNULL;
+	memf = _PATH_DEVNULL;
+	nlistf = NULL;
 	while ((ch = getopt(argc, argv, PS_ARGS)) != -1)
 		switch (ch) {
 		case 'A':

Modified: user/imp/tbemd/etc/defaults/rc.conf
==============================================================================
--- user/imp/tbemd/etc/defaults/rc.conf	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/etc/defaults/rc.conf	Sat Feb 13 15:35:51 2010	(r203832)
@@ -118,6 +118,8 @@ firewall_type="UNKNOWN"		# Firewall type
 firewall_quiet="NO"		# Set to YES to suppress rule display
 firewall_logging="NO"		# Set to YES to enable events logging
 firewall_flags=""		# Flags passed to ipfw when type is a file
+firewall_coscripts=""		# List of executables/scripts to run after
+				# firewall starts/stops
 firewall_client_net="192.0.2.0/24" # IPv4 Network address for "client"
 				# firewall.
 #firewall_client_net_ipv6="2001:db8:2:1::/64" # IPv6 network prefix for

Modified: user/imp/tbemd/etc/rc.d/ipfw
==============================================================================
--- user/imp/tbemd/etc/rc.d/ipfw	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/etc/rc.d/ipfw	Sat Feb 13 15:35:51 2010	(r203832)
@@ -14,6 +14,7 @@ name="ipfw"
 rcvar="firewall_enable"
 start_cmd="ipfw_start"
 start_precmd="ipfw_prestart"
+start_postcmd="ipfw_poststart"
 stop_cmd="ipfw_stop"
 required_modules="ipfw"
 
@@ -42,9 +43,6 @@ ipfw_start()
 	[ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall
 
 	if [ -r "${firewall_script}" ]; then
-		if [ -f /etc/rc.d/natd ] ; then
-			/etc/rc.d/natd quietstart
-		fi
 		/bin/sh "${firewall_script}" "${_firewall_type}"
 		echo 'Firewall rules loaded.'
 	elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then
@@ -59,6 +57,19 @@ ipfw_start()
 		echo 'Firewall logging enabled.'
 		sysctl net.inet.ip.fw.verbose=1 >/dev/null
 	fi
+}
+
+ipfw_poststart()
+{
+	local	_coscript
+
+	# Start firewall coscripts
+	#
+	for _coscript in ${firewall_coscripts} ; do
+		if [ -f "${_coscript}" ]; then
+			${_coscript} quietstart
+		fi
+	done
 
 	# Enable the firewall
 	#
@@ -75,16 +86,25 @@ ipfw_start()
 
 ipfw_stop()
 {
+	local	_coscript
+
 	# Disable the firewall
 	#
 	${SYSCTL_W} net.inet.ip.fw.enable=0
 	if afexists inet6; then
 		${SYSCTL_W} net.inet6.ip6.fw.enable=0
 	fi
-	if [ -f /etc/rc.d/natd ] ; then
-		/etc/rc.d/natd quietstop
-	fi
+
+	# Stop firewall coscripts
+	#
+	for _coscript in `reverse_list ${firewall_coscripts}` ; do
+		if [ -f "${_coscript}" ]; then
+			${_coscript} quietstop
+		fi
+	done
 }
 
 load_rc_config $name
+firewall_coscripts="/etc/rc.d/natd ${firewall_coscripts}"
+
 run_rc_command $*

Modified: user/imp/tbemd/games/fortune/datfiles/fortunes
==============================================================================
--- user/imp/tbemd/games/fortune/datfiles/fortunes	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/games/fortune/datfiles/fortunes	Sat Feb 13 15:35:51 2010	(r203832)
@@ -33335,6 +33335,12 @@ Miss, n.:
 %
 Mistakes are often the stepping stones to utter failure.
 %
+Mistakeholder, n.:
+	A person who depends on accidental features or 
+	implementation errors and so now has a vested 
+	interest in keeping things from being fixed.
+		-- Chip Morningstar
+%
 Mistrust first impulses; they are always right.
 %
 MIT:

Modified: user/imp/tbemd/games/grdc/grdc.c
==============================================================================
--- user/imp/tbemd/games/grdc/grdc.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/games/grdc/grdc.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -59,6 +59,7 @@ main(argc, argv)
 int argc;
 char **argv;
 {
+struct timespec ts;
 long t, a;
 int i, j, s, k;
 int n;
@@ -136,9 +137,9 @@ int t12;
 
 		attrset(COLOR_PAIR(2));
 	}
+	time(&now);
 	do {
 		mask = 0;
-		time(&now);
 		tm = localtime(&now);
 		set(tm->tm_sec%10, 0);
 		set(tm->tm_sec/10, 4);
@@ -193,7 +194,19 @@ int t12;
 		}
 		movto(6, 0);
 		refresh();
-		sleep(1);
+		clock_gettime(CLOCK_REALTIME_FAST, &ts);
+		if (ts.tv_sec == now) {
+			if (ts.tv_nsec > 0) {
+				ts.tv_sec = 0;
+				ts.tv_nsec = 1000000000 - ts.tv_nsec;
+			} else {
+				ts.tv_sec = 1;
+				ts.tv_nsec = 0;
+			}
+			nanosleep(&ts, NULL);
+			now = ts.tv_sec + 1;
+		} else
+			now = ts.tv_sec;
 		if (sigtermed) {
 			standend();
 			clear();

Modified: user/imp/tbemd/gnu/usr.bin/groff/tmac/mdoc.local
==============================================================================
--- user/imp/tbemd/gnu/usr.bin/groff/tmac/mdoc.local	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/gnu/usr.bin/groff/tmac/mdoc.local	Sat Feb 13 15:35:51 2010	(r203832)
@@ -43,6 +43,7 @@
 .ds doc-str-Lb-libdevstat  Device Statistics Library (libdevstat, \-ldevstat)
 .ds doc-str-Lb-libdisk     Interface to Slice and Partition Labels Library (libdisk, \-ldisk)
 .ds doc-str-Lb-libedit     Line Editor and History Library (libedit, \-ledit)
+.ds doc-str-Lb-libefi      EFI Runtime Services Library (libefi, \-lefi)
 .ds doc-str-Lb-libelf      ELF Parsing Library (libelf, \-lelf)
 .ds doc-str-Lb-libfetch    File Transfer Library (libfetch, \-lfetch)
 .ds doc-str-Lb-libgeom     Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom)

Modified: user/imp/tbemd/lib/libc/nls/msgcat.c
==============================================================================
--- user/imp/tbemd/lib/libc/nls/msgcat.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libc/nls/msgcat.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -77,19 +77,22 @@ __FBSDID("$FreeBSD$");
 
 #define	NLERR		((nl_catd) -1)
 #define NLRETERR(errc)  { errno = errc; return (NLERR); }
-#define SAVEFAIL(n, e)	{ WLOCK(NLERR); \
-			  np = malloc(sizeof(struct catentry)); \
-			  if (np != NULL) { \
-			  	np->name = strdup(n); \
-				np->caterrno = e; \
-			  	SLIST_INSERT_HEAD(&cache, np, list); \
-			  } \
-			  UNLOCK; \
-			}
+#define SAVEFAIL(n, l, e)	{ WLOCK(NLERR); \
+				  np = malloc(sizeof(struct catentry)); \
+				  if (np != NULL) { \
+				  	np->name = strdup(n); \
+					np->path = NULL; \
+					np->lang = (l == NULL) ? NULL : strdup(l); \
+					np->caterrno = e; \
+				  	SLIST_INSERT_HEAD(&cache, np, list); \
+				  } \
+				  UNLOCK; \
+				  errno = e; \
+				}
 
 static nl_catd load_msgcat(const char *, const char *, const char *);
 
-static pthread_rwlock_t		 rwlock;
+static pthread_rwlock_t		 rwlock = PTHREAD_RWLOCK_INITIALIZER;
 
 struct catentry {
 	SLIST_ENTRY(catentry)	 list;
@@ -114,10 +117,12 @@ catopen(const char *name, int type)
 	int saverr, spcleft;
 	char path[PATH_MAX];
 
+	/* sanity checking */
 	if (name == NULL || *name == '\0')
 		NLRETERR(EINVAL);
 
 	if (strchr(name, '/') != NULL)
+		/* have a pathname */
 		lang = NULL;
 	else {
 		if (type == NL_CAT_LOCALE)
@@ -135,12 +140,14 @@ catopen(const char *name, int type)
 	/* Try to get it from the cache first */
 	RLOCK(NLERR);
 	SLIST_FOREACH(np, &cache, list) {
-		if (strcmp(np->name, name) == 0) {
+		if ((strcmp(np->name, name) == 0) &&
+		    ((lang != NULL && np->lang != NULL &&
+		    strcmp(np->lang, lang) == 0) || (np->lang == lang))) {
 			if (np->caterrno != 0) {
 				/* Found cached failing entry */
 				UNLOCK;
 				NLRETERR(np->caterrno);
-			} else if (strcmp(np->lang, lang) == 0) {
+			} else {
 				/* Found cached successful entry */
 				np->refcount++;
 				UNLOCK;
@@ -154,6 +161,7 @@ catopen(const char *name, int type)
 	if (strchr(name, '/') != NULL)
 		return (load_msgcat(name, name, lang));
 
+	/* sanity checking */
 	if ((plang = cptr1 = strdup(lang)) == NULL)
 		return (NLERR);
 	if ((cptr = strchr(cptr1, '@')) != NULL)
@@ -218,6 +226,7 @@ catopen(const char *name, int type)
 			too_long:
 						free(plang);
 						free(base);
+						SAVEFAIL(name, lang, ENAMETOOLONG);
 						NLRETERR(ENAMETOOLONG);
 					}
 					pathP += strlen(tmpptr);
@@ -241,6 +250,7 @@ catopen(const char *name, int type)
 	}
 	free(plang);
 	free(base);
+	SAVEFAIL(name, lang, ENOENT);
 	NLRETERR(ENOENT);
 }
 
@@ -317,6 +327,7 @@ catclose(nl_catd catd)
 {
 	struct catentry *np;
 
+	/* sanity checking */
 	if (catd == NULL || catd == NLERR) {
 		errno = EBADF;
 		return (-1);
@@ -325,13 +336,15 @@ catclose(nl_catd catd)
 	/* Remove from cache if not referenced any more */
 	WLOCK(-1);
 	SLIST_FOREACH(np, &cache, list) {
-		if ((np->catd->__size == catd->__size) &&
-		    memcmp((const void *)np->catd, (const void *)catd, np->catd->__size) == 0) {
+		if (catd == np->catd) {
 			np->refcount--;
 			if (np->refcount == 0) {
 				munmap(catd->__data, (size_t)catd->__size);
 				free(catd);
 				SLIST_REMOVE(&cache, np, catentry, list);
+				free(np->name);
+				free(np->path);
+				free(np->lang);
 				free(np);
 			}
 			break;
@@ -357,10 +370,11 @@ load_msgcat(const char *path, const char
 	/* path/name will never be NULL here */
 
 	/* One more try in cache; if it was not found by name,
-	   it might still be found by absolute path. */
+	 * it might still be found by absolute path.
+	 */
 	RLOCK(NLERR);
 	SLIST_FOREACH(np, &cache, list) {
-		if (strcmp(np->path, path) == 0) {
+		if ((np->path != NULL) && (strcmp(np->path, path) == 0)) {
 			np->refcount++;
 			UNLOCK;
 			return (np->catd);
@@ -369,36 +383,46 @@ load_msgcat(const char *path, const char
 	UNLOCK;
 
 	if ((fd = _open(path, O_RDONLY)) == -1) {
-		SAVEFAIL(name, errno);
-		return (NLERR);
+		SAVEFAIL(name, lang, errno);
+		NLRETERR(errno);
 	}
 
 	if (_fstat(fd, &st) != 0) {
-		SAVEFAIL(name, errno);
 		_close(fd);
-		return (NLERR);
+		SAVEFAIL(name, lang, EFTYPE);
+		NLRETERR(EFTYPE);
 	}
 
-	data = mmap(0, (size_t)st.st_size, PROT_READ, MAP_FILE|MAP_SHARED, fd,
-	    (off_t)0);
-	_close(fd);
+	/* If the file size cannot be held in size_t we cannot mmap()
+	 * it to the memory. Probably, this will not be a problem given
+	 * that catalog files are usually small.
+	 */
+	if (st.st_size > SIZE_T_MAX) {
+		_close(fd);
+		SAVEFAIL(name, lang, EFBIG);
+		NLRETERR(EFBIG);
+	}
 
-	if (data == MAP_FAILED) {
-		SAVEFAIL(name, errno);
-		return (NLERR);
+	if ((data = mmap(0, (size_t)st.st_size, PROT_READ,
+	    MAP_FILE|MAP_SHARED, fd, (off_t)0)) == MAP_FAILED) {
+		int saved_errno = errno;
+		_close(fd);
+		SAVEFAIL(name, lang, saved_errno);
+		NLRETERR(saved_errno);
 	}
+	_close(fd);
 
 	if (ntohl((u_int32_t)((struct _nls_cat_hdr *)data)->__magic) !=
 	    _NLS_MAGIC) {
-		SAVEFAIL(name, errno);
 		munmap(data, (size_t)st.st_size);
-		NLRETERR(EINVAL);
+		SAVEFAIL(name, lang, EFTYPE);
+		NLRETERR(EFTYPE);
 	}
 
 	if ((catd = malloc(sizeof (*catd))) == NULL) {
-		SAVEFAIL(name, errno);
 		munmap(data, (size_t)st.st_size);
-		return (NLERR);
+		SAVEFAIL(name, lang, ENOMEM);
+		NLRETERR(ENOMEM);
 	}
 
 	catd->__data = data;

Modified: user/imp/tbemd/lib/libc/posix1e/mac.3
==============================================================================
--- user/imp/tbemd/lib/libc/posix1e/mac.3	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libc/posix1e/mac.3	Sat Feb 13 15:35:51 2010	(r203832)
@@ -154,8 +154,8 @@ system objects, but without policy-speci
 .Sh STANDARDS
 These APIs are loosely based on the APIs described in POSIX.1e, as described
 in IEEE POSIX.1e draft 17.
-However, the resemblence of these APIS to the POSIX APIs is loose, as the
-PSOXI APIS were unable to express some notinos required for flexible and
+However, the resemblence of these APIs to the POSIX APIs is loose, as the
+POSIX APIs were unable to express some notions required for flexible and
 extensible access control.
 .Sh HISTORY
 Support for Mandatory Access Control was introduced in

Modified: user/imp/tbemd/lib/libc/stdlib/strfmon.c
==============================================================================
--- user/imp/tbemd/lib/libc/stdlib/strfmon.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libc/stdlib/strfmon.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -413,7 +413,7 @@ __setup_vars(int flags, char *cs_precede
 		*cs_precedes = lc->int_n_cs_precedes;
 		*sep_by_space = lc->int_n_sep_by_space;
 		*sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn;
-		*signstr = (lc->negative_sign == '\0') ? "-"
+		*signstr = (lc->negative_sign[0] == '\0') ? "-"
 		    : lc->negative_sign;
 	} else if (flags & USE_INTL_CURRENCY) {
 		*cs_precedes = lc->int_p_cs_precedes;
@@ -424,7 +424,7 @@ __setup_vars(int flags, char *cs_precede
 		*cs_precedes = lc->n_cs_precedes;
 		*sep_by_space = lc->n_sep_by_space;
 		*sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn;
-		*signstr = (lc->negative_sign == '\0') ? "-"
+		*signstr = (lc->negative_sign[0] == '\0') ? "-"
 		    : lc->negative_sign;
 	} else {
 		*cs_precedes = lc->p_cs_precedes;

Modified: user/imp/tbemd/lib/libc/sys/ptrace.2
==============================================================================
--- user/imp/tbemd/lib/libc/sys/ptrace.2	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libc/sys/ptrace.2	Sat Feb 13 15:35:51 2010	(r203832)
@@ -2,7 +2,7 @@
 .\"	$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
 .\"
 .\" This file is in the public domain.
-.Dd March 27, 2009
+.Dd February 11, 2010
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -327,6 +327,68 @@ This request will trace the specified pr
 .It PT_SYSCALL
 This request will trace the specified process
 on each system call entry and exit.
+.It PT_VM_TIMESTAMP
+This request returns the generation number or timestamp of the memory map of
+the traced process as the return value from
+.Fn ptrace .
+This provides a low-cost way for the tracing process to determine if the
+VM map changed since the last time this request was made.
+.It PT_VM_ENTRY
+This request is used to iterate over the entries of the VM map of the traced
+process.
+The
+.Fa addr
+argument specifies a pointer to a 
+.Vt "struct ptrace_vm_entry" ,
+which is defined as follows:
+.Bd -literal
+struct ptrace_vm_entry {
+	int		pve_entry;
+	int		pve_timestamp;
+	u_long		pve_start;
+	u_long		pve_end;
+	u_long		pve_offset;
+	u_int		pve_prot;
+	u_int		pve_pathlen;
+	long		pve_fileid;
+	uint32_t	pve_fsid;
+	char		*pve_path;
+};
+.Ed
+.Pp
+The first entry is returned by setting
+.Va pve_entry
+to zero.
+Subsequent entries are returned by leaving
+.Va pve_entry
+unmodified from the value returned by previous requests.
+The
+.Va pve_timestamp
+field can be used to detect changes to the VM map while iterating over the
+entries.
+The tracing process can then take appropriate action, such as restarting.
+By setting
+.Va pve_pathlen
+to a non-zero value on entry, the pathname of the backing object is returned
+in the buffer pointed to by
+.Va pve_path ,
+provided the entry is backed by a vnode.
+The
+.Va pve_pathlen
+field is updated with the actual length of the pathname (including the
+terminating null character).
+The
+.Va pve_offset
+field is the offset within the backing object at which the range starts.
+The range is located in the VM space at
+.Va pve_start
+and extends up to
+.Va pve_end
+(inclusive).
+.Pp
+The
+.Fa data
+argument is ignored.
 .El
 .Pp
 Additionally, machine-specific requests can exist.
@@ -376,6 +438,11 @@ or
 .Dv PT_SETDBREGS
 was attempted on a process with no valid register set.
 (This is normally true only of system processes.)
+.It
+.Dv PT_VM_ENTRY
+was given an invalid value for
+.Fa pve_entry .
+This can also be caused by changes to the VM map of the process.
 .El
 .It Bq Er EBUSY
 .Bl -bullet -compact
@@ -405,6 +472,22 @@ on a process in violation of the require
 .Dv PT_ATTACH
 above.
 .El
+.It Bq Er ENOENT
+.Bl -bullet -compact
+.It
+.Dv PT_VM_ENTRY
+previously returned the last entry of the memory map.
+No more entries exist.
+.El
+.It Bq Er ENAMETOOLONG
+.Bl -bullet -compact
+.It
+.Dv PT_VM_ENTRY
+cannot return the pathname of the backing object because the buffer is not big
+enough.
+.Fa pve_pathlen
+holds the minimum buffer size required on return.
+.El
 .El
 .Sh SEE ALSO
 .Xr execve 2 ,

Modified: user/imp/tbemd/lib/libefi/libefi.3
==============================================================================
--- user/imp/tbemd/lib/libefi/libefi.3	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libefi/libefi.3	Sat Feb 13 15:35:51 2010	(r203832)
@@ -25,24 +25,28 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Januari 29, 2010
+.Dd January 29, 2010
 .Dt LIBEFI 3
 .Os
 .Sh NAME
 .Nm efi_getvar , efi_nextvarname , efi_setvar
-.Nd Interface for accessing the EFI variable services
+.Nd "interface for accessing the EFI variable services"
 .Sh LIBRARY
 .Lb libefi
 .Sh SYNOPSIS
 .In libefi.h
 .Ft int
-.Fn efi_getvar "char *name" "uuid_t *vendor" "uint32_t *attrib" \
-        "size_t *datasize" "void *data"
+.Fo efi_getvar
+.Fa "char *name" "uuid_t *vendor" "uint32_t *attrib"
+.Fa "size_t *datasize" "void *data"
+.Fc
 .Ft int
 .Fn efi_nextvarname "size_t *namesize" "char *name" "uuid_t *vendor"
 .Ft int
-.Fn efi_setvar "char *name" "uuid_t *vendor" "uint32_t attrib" \
-        "size_t datasize" "void *data"
+.Fo efi_setvar
+.Fa "char *name" "uuid_t *vendor" "uint32_t attrib"
+.Fa "size_t datasize" "void *data"
+.Fc
 .Sh DESCRIPTION
 The
 .Nm libefi
@@ -53,18 +57,19 @@ The
 .Fn efi_nextvarname
 function is used to enumerate the variables.
 The
-.Nm namesize
+.Fa namesize
 parameter needs to be set to the size of the buffer pointed to by
-.Nm name .
+.Fa name .
 On return,
-.Nm namesize
-is set to the length of the variable name (including the terminating '\\0')
+.Fa namesize
+is set to the length of the variable name (including the terminating
+.Ql \e0 )
 irrespective of whether the buffer was big enough.
 The buffer pointed to by
-.Nm name
+.Fa name
 contains the full or partial variable name on return.
 Only on successful completion of the request is the
-.Nm vendor
+.Fa vendor
 updated.
 The values returned should be passed to successive calls to
 .Fn efi_nextvarname
@@ -76,11 +81,11 @@ can be passed to
 .Fn efi_getvar
 to obtain the value and attribute of the variable.
 The buffer that is to contain the value is specified by
-.Nm data
+.Fa data
 and the size of the buffer is given by
-.Nm datasize .
+.Fa datasize .
 The attribute pointed to by
-.Nm attrib
+.Fa attrib
 consists of the bit values defined by the EFI specification.
 .Pp
 Variables can be created, modified and deleted using the
@@ -91,15 +96,17 @@ order for the request to succeed.
 Note that for runtime accessable variables the boottime accessable bit must
 be set as well.
 To delete a variable, set
-.Nm datasize
+.Fa datasize
 to 0.
 .Pp
 The vendor UUID is used to avoid collisions between variable names of
 different vendors.
-Variables created for use by FreeBSD should use the
-.Nm EFI_FREEBSD_VARIABLE
+Variables created for use by
+.Fx
+should use the
+.Dv EFI_FREEBSD_VARIABLE
 UUID as defined in the
-.Nm libefi
+.In libefi.h
 header file.
 .Sh RETURN VALUES
 Upon successful completion, these functions return 0.
@@ -127,10 +134,10 @@ the buffer provided.
 The
 .Nm libefi
 library first appeared in
-.Fx 9
+.Fx 9.0
 for the ia64 architecture.
 .Sh AUTHORS
 The
 .Nm libefi
-library and corresponding manual page were written by
+library and this manual page were written by
 .An Marcel Moolenaar Aq marcel at FreeBSD.org .

Modified: user/imp/tbemd/lib/libufs/cgroup.c
==============================================================================
--- user/imp/tbemd/lib/libufs/cgroup.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libufs/cgroup.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -59,7 +59,7 @@ cgread1(struct uufsd *disk, int c)
 
 	fs = &disk->d_fs;
 
-	if (c >= fs->fs_ncg) {
+	if ((unsigned)c >= fs->fs_ncg) {
 		return (0);
 	}
 	ccg = fsbtodb(fs, cgtod(fs, c)) * disk->d_bsize;

Modified: user/imp/tbemd/lib/libufs/sblock.c
==============================================================================
--- user/imp/tbemd/lib/libufs/sblock.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libufs/sblock.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -93,7 +93,7 @@ int
 sbwrite(struct uufsd *disk, int all)
 {
 	struct fs *fs;
-	int i;
+	unsigned i;
 
 	ERROR(disk, NULL);
 

Modified: user/imp/tbemd/lib/libusb/libusb.h
==============================================================================
--- user/imp/tbemd/lib/libusb/libusb.h	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/libusb.h	Sat Feb 13 15:35:51 2010	(r203832)
@@ -29,12 +29,7 @@
 
 #include <sys/time.h>
 #include <sys/types.h>
-#include <sys/endian.h>
 
-#include <stdint.h>
-#include <time.h>
-#include <string.h>
-#include <pthread.h>
 
 
 #ifdef __cplusplus

Modified: user/imp/tbemd/lib/libusb/libusb10.c
==============================================================================
--- user/imp/tbemd/lib/libusb/libusb10.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/libusb10.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -25,17 +25,16 @@
  * SUCH DAMAGE.
  */
 
+#include <assert.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <poll.h>
 #include <pthread.h>
-#include <time.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <sys/filio.h>
+#include <sys/fcntl.h>
 #include <sys/queue.h>
-#include <sys/endian.h>
 
 #include "libusb20.h"
 #include "libusb20_desc.h"
@@ -73,6 +72,7 @@ libusb_init(libusb_context **context)
 {
 	struct libusb_context *ctx;
 	char *debug;
+	int flag;
 	int ret;
 
 	ctx = malloc(sizeof(*ctx));
@@ -103,10 +103,12 @@ libusb_init(libusb_context **context)
 		return (LIBUSB_ERROR_OTHER);
 	}
 	/* set non-blocking mode on the control pipe to avoid deadlock */
-	ret = 1;
-	ioctl(ctx->ctrl_pipe[0], FIONBIO, &ret);
-	ret = 1;
-	ioctl(ctx->ctrl_pipe[1], FIONBIO, &ret);
+	flag = 1;
+	ret = fcntl(ctx->ctrl_pipe[0], O_NONBLOCK, &flag);
+	assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[0]");
+	flag = 1;
+	ret = fcntl(ctx->ctrl_pipe[1], O_NONBLOCK, &flag);
+	assert(ret != -1 && "Couldn't set O_NONBLOCK for ctx->ctrl_pipe[1]");
 
 	libusb10_add_pollfd(ctx, &ctx->ctx_poll, NULL, ctx->ctrl_pipe[0], POLLIN);
 

Modified: user/imp/tbemd/lib/libusb/libusb10_desc.c
==============================================================================
--- user/imp/tbemd/lib/libusb/libusb10_desc.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/libusb10_desc.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -26,7 +26,6 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <pthread.h>
 #include <sys/queue.h>
 
 #include "libusb20.h"

Modified: user/imp/tbemd/lib/libusb/libusb10_io.c
==============================================================================
--- user/imp/tbemd/lib/libusb/libusb10_io.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/libusb10_io.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -32,7 +32,6 @@
 #include <time.h>
 #include <errno.h>
 #include <sys/queue.h>
-#include <sys/endian.h>
 
 #include "libusb20.h"
 #include "libusb20_desc.h"

Modified: user/imp/tbemd/lib/libusb/libusb20_compat01.c
==============================================================================
--- user/imp/tbemd/lib/libusb/libusb20_compat01.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/libusb20_compat01.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -829,6 +829,7 @@ usb_find_devices(void)
 	struct libusb20_device *pdev;
 	struct usb_device *udev;
 	struct LIBUSB20_DEVICE_DESC_DECODED *ddesc;
+	int devnum;
 	int err;
 
 	/* cleanup after last device search */
@@ -855,6 +856,7 @@ usb_find_devices(void)
 	}
 	/* iterate all devices */
 
+	devnum = 1;
 	pdev = NULL;
 	while ((pdev = libusb20_be_device_foreach(usb_backend, pdev))) {
 		udev = malloc(sizeof(*udev));
@@ -891,6 +893,7 @@ usb_find_devices(void)
 			/* truncate number of configurations */
 			udev->descriptor.bNumConfigurations = USB_MAXCONFIG;
 		}
+		udev->devnum = devnum++;
 		/* link together the two structures */
 		udev->dev = pdev;
 		pdev->privLuData = udev;

Modified: user/imp/tbemd/lib/libusb/libusb20_desc.c
==============================================================================
--- user/imp/tbemd/lib/libusb/libusb20_desc.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/libusb20_desc.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -27,7 +27,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <poll.h>
 #include <sys/queue.h>
 
 #include "libusb20.h"

Modified: user/imp/tbemd/lib/libusb/libusb20_ugen20.c
==============================================================================
--- user/imp/tbemd/lib/libusb/libusb20_ugen20.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/libusb20_ugen20.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -31,7 +31,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
-#include <poll.h>
 #include <fcntl.h>
 #include <errno.h>
 

Modified: user/imp/tbemd/lib/libusb/usb.h
==============================================================================
--- user/imp/tbemd/lib/libusb/usb.h	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/lib/libusb/usb.h	Sat Feb 13 15:35:51 2010	(r203832)
@@ -27,8 +27,7 @@
 #ifndef _LIBUSB20_COMPAT_01_H_
 #define	_LIBUSB20_COMPAT_01_H_
 
-#include <sys/stdint.h>
-#include <sys/endian.h>
+#include <stdint.h>
 #include <sys/types.h>
 #include <sys/param.h>
 

Modified: user/imp/tbemd/libexec/ftpd/logwtmp.c
==============================================================================
--- user/imp/tbemd/libexec/ftpd/logwtmp.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/libexec/ftpd/logwtmp.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -75,6 +75,7 @@ ftpd_logwtmp(char *id, char *user, struc
 	ut.ut_pid = getpid();
 	gettimeofday(&ut.ut_tv, NULL);
 	(void)strncpy(ut.ut_id, id, sizeof(ut.ut_id));
+	(void)strncpy(ut.ut_line, "ftpd", sizeof(ut.ut_line));
 
 	pututxline(&ut);
 }

Modified: user/imp/tbemd/sbin/growfs/growfs.c
==============================================================================
--- user/imp/tbemd/sbin/growfs/growfs.c	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/sbin/growfs/growfs.c	Sat Feb 13 15:35:51 2010	(r203832)
@@ -174,10 +174,9 @@ static void
 growfs(int fsi, int fso, unsigned int Nflag)
 {
 	DBG_FUNC("growfs")
-	int	i;
-	int	cylno, j;
 	time_t	utime;
-	int	width;
+	uint	cylno;
+	int	i, j, width;
 	char	tmpbuf[100];
 #ifdef FSIRAND
 	static int	randinit=0;
@@ -373,10 +372,11 @@ initcg(int cylno, time_t utime, int fso,
 {
 	DBG_FUNC("initcg")
 	static void *iobuf;
-	long d, dlower, dupper, blkno, start;
+	long blkno, start;
 	ufs2_daddr_t i, cbase, dmax;
 	struct ufs1_dinode *dp1;
 	struct csum *cs;
+	uint d, dupper, dlower;
 
 	if (iobuf == NULL && (iobuf = malloc(sblock.fs_bsize)) == NULL) {
 		errx(37, "panic: cannot allocate I/O buffer");
@@ -436,7 +436,7 @@ initcg(int cylno, time_t utime, int fso,
 		acg.cg_nextfreeoff = acg.cg_clusteroff +
 		    howmany(fragstoblks(&sblock, sblock.fs_fpg), CHAR_BIT);
 	}
-	if (acg.cg_nextfreeoff > sblock.fs_cgsize) {
+	if (acg.cg_nextfreeoff > (unsigned)sblock.fs_cgsize) {
 		/*
 		 * This should never happen as we would have had that panic
 		 * already on file system creation
@@ -751,7 +751,7 @@ updjcg(int cylno, time_t utime, int fsi,
 	 * needed, update the free space in the superblock.
 	 */
 	acg.cg_time = utime;
-	if (cylno == sblock.fs_ncg - 1) {
+	if ((unsigned)cylno == sblock.fs_ncg - 1) {
 		/*
 		 * This is still the last cylinder group.
 		 */
@@ -945,8 +945,8 @@ updcsloc(time_t utime, int fsi, int fso,
 	int	ocscg, ncscg;
 	int	blocks;
 	ufs2_daddr_t	cbase, dupper, odupper, d, f, g;
-	int	ind;
-	int	cylno, inc;
+	int	ind, inc;
+	uint	cylno;
 	struct gfs_bpp	*bp;
 	int	i, l;
 	int	lcs=0;

Modified: user/imp/tbemd/sbin/mount/mount.8
==============================================================================
--- user/imp/tbemd/sbin/mount/mount.8	Sat Feb 13 15:12:46 2010	(r203831)
+++ user/imp/tbemd/sbin/mount/mount.8	Sat Feb 13 15:35:51 2010	(r203832)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd March 11, 2008
+.Dd February 10, 2010
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -433,8 +433,8 @@ However, for the following file system t
 .Cm cd9660 ,

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


More information about the svn-src-user mailing list