svn commit: r223452 - in user/gabor/tre-integration: bin/realpath bin/sh cddl/contrib/opensolaris/lib/libdtrace/common contrib/dialog contrib/lukemftp contrib/top etc etc/defaults etc/rc.d lib/libc...

Gabor Kovesdan gabor at FreeBSD.org
Wed Jun 22 23:36:03 UTC 2011


Author: gabor
Date: Wed Jun 22 23:36:01 2011
New Revision: 223452
URL: http://svn.freebsd.org/changeset/base/223452

Log:
  - MFC

Added:
     - copied from r223450, head/contrib/tnftp/
  user/gabor/tre-integration/etc/rc.d/netwait
     - copied unchanged from r223450, head/etc/rc.d/netwait
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_clkdtrace.c
     - copied unchanged from r223450, head/sys/fs/nfsclient/nfs_clkdtrace.c
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_kdtrace.h
     - copied unchanged from r223450, head/sys/fs/nfsclient/nfs_kdtrace.h
  user/gabor/tre-integration/sys/modules/dtrace/dtnfscl/
     - copied from r223450, head/sys/modules/dtrace/dtnfscl/
  user/gabor/tre-integration/sys/powerpc/ps3/ohci_ps3.c
     - copied unchanged from r223450, head/sys/powerpc/ps3/ohci_ps3.c
  user/gabor/tre-integration/sys/powerpc/ps3/ps3disk.c
     - copied unchanged from r223450, head/sys/powerpc/ps3/ps3disk.c
  user/gabor/tre-integration/sys/x86/include/pci_cfgreg.h
     - copied unchanged from r223450, head/sys/x86/include/pci_cfgreg.h
  user/gabor/tre-integration/sys/x86/pci/pci_bus.c
     - copied unchanged from r223450, head/sys/x86/pci/pci_bus.c
  user/gabor/tre-integration/tools/regression/bin/sh/execution/bg4.0
     - copied unchanged from r223450, head/tools/regression/bin/sh/execution/bg4.0
  user/gabor/tre-integration/usr.bin/ftp/tnftp_config.h
     - copied unchanged from r223450, head/usr.bin/ftp/tnftp_config.h
  user/gabor/tre-integration/usr.sbin/makefs/mtree.c
     - copied unchanged from r223450, head/usr.sbin/makefs/mtree.c
Directory Properties:
  user/gabor/tre-integration/contrib/tnftp/   (props changed)
Deleted:
  user/gabor/tre-integration/contrib/lukemftp/
  user/gabor/tre-integration/sys/amd64/pci/pci_bus.c
  user/gabor/tre-integration/sys/i386/pci/pci_bus.c
  user/gabor/tre-integration/usr.bin/ftp/config.h
