socsvn commit: r286868 - in soc2015/clord/head: . bin/chmod bin/cp bin/ls cddl cddl/contrib/opensolaris cddl/contrib/opensolaris/lib/libdtrace/common contrib/dtc contrib/top etc lib/libc lib/libc/a...
clord at FreeBSD.org
clord at FreeBSD.org
Tue Jun 9 20:04:50 UTC 2015
Author: clord
Date: Tue Jun 9 20:04:43 2015
New Revision: 286868
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=286868
Log:
merge with head
Added:
soc2015/clord/head/contrib/top/top.local.hs
- copied unchanged from r286867, mirror/FreeBSD/head/contrib/top/top.local.hs
soc2015/clord/head/contrib/top/top.xs
- copied unchanged from r286867, mirror/FreeBSD/head/contrib/top/top.xs
soc2015/clord/head/release/arm/GUMSTIX.conf
- copied unchanged from r286867, mirror/FreeBSD/head/release/arm/GUMSTIX.conf
soc2015/clord/head/sys/arm/ti/am335x/tps65217x.h
- copied unchanged from r286867, mirror/FreeBSD/head/sys/arm/ti/am335x/tps65217x.h
soc2015/clord/head/sys/dev/ixl/i40e_devids.h
- copied unchanged from r286867, mirror/FreeBSD/head/sys/dev/ixl/i40e_devids.h
soc2015/clord/head/sys/dev/proto/proto_busdma.c
- copied unchanged from r286867, mirror/FreeBSD/head/sys/dev/proto/proto_busdma.c
soc2015/clord/head/sys/dev/proto/proto_busdma.h
- copied unchanged from r286867, mirror/FreeBSD/head/sys/dev/proto/proto_busdma.h
soc2015/clord/head/sys/modules/geom/geom_map/
- copied from r286867, mirror/FreeBSD/head/sys/modules/geom/geom_map/
soc2015/clord/head/tools/bus_space/busdma.c
- copied unchanged from r286867, mirror/FreeBSD/head/tools/bus_space/busdma.c
soc2015/clord/head/tools/bus_space/busdma.h
- copied unchanged from r286867, mirror/FreeBSD/head/tools/bus_space/busdma.h
soc2015/clord/head/usr.sbin/pw/tests/pw-modified.conf
- copied unchanged from r286867, mirror/FreeBSD/head/usr.sbin/pw/tests/pw-modified.conf
soc2015/clord/head/usr.sbin/pw/tests/pw.conf
- copied unchanged from r286867, mirror/FreeBSD/head/usr.sbin/pw/tests/pw.conf
soc2015/clord/head/usr.sbin/pw/tests/pw_config.sh
- copied unchanged from r286867, mirror/FreeBSD/head/usr.sbin/pw/tests/pw_config.sh
Deleted:
soc2015/clord/head/contrib/top/top.X
soc2015/clord/head/contrib/top/top.local.H
Modified:
soc2015/clord/head/ (props changed)
soc2015/clord/head/UPDATING
soc2015/clord/head/bin/chmod/chmod.c
soc2015/clord/head/bin/cp/cp.1
soc2015/clord/head/bin/cp/cp.c
soc2015/clord/head/bin/cp/extern.h
soc2015/clord/head/bin/cp/utils.c
soc2015/clord/head/bin/ls/ls.c
soc2015/clord/head/cddl/ (props changed)
soc2015/clord/head/cddl/contrib/opensolaris/ (props changed)
soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c
soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h
soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
soc2015/clord/head/contrib/dtc/ (props changed)
soc2015/clord/head/contrib/dtc/checks.c
soc2015/clord/head/contrib/top/ (props changed)
soc2015/clord/head/etc/ (props changed)
soc2015/clord/head/etc/Makefile
soc2015/clord/head/lib/libc/ (props changed)
soc2015/clord/head/lib/libc/aarch64/gen/setjmp.S
soc2015/clord/head/lib/libc/string/strchr.3
soc2015/clord/head/lib/libdevstat/devstat.c
soc2015/clord/head/lib/libdpv/dprompt.c
soc2015/clord/head/lib/libedit/edit/readline/readline.h
soc2015/clord/head/lib/libedit/readline.c
soc2015/clord/head/lib/libugidfw/ugidfw.c
soc2015/clord/head/lib/libutil/ (props changed)
soc2015/clord/head/lib/libutil/Makefile
soc2015/clord/head/lib/libutil/libutil.h
soc2015/clord/head/lib/libutil/pw_util.3
soc2015/clord/head/lib/libutil/pw_util.c
soc2015/clord/head/release/arm/BEAGLEBONE.conf
soc2015/clord/head/release/arm/CUBOX-HUMMINGBOARD.conf
soc2015/clord/head/release/arm/WANDBOARD.conf
soc2015/clord/head/release/tools/arm.subr
soc2015/clord/head/sbin/ (props changed)
soc2015/clord/head/sbin/badsect/Makefile
soc2015/clord/head/share/ (props changed)
soc2015/clord/head/share/examples/bhyve/vmrun.sh
soc2015/clord/head/share/man/man4/ (props changed)
soc2015/clord/head/share/man/man4/geom.4
soc2015/clord/head/share/man/man4/geom_map.4
soc2015/clord/head/share/misc/committers-ports.dot
soc2015/clord/head/share/mk/bsd.mkopt.mk
soc2015/clord/head/sys/ (props changed)
soc2015/clord/head/sys/amd64/amd64/initcpu.c
soc2015/clord/head/sys/amd64/amd64/pmap.c
soc2015/clord/head/sys/amd64/include/md_var.h
soc2015/clord/head/sys/amd64/include/vmparam.h
soc2015/clord/head/sys/amd64/linux/linux_support.s
soc2015/clord/head/sys/amd64/vmm/ (props changed)
soc2015/clord/head/sys/amd64/vmm/amd/svm.c
soc2015/clord/head/sys/amd64/vmm/intel/vmx.c
soc2015/clord/head/sys/amd64/vmm/intel/vmx.h
soc2015/clord/head/sys/amd64/vmm/intel/vmx_msr.c
soc2015/clord/head/sys/amd64/vmm/vmm_instruction_emul.c
soc2015/clord/head/sys/arm/arm/exception.S
soc2015/clord/head/sys/arm/arm/genassym.c
soc2015/clord/head/sys/arm/arm/machdep.c
soc2015/clord/head/sys/arm/arm/mp_machdep.c
soc2015/clord/head/sys/arm/arm/pmap-v6-new.c
soc2015/clord/head/sys/arm/arm/swtch.S
soc2015/clord/head/sys/arm/arm/sys_machdep.c
soc2015/clord/head/sys/arm/arm/vfp.c
soc2015/clord/head/sys/arm/arm/vm_machdep.c
soc2015/clord/head/sys/arm/freescale/imx/imx6_sdma.c
soc2015/clord/head/sys/arm/include/pcpu.h
soc2015/clord/head/sys/arm/include/vmparam.h
soc2015/clord/head/sys/arm/ti/am335x/am335x_pmic.c
soc2015/clord/head/sys/arm64/arm64/exception.S
soc2015/clord/head/sys/arm64/include/vmparam.h
soc2015/clord/head/sys/boot/ (props changed)
soc2015/clord/head/sys/boot/zfs/zfsimpl.c
soc2015/clord/head/sys/cam/ctl/ctl.c
soc2015/clord/head/sys/cam/ctl/scsi_ctl.c
soc2015/clord/head/sys/cddl/compat/opensolaris/sys/nvpair.h
soc2015/clord/head/sys/compat/linux/linux_emul.c
soc2015/clord/head/sys/compat/linux/linux_socket.c
soc2015/clord/head/sys/conf/ (props changed)
soc2015/clord/head/sys/conf/NOTES
soc2015/clord/head/sys/conf/options
soc2015/clord/head/sys/dev/aic7xxx/aic79xx_pci.c
soc2015/clord/head/sys/dev/cxgbe/t4_netmap.c
soc2015/clord/head/sys/dev/drm/drmP.h
soc2015/clord/head/sys/dev/drm/drm_agpsupport.c
soc2015/clord/head/sys/dev/drm/drm_bufs.c
soc2015/clord/head/sys/dev/drm/drm_drv.c
soc2015/clord/head/sys/dev/drm/drm_irq.c
soc2015/clord/head/sys/dev/drm/i915_drv.c
soc2015/clord/head/sys/dev/drm/mach64_drv.c
soc2015/clord/head/sys/dev/drm/mga_drv.c
soc2015/clord/head/sys/dev/drm/r128_drv.c
soc2015/clord/head/sys/dev/drm/radeon_drv.c
soc2015/clord/head/sys/dev/drm/savage_drv.c
soc2015/clord/head/sys/dev/drm/sis_drv.c
soc2015/clord/head/sys/dev/drm/tdfx_drv.c
soc2015/clord/head/sys/dev/drm2/drm_bufs.c
soc2015/clord/head/sys/dev/iwn/if_iwn.c
soc2015/clord/head/sys/dev/ixl/i40e_adminq.c
soc2015/clord/head/sys/dev/ixl/i40e_adminq.h
soc2015/clord/head/sys/dev/ixl/i40e_adminq_cmd.h
soc2015/clord/head/sys/dev/ixl/i40e_common.c
soc2015/clord/head/sys/dev/ixl/i40e_hmc.c
soc2015/clord/head/sys/dev/ixl/i40e_hmc.h
soc2015/clord/head/sys/dev/ixl/i40e_lan_hmc.c
soc2015/clord/head/sys/dev/ixl/i40e_nvm.c
soc2015/clord/head/sys/dev/ixl/i40e_osdep.h
soc2015/clord/head/sys/dev/ixl/i40e_prototype.h
soc2015/clord/head/sys/dev/ixl/i40e_register.h
soc2015/clord/head/sys/dev/ixl/i40e_type.h
soc2015/clord/head/sys/dev/ixl/i40e_virtchnl.h
soc2015/clord/head/sys/dev/ixl/if_ixl.c
soc2015/clord/head/sys/dev/ixl/if_ixlv.c
soc2015/clord/head/sys/dev/ixl/ixlv.h
soc2015/clord/head/sys/dev/ixl/ixlvc.c
soc2015/clord/head/sys/dev/mfi/mfi.c
soc2015/clord/head/sys/dev/nand/nfc_rb.c
soc2015/clord/head/sys/dev/pci/vga_pci.c
soc2015/clord/head/sys/dev/proto/proto.h
soc2015/clord/head/sys/dev/proto/proto_bus_pci.c
soc2015/clord/head/sys/dev/proto/proto_core.c
soc2015/clord/head/sys/dev/proto/proto_dev.h
soc2015/clord/head/sys/dev/usb/quirk/usb_quirk.c
soc2015/clord/head/sys/dev/usb/usb_dev.c
soc2015/clord/head/sys/dev/usb/usbdevs
soc2015/clord/head/sys/fs/devfs/devfs_vnops.c
soc2015/clord/head/sys/fs/unionfs/union_vfsops.c
soc2015/clord/head/sys/geom/part/g_part_gpt.c
soc2015/clord/head/sys/i386/i386/initcpu.c
soc2015/clord/head/sys/i386/i386/pmap.c
soc2015/clord/head/sys/i386/i386/trap.c
soc2015/clord/head/sys/i386/include/md_var.h
soc2015/clord/head/sys/i386/include/vmparam.h
soc2015/clord/head/sys/kern/imgact_elf.c
soc2015/clord/head/sys/kern/kern_tc.c
soc2015/clord/head/sys/kern/subr_uio.c
soc2015/clord/head/sys/kern/subr_witness.c
soc2015/clord/head/sys/kern/uipc_shm.c
soc2015/clord/head/sys/kern/vfs_vnops.c
soc2015/clord/head/sys/mips/conf/AR71XX_BASE
soc2015/clord/head/sys/mips/conf/AR724X_BASE
soc2015/clord/head/sys/mips/include/vmparam.h
soc2015/clord/head/sys/modules/Makefile
soc2015/clord/head/sys/modules/em/Makefile
soc2015/clord/head/sys/modules/ixl/Makefile
soc2015/clord/head/sys/modules/ixlv/Makefile
soc2015/clord/head/sys/modules/proto/Makefile
soc2015/clord/head/sys/net80211/ieee80211.c
soc2015/clord/head/sys/net80211/ieee80211_freebsd.c
soc2015/clord/head/sys/net80211/ieee80211_freebsd.h
soc2015/clord/head/sys/net80211/ieee80211_output.c
soc2015/clord/head/sys/net80211/ieee80211_scan.c
soc2015/clord/head/sys/net80211/ieee80211_scan.h
soc2015/clord/head/sys/net80211/ieee80211_scan_sw.c
soc2015/clord/head/sys/net80211/ieee80211_scan_sw.h
soc2015/clord/head/sys/net80211/ieee80211_var.h
soc2015/clord/head/sys/netinet/sctp_sysctl.c
soc2015/clord/head/sys/netinet/sctp_uio.h
soc2015/clord/head/sys/powerpc/include/vmparam.h
soc2015/clord/head/sys/sparc64/include/vmparam.h
soc2015/clord/head/sys/sys/bus.h
soc2015/clord/head/sys/sys/file.h
soc2015/clord/head/sys/sys/mman.h
soc2015/clord/head/sys/sys/param.h
soc2015/clord/head/sys/vm/vm_extern.h
soc2015/clord/head/sys/vm/vm_mmap.c
soc2015/clord/head/sys/vm/vm_page.c
soc2015/clord/head/sys/vm/vm_reserv.c
soc2015/clord/head/sys/x86/acpica/madt.c
soc2015/clord/head/sys/x86/x86/identcpu.c
soc2015/clord/head/tests/sys/kern/ptrace_test.c
soc2015/clord/head/tools/bus_space/C/Makefile
soc2015/clord/head/tools/bus_space/C/lang.c
soc2015/clord/head/tools/bus_space/C/libbus_space.h
soc2015/clord/head/tools/bus_space/Makefile.inc
soc2015/clord/head/tools/bus_space/Python/lang.c
soc2015/clord/head/usr.bin/colcrt/colcrt.1
soc2015/clord/head/usr.bin/colrm/colrm.1
soc2015/clord/head/usr.bin/expand/expand.1
soc2015/clord/head/usr.bin/fold/fold.1
soc2015/clord/head/usr.bin/keylogin/Makefile
soc2015/clord/head/usr.bin/last/last.1
soc2015/clord/head/usr.bin/mail/Makefile
soc2015/clord/head/usr.bin/mail/main.c
soc2015/clord/head/usr.bin/mkstr/mkstr.1
soc2015/clord/head/usr.bin/mkstr/mkstr.c
soc2015/clord/head/usr.bin/rsh/Makefile
soc2015/clord/head/usr.bin/rsh/rsh.c
soc2015/clord/head/usr.bin/rup/Makefile
soc2015/clord/head/usr.bin/systat/Makefile
soc2015/clord/head/usr.bin/systat/main.c
soc2015/clord/head/usr.bin/top/Makefile
soc2015/clord/head/usr.bin/tset/tset.1
soc2015/clord/head/usr.bin/vgrind/regexp.c
soc2015/clord/head/usr.bin/vgrind/vgrindefs.c
soc2015/clord/head/usr.bin/vtfontcvt/Makefile
soc2015/clord/head/usr.sbin/pw/grupd.c
soc2015/clord/head/usr.sbin/pw/pw.c
soc2015/clord/head/usr.sbin/pw/pw.h
soc2015/clord/head/usr.sbin/pw/pw_group.c
soc2015/clord/head/usr.sbin/pw/pw_user.c
soc2015/clord/head/usr.sbin/pw/pwupd.c
soc2015/clord/head/usr.sbin/pw/pwupd.h
soc2015/clord/head/usr.sbin/pw/tests/Makefile
soc2015/clord/head/usr.sbin/pw/tests/pw_groupmod.sh
soc2015/clord/head/usr.sbin/pw/tests/pw_useradd.sh
soc2015/clord/head/usr.sbin/pw/tests/pw_usermod.sh
soc2015/clord/head/usr.sbin/pwd_mkdb/pwd_mkdb.8
soc2015/clord/head/usr.sbin/pwd_mkdb/pwd_mkdb.c
Modified: soc2015/clord/head/UPDATING
==============================================================================
--- soc2015/clord/head/UPDATING Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/UPDATING Tue Jun 9 20:04:43 2015 (r286868)
@@ -31,6 +31,15 @@
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20150604:
+ Generation of legacy formatted entries have been disabled by default
+ in pwd_mkdb(8), as all base system consumers of the legacy formatted
+ entries were converted to use the new format by default when the new,
+ machine independent format have been added and supported since FreeBSD
+ 5.x.
+
+ Please see the pwd_mkdb(8) manual page for further details.
+
20150525:
Clang and llvm have been upgraded to 3.6.1 release. Please see the
20141231 entry below for information about prerequisites and upgrading,
Modified: soc2015/clord/head/bin/chmod/chmod.c
==============================================================================
--- soc2015/clord/head/bin/chmod/chmod.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/bin/chmod/chmod.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -162,14 +162,16 @@
atflag = AT_SYMLINK_NOFOLLOW;
switch (p->fts_info) {
- case FTS_D: /* Change it at FTS_DP. */
+ case FTS_D:
if (!Rflag)
fts_set(ftsp, p, FTS_SKIP);
- continue;
+ break;
case FTS_DNR: /* Warn, chmod. */
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
rval = 1;
break;
+ case FTS_DP: /* Already changed at FTS_D. */
+ continue;
case FTS_ERR: /* Warn, continue. */
case FTS_NS:
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
Modified: soc2015/clord/head/bin/cp/cp.1
==============================================================================
--- soc2015/clord/head/bin/cp/cp.1 Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/bin/cp/cp.1 Tue Jun 9 20:04:43 2015 (r286868)
@@ -32,7 +32,7 @@
.\" @(#)cp.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd March 15, 2013
+.Dd June 6, 2015
.Dt CP 1
.Os
.Sh NAME
@@ -45,7 +45,7 @@
.Op Fl H | Fl L | Fl P
.Oc
.Op Fl f | i | n
-.Op Fl alpvx
+.Op Fl alpsvx
.Ar source_file target_file
.Nm
.Oo
@@ -53,7 +53,7 @@
.Op Fl H | Fl L | Fl P
.Oc
.Op Fl f | i | n
-.Op Fl alpvx
+.Op Fl alpsvx
.Ar source_file ... target_directory
.Sh DESCRIPTION
In the first synopsis form, the
@@ -179,6 +179,8 @@
and either the user ID or group ID cannot be preserved, neither
the set-user-ID nor set-group-ID bits are preserved in the copy's
permissions.
+.It Fl s
+Create symbolic links to regular files in a hierarchy instead of copying.
.It Fl v
Cause
.Nm
@@ -298,7 +300,10 @@
files while recreating a hierarchy.
.Pp
The
-.Fl v
+.Fl l,
+.Fl s,
+.Fl v,
+.Fl x
and
.Fl n
options are non-standard and their use in scripts is not recommended.
Modified: soc2015/clord/head/bin/cp/cp.c
==============================================================================
--- soc2015/clord/head/bin/cp/cp.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/bin/cp/cp.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -75,15 +75,15 @@
#include "extern.h"
#define STRIP_TRAILING_SLASH(p) { \
- while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \
- *--(p).p_end = 0; \
+ while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \
+ *--(p).p_end = 0; \
}
static char emptystring[] = "";
PATH_T to = { to.p_path, emptystring, "" };
-int fflag, iflag, lflag, nflag, pflag, vflag;
+int fflag, iflag, lflag, nflag, pflag, sflag, vflag;
static int Rflag, rflag;
volatile sig_atomic_t info;
@@ -102,7 +102,7 @@
fts_options = FTS_NOCHDIR | FTS_PHYSICAL;
Hflag = Lflag = 0;
- while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1)
+ while ((ch = getopt(argc, argv, "HLPRafilnprsvx")) != -1)
switch (ch) {
case 'H':
Hflag = 1;
@@ -145,6 +145,9 @@
rflag = Lflag = 1;
Hflag = 0;
break;
+ case 's':
+ sflag = 1;
+ break;
case 'v':
vflag = 1;
break;
@@ -163,6 +166,8 @@
if (Rflag && rflag)
errx(1, "the -R and -r options may not be specified together");
+ if (lflag && sflag)
+ errx(1, "the -l and -s options may not be specified together");
if (rflag)
Rflag = 1;
if (Rflag) {
@@ -183,7 +188,7 @@
if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path))
errx(1, "%s: name too long", target);
to.p_end = to.p_path + strlen(to.p_path);
- if (to.p_path == to.p_end) {
+ if (to.p_path == to.p_end) {
*to.p_end++ = '.';
*to.p_end = 0;
}
@@ -240,10 +245,10 @@
type = FILE_TO_FILE;
if (have_trailing_slash && type == FILE_TO_FILE) {
- if (r == -1)
+ if (r == -1) {
errx(1, "directory %s does not exist",
- to.p_path);
- else
+ to.p_path);
+ } else
errx(1, "%s is not a directory", to.p_path);
}
} else
@@ -294,8 +299,8 @@
/*
* If we are in case (2) or (3) above, we need to append the
- * source name to the target name.
- */
+ * source name to the target name.
+ */
if (type != FILE_TO_FILE) {
/*
* Need to remember the roots of traversals to create
@@ -374,7 +379,8 @@
mode = curr->fts_statp->st_mode;
if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) ||
((mode | S_IRWXU) & mask) != (mode & mask))
- if (chmod(to.p_path, mode & mask) != 0){
+ if (chmod(to.p_path, mode & mask) !=
+ 0) {
warn("chmod: %s", to.p_path);
rval = 1;
}
@@ -382,7 +388,7 @@
continue;
}
- /* Not an error but need to remember it happened */
+ /* Not an error but need to remember it happened. */
if (stat(to.p_path, &to_stat) == -1)
dne = 1;
else {
@@ -408,7 +414,7 @@
switch (curr->fts_statp->st_mode & S_IFMT) {
case S_IFLNK:
- /* Catch special case of a non-dangling symlink */
+ /* Catch special case of a non-dangling symlink. */
if ((fts_options & FTS_LOGICAL) ||
((fts_options & FTS_COMFOLLOW) &&
curr->fts_level == 0)) {
@@ -433,7 +439,7 @@
* modified by the umask. Trade-off between being
* able to write the directory (if from directory is
* 555) and not causing a permissions race. If the
- * umask blocks owner writes, we fail..
+ * umask blocks owner writes, we fail.
*/
if (dne) {
if (mkdir(to.p_path,
@@ -452,7 +458,7 @@
break;
case S_IFBLK:
case S_IFCHR:
- if (Rflag) {
+ if (Rflag && !sflag) {
if (copy_special(curr->fts_statp, !dne))
badcp = rval = 1;
} else {
@@ -462,10 +468,10 @@
break;
case S_IFSOCK:
warnx("%s is a socket (not copied).",
- curr->fts_path);
+ curr->fts_path);
break;
case S_IFIFO:
- if (Rflag) {
+ if (Rflag && !sflag) {
if (copy_fifo(curr->fts_statp, !dne))
badcp = rval = 1;
} else {
Modified: soc2015/clord/head/bin/cp/extern.h
==============================================================================
--- soc2015/clord/head/bin/cp/extern.h Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/bin/cp/extern.h Tue Jun 9 20:04:43 2015 (r286868)
@@ -37,7 +37,7 @@
} PATH_T;
extern PATH_T to;
-extern int fflag, iflag, lflag, nflag, pflag, vflag;
+extern int fflag, iflag, lflag, nflag, pflag, sflag, vflag;
extern volatile sig_atomic_t info;
__BEGIN_DECLS
Modified: soc2015/clord/head/bin/cp/utils.c
==============================================================================
--- soc2015/clord/head/bin/cp/utils.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/bin/cp/utils.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -57,15 +57,19 @@
#define cp_pct(x, y) ((y == 0) ? 0 : (int)(100.0 * (x) / (y)))
-/* Memory strategy threshold, in pages: if physmem is larger then this, use a
- * large buffer */
+/*
+ * Memory strategy threshold, in pages: if physmem is larger then this, use a
+ * large buffer.
+ */
#define PHYSPAGES_THRESHOLD (32*1024)
-/* Maximum buffer size in bytes - do not allow it to grow larger than this */
+/* Maximum buffer size in bytes - do not allow it to grow larger than this. */
#define BUFSIZE_MAX (2*1024*1024)
-/* Small (default) buffer size in bytes. It's inefficient for this to be
- * smaller than MAXPHYS */
+/*
+ * Small (default) buffer size in bytes. It's inefficient for this to be
+ * smaller than MAXPHYS.
+ */
#define BUFSIZE_SMALL (MAXPHYS)
int
@@ -77,13 +81,15 @@
ssize_t wcount;
size_t wresid;
off_t wtotal;
- int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0;
+ int ch, checkch, from_fd, rcount, rval, to_fd;
char *bufp;
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
char *p;
#endif
- if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
+ from_fd = to_fd = -1;
+ if (!lflag && !sflag &&
+ (from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
warn("%s", entp->fts_path);
return (1);
}
@@ -103,63 +109,65 @@
if (nflag) {
if (vflag)
printf("%s not overwritten\n", to.p_path);
- (void)close(from_fd);
- return (1);
+ rval = 1;
+ goto done;
} else if (iflag) {
(void)fprintf(stderr, "overwrite %s? %s",
- to.p_path, YESNO);
+ to.p_path, YESNO);
checkch = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (checkch != 'y' && checkch != 'Y') {
- (void)close(from_fd);
(void)fprintf(stderr, "not overwritten\n");
- return (1);
+ rval = 1;
+ goto done;
}
}
-
+
if (fflag) {
- /* remove existing destination file name,
- * create a new file */
- (void)unlink(to.p_path);
- if (!lflag)
- to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
- fs->st_mode & ~(S_ISUID | S_ISGID));
- } else {
- if (!lflag)
- /* overwrite existing destination file name */
- to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
+ /*
+ * Remove existing destination file name create a new
+ * file.
+ */
+ (void)unlink(to.p_path);
+ if (!lflag && !sflag) {
+ to_fd = open(to.p_path,
+ O_WRONLY | O_TRUNC | O_CREAT,
+ fs->st_mode & ~(S_ISUID | S_ISGID));
+ }
+ } else if (!lflag && !sflag) {
+ /* Overwrite existing destination file name. */
+ to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
}
- } else {
- if (!lflag)
- to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
- fs->st_mode & ~(S_ISUID | S_ISGID));
+ } else if (!lflag && !sflag) {
+ to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
+ fs->st_mode & ~(S_ISUID | S_ISGID));
}
-
- if (to_fd == -1) {
+
+ if (!lflag && !sflag && to_fd == -1) {
warn("%s", to.p_path);
- (void)close(from_fd);
- return (1);
+ rval = 1;
+ goto done;
}
rval = 0;
- if (!lflag) {
+ if (!lflag && !sflag) {
/*
- * Mmap and write if less than 8M (the limit is so we don't totally
- * trash memory on big files. This is really a minor hack, but it
- * wins some CPU back.
+ * Mmap and write if less than 8M (the limit is so we don't
+ * totally trash memory on big files. This is really a minor
+ * hack, but it wins some CPU back.
* Some filesystems, such as smbnetfs, don't support mmap,
* so this is a best-effort attempt.
*/
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
if (S_ISREG(fs->st_mode) && fs->st_size > 0 &&
- fs->st_size <= 8 * 1024 * 1024 &&
+ fs->st_size <= 8 * 1024 * 1024 &&
(p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) {
wtotal = 0;
for (bufp = p, wresid = fs->st_size; ;
- bufp += wcount, wresid -= (size_t)wcount) {
+ bufp += wcount, wresid -= (size_t)wcount) {
wcount = write(to_fd, bufp, wresid);
if (wcount <= 0)
break;
@@ -204,7 +212,7 @@
wtotal = 0;
while ((rcount = read(from_fd, buf, bufsize)) > 0) {
for (bufp = buf, wresid = rcount; ;
- bufp += wcount, wresid -= wcount) {
+ bufp += wcount, wresid -= wcount) {
wcount = write(to_fd, bufp, wresid);
if (wcount <= 0)
break;
@@ -230,13 +238,18 @@
rval = 1;
}
}
- } else {
+ } else if (lflag) {
if (link(entp->fts_path, to.p_path)) {
warn("%s", to.p_path);
rval = 1;
}
+ } else if (sflag) {
+ if (symlink(entp->fts_path, to.p_path)) {
+ warn("%s", to.p_path);
+ rval = 1;
+ }
}
-
+
/*
* Don't remove the target even after an error. The target might
* not be a regular file, or its attributes might be important,
@@ -244,7 +257,7 @@
* to remove it if we created it and its length is 0.
*/
- if (!lflag) {
+ if (!lflag && !sflag) {
if (pflag && setfile(fs, to_fd))
rval = 1;
if (pflag && preserve_fd_acls(from_fd, to_fd) != 0)
@@ -255,8 +268,9 @@
}
}
- (void)close(from_fd);
-
+done:
+ if (from_fd != -1)
+ (void)close(from_fd);
return (rval);
}
@@ -338,7 +352,7 @@
fdval = fd != -1;
islink = !fdval && S_ISLNK(fs->st_mode);
fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX |
- S_IRWXU | S_IRWXG | S_IRWXO;
+ S_IRWXU | S_IRWXG | S_IRWXO;
tspec[0] = fs->st_atim;
tspec[1] = fs->st_mtim;
@@ -353,7 +367,7 @@
else {
gotstat = 1;
ts.st_mode &= S_ISUID | S_ISGID | S_ISVTX |
- S_IRWXU | S_IRWXG | S_IRWXO;
+ S_IRWXU | S_IRWXG | S_IRWXO;
}
/*
* Changing the ownership probably won't succeed, unless we're root
@@ -477,7 +491,7 @@
return (0);
/*
- * If the file is a link we will not follow it
+ * If the file is a link we will not follow it.
*/
if (S_ISLNK(fs->st_mode)) {
aclgetf = acl_get_link_np;
@@ -536,8 +550,10 @@
{
(void)fprintf(stderr, "%s\n%s\n",
-"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file",
-" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... "
-"target_directory");
+ "usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] "
+ "source_file target_file",
+ " cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] "
+ "source_file ... "
+ "target_directory");
exit(EX_USAGE);
}
Modified: soc2015/clord/head/bin/ls/ls.c
==============================================================================
--- soc2015/clord/head/bin/ls/ls.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/bin/ls/ls.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -413,9 +413,14 @@
/*
* If not -F, -P, -d or -l options, follow any symbolic links listed on
- * the command line.
+ * the command line, unless in color mode in which case we need to
+ * distinguish file type for a symbolic link itself and its target.
*/
- if (!f_nofollow && !f_longform && !f_listdir && (!f_type || f_slash))
+ if (!f_nofollow && !f_longform && !f_listdir && (!f_type || f_slash)
+#ifdef COLORLS
+ && !f_color
+#endif
+ )
fts_options |= FTS_COMFOLLOW;
/*
Modified: soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h
==============================================================================
--- soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Tue Jun 9 20:04:43 2015 (r286868)
@@ -156,6 +156,21 @@
#define DT_DM_KERNEL 0x2 /* module is associated with a kernel object */
#define DT_DM_PRIMARY 0x4 /* module is a krtld primary kernel object */
+#ifdef __FreeBSD__
+/*
+ * A representation of a FreeBSD kernel module, used when checking module
+ * dependencies. This differs from dt_module_t, which refers to a KLD in the
+ * case of kernel probes. Since modules can be identified regardless of whether
+ * they've been compiled into the kernel, we use them to identify DTrace
+ * modules.
+ */
+typedef struct dt_kmodule {
+ struct dt_kmodule *dkm_next; /* hash table entry */
+ char *dkm_name; /* string name of module */
+ dt_module_t *dkm_module; /* corresponding KLD module */
+} dt_kmodule_t;
+#endif
+
typedef struct dt_provmod {
char *dp_name; /* name of provider module */
struct dt_provmod *dp_next; /* next module */
@@ -235,6 +250,9 @@
dt_idhash_t *dt_tls; /* hash table of thread-local identifiers */
dt_list_t dt_modlist; /* linked list of dt_module_t's */
dt_module_t **dt_mods; /* hash table of dt_module_t's */
+#ifdef __FreeBSD__
+ dt_kmodule_t **dt_kmods; /* hash table of dt_kmodule_t's */
+#endif
uint_t dt_modbuckets; /* number of module hash buckets */
uint_t dt_nmods; /* number of modules in hash and list */
dt_provmod_t *dt_provmod; /* linked list of provider modules */
Modified: soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c
==============================================================================
--- soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -37,6 +37,7 @@
#else
#include <sys/param.h>
#include <sys/linker.h>
+#include <sys/module.h>
#include <sys/stat.h>
#endif
@@ -542,6 +543,22 @@
return (ctfp ? ctf_getspecific(ctfp) : NULL);
}
+#ifdef __FreeBSD__
+dt_kmodule_t *
+dt_kmodule_lookup(dtrace_hdl_t *dtp, const char *name)
+{
+ uint_t h = dt_strtab_hash(name, NULL) % dtp->dt_modbuckets;
+ dt_kmodule_t *dkmp;
+
+ for (dkmp = dtp->dt_kmods[h]; dkmp != NULL; dkmp = dkmp->dkm_next) {
+ if (strcmp(dkmp->dkm_name, name) == 0)
+ return (dkmp);
+ }
+
+ return (NULL);
+}
+#endif
+
static int
dt_module_load_sect(dtrace_hdl_t *dtp, dt_module_t *dmp, ctf_sect_t *ctsp)
{
@@ -1124,6 +1141,12 @@
char fname[MAXPATHLEN];
struct stat64 st;
int fd, err, bits;
+#ifdef __FreeBSD__
+ struct module_stat ms;
+ dt_kmodule_t *dkmp;
+ uint_t h;
+ int modid;
+#endif
dt_module_t *dmp;
const char *s;
@@ -1270,6 +1293,33 @@
if (dmp->dm_info.objfs_info_primary)
dmp->dm_flags |= DT_DM_PRIMARY;
+#ifdef __FreeBSD__
+ ms.version = sizeof(ms);
+ for (modid = kldfirstmod(k_stat->id); modid > 0;
+ modid = modnext(modid)) {
+ if (modstat(modid, &ms) != 0) {
+ dt_dprintf("modstat failed for id %d in %s: %s\n",
+ modid, k_stat->name, strerror(errno));
+ continue;
+ }
+ if (dt_kmodule_lookup(dtp, ms.name) != NULL)
+ continue;
+
+ dkmp = malloc(sizeof (*dkmp));
+ if (dkmp == NULL) {
+ dt_dprintf("failed to allocate memory\n");
+ dt_module_destroy(dtp, dmp);
+ return;
+ }
+
+ h = dt_strtab_hash(ms.name, NULL) % dtp->dt_modbuckets;
+ dkmp->dkm_next = dtp->dt_kmods[h];
+ dkmp->dkm_name = strdup(ms.name);
+ dkmp->dkm_module = dmp;
+ dtp->dt_kmods[h] = dkmp;
+ }
+#endif
+
dt_dprintf("opened %d-bit module %s (%s) [%d]\n",
bits, dmp->dm_name, dmp->dm_file, dmp->dm_modid);
}
Modified: soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h
==============================================================================
--- soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h Tue Jun 9 20:04:43 2015 (r286868)
@@ -44,6 +44,10 @@
extern dt_module_t *dt_module_lookup_by_name(dtrace_hdl_t *, const char *);
extern dt_module_t *dt_module_lookup_by_ctf(dtrace_hdl_t *, ctf_file_t *);
+#ifdef __FreeBSD__
+extern dt_kmodule_t *dt_kmodule_lookup(dtrace_hdl_t *, const char *);
+#endif
+
extern int dt_module_hasctf(dtrace_hdl_t *, dt_module_t *);
extern ctf_file_t *dt_module_getctf(dtrace_hdl_t *, dt_module_t *);
extern dt_ident_t *dt_module_extern(dtrace_hdl_t *, dt_module_t *,
Modified: soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
==============================================================================
--- soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -1178,6 +1178,9 @@
#endif
dtp->dt_modbuckets = _dtrace_strbuckets;
dtp->dt_mods = calloc(dtp->dt_modbuckets, sizeof (dt_module_t *));
+#ifdef __FreeBSD__
+ dtp->dt_kmods = calloc(dtp->dt_modbuckets, sizeof (dt_module_t *));
+#endif
dtp->dt_provbuckets = _dtrace_strbuckets;
dtp->dt_provs = calloc(dtp->dt_provbuckets, sizeof (dt_provider_t *));
dt_proc_hash_create(dtp);
@@ -1199,6 +1202,7 @@
if (dtp->dt_mods == NULL || dtp->dt_provs == NULL ||
dtp->dt_procs == NULL || dtp->dt_ld_path == NULL ||
#ifdef __FreeBSD__
+ dtp->dt_kmods == NULL ||
dtp->dt_objcopy_path == NULL ||
#endif
dtp->dt_cpp_path == NULL || dtp->dt_cpp_argv == NULL)
@@ -1621,6 +1625,10 @@
dtrace_prog_t *pgp;
dt_xlator_t *dxp;
dt_dirpath_t *dirp;
+#ifdef __FreeBSD__
+ dt_kmodule_t *dkm;
+ uint_t h;
+#endif
int i;
if (dtp->dt_procs != NULL)
@@ -1648,6 +1656,15 @@
if (dtp->dt_tls != NULL)
dt_idhash_destroy(dtp->dt_tls);
+#ifdef __FreeBSD__
+ for (h = 0; h < dtp->dt_modbuckets; h++)
+ while ((dkm = dtp->dt_kmods[h]) != NULL) {
+ dtp->dt_kmods[h] = dkm->dkm_next;
+ free(dkm->dkm_name);
+ free(dkm);
+ }
+#endif
+
while ((dmp = dt_list_next(&dtp->dt_modlist)) != NULL)
dt_module_destroy(dtp, dmp);
@@ -1697,6 +1714,9 @@
#endif
free(dtp->dt_mods);
+#ifdef __FreeBSD__
+ free(dtp->dt_kmods);
+#endif
free(dtp->dt_provs);
free(dtp);
}
Modified: soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c
==============================================================================
--- soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -278,6 +278,14 @@
} else if (strcmp(cnp->dn_string, "module") == 0) {
dt_module_t *mp = dt_module_lookup_by_name(dtp, nnp->dn_string);
found = mp != NULL && dt_module_getctf(dtp, mp) != NULL;
+#ifdef __FreeBSD__
+ if (!found) {
+ dt_kmodule_t *dkmp = dt_kmodule_lookup(dtp,
+ nnp->dn_string);
+ found = dkmp != NULL &&
+ dt_module_getctf(dtp, dkmp->dkm_module) != NULL;
+ }
+#endif
} else if (strcmp(cnp->dn_string, "library") == 0) {
if (yypcb->pcb_cflags & DTRACE_C_CTL) {
assert(dtp->dt_filetag != NULL);
Modified: soc2015/clord/head/contrib/dtc/checks.c
==============================================================================
--- soc2015/clord/head/contrib/dtc/checks.c Tue Jun 9 19:41:16 2015 (r286867)
+++ soc2015/clord/head/contrib/dtc/checks.c Tue Jun 9 20:04:43 2015 (r286868)
@@ -624,11 +624,11 @@
if (!reg && !ranges)
return;
- if ((node->parent->addr_cells == -1))
+ if (node->parent->addr_cells == -1)
FAIL(c, "Relying on default #address-cells value for %s",
node->fullpath);
- if ((node->parent->size_cells == -1))
+ if (node->parent->size_cells == -1)
FAIL(c, "Relying on default #size-cells value for %s",
node->fullpath);
}
Copied: soc2015/clord/head/contrib/top/top.local.hs (from r286867, mirror/FreeBSD/head/contrib/top/top.local.hs)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2015/clord/head/contrib/top/top.local.hs Tue Jun 9 20:04:43 2015 (r286868, copy of r286867, mirror/FreeBSD/head/contrib/top/top.local.hs)
@@ -0,0 +1,68 @@
+/*
+ * Top - a top users display for Berkeley Unix
+ *
+ * Definitions for things that might vary between installations.
+ */
+
+/*
+ * The space command forces an immediate update. Sometimes, on loaded
+ * systems, this update will take a significant period of time (because all
+ * the output is buffered). So, if the short-term load average is above
+ * "LoadMax", then top will put the cursor home immediately after the space
+ * is pressed before the next update is attempted. This serves as a visual
+ * acknowledgement of the command. On Suns, "LoadMax" will get multiplied by
+ * "FSCALE" before being compared to avenrun[0]. Therefore, "LoadMax"
+ * should always be specified as a floating point number.
+ */
+#ifndef LoadMax
+#define LoadMax %LoadMax%
+#endif
+
+/*
+ * "Table_size" defines the size of the hash tables used to map uid to
+ * username. The number of users in /etc/passwd CANNOT be greater than
+ * this number. If the error message "table overflow: too many users"
+ * is printed by top, then "Table_size" needs to be increased. Things will
+ * work best if the number is a prime number that is about twice the number
+ * of lines in /etc/passwd.
+ */
+#ifndef Table_size
+#define Table_size %TableSize%
+#endif
+
+/*
+ * "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity
+ * and the output is a dumb terminal. If we didn't do this, then
+ * installations who use a default TOPN of Infinity will get every
+ * process in the system when running top on a dumb terminal (or redirected
+ * to a file). Note that Nominal_TOPN is a default: it can still be
+ * overridden on the command line, even with the value "infinity".
+ */
+#ifndef Nominal_TOPN
+#define Nominal_TOPN %NominalTopn%
+#endif
+
+#ifndef Default_TOPN
+#define Default_TOPN %topn%
+#endif
+
+#ifndef Default_DELAY
+#define Default_DELAY %delay%
+#endif
+
+/*
+ * If the local system's getpwnam interface uses random access to retrieve
+ * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining
+ * RANDOM_PW will take advantage of that fact. If RANDOM_PW is defined,
+ * then getpwnam is used and the result is cached. If not, then getpwent
+ * is used to read and cache the password entries sequentially until the
+ * desired one is found.
+ *
+ * We initially set RANDOM_PW to something which is controllable by the
+ * Configure script. Then if its value is 0, we undef it.
+ */
+
+#define RANDOM_PW %random%
+#if RANDOM_PW == 0
+#undef RANDOM_PW
+#endif
Copied: soc2015/clord/head/contrib/top/top.xs (from r286867, mirror/FreeBSD/head/contrib/top/top.xs)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2015/clord/head/contrib/top/top.xs Tue Jun 9 20:04:43 2015 (r286868, copy of r286867, mirror/FreeBSD/head/contrib/top/top.xs)
@@ -0,0 +1,448 @@
+.\" NOTE: changes to the manual page for "top" should be made in the
+.\" file "top.X" and NOT in the file "top.1".
+.\" $FreeBSD$
+.nr N %topn%
+.nr D %delay%
+.TH TOP 1 Local
+.UC 4
+.SH NAME
+top \- display and update information about the top cpu processes
+.SH SYNOPSIS
+.B top
+[
+.B \-abCHIijnPqStuvz
+] [
+.BI \-d count
+] [
+.BI \-m io | cpu
+] [
+.BI \-o field
+] [
+.BI \-s time
+] [
+.BI \-J jail
+] [
+.BI \-U username
+] [
+.I number
+]
+.SH DESCRIPTION
+.\" This defines appropriate quote strings for nroff and troff
+.ds lq \&"
+.ds rq \&"
+.if t .ds lq ``
+.if t .ds rq ''
+.\" Just in case these number registers aren't set yet...
+.if \nN==0 .nr N 10
+.if \nD==0 .nr D 2
+.I Top
+displays the top
+.if !\nN==-1 \nN
+processes on the system and periodically updates this information.
+.if \nN==-1 \
+\{\
+If standard output is an intelligent terminal (see below) then
+as many processes as will fit on the terminal screen are displayed
+by default. Otherwise, a good number of them are shown (around 20).
+.\}
+Raw cpu percentage is used to rank the processes. If
+.I number
+is given, then the top
+.I number
+processes will be displayed instead of the default.
+.PP
+.I Top
+makes a distinction between terminals that support advanced capabilities
+and those that do not. This
+distinction affects the choice of defaults for certain options. In the
+remainder of this document, an \*(lqintelligent\*(rq terminal is one that
+supports cursor addressing, clear screen, and clear to end of line.
+Conversely, a \*(lqdumb\*(rq terminal is one that does not support such
+features. If the output of
+.I top
+is redirected to a file, it acts as if it were being run on a dumb
+terminal.
+.SH OPTIONS
+.TP
+.B \-C
+Toggle CPU display mode.
+By default top displays the weighted CPU percentage in the WCPU column
+(this is the same value that
+.IR ps (1)
+displays as CPU).
+Each time
+.B \-C
+flag is passed it toggles between \*(lqraw cpu\*(rq mode
+and \*(lqweighted cpu\*(rq mode, showing the \*(lqCPU\*(rq or
+the \*(lqWCPU\*(rq column respectively.
+.TP
+.B \-S
+Show system processes in the display. Normally, system processes such as
+the pager and the swapper are not shown. This option makes them visible.
+.TP
+.B \-a
+Display command names derived from the argv[] vector, rather than real
+executable name. It's useful when you want to watch applications, that
+puts their status information there. If the real name differs from argv[0],
+it will be displayed in parenthesis.
+.TP
+.B \-b
+Use \*(lqbatch\*(rq mode. In this mode, all input from the terminal is
+ignored. Interrupt characters (such as ^C and ^\e) still have an effect.
+This is the default on a dumb terminal, or when the output is not a terminal.
+.TP
+.B \-H
+Display each thread for a multithreaded process individually.
+By default a single summary line is displayed for each process.
+.TP
+.B \-i
+Use \*(lqinteractive\*(rq mode. In this mode, any input is immediately
+read for processing. See the section on \*(lqInteractive Mode\*(rq
+for an explanation of
+which keys perform what functions. After the command is processed, the
+screen will immediately be updated, even if the command was not
+understood. This mode is the default when standard output is an
+intelligent terminal.
+.TP
+.B \-I
+Do not display idle processes.
+By default, top displays both active and idle processes.
+.TP
+.B \-j
+Display the
+.IR jail (8)
+ID.
+.TP
+.B \-t
+Do not display the
+.I top
+process.
+.TP
+.BI \-m display
+Display either 'cpu' or 'io' statistics. Default is 'cpu'.
+.TP
+.B \-n
+Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq
+mode.
+.TP
+.B \-P
+Display per-cpu CPU usage statistics.
+.TP
+.B \-q
+Renice
+.I top
+to -20 so that it will run faster. This can be used when the system is
+being very sluggish to improve the possibility of discovering the problem.
+This option can only be used by root.
+.TP
+.B \-u
+Do not take the time to map uid numbers to usernames. Normally,
+.I top
+will read as much of the file \*(lq/etc/passwd\*(rq as is necessary to map
+all the user id numbers it encounters into login names. This option
+disables all that, while possibly decreasing execution time. The uid
+numbers are displayed instead of the names.
+.TP
+.B \-v
+Write version number information to stderr then exit immediately.
+No other processing takes place when this option is used. To see current
+revision information while top is running, use the help command \*(lq?\*(rq.
+.TP
+.B \-z
+Do not display the system idle process.
+.TP
+.BI \-d count
+Show only
+.I count
+displays, then exit. A display is considered to be one update of the
+screen. This option allows the user to select the number of displays he
+wants to see before
+.I top
+automatically exits. For intelligent terminals, no upper limit
+is set. The default is 1 for dumb terminals.
+.TP
+.BI \-s time
+Set the delay between screen updates to
+.I time
+seconds. The default delay between updates is \nD seconds.
+.TP
+.BI \-o field
+Sort the process display area on the specified field. The field name is
+the name of the column as seen in the output, but in lower case. Likely
+values are \*(lqcpu\*(rq, \*(lqsize\*(rq, \*(lqres\*(rq, and \*(lqtime\*(rq,
+but may vary on different operating systems. Note that
+not all operating systems support this option.
+.TP
+.BI \-J jail
+Show only those processes owned by
+.IR jail .
+This may be either the
+.B jid
+or
+.B name
+of the jail.
+Use
+.B 0
+to limit to host processes.
+Using this option implies the
+.B \-j
+flag.
+.PP
+.BI \-U username
+Show only those processes owned by
+.IR username .
+This option currently only accepts usernames and will not understand
+uid numbers.
+.PP
+Both
+.I count
+and
+.I number
+fields can be specified as \*(lqinfinite\*(rq, indicating that they can
+stretch as far as possible. This is accomplished by using any proper
+prefix of the keywords
+\*(lqinfinity\*(rq,
+\*(lqmaximum\*(rq,
+or
+\*(lqall\*(rq.
+The default for
+.I count
+on an intelligent terminal is, in fact,
+.BI infinity .
+.PP
+The environment variable
+.B TOP
+is examined for options before the command line is scanned. This enables
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-soc-all
mailing list