Modified:
  user/gabor/tre-integration/bin/realpath/realpath.1
  user/gabor/tre-integration/bin/realpath/realpath.c
  user/gabor/tre-integration/bin/sh/eval.c
  user/gabor/tre-integration/bin/sh/nodetypes
  user/gabor/tre-integration/bin/sh/options.h
  user/gabor/tre-integration/bin/sh/parser.c
  user/gabor/tre-integration/bin/sh/sh.1
  user/gabor/tre-integration/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
  user/gabor/tre-integration/contrib/dialog/dialog.h
  user/gabor/tre-integration/contrib/top/display.c
  user/gabor/tre-integration/contrib/top/top.h
  user/gabor/tre-integration/etc/defaults/rc.conf
  user/gabor/tre-integration/etc/rc.d/Makefile
  user/gabor/tre-integration/etc/rc.d/mountcritremote
  user/gabor/tre-integration/etc/rc.subr
  user/gabor/tre-integration/lib/libc/iconv/citrus_mapper.c
  user/gabor/tre-integration/lib/libc/iconv/iconv.c
  user/gabor/tre-integration/lib/libc/stdlib/malloc.c
  user/gabor/tre-integration/lib/libprocstat/libprocstat.c
  user/gabor/tre-integration/lib/libthr/thread/thr_init.c
  user/gabor/tre-integration/lib/msun/src/e_rem_pio2.c
  user/gabor/tre-integration/libexec/ftpd/ftpd.c
  user/gabor/tre-integration/libexec/tftpd/tftpd.8
  user/gabor/tre-integration/libexec/ulog-helper/Makefile
  user/gabor/tre-integration/libexec/ulog-helper/ulog-helper.c
  user/gabor/tre-integration/sbin/ddb/ddb.8
  user/gabor/tre-integration/sbin/geom/class/part/geom_part.c
  user/gabor/tre-integration/sbin/growfs/growfs.8
  user/gabor/tre-integration/sbin/growfs/growfs.c
  user/gabor/tre-integration/sbin/ipfw/nat.c
  user/gabor/tre-integration/sbin/newfs/newfs.8
  user/gabor/tre-integration/sbin/tunefs/tunefs.8
  user/gabor/tre-integration/share/man/man5/rc.conf.5
  user/gabor/tre-integration/sys/amd64/include/pci_cfgreg.h
  user/gabor/tre-integration/sys/boot/common/load_elf_obj.c
  user/gabor/tre-integration/sys/cam/ata/ata_da.c
  user/gabor/tre-integration/sys/cam/ata/ata_xpt.c
  user/gabor/tre-integration/sys/cam/scsi/scsi_xpt.c
  user/gabor/tre-integration/sys/conf/files.amd64
  user/gabor/tre-integration/sys/conf/files.i386
  user/gabor/tre-integration/sys/conf/files.pc98
  user/gabor/tre-integration/sys/conf/files.powerpc
  user/gabor/tre-integration/sys/dev/acpica/acpi_cpu.c
  user/gabor/tre-integration/sys/dev/acpica/acpi_pcib_acpi.c
  user/gabor/tre-integration/sys/dev/acpica/acpi_resource.c
  user/gabor/tre-integration/sys/dev/acpica/acpivar.h
  user/gabor/tre-integration/sys/dev/atkbdc/atkbd.c
  user/gabor/tre-integration/sys/dev/cardbus/cardbus_cis.c
  user/gabor/tre-integration/sys/dev/dc/if_dc.c
  user/gabor/tre-integration/sys/dev/e1000/if_igb.c
  user/gabor/tre-integration/sys/dev/e1000/if_igb.h
  user/gabor/tre-integration/sys/dev/firewire/fwohci.c
  user/gabor/tre-integration/sys/dev/pccbb/pccbb_pci.c
  user/gabor/tre-integration/sys/dev/pci/pci.c
  user/gabor/tre-integration/sys/dev/usb/net/if_udav.c
  user/gabor/tre-integration/sys/dev/usb/usbdevs
  user/gabor/tre-integration/sys/dev/usb/wlan/if_urtw.c
  user/gabor/tre-integration/sys/dev/vr/if_vr.c
  user/gabor/tre-integration/sys/dev/vr/if_vrreg.h
  user/gabor/tre-integration/sys/dev/xl/if_xl.c
  user/gabor/tre-integration/sys/fs/nfs/nfs_commonkrpc.c
  user/gabor/tre-integration/sys/fs/nfs/nfsport.h
  user/gabor/tre-integration/sys/fs/nfs/nfsproto.h
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_clbio.c
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_clkrpc.c
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_clnode.c
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_clport.c
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_clsubs.c
  user/gabor/tre-integration/sys/fs/nfsclient/nfs_clvnops.c
  user/gabor/tre-integration/sys/fs/nfsserver/nfs_nfsdcache.c
  user/gabor/tre-integration/sys/fs/nfsserver/nfs_nfsdkrpc.c
  user/gabor/tre-integration/sys/fs/nfsserver/nfs_nfsdserv.c
  user/gabor/tre-integration/sys/fs/nfsserver/nfs_nfsdsocket.c
  user/gabor/tre-integration/sys/geom/part/g_part_bsd.c
  user/gabor/tre-integration/sys/i386/include/param.h
  user/gabor/tre-integration/sys/i386/include/pci_cfgreg.h
  user/gabor/tre-integration/sys/ia64/conf/NOTES
  user/gabor/tre-integration/sys/kern/kern_clocksource.c
  user/gabor/tre-integration/sys/kgssapi/gss_impl.c
  user/gabor/tre-integration/sys/modules/Makefile
  user/gabor/tre-integration/sys/modules/dtrace/Makefile
  user/gabor/tre-integration/sys/modules/dtrace/dtraceall/dtraceall.c
  user/gabor/tre-integration/sys/modules/kgssapi_krb5/Makefile
  user/gabor/tre-integration/sys/net/route.c
  user/gabor/tre-integration/sys/net/route.h
  user/gabor/tre-integration/sys/net80211/ieee80211_ht.c
  user/gabor/tre-integration/sys/net80211/ieee80211_var.h
  user/gabor/tre-integration/sys/netinet/ipfw/ip_dn_io.c
  user/gabor/tre-integration/sys/netinet/ipfw/ip_fw_pfil.c
  user/gabor/tre-integration/sys/netinet/libalias/alias_db.c
  user/gabor/tre-integration/sys/netinet/libalias/alias_ftp.c
  user/gabor/tre-integration/sys/netinet/libalias/alias_local.h
  user/gabor/tre-integration/sys/netinet/libalias/libalias.3
  user/gabor/tre-integration/sys/netinet/tcp_output.c
  user/gabor/tre-integration/sys/nfsclient/nfs_krpc.c
  user/gabor/tre-integration/sys/nfsserver/nfs_srvkrpc.c
  user/gabor/tre-integration/sys/powerpc/ps3/if_glc.c
  user/gabor/tre-integration/sys/powerpc/ps3/ps3bus.c
  user/gabor/tre-integration/sys/powerpc/ps3/ps3bus.h
  user/gabor/tre-integration/sys/rpc/rpc_generic.c
  user/gabor/tre-integration/sys/rpc/rpcsec_gss.h
  user/gabor/tre-integration/sys/sparc64/include/tsb.h
  user/gabor/tre-integration/sys/sparc64/include/vmparam.h
  user/gabor/tre-integration/sys/sparc64/sparc64/mp_machdep.c
  user/gabor/tre-integration/sys/sparc64/sparc64/pmap.c
  user/gabor/tre-integration/sys/sparc64/sparc64/tlb.c
  user/gabor/tre-integration/sys/sys/dtrace_bsd.h
  user/gabor/tre-integration/sys/sys/systm.h
  user/gabor/tre-integration/sys/ufs/ffs/ffs_alloc.c
  user/gabor/tre-integration/sys/ufs/ffs/ffs_extern.h
  user/gabor/tre-integration/sys/ufs/ffs/ffs_snapshot.c
  user/gabor/tre-integration/sys/ufs/ffs/ffs_softdep.c
  user/gabor/tre-integration/sys/vm/vm_fault.c
  user/gabor/tre-integration/sys/vm/vm_page.c
  user/gabor/tre-integration/sys/vm/vm_page.h
  user/gabor/tre-integration/sys/x86/x86/tsc.c
  user/gabor/tre-integration/usr.bin/cmp/regular.c
  user/gabor/tre-integration/usr.bin/cmp/special.c
  user/gabor/tre-integration/usr.bin/finger/net.c
  user/gabor/tre-integration/usr.bin/ftp/Makefile
  user/gabor/tre-integration/usr.bin/lastcomm/lastcomm.c
  user/gabor/tre-integration/usr.bin/lastcomm/readrec.c
  user/gabor/tre-integration/usr.bin/tftp/tftp.1
  user/gabor/tre-integration/usr.sbin/makefs/Makefile
  user/gabor/tre-integration/usr.sbin/makefs/cd9660/cd9660_write.c
  user/gabor/tre-integration/usr.sbin/makefs/ffs.c
  user/gabor/tre-integration/usr.sbin/makefs/makefs.8
  user/gabor/tre-integration/usr.sbin/makefs/makefs.c
  user/gabor/tre-integration/usr.sbin/makefs/makefs.h
  user/gabor/tre-integration/usr.sbin/mfiutil/mfi_config.c
  user/gabor/tre-integration/usr.sbin/mfiutil/mfi_drive.c
  user/gabor/tre-integration/usr.sbin/mfiutil/mfi_patrol.c
  user/gabor/tre-integration/usr.sbin/mfiutil/mfi_show.c
  user/gabor/tre-integration/usr.sbin/mfiutil/mfiutil.8
  user/gabor/tre-integration/usr.sbin/mfiutil/mfiutil.c
  user/gabor/tre-integration/usr.sbin/mfiutil/mfiutil.h
  user/gabor/tre-integration/usr.sbin/nfsuserd/nfsuserd.c
  user/gabor/tre-integration/usr.sbin/ypserv/yp_main.c
Directory Properties:
  user/gabor/tre-integration/   (props changed)
  user/gabor/tre-integration/cddl/contrib/opensolaris/   (props changed)
  user/gabor/tre-integration/contrib/bind9/   (props changed)
  user/gabor/tre-integration/contrib/binutils/   (props changed)
  user/gabor/tre-integration/contrib/bzip2/   (props changed)
  user/gabor/tre-integration/contrib/compiler-rt/   (props changed)
  user/gabor/tre-integration/contrib/dialog/   (props changed)
  user/gabor/tre-integration/contrib/ee/   (props changed)
  user/gabor/tre-integration/contrib/expat/   (props changed)
  user/gabor/tre-integration/contrib/file/   (props changed)
  user/gabor/tre-integration/contrib/gcc/   (props changed)
  user/gabor/tre-integration/contrib/gdb/   (props changed)
  user/gabor/tre-integration/contrib/gdtoa/   (props changed)
  user/gabor/tre-integration/contrib/gnu-sort/   (props changed)
  user/gabor/tre-integration/contrib/groff/   (props changed)
  user/gabor/tre-integration/contrib/less/   (props changed)
  user/gabor/tre-integration/contrib/libpcap/   (props changed)
  user/gabor/tre-integration/contrib/libstdc++/   (props changed)
  user/gabor/tre-integration/contrib/llvm/   (props changed)
  user/gabor/tre-integration/contrib/llvm/tools/clang/   (props changed)
  user/gabor/tre-integration/contrib/ncurses/   (props changed)
  user/gabor/tre-integration/contrib/netcat/   (props changed)
  user/gabor/tre-integration/contrib/ntp/   (props changed)
  user/gabor/tre-integration/contrib/one-true-awk/   (props changed)
  user/gabor/tre-integration/contrib/openbsm/   (props changed)
  user/gabor/tre-integration/contrib/openpam/   (props changed)
  user/gabor/tre-integration/contrib/pf/   (props changed)
  user/gabor/tre-integration/contrib/sendmail/   (props changed)
  user/gabor/tre-integration/contrib/tcpdump/   (props changed)
  user/gabor/tre-integration/contrib/tcsh/   (props changed)
  user/gabor/tre-integration/contrib/top/   (props changed)
  user/gabor/tre-integration/contrib/top/install-sh   (props changed)
  user/gabor/tre-integration/contrib/tzcode/stdtime/   (props changed)
  user/gabor/tre-integration/contrib/tzcode/zic/   (props changed)
  user/gabor/tre-integration/contrib/tzdata/   (props changed)
  user/gabor/tre-integration/contrib/wpa/   (props changed)
  user/gabor/tre-integration/contrib/xz/   (props changed)
  user/gabor/tre-integration/crypto/openssh/   (props changed)
  user/gabor/tre-integration/crypto/openssl/   (props changed)
  user/gabor/tre-integration/gnu/lib/   (props changed)
  user/gabor/tre-integration/gnu/usr.bin/binutils/   (props changed)
  user/gabor/tre-integration/gnu/usr.bin/cc/cc_tools/   (props changed)
  user/gabor/tre-integration/gnu/usr.bin/gdb/   (props changed)
  user/gabor/tre-integration/lib/libc/   (props changed)
  user/gabor/tre-integration/lib/libc/stdtime/   (props changed)
  user/gabor/tre-integration/lib/libutil/   (props changed)
  user/gabor/tre-integration/lib/libz/   (props changed)
  user/gabor/tre-integration/sbin/   (props changed)
  user/gabor/tre-integration/sbin/ipfw/   (props changed)
  user/gabor/tre-integration/share/mk/bsd.arch.inc.mk   (props changed)
  user/gabor/tre-integration/share/zoneinfo/   (props changed)
  user/gabor/tre-integration/sys/   (props changed)
  user/gabor/tre-integration/sys/amd64/include/xen/   (props changed)
  user/gabor/tre-integration/sys/boot/   (props changed)
  user/gabor/tre-integration/sys/boot/i386/efi/   (props changed)
  user/gabor/tre-integration/sys/boot/ia64/efi/   (props changed)
  user/gabor/tre-integration/sys/boot/ia64/ski/   (props changed)
  user/gabor/tre-integration/sys/boot/powerpc/boot1.chrp/   (props changed)
  user/gabor/tre-integration/sys/boot/powerpc/ofw/   (props changed)
  user/gabor/tre-integration/sys/cddl/contrib/opensolaris/   (props changed)
  user/gabor/tre-integration/sys/conf/   (props changed)
  user/gabor/tre-integration/sys/contrib/dev/acpica/   (props changed)
  user/gabor/tre-integration/sys/contrib/octeon-sdk/   (props changed)
  user/gabor/tre-integration/sys/contrib/pf/   (props changed)
  user/gabor/tre-integration/sys/contrib/x86emu/   (props changed)
  user/gabor/tre-integration/usr.bin/calendar/   (props changed)
  user/gabor/tre-integration/usr.bin/csup/   (props changed)
  user/gabor/tre-integration/usr.bin/procstat/   (props changed)
  user/gabor/tre-integration/usr.sbin/ndiscvt/   (props changed)
  user/gabor/tre-integration/usr.sbin/zic/   (props changed)

Modified: user/gabor/tre-integration/bin/realpath/realpath.1
==============================================================================
--- user/gabor/tre-integration/bin/realpath/realpath.1	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/bin/realpath/realpath.1	Wed Jun 22 23:36:01 2011	(r223452)
@@ -33,7 +33,7 @@
 .\" From: src/bin/pwd/pwd.1,v 1.11 2000/11/20 11:39:39 ru Exp
 .\" $FreeBSD$
 .\"
-.Dd November 24, 2000
+.Dd June 21, 2011
 .Dt REALPATH 1
 .Os
 .Sh NAME
@@ -42,8 +42,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl q
-.Ar path
-.Op Ar ...
+.Op Ar path ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -57,6 +56,11 @@ and
 .Pa /../
 in
 .Ar path .
+If
+.Ar path
+is absent, the current working directory
+.Pq Sq Pa .\&
+is assumed.
 .Pp
 If
 .Fl q

Modified: user/gabor/tre-integration/bin/realpath/realpath.c
==============================================================================
--- user/gabor/tre-integration/bin/realpath/realpath.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/bin/realpath/realpath.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -44,7 +44,8 @@ main(int argc, char *argv[])
 {
 	char buf[PATH_MAX];
 	char *p;
-	int ch, i, qflag, rval;
+	const char *path;
+	int ch, qflag, rval;
 
 	qflag = 0;
 	while ((ch = getopt(argc, argv, "q")) != -1) {
@@ -59,17 +60,16 @@ main(int argc, char *argv[])
 	}
 	argc -= optind;
 	argv += optind;
-	if (argc < 1)
-		usage();
+	path = *argv != NULL ? *argv++ : ".";
 	rval  = 0;
-	for (i = 0; i < argc; i++) {
-		if ((p = realpath(argv[i], buf)) == NULL) {
+	do {
+		if ((p = realpath(path, buf)) == NULL) {
 			if (!qflag)
-				warn("%s", argv[i]);
+				warn("%s", path);
 			rval = 1;
 		} else
 			(void)printf("%s\n", p);
-	}
+	} while ((path = *argv++) != NULL);
 	exit(rval);
 }
 
@@ -77,6 +77,6 @@ static void
 usage(void)
 {
 
-	(void)fprintf(stderr, "usage: realpath [-q] path [...]\n");
+	(void)fprintf(stderr, "usage: realpath [-q] [path ...]\n");
   	exit(1);
 }

Modified: user/gabor/tre-integration/bin/sh/eval.c
==============================================================================
--- user/gabor/tre-integration/bin/sh/eval.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/bin/sh/eval.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -894,14 +894,13 @@ evalcommand(union node *cmd, int flags, 
 	}
 
 	/* Fork off a child process if necessary. */
-	if (cmd->ncmd.backgnd
-	 || ((cmdentry.cmdtype == CMDNORMAL || cmdentry.cmdtype == CMDUNKNOWN)
+	if (((cmdentry.cmdtype == CMDNORMAL || cmdentry.cmdtype == CMDUNKNOWN)
 	    && ((flags & EV_EXIT) == 0 || have_traps()))
 	 || ((flags & EV_BACKCMD) != 0
 	    && (cmdentry.cmdtype != CMDBUILTIN ||
 		 !safe_builtin(cmdentry.u.index, argc, argv)))) {
 		jp = makejob(cmd, 1);
-		mode = cmd->ncmd.backgnd;
+		mode = FORK_FG;
 		if (flags & EV_BACKCMD) {
 			mode = FORK_NOJOB;
 			if (pipe(pip) < 0)
@@ -1068,8 +1067,7 @@ parent:	/* parent process gets here (if 
 		backcmd->fd = pip[0];
 		close(pip[1]);
 		backcmd->jp = jp;
-	} else
-		exitstatus = 0;
+	}
 
 out:
 	if (lastarg)

Modified: user/gabor/tre-integration/bin/sh/nodetypes
==============================================================================
--- user/gabor/tre-integration/bin/sh/nodetypes	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/bin/sh/nodetypes	Wed Jun 22 23:36:01 2011	(r223452)
@@ -56,7 +56,6 @@ NSEMI nbinary			# two commands separated
 
 NCMD ncmd			# a simple command
 	type	  int
-	backgnd	  int			# set to run command in background
 	args	  nodeptr		# the arguments
 	redirect  nodeptr		# list of file redirections
 

Modified: user/gabor/tre-integration/bin/sh/options.h
==============================================================================
--- user/gabor/tre-integration/bin/sh/options.h	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/bin/sh/options.h	Wed Jun 22 23:36:01 2011	(r223452)
@@ -62,8 +62,9 @@ struct shparam {
 #define	privileged optlist[15].val
 #define	Tflag optlist[16].val
 #define	Pflag optlist[17].val
+#define	hflag optlist[18].val
 
-#define NOPTS	18
+#define NOPTS	19
 
 struct optent {
 	const char *name;
@@ -91,6 +92,7 @@ struct optent optlist[NOPTS] = {
 	{ "privileged",	'p',	0 },
 	{ "trapsasync",	'T',	0 },
 	{ "physical",	'P',	0 },
+	{ "trackall",	'h',	0 },
 };
 #else
 extern struct optent optlist[NOPTS];

Modified: user/gabor/tre-integration/bin/sh/parser.c
==============================================================================
--- user/gabor/tre-integration/bin/sh/parser.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/bin/sh/parser.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -240,8 +240,8 @@ list(int nlflag, int erflag)
 		n2 = andor();
 		tok = readtoken();
 		if (tok == TBACKGND) {
-			if (n2->type == NCMD || n2->type == NPIPE) {
-				n2->ncmd.backgnd = 1;
+			if (n2->type == NPIPE) {
+				n2->npipe.backgnd = 1;
 			} else if (n2->type == NREDIR) {
 				n2->type = NBACKGND;
 			} else {
@@ -689,7 +689,6 @@ simplecmd(union node **rpp, union node *
 	*rpp = NULL;
 	n = (union node *)stalloc(sizeof (struct ncmd));
 	n->type = NCMD;
-	n->ncmd.backgnd = 0;
 	n->ncmd.args = args;
 	n->ncmd.redirect = redir;
 	return n;

Modified: user/gabor/tre-integration/bin/sh/sh.1
==============================================================================
--- user/gabor/tre-integration/bin/sh/sh.1	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/bin/sh/sh.1	Wed Jun 22 23:36:01 2011	(r223452)
@@ -32,7 +32,7 @@
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd June 17, 2011
+.Dd June 18, 2011
 .Dt SH 1
 .Os
 .Sh NAME
@@ -241,6 +241,10 @@ tested, all commands of the function are
 well.
 .It Fl f Li noglob
 Disable pathname expansion.
+.It Fl h Li trackall
+A do-nothing option for
+.Tn POSIX
+compliance.
 .It Fl I Li ignoreeof
 Ignore
 .Dv EOF Ap s

Modified: user/gabor/tre-integration/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c
==============================================================================
--- user/gabor/tre-integration/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -828,7 +828,7 @@ dt_popc(ulong_t x)
 	x = x + (x >> 32);
 	return (x & 0x7F);
 #else
-# warning need td_popc() implementation
+/* This should be a #warning but for now ignore error. Err: "need td_popc() implementation" */
 #endif
 }
 

Modified: user/gabor/tre-integration/contrib/dialog/dialog.h
==============================================================================
--- user/gabor/tre-integration/contrib/dialog/dialog.h	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/contrib/dialog/dialog.h	Wed Jun 22 23:36:01 2011	(r223452)
@@ -1,5 +1,5 @@
 /*
- *  $Id: dialog.h,v 1.223 2011/03/02 10:04:09 tom Exp $
+ *  $Id: dialog.h,v 1.224 2011/06/13 14:29:42 tom Exp $
  *
  *  dialog.h -- common declarations for all dialog modules
  *
@@ -44,7 +44,10 @@
 #include <signal.h>	/* fork() etc. */
 #include <math.h>	/* sqrt() */
 
-#undef ERR		/* header conflict with Solaris xpg4 */
+/* header conflict with Solaris xpg4 versus <sys/regset.h> */
+#if defined(ERR) && (ERR == 13)
+#undef ERR
+#endif
 
 #if defined(HAVE_NCURSESW_NCURSES_H)
 #include <ncursesw/ncurses.h>

Modified: user/gabor/tre-integration/contrib/top/display.c
==============================================================================
--- user/gabor/tre-integration/contrib/top/display.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/contrib/top/display.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -698,7 +698,7 @@ char *text;
 	int width;
 
 	s = NULL;
-	width = screen_width;
+	width = display_width;
 	header_length = strlen(text);
 	if (header_length >= width) {
 		s = malloc((width + 1) * sizeof(char));
@@ -706,14 +706,6 @@ char *text;
 			return (NULL);
 		strncpy(s, text, width);
 		s[width] = '\0';
-	} else {
-		s = malloc((width + 1) * sizeof(char));
-		if (s == NULL)
-			return (NULL);
-		strncpy(s, text, width);
-		while (screen_width > header_length)
-			s[header_length++] = ' ';
-		s[width] = '\0';
 	}
 	return (s);
 }
@@ -738,7 +730,7 @@ char *text;
     if (header_status == ON)
     {
 	putchar('\n');
-	standout(text, stdout);
+	fputs(text, stdout);
 	lastline++;
     }
     else if (header_status == ERASE)

Modified: user/gabor/tre-integration/contrib/top/top.h
==============================================================================
--- user/gabor/tre-integration/contrib/top/top.h	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/contrib/top/top.h	Wed Jun 22 23:36:01 2011	(r223452)
@@ -14,7 +14,7 @@
 extern int Header_lines;	/* 7 */
 
 /* Maximum number of columns allowed for display */
-#define MAX_COLS	512
+#define MAX_COLS	128
 
 /* Log base 2 of 1024 is 10 (2^10 == 1024) */
 #define LOG1024		10

Modified: user/gabor/tre-integration/etc/defaults/rc.conf
==============================================================================
--- user/gabor/tre-integration/etc/defaults/rc.conf	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/etc/defaults/rc.conf	Wed Jun 22 23:36:01 2011	(r223452)
@@ -444,6 +444,13 @@ ubthidhci_enable="NO"		# Switch an USB B
 #ubthidhci_addr="2"		# Check usbconfig list to find the correct
 				# numbers for your system.
 
+### Network link/usability verification options
+netwait_enable="NO"		# Enable rc.d/netwait (or NO)
+#netwait_ip=""			# IP addresses to be pinged by netwait.
+netwait_timeout="60"		# Total number of seconds to perform pings.
+#netwait_if=""			# Interface name to watch link state on.
+netwait_if_timeout="30"		# Total number of seconds to monitor link state.
+
 ### Miscellaneous network options: ###
 icmp_bmcastecho="NO"	# respond to broadcast ping packets
 

Modified: user/gabor/tre-integration/etc/rc.d/Makefile
==============================================================================
--- user/gabor/tre-integration/etc/rc.d/Makefile	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/etc/rc.d/Makefile	Wed Jun 22 23:36:01 2011	(r223452)
@@ -22,7 +22,7 @@ FILES=	DAEMON FILESYSTEMS LOGIN NETWORKI
 	ldconfig local localpkg lockd lpd \
 	mixer motd mountcritlocal mountcritremote mountlate \
 	mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \
-	named natd netif netoptions \
+	named natd netif netoptions netwait \
 	newsyslog nfsclient nfscbd nfsd \
 	nfsserver nfsuserd nisdomain nsswitch ntpd ntpdate \
 	othermta \

Modified: user/gabor/tre-integration/etc/rc.d/mountcritremote
==============================================================================
--- user/gabor/tre-integration/etc/rc.d/mountcritremote	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/etc/rc.d/mountcritremote	Wed Jun 22 23:36:01 2011	(r223452)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: mountcritremote
-# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec
+# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec netwait
 # KEYWORD: nojail
 
 . /etc/rc.subr

Copied: user/gabor/tre-integration/etc/rc.d/netwait (from r223450, head/etc/rc.d/netwait)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/gabor/tre-integration/etc/rc.d/netwait	Wed Jun 22 23:36:01 2011	(r223452, copy of r223450, head/etc/rc.d/netwait)
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: netwait
+# REQUIRE: NETWORKING
+# KEYWORD: nojail
+#
+# The netwait script is intended to be used by systems which have
+# statically-configured IP addresses in rc.conf(5).  If your system
+# uses DHCP, you should use synchronous_dhclient="YES" in your
+# /etc/rc.conf instead of using netwait.
+
+. /etc/rc.subr
+
+name="netwait"
+rcvar=`set_rcvar`
+
+start_cmd="${name}_start"
+stop_cmd=":"
+
+netwait_start()
+{
+	local ip rc count output link
+
+	if [ -z "${netwait_ip}" ]; then
+		err 1 "You must define one or more IP addresses in netwait_ip"
+	fi
+
+	if [ ${netwait_timeout} -lt 1 ]; then
+		err 1 "netwait_timeout must be >= 1"
+	fi
+
+	# Handle SIGINT (Ctrl-C); force abort of while() loop
+	trap break SIGINT
+
+	if [ -n "${netwait_if}" ]; then
+		echo -n "Waiting for $netwait_if to have link"
+
+		count=1
+		while [ ${count} -le ${netwait_if_timeout} ]; do
+			if output=`/sbin/ifconfig ${netwait_if} 2>/dev/null`; then
+				link=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'`
+				if [ -z "${link}" ]; then
+					echo '.'
+					break
+				fi
+			else
+				echo ''
+				err 1 "ifconfig ${netwait_if} failed"
+			fi
+			sleep 1
+			count=$((count+1))
+		done
+		if [ -n "${link}" ]; then
+			# Restore default SIGINT handler
+			trap - SIGINT
+
+			echo ''
+			warn "Interface still has no link.  Continuing with startup, but"
+			warn "be aware you may not have a fully functional networking"
+			warn "layer at this point."
+			return
+		fi
+	fi
+
+	# Handle SIGINT (Ctrl-C); force abort of while() loop
+	trap break SIGINT
+
+	for ip in ${netwait_ip}; do
+		echo -n "Waiting for ${ip} to respond to ICMP"
+
+		count=1
+		while [ ${count} -le ${netwait_timeout} ]; do
+			/sbin/ping -t 1 -c 1 -o ${ip} >/dev/null 2>&1
+			rc=$?
+
+			if [ $rc -eq 0 ]; then
+				# Restore default SIGINT handler
+				trap - SIGINT
+
+				echo '.'
+				return
+			fi
+			count=$((count+1))
+		done
+		echo ': No response from host.'
+	done
+
+	# Restore default SIGINT handler
+	trap - SIGINT
+
+	warn "Exhausted IP list.  Continuing with startup, but be aware you may"
+	warn "not have a fully functional networking layer at this point."
+}
+
+load_rc_config $name
+run_rc_command "$1"

Modified: user/gabor/tre-integration/etc/rc.subr
==============================================================================
--- user/gabor/tre-integration/etc/rc.subr	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/etc/rc.subr	Wed Jun 22 23:36:01 2011	(r223452)
@@ -1732,8 +1732,6 @@ check_required_after()
 	return 0
 }
 
-fi
-
 # check_kern_features mib
 #	Return existence of kern.features.* sysctl MIB as true or
 #	false.  The result will be cached in $_rc_cache_kern_features_
@@ -1744,7 +1742,7 @@ check_kern_features()
 	local _v
 
 	[ -n "$1" ] || return 1;
-	_v=`eval echo "\\$_rc_cache_kern_features_$1"`
+	eval _v=\$_rc_cache_kern_features_$1
 	[ -n "$_v" ] && return "$_v";
 
 	if ${SYSCTL_N} kern.features.$1 > /dev/null 2>&1; then
@@ -1775,4 +1773,6 @@ _echoonce()
 	esac
 }
 
+fi # [ -z "${_rc_subr_loaded}" ]
+
 _rc_subr_loaded=:

Modified: user/gabor/tre-integration/lib/libc/iconv/citrus_mapper.c
==============================================================================
--- user/gabor/tre-integration/lib/libc/iconv/citrus_mapper.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/lib/libc/iconv/citrus_mapper.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -337,7 +337,9 @@ _citrus_mapper_open(struct _citrus_mappe
 		goto quit;
 
 	/* open mapper */
+	UNLOCK;
 	ret = mapper_open(ma, &cm, module, variable);
+	WLOCK;
 	if (ret)
 		goto quit;
 	cm->cm_key = strdup(mapname);

Modified: user/gabor/tre-integration/lib/libc/iconv/iconv.c
==============================================================================
--- user/gabor/tre-integration/lib/libc/iconv/iconv.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/lib/libc/iconv/iconv.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -85,7 +85,7 @@ _iconv_open(const char *out, const char 
 		errno = ENOMEM;
 		return ((iconv_t)-1);
 	}
-		
+
 	p = out_truncated;
         while (*p != 0) {
                 if (p[0] == '/' && p[1] == '/') {

Modified: user/gabor/tre-integration/lib/libc/stdlib/malloc.c
==============================================================================
--- user/gabor/tre-integration/lib/libc/stdlib/malloc.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/lib/libc/stdlib/malloc.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -234,7 +234,7 @@ __FBSDID("$FreeBSD$");
 #ifdef __sparc64__
 #  define LG_QUANTUM		4
 #  define LG_SIZEOF_PTR		3
-#  define TLS_MODEL		/* default */
+#  define TLS_MODEL		__attribute__((tls_model("initial-exec")))
 #endif
 #ifdef __amd64__
 #  define LG_QUANTUM		4

Modified: user/gabor/tre-integration/lib/libprocstat/libprocstat.c
==============================================================================
--- user/gabor/tre-integration/lib/libprocstat/libprocstat.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/lib/libprocstat/libprocstat.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -191,7 +191,7 @@ procstat_getprocs(struct procstat *procs
 		len = *count * sizeof(*p);
 		p = malloc(len);
 		if (p == NULL) {
-			warnx("malloc(%zd)", len);
+			warnx("malloc(%zu)", len);
 			goto fail;
 		}
 		bcopy(p0, p, len);
@@ -213,7 +213,7 @@ procstat_getprocs(struct procstat *procs
 		}
 		p = malloc(len);
 		if (p == NULL) {
-			warnx("malloc(%zd)", len);
+			warnx("malloc(%zu)", len);
 			goto fail;
 		}
 		error = sysctl(name, 4, p, &len, NULL, 0);
@@ -229,7 +229,7 @@ procstat_getprocs(struct procstat *procs
 		*count = len / sizeof(*p);
 		return (p);
 	} else {
-		warnx("unknown access method");
+		warnx("unknown access method: %d", procstat->type);
 		return (NULL);
 	}
 fail:
@@ -271,11 +271,11 @@ procstat_freefiles(struct procstat *proc
 	}
 	free(head);
 	if (procstat->vmentries != NULL) {
-		free (procstat->vmentries);
+		free(procstat->vmentries);
 		procstat->vmentries = NULL;
 	}
 	if (procstat->files != NULL) {
-		free (procstat->files);
+		free(procstat->files);
 		procstat->files = NULL;
 	}
 }
@@ -426,7 +426,7 @@ procstat_getfiles_kvm(struct procstat *p
 	nfiles = filed.fd_lastfile + 1;
 	ofiles = malloc(nfiles * sizeof(struct file *));
 	if (ofiles == NULL) {
-		warn("malloc(%zd)", nfiles * sizeof(struct file *));
+		warn("malloc(%zu)", nfiles * sizeof(struct file *));
 		goto do_mmapped;
 	}
 	if (!kvm_read_all(kd, (unsigned long)filed.fd_ofiles, ofiles,
@@ -522,7 +522,8 @@ do_mmapped:
 			fflags = 0;
 			if (prot & VM_PROT_READ)
 				fflags = PS_FST_FFLAG_READ;
-			if (prot & VM_PROT_WRITE)
+			if ((vmentry.eflags & MAP_ENTRY_COW) == 0 &&
+			    prot & VM_PROT_WRITE)
 				fflags |= PS_FST_FFLAG_WRITE;
 
 			/*
@@ -696,7 +697,8 @@ procstat_getfiles_sysctl(struct procstat
 			fflags = 0;
 			if (kve->kve_protection & KVME_PROT_READ)
 				fflags = PS_FST_FFLAG_READ;
-			if (kve->kve_protection & KVME_PROT_WRITE)
+			if ((kve->kve_flags & KVME_FLAG_COW) == 0 &&
+			    kve->kve_protection & KVME_PROT_WRITE)
 				fflags |= PS_FST_FFLAG_WRITE;
 			offset = kve->kve_offset;
 			refcount = kve->kve_ref_count;
@@ -726,7 +728,7 @@ procstat_get_pipe_info(struct procstat *
 	} else if (procstat->type == PROCSTAT_SYSCTL) {
 		return (procstat_get_pipe_info_sysctl(fst, ps, errbuf));
 	} else {
-		warnx("unknow access method: %d", procstat->type);
+		warnx("unknown access method: %d", procstat->type);
 		snprintf(errbuf, _POSIX2_LINE_MAX, "error");
 		return (1);
 	}
@@ -790,7 +792,7 @@ procstat_get_pts_info(struct procstat *p
 	} else if (procstat->type == PROCSTAT_SYSCTL) {
 		return (procstat_get_pts_info_sysctl(fst, pts, errbuf));
 	} else {
-		warnx("unknow access method: %d", procstat->type);
+		warnx("unknown access method: %d", procstat->type);
 		snprintf(errbuf, _POSIX2_LINE_MAX, "error");
 		return (1);
 	}
@@ -852,7 +854,7 @@ procstat_get_vnode_info(struct procstat 
 	} else if (procstat->type == PROCSTAT_SYSCTL) {
 		return (procstat_get_vnode_info_sysctl(fst, vn, errbuf));
 	} else {
-		warnx("unknow access method: %d", procstat->type);
+		warnx("unknown access method: %d", procstat->type);
 		snprintf(errbuf, _POSIX2_LINE_MAX, "error");
 		return (1);
 	}
@@ -1059,7 +1061,7 @@ procstat_get_socket_info(struct procstat
 	} else if (procstat->type == PROCSTAT_SYSCTL) {
 		return (procstat_get_socket_info_sysctl(fst, sock, errbuf));
 	} else {
-		warnx("unknow access method: %d", procstat->type);
+		warnx("unknown access method: %d", procstat->type);
 		snprintf(errbuf, _POSIX2_LINE_MAX, "error");
 		return (1);
 	}

Modified: user/gabor/tre-integration/lib/libthr/thread/thr_init.c
==============================================================================
--- user/gabor/tre-integration/lib/libthr/thread/thr_init.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/lib/libthr/thread/thr_init.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -409,7 +409,6 @@ init_main_thread(struct pthread *thread)
 
 	thread->cancel_enable = 1;
 	thread->cancel_async = 0;
-	thr_set_name(thread->tid, "initial thread");
 
 	/* Initialize the mutex queue: */
 	TAILQ_INIT(&thread->mutexq);

Modified: user/gabor/tre-integration/lib/msun/src/e_rem_pio2.c
==============================================================================
--- user/gabor/tre-integration/lib/msun/src/e_rem_pio2.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/lib/msun/src/e_rem_pio2.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -171,9 +171,8 @@ medium:
 	}
     /* set z = scalbn(|x|,ilogb(x)-23) */
 	GET_LOW_WORD(low,x);
-	SET_LOW_WORD(z,low);
 	e0 	= (ix>>20)-1046;	/* e0 = ilogb(z)-23; */
-	SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
+	INSERT_WORDS(z, ix - ((int32_t)(e0<<20)), low);
 	for(i=0;i<2;i++) {
 		tx[i] = (double)((int32_t)(z));
 		z     = (z-tx[i])*two24;

Modified: user/gabor/tre-integration/libexec/ftpd/ftpd.c
==============================================================================
--- user/gabor/tre-integration/libexec/ftpd/ftpd.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/libexec/ftpd/ftpd.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -1191,9 +1191,9 @@ end_login(void)
 		ftpd_logwtmp(wtmpid, NULL, NULL);
 	pw = NULL;
 #ifdef	LOGIN_CAP
-	setusercontext(NULL, getpwuid(0), 0,
-		       LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK|
-		       LOGIN_SETMAC);
+	setusercontext(NULL, getpwuid(0), 0, LOGIN_SETALL & ~(LOGIN_SETLOGIN |
+		       LOGIN_SETUSER | LOGIN_SETGROUP | LOGIN_SETPATH |
+		       LOGIN_SETENV));
 #endif
 #ifdef USE_PAM
 	if (pamh) {
@@ -1465,9 +1465,8 @@ skip:
 			return;
 		}
 	}
-	setusercontext(lc, pw, 0,
-		LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY|
-		LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC);
+	setusercontext(lc, pw, 0, LOGIN_SETALL &
+		       ~(LOGIN_SETUSER | LOGIN_SETPATH | LOGIN_SETENV));
 #else
 	setlogin(pw->pw_name);
 	(void) initgroups(pw->pw_name, pw->pw_gid);

Modified: user/gabor/tre-integration/libexec/tftpd/tftpd.8
==============================================================================
--- user/gabor/tre-integration/libexec/tftpd/tftpd.8	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/libexec/tftpd/tftpd.8	Wed Jun 22 23:36:01 2011	(r223452)
@@ -32,7 +32,7 @@
 .\"	@(#)tftpd.8	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd September 14, 2000
+.Dd June 22, 2011
 .Dt TFTPD 8
 .Os
 .Sh NAME
@@ -150,9 +150,27 @@ compatible format string for the creatio
 .Fl W
 is specified.
 By default the string "%Y%m%d" is used.
-.It Fl d
+.It Fl d, d Ar [value]
 Enables debug output.
-If specified twice, it will log DATA and ACK packets too.
+If
+.Ar value
+is not specified, then the debug level is increased by one
+for each instance of
+.Fl d
+which is specified.
+.Pp
+If
+.Ar value
+is specified, then the debug level is set to 
+.Ar value .
+The debug level is a bitmask implemented in 
+.Pa src/libexec/tftpd/tftp-utils.h .
+Valid values are 0 (DEBUG_NONE), 1 (DEBUG_PACKETS), 2, (DEBUG_SIMPLE),
+4 (DEBUG_OPTIONS), and 8 (DEBUG_ACCESS).  Multiple debug values can be combined
+in the bitmask by logically OR'ing the values.  For example, specifying
+.Fl d
+.Ar 15
+will enable all the debug values.
 .It Fl l
 Log all requests using
 .Xr syslog 3
@@ -217,12 +235,34 @@ option.
 .Xr services 5 ,
 .Xr syslog.conf 5 ,
 .Xr inetd 8
+.Pp
+The following RFC's are supported:
 .Rs
-.%A K. R. Sollins
+RFC 1350
 .%T The TFTP Protocol (Revision 2)
-.%D July 1992
-.%O RFC 1350, STD 33
 .Re
+.Rs
+RFC 2347
+.%T TFTP Option Extension
+.Re
+.Rs
+RFC 2348
+.%T TFTP Blocksize Option
+.Re
+.Rs
+RFC 2349
+.%T TFTP Timeout Interval and Transfer Size Options
+.Re
+.Pp
+The non-standard
+.Cm rollover
+and
+.Cm blksize2
+TFTP options are mentioned here:
+.Rs
+.%T Extending TFTP
+.%U http://www.compuphase.com/tftp.htm
+.Re 
 .Sh HISTORY
 The
 .Nm
@@ -255,7 +295,7 @@ was introduced in
 .Fx 7.4 .
 .Sh NOTES
 Files larger than 33488896 octets (65535 blocks) cannot be transferred
-without client and server supporting the the TFTP blocksize option (RFC2348),
+without client and server supporting the TFTP blocksize option (RFC2348),
 or the non-standard TFTP rollover option.
 .Pp
 Many tftp clients will not transfer files over 16744448 octets (32767 blocks).

Modified: user/gabor/tre-integration/libexec/ulog-helper/Makefile
==============================================================================
--- user/gabor/tre-integration/libexec/ulog-helper/Makefile	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/libexec/ulog-helper/Makefile	Wed Jun 22 23:36:01 2011	(r223452)
@@ -5,7 +5,7 @@ BINOWN=	root
 BINMODE=4555
 NO_MAN=
 
-DPADD=	${LIBULOG} ${LIBMD}
-LDADD=	-lulog -lmd
+DPADD=	${LIBULOG}
+LDADD=	-lulog
 
 .include <bsd.prog.mk>

Modified: user/gabor/tre-integration/libexec/ulog-helper/ulog-helper.c
==============================================================================
--- user/gabor/tre-integration/libexec/ulog-helper/ulog-helper.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/libexec/ulog-helper/ulog-helper.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -36,11 +36,11 @@ __FBSDID("$FreeBSD$");
 
 /*
  * This setuid helper utility writes user login records to disk.
- * Unprivileged processes are not capable of writing records to utmp,
- * wtmp and lastlog, but we do want to allow this for pseudo-terminals.
- * Because a file descriptor to a pseudo-terminal master device can only
- * be obtained by processes using the pseudo-terminal, we expect such a
- * descriptor on stdin.
+ * Unprivileged processes are not capable of writing records to utmpx,
+ * but we do want to allow this for pseudo-terminals.  Because a file
+ * descriptor to a pseudo-terminal master device can only be obtained by
+ * processes using the pseudo-terminal, we expect such a descriptor on
+ * stdin.
  *
  * It uses the real user ID of the calling process to determine the
  * username.  It does allow users to log arbitrary hostnames.
@@ -49,26 +49,22 @@ __FBSDID("$FreeBSD$");
 int
 main(int argc, char *argv[])
 {
-	const char *line;
+	const char *line, *user, *host;
 
 	/* Device line name. */
 	if ((line = ptsname(STDIN_FILENO)) == NULL)
 		return (EX_USAGE);
 
 	if ((argc == 2 || argc == 3) && strcmp(argv[1], "login") == 0) {
-		struct passwd *pwd;
-		const char *host = NULL;
-
 		/* Username. */
-		pwd = getpwuid(getuid());
-		if (pwd == NULL)
+		user = user_from_uid(getuid(), 1);
+		if (user == NULL)
 			return (EX_OSERR);
 
 		/* Hostname. */
-		if (argc == 3)
-			host = argv[2];
+		host = argc == 3 ? argv[2] : NULL;
 
-		ulog_login(line, pwd->pw_name, host);
+		ulog_login(line, user, host);
 		return (EX_OK);
 	} else if (argc == 2 && strcmp(argv[1], "logout") == 0) {
 		ulog_logout(line);

Modified: user/gabor/tre-integration/sbin/ddb/ddb.8
==============================================================================
--- user/gabor/tre-integration/sbin/ddb/ddb.8	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/sbin/ddb/ddb.8	Wed Jun 22 23:36:01 2011	(r223452)
@@ -126,7 +126,7 @@ it is advisable to enclose
 in quotes.
 .It Cm scripts
 List currently defined scripts.
-.It Cm unset Ar scriptname
+.It Cm unscript Ar scriptname
 Delete the script named
 .Ar scriptname .
 .El

Modified: user/gabor/tre-integration/sbin/geom/class/part/geom_part.c
==============================================================================
--- user/gabor/tre-integration/sbin/geom/class/part/geom_part.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/sbin/geom/class/part/geom_part.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -362,7 +362,7 @@ gpart_autofill_resize(struct gctl_req *r
 			goto done;
 	}
 
-	offset = pp->lg_stripeoffset / pp->lg_sectorsize;
+	offset = (pp->lg_stripeoffset / pp->lg_sectorsize) % alignment;
 	last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
 	LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
 		s = find_provcfg(pp, "index");
@@ -497,10 +497,10 @@ gpart_autofill(struct gctl_req *req)
 		alignment = len;
 
 	/* Adjust parameters to stripeoffset */
-	offset = pp->lg_stripeoffset / pp->lg_sectorsize;
+	offset = (pp->lg_stripeoffset / pp->lg_sectorsize) % alignment;
 	start = ALIGNUP(start + offset, alignment);
-	if (size + offset > alignment)
-		size = ALIGNDOWN(size + offset, alignment);
+	if (size > alignment)
+		size = ALIGNDOWN(size, alignment);
 
 	first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0);
 	last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
@@ -1208,8 +1208,11 @@ gpart_bootcode(struct gctl_req *req, uns
 			if (idx == 0)
 				errx(EXIT_FAILURE, "missing -i option");
 			gpart_write_partcode(gp, idx, partcode, partsize);
-		} else
+		} else {
+			if (partsize != VTOC_BOOTSIZE)
+				errx(EXIT_FAILURE, "invalid bootcode");
 			gpart_write_partcode_vtoc8(gp, idx, partcode);
+		}
 	} else
 		if (bootcode == NULL)
 			errx(EXIT_FAILURE, "no -b nor -p");

Modified: user/gabor/tre-integration/sbin/growfs/growfs.8
==============================================================================
--- user/gabor/tre-integration/sbin/growfs/growfs.8	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/sbin/growfs/growfs.8	Wed Jun 22 23:36:01 2011	(r223452)
@@ -37,12 +37,12 @@
 .\" $TSHeader: src/sbin/growfs/growfs.8,v 1.3 2000/12/12 19:31:00 tomsoft Exp $
 .\" $FreeBSD$
 .\"
-.Dd May 8, 2011
+.Dd June 22, 2011
 .Dt GROWFS 8
 .Os
 .Sh NAME
 .Nm growfs
-.Nd grow size of an existing UFS file system
+.Nd expand an existing UFS filesystem
 .Sh SYNOPSIS
 .Nm
 .Op Fl Ny
@@ -58,26 +58,26 @@ Before starting
 .Nm
 the disk must be labeled to a bigger size using
 .Xr bsdlabel 8 .
-If you wish to grow a file system beyond the boundary of
-the slice it resides in, you must re-size the slice using
-.Xr fdisk 8
+If you wish to grow a filesystem beyond the boundary of
+the slice it resides in, you must resize the slice using
+.Xr gpart 8
 before running
 .Nm .
 If you are using volumes you must enlarge them by using
-.Xr vinum 8 .
+.Xr gvinum 8 .
 The
 .Nm
-utility extends the size of the file system on the specified special file.
+utility extends the size of the filesystem on the specified special file.
 Currently
 .Nm
-can only enlarge unmounted file systems.
-Do not try enlarging a mounted file system, your system may panic and you will
-not be able to use the file system any longer.
+can only enlarge unmounted filesystems.
+Do not try enlarging a mounted filesystem, your system may panic and you will
+not be able to use the filesystem any longer.
 Most of the
 .Xr newfs 8
 options cannot be changed by
 .Nm .
-In fact, you can only increase the size of the file system.
+In fact, you can only increase the size of the filesystem.
 Use
 .Xr tunefs 8
 for other changes.
@@ -86,8 +86,8 @@ The following options are available:
 .Bl -tag -width indent
 .It Fl N
 .Dq Test mode .
-Causes the new file system parameters to be printed out without actually
-enlarging the file system.
+Causes the new filesystem parameters to be printed out without actually
+enlarging the filesystem.
 .It Fl y
 .Dq Expert mode .
 Usually
@@ -102,12 +102,12 @@ So use this option with great care!
 .It Fl s Ar size
 Determines the
 .Ar size
-of the file system after enlarging in sectors.
+of the filesystem after enlarging in sectors.
 This value defaults to the size of the raw partition specified in
 .Ar special
 (in other words,
 .Nm
-will enlarge the file system to the size of the entire partition).
+will enlarge the filesystem to the size of the entire partition).
 .El
 .Sh EXAMPLES
 .Dl growfs -s 4194304 /dev/vinum/testvol
@@ -119,12 +119,12 @@ up to 2GB if there is enough space in
 .Sh SEE ALSO
 .Xr bsdlabel 8 ,
 .Xr dumpfs 8 ,
-.Xr fdisk 8 ,
 .Xr ffsinfo 8 ,
 .Xr fsck 8 ,
+.Xr gpart 8 ,
 .Xr newfs 8 ,
 .Xr tunefs 8 ,
-.Xr vinum 8
+.Xr gvinum 8
 .Sh HISTORY
 The
 .Nm
@@ -144,12 +144,12 @@ There may be cases on
 .Fx
 3.x only, when
 .Nm
-does not recognize properly whether or not the file system is mounted and
+does not recognize properly whether or not the filesystem is mounted and
 exits with an error message.
 Then please use
 .Nm
 .Fl y
-if you are sure that the file system is not mounted.
+if you are sure that the filesystem is not mounted.
 It is also recommended to always use
 .Xr fsck 8
 after enlarging (just to be on the safe side).
@@ -183,8 +183,8 @@ on the first cylinder group to verify th
 in the CYLINDER SUMMARY (internal cs) of the CYLINDER GROUP
 .Em cgr0
 has enough blocks.
-As a rule of thumb for default file system parameters one block is needed for
-every 2 GB of total file system size.
+As a rule of thumb for default filesystem parameters one block is needed for
+every 2 GB of total filesystem size.
 .Pp
 Normally
 .Nm

Modified: user/gabor/tre-integration/sbin/growfs/growfs.c
==============================================================================
--- user/gabor/tre-integration/sbin/growfs/growfs.c	Wed Jun 22 23:26:04 2011	(r223451)
+++ user/gabor/tre-integration/sbin/growfs/growfs.c	Wed Jun 22 23:36:01 2011	(r223452)
@@ -160,7 +160,7 @@ static void	get_dev_size(int, int *);
 
 /* ************************************************************ growfs ***** */
 /*
- * Here we actually start growing the file system. We basically read the
+ * Here we actually start growing the filesystem. We basically read the
  * cylinder summary from the first cylinder group as we want to update
  * this on the fly during our various operations. First we handle the
  * changes in the former last cylinder group. Afterwards we create all new
@@ -231,7 +231,7 @@ growfs(int fsi, int fso, unsigned int Nf
 	updjcg(osblock.fs_ncg-1, modtime, fsi, fso, Nflag);
 
 	/*
-	 * Dump out summary information about file system.
+	 * Dump out summary information about filesystem.
 	 */
 #	define B2MBFACTOR (1 / (1024.0 * 1024.0))
 	printf("growfs: %.1fMB (%jd sectors) block size %d, fragment size %d\n",
@@ -435,7 +435,7 @@ initcg(int cylno, time_t modtime, int fs
 	if (acg.cg_nextfreeoff > (unsigned)sblock.fs_cgsize) {
 		/*
 		 * This should never happen as we would have had that panic
-		 * already on file system creation
+		 * already on filesystem creation
 		 */
 		errx(37, "panic: cylinder group too big");
 	}
@@ -446,7 +446,7 @@ initcg(int cylno, time_t modtime, int fs
 			acg.cg_cs.cs_nifree--;
 		}
 	/*
-	 * For the old file system, we have to initialize all the inodes.
+	 * For the old filesystem, we have to initialize all the inodes.
 	 */
 	if (sblock.fs_magic == FS_UFS1_MAGIC) {
 		bzero(iobuf, sblock.fs_bsize);
@@ -670,7 +670,7 @@ cond_bl_upd(ufs2_daddr_t *block, struct 
 /* ************************************************************ updjcg ***** */
 /*
  * Here we do all needed work for the former last cylinder group. It has to be
- * changed in any case, even if the file system ended exactly on the end of
+ * changed in any case, even if the filesystem ended exactly on the end of
  * this group, as there is some slightly inconsistent handling of the number
  * of cylinders in the cylinder group. We start again by reading the cylinder
  * group from disk. If the last block was not fully available, we first handle
@@ -780,7 +780,7 @@ updjcg(int cylno, time_t modtime, int fs
 	 * the rotational layout tables and the cluster summary.  This is
 	 * also done per fragment for the first new block if the old file
 	 * system end was not on a block boundary, per fragment for the new
-	 * last block if the new file system end is not on a block boundary,
+	 * last block if the new filesystem end is not on a block boundary,
 	 * and per block for all space in between.
 	 *
 	 * Handle the first new block here if it was partially available
@@ -804,7 +804,7 @@ updjcg(int cylno, time_t modtime, int fs
 			/*
 			 * Check if the fragment just created could join an
 			 * already existing fragment at the former end of the
-			 * file system.
+			 * filesystem.
 			 */
 			if(isblock(&sblock, cg_blksfree(&acg),
 			    ((osblock.fs_size - cgbase(&sblock, cylno))/

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


More information about the svn-src-user mailing list