svn commit: r287878 - in projects/clang370-import: . cddl/contrib/opensolaris/cmd/sgs/tools/common cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/lib/libdtrace include lib/l...
Dimitry Andric
dim at FreeBSD.org
Wed Sep 16 22:36:08 UTC 2015
Author: dim
Date: Wed Sep 16 22:35:59 2015
New Revision: 287878
URL: https://svnweb.freebsd.org/changeset/base/287878
Log:
Merge ^/head r287680 through r287877.
Added:
projects/clang370-import/share/dtrace/tcpdebug
- copied unchanged from r287877, head/share/dtrace/tcpdebug
projects/clang370-import/sys/sparc64/pci/ofw_pci.c
- copied unchanged from r287877, head/sys/sparc64/pci/ofw_pci.c
Modified:
projects/clang370-import/Makefile.inc1
projects/clang370-import/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c
projects/clang370-import/cddl/contrib/opensolaris/cmd/zdb/zdb.c
projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs.8
projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
projects/clang370-import/cddl/lib/libdtrace/ip.d
projects/clang370-import/cddl/lib/libdtrace/tcp.d
projects/clang370-import/include/Makefile
projects/clang370-import/lib/libc/db/recno/rec_open.c
projects/clang370-import/lib/libc/gen/fts-compat.c
projects/clang370-import/lib/libc/gen/getgrent.c
projects/clang370-import/lib/libc/gen/getloadavg.c
projects/clang370-import/lib/libc/gen/getmntinfo.c
projects/clang370-import/lib/libc/gen/getpwent.c
projects/clang370-import/lib/libc/gen/nlist.c
projects/clang370-import/lib/libc/gen/strtofflags.c
projects/clang370-import/lib/libc/gmon/gmon.c
projects/clang370-import/lib/libc/stdlib/heapsort.c
projects/clang370-import/lib/libc/stdlib/merge.c
projects/clang370-import/lib/libc/stdlib/radixsort.c
projects/clang370-import/lib/libc/sys/setuid.2
projects/clang370-import/release/Makefile
projects/clang370-import/sbin/geom/class/nop/geom_nop.c
projects/clang370-import/sbin/geom/class/nop/gnop.8
projects/clang370-import/sbin/ifconfig/ifconfig.c
projects/clang370-import/share/man/man4/ctl.4
projects/clang370-import/share/man/man4/dtrace_ip.4
projects/clang370-import/share/man/man4/geom_fox.4
projects/clang370-import/share/man/man4/ng_pppoe.4
projects/clang370-import/share/man/man9/Makefile
projects/clang370-import/share/man/man9/timeout.9
projects/clang370-import/share/mk/local.meta.sys.mk
projects/clang370-import/sys/arm64/conf/GENERIC
projects/clang370-import/sys/boot/usb/usbcore.mk
projects/clang370-import/sys/cam/ctl/README.ctl.txt
projects/clang370-import/sys/cam/ctl/ctl.c
projects/clang370-import/sys/cam/ctl/ctl.h
projects/clang370-import/sys/cam/ctl/ctl_backend_block.c
projects/clang370-import/sys/cam/ctl/ctl_cmd_table.c
projects/clang370-import/sys/cam/ctl/ctl_error.c
projects/clang370-import/sys/cam/ctl/ctl_error.h
projects/clang370-import/sys/cam/ctl/ctl_frontend.c
projects/clang370-import/sys/cam/ctl/ctl_frontend_cam_sim.c
projects/clang370-import/sys/cam/ctl/ctl_frontend_ioctl.c
projects/clang370-import/sys/cam/ctl/ctl_frontend_iscsi.c
projects/clang370-import/sys/cam/ctl/ctl_ha.c
projects/clang370-import/sys/cam/ctl/ctl_io.h
projects/clang370-import/sys/cam/ctl/ctl_tpc.c
projects/clang370-import/sys/cam/ctl/ctl_tpc_local.c
projects/clang370-import/sys/cam/ctl/ctl_util.c
projects/clang370-import/sys/cam/scsi/scsi_all.c
projects/clang370-import/sys/cam/scsi/scsi_all.h
projects/clang370-import/sys/cam/scsi/scsi_ch.c
projects/clang370-import/sys/cddl/contrib/opensolaris/common/avl/avl.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_zfetch.h
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
projects/clang370-import/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h
projects/clang370-import/sys/conf/files.arm64
projects/clang370-import/sys/conf/files.sparc64
projects/clang370-import/sys/dev/dwc/if_dwc.c
projects/clang370-import/sys/dev/e1000/e1000_80003es2lan.c
projects/clang370-import/sys/dev/e1000/e1000_82540.c
projects/clang370-import/sys/dev/e1000/e1000_82541.c
projects/clang370-import/sys/dev/e1000/e1000_82542.c
projects/clang370-import/sys/dev/e1000/e1000_82543.c
projects/clang370-import/sys/dev/e1000/e1000_82571.h
projects/clang370-import/sys/dev/e1000/e1000_82575.c
projects/clang370-import/sys/dev/e1000/e1000_82575.h
projects/clang370-import/sys/dev/e1000/e1000_api.c
projects/clang370-import/sys/dev/e1000/e1000_api.h
projects/clang370-import/sys/dev/e1000/e1000_defines.h
projects/clang370-import/sys/dev/e1000/e1000_hw.h
projects/clang370-import/sys/dev/e1000/e1000_i210.c
projects/clang370-import/sys/dev/e1000/e1000_i210.h
projects/clang370-import/sys/dev/e1000/e1000_ich8lan.c
projects/clang370-import/sys/dev/e1000/e1000_ich8lan.h
projects/clang370-import/sys/dev/e1000/e1000_mac.c
projects/clang370-import/sys/dev/e1000/e1000_mac.h
projects/clang370-import/sys/dev/e1000/e1000_nvm.c
projects/clang370-import/sys/dev/e1000/e1000_nvm.h
projects/clang370-import/sys/dev/e1000/e1000_osdep.h
projects/clang370-import/sys/dev/e1000/e1000_phy.c
projects/clang370-import/sys/dev/e1000/e1000_regs.h
projects/clang370-import/sys/dev/e1000/if_igb.c
projects/clang370-import/sys/dev/ral/rt2860.c
projects/clang370-import/sys/dev/re/if_re.c
projects/clang370-import/sys/dev/rl/if_rlreg.h
projects/clang370-import/sys/dev/uart/uart_bus_pci.c
projects/clang370-import/sys/dev/usb/controller/uhci_pci.c
projects/clang370-import/sys/dev/usb/controller/xhci_pci.c
projects/clang370-import/sys/dev/usb/serial/u3g.c
projects/clang370-import/sys/dev/usb/usbdevs
projects/clang370-import/sys/dev/usb/wlan/if_rsu.c
projects/clang370-import/sys/dev/usb/wlan/if_run.c
projects/clang370-import/sys/dev/usb/wlan/if_ural.c
projects/clang370-import/sys/geom/nop/g_nop.c
projects/clang370-import/sys/geom/nop/g_nop.h
projects/clang370-import/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
projects/clang370-import/sys/kern/kern_linker.c
projects/clang370-import/sys/kern/kern_proc.c
projects/clang370-import/sys/kern/kern_rmlock.c
projects/clang370-import/sys/kern/kern_sysctl.c
projects/clang370-import/sys/kern/kern_timeout.c
projects/clang370-import/sys/kern/subr_syscall.c
projects/clang370-import/sys/kern/vfs_init.c
projects/clang370-import/sys/kern/vfs_subr.c
projects/clang370-import/sys/kern/vnode_if.src
projects/clang370-import/sys/net/if.c
projects/clang370-import/sys/net/if_arcsubr.c
projects/clang370-import/sys/net/if_ethersubr.c
projects/clang370-import/sys/net/if_fddisubr.c
projects/clang370-import/sys/net/if_fwsubr.c
projects/clang370-import/sys/net/if_iso88025subr.c
projects/clang370-import/sys/net/if_llatbl.c
projects/clang370-import/sys/net/if_llatbl.h
projects/clang370-import/sys/net/if_var.h
projects/clang370-import/sys/net/route.c
projects/clang370-import/sys/netinet/if_ether.c
projects/clang370-import/sys/netinet/if_ether.h
projects/clang370-import/sys/netinet/in.c
projects/clang370-import/sys/netinet/in_kdtrace.c
projects/clang370-import/sys/netinet/in_kdtrace.h
projects/clang370-import/sys/netinet/ip_carp.c
projects/clang370-import/sys/netinet/sctp.h
projects/clang370-import/sys/netinet/sctp_auth.c
projects/clang370-import/sys/netinet/sctp_header.h
projects/clang370-import/sys/netinet/sctp_indata.c
projects/clang370-import/sys/netinet/sctp_input.c
projects/clang370-import/sys/netinet/sctp_sysctl.h
projects/clang370-import/sys/netinet/tcp_input.c
projects/clang370-import/sys/netinet/tcp_output.c
projects/clang370-import/sys/netinet/tcp_subr.c
projects/clang370-import/sys/netinet/tcp_timer.c
projects/clang370-import/sys/netinet/tcp_usrreq.c
projects/clang370-import/sys/netinet6/icmp6.c
projects/clang370-import/sys/netinet6/in6.c
projects/clang370-import/sys/netinet6/ip6_forward.c
projects/clang370-import/sys/netinet6/ip6_output.c
projects/clang370-import/sys/netinet6/nd6.c
projects/clang370-import/sys/netinet6/nd6.h
projects/clang370-import/sys/netinet6/nd6_rtr.c
projects/clang370-import/sys/netpfil/pf/pf.c
projects/clang370-import/sys/ofed/drivers/infiniband/core/addr.c
projects/clang370-import/sys/ofed/drivers/infiniband/core/mad.c
projects/clang370-import/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
projects/clang370-import/sys/sparc64/ebus/ebus.c
projects/clang370-import/sys/sparc64/include/smp.h
projects/clang370-import/sys/sparc64/pci/fire.c
projects/clang370-import/sys/sparc64/pci/firereg.h
projects/clang370-import/sys/sparc64/pci/firevar.h
projects/clang370-import/sys/sparc64/pci/ofw_pci.h
projects/clang370-import/sys/sparc64/pci/psycho.c
projects/clang370-import/sys/sparc64/pci/psychoreg.h
projects/clang370-import/sys/sparc64/pci/psychovar.h
projects/clang370-import/sys/sparc64/pci/schizo.c
projects/clang370-import/sys/sparc64/pci/schizoreg.h
projects/clang370-import/sys/sparc64/pci/schizovar.h
projects/clang370-import/sys/sys/_callout.h
projects/clang370-import/sys/sys/callout.h
projects/clang370-import/sys/sys/sysctl.h
projects/clang370-import/sys/sys/vnode.h
projects/clang370-import/sys/x86/acpica/madt.c
projects/clang370-import/tools/tools/usbtest/Makefile
projects/clang370-import/usr.bin/rctl/rctl.8
projects/clang370-import/usr.sbin/bsdconfig/share/common.subr
projects/clang370-import/usr.sbin/bsdinstall/scripts/auto
projects/clang370-import/usr.sbin/bsdinstall/scripts/config
projects/clang370-import/usr.sbin/bsdinstall/scripts/docsinstall
projects/clang370-import/usr.sbin/bsdinstall/scripts/hostname
projects/clang370-import/usr.sbin/bsdinstall/scripts/jail
projects/clang370-import/usr.sbin/bsdinstall/scripts/keymap
projects/clang370-import/usr.sbin/bsdinstall/scripts/netconfig_ipv4
projects/clang370-import/usr.sbin/bsdinstall/scripts/netconfig_ipv6
projects/clang370-import/usr.sbin/bsdinstall/scripts/rootpass
projects/clang370-import/usr.sbin/bsdinstall/scripts/script
projects/clang370-import/usr.sbin/bsdinstall/scripts/wlanconfig
projects/clang370-import/usr.sbin/bsdinstall/scripts/zfsboot
projects/clang370-import/usr.sbin/ctladm/ctladm.8
projects/clang370-import/usr.sbin/ctld/ctl.conf.5
projects/clang370-import/usr.sbin/ctld/ctld.c
projects/clang370-import/usr.sbin/ctld/ctld.h
projects/clang370-import/usr.sbin/ctld/kernel.c
projects/clang370-import/usr.sbin/ctld/login.c
projects/clang370-import/usr.sbin/ctld/parse.y
projects/clang370-import/usr.sbin/ctld/token.l
projects/clang370-import/usr.sbin/i2c/i2c.c
projects/clang370-import/usr.sbin/pw/pw_user.c
Directory Properties:
projects/clang370-import/ (props changed)
projects/clang370-import/cddl/ (props changed)
projects/clang370-import/cddl/contrib/opensolaris/ (props changed)
projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/ (props changed)
projects/clang370-import/include/ (props changed)
projects/clang370-import/lib/libc/ (props changed)
projects/clang370-import/sbin/ (props changed)
projects/clang370-import/share/ (props changed)
projects/clang370-import/share/man/man4/ (props changed)
projects/clang370-import/sys/ (props changed)
projects/clang370-import/sys/boot/ (props changed)
projects/clang370-import/sys/cddl/contrib/opensolaris/ (props changed)
projects/clang370-import/sys/conf/ (props changed)
Modified: projects/clang370-import/Makefile.inc1
==============================================================================
--- projects/clang370-import/Makefile.inc1 Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/Makefile.inc1 Wed Sep 16 22:35:59 2015 (r287878)
@@ -1258,7 +1258,7 @@ _elftoolchain_libs= lib/libelf lib/libdw
legacy:
.if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0
- @echo "ERROR: Source upgrades from versions prior to 8.0 not supported."; \
+ @echo "ERROR: Source upgrades from versions prior to 8.0 are not supported."; \
false
.endif
.for _tool in tools/build ${_elftoolchain_libs}
@@ -1355,11 +1355,8 @@ ${_bt}-usr.bin/clang/clang-tblgen: ${_bt
${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport
.endif
-# ELF Tool Chain libraries are needed for ELF tools and dtrace tools.
-# dtrace tools are required for older bootstrap env and cross-build
-# pre libdwarf
-.if ${BOOTSTRAPPING} < 1100006 || (${MACHINE} != ${TARGET} || \
- ${MACHINE_ARCH} != ${TARGET_ARCH})
+# Rebuild ctfconvert and ctfmerge to avoid difficult-to-diagnose failures
+# resulting from missing bug fixes or ELF Toolchain updates.
.if ${MK_CDDL} != "no"
_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf cddl/usr.bin/ctfconvert \
cddl/usr.bin/ctfmerge
@@ -1367,7 +1364,6 @@ _dtrace_tools= cddl/usr.bin/sgsmsg cddl/
${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-cddl/lib/libctf
${_bt}-cddl/usr.bin/ctfmerge: ${_bt}-cddl/lib/libctf
.endif
-.endif
# Default to building the GPL DTC, but build the BSDL one if users explicitly
# request it.
Modified: projects/clang370-import/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c
==============================================================================
--- projects/clang370-import/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/cddl/contrib/opensolaris/cmd/sgs/tools/common/sgsmsg.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -132,6 +132,8 @@ typedef struct msg_string {
static msg_string *msg_head;
static msg_string *msg_tail;
+int aok;
+
/*
* message_append() is responsible for both inserting strings into
* the master Str_tbl as well as maintaining a list of the
Modified: projects/clang370-import/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==============================================================================
--- projects/clang370-import/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -1205,7 +1205,9 @@ snprintf_blkptr_compact(char *blkbuf, si
if (BP_IS_HOLE(bp)) {
(void) snprintf(blkbuf + strlen(blkbuf),
- buflen - strlen(blkbuf), "B=%llu",
+ buflen - strlen(blkbuf),
+ "%llxL B=%llu",
+ (u_longlong_t)BP_GET_LSIZE(bp),
(u_longlong_t)bp->blk_birth);
} else {
(void) snprintf(blkbuf + strlen(blkbuf),
Modified: projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==============================================================================
--- projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Sep 16 22:35:59 2015 (r287878)
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 30, 2015
+.Dd September 14, 2015
.Dt ZFS 8
.Os
.Sh NAME
@@ -2144,7 +2144,8 @@ Property name
.It value
Property value
.It source
-Property source. Can either be local, default, temporary, inherited, or none
+Property source. Can either be local, default, temporary, inherited, received,
+or none
(\&-).
.El
.Pp
@@ -2210,8 +2211,11 @@ The default value is all sources.
.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
.Xc
.Pp
-Clears the specified property, causing it to be inherited from an ancestor. If
-no ancestor has the property set, then the default value is used. See the
+Clears the specified property, causing it to be inherited from an ancestor,
+restored to default if no ancestor has the property set, or with the
+.Fl S
+option reverted to the received value if one exists.
+See the
.Qq Sx Properties
section for a listing of default values, and details on which properties can be
inherited.
@@ -2219,8 +2223,10 @@ inherited.
.It Fl r
Recursively inherit the given property for all children.
.It Fl S
-For properties with a received value, revert to this value. This flag has no
-effect on properties that do not have a received value.
+Revert the property to the received value if one exists; otherwise operate as
+if the
+.Fl S
+option was not specified.
.El
.It Xo
.Nm
Modified: projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==============================================================================
--- projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -1928,9 +1928,13 @@ zfs_do_inherit(int argc, char **argv)
if (prop == ZFS_PROP_QUOTA ||
prop == ZFS_PROP_RESERVATION ||
prop == ZFS_PROP_REFQUOTA ||
- prop == ZFS_PROP_REFRESERVATION)
+ prop == ZFS_PROP_REFRESERVATION) {
(void) fprintf(stderr, gettext("use 'zfs set "
"%s=none' to clear\n"), propname);
+ (void) fprintf(stderr, gettext("use 'zfs "
+ "inherit -S %s' to revert to received "
+ "value\n"), propname);
+ }
return (1);
}
if (received && (prop == ZFS_PROP_VOLSIZE ||
Modified: projects/clang370-import/cddl/lib/libdtrace/ip.d
==============================================================================
--- projects/clang370-import/cddl/lib/libdtrace/ip.d Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/cddl/lib/libdtrace/ip.d Wed Sep 16 22:35:59 2015 (r287878)
@@ -110,7 +110,6 @@ typedef struct ipv4info {
* These values are NULL if the packet is not IPv6.
*/
typedef struct in6_addr in6_addr_t;
-typedef struct ip6_hdr ip6_t;
typedef struct ipv6info {
uint8_t ipv6_ver; /* IP version (6) */
uint8_t ipv6_tclass; /* traffic class */
@@ -123,7 +122,7 @@ typedef struct ipv6info {
in6_addr_t *ipv6_dst; /* destination address */
string ipv6_saddr; /* source address, string */
string ipv6_daddr; /* destination address, string */
- ip6_t *ipv6_hdr; /* pointer to raw header */
+ struct ip6_hdr *ipv6_hdr; /* pointer to raw header */
} ipv6info_t;
#pragma D binding "1.5" IPPROTO_IP
@@ -282,5 +281,5 @@ translator ipv6info_t < struct ip6_hdr *
ipv6_dst = p == NULL ? 0 : (in6_addr_t *)&p->ip6_dst;
ipv6_saddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_src);
ipv6_daddr = p == NULL ? 0 : inet_ntoa6(&p->ip6_dst);
- ipv6_hdr = (ip6_t *)p;
+ ipv6_hdr = p;
};
Modified: projects/clang370-import/cddl/lib/libdtrace/tcp.d
==============================================================================
--- projects/clang370-import/cddl/lib/libdtrace/tcp.d Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/cddl/lib/libdtrace/tcp.d Wed Sep 16 22:35:59 2015 (r287878)
@@ -103,11 +103,15 @@ typedef struct tcpsinfo {
int32_t tcps_state; /* TCP state */
uint32_t tcps_iss; /* Initial sequence # sent */
uint32_t tcps_suna; /* sequence # sent but unacked */
+ uint32_t tcps_smax; /* highest sequence number sent */
uint32_t tcps_snxt; /* next sequence # to send */
uint32_t tcps_rack; /* sequence # we have acked */
uint32_t tcps_rnxt; /* next sequence # expected */
uint32_t tcps_swnd; /* send window size */
int32_t tcps_snd_ws; /* send window scaling */
+ uint32_t tcps_swl1; /* window update seg seq number */
+ uint32_t tcps_swl2; /* window update seg ack number */
+ uint32_t tcps_rup; /* receive urgent pointer */
uint32_t tcps_rwnd; /* receive window size */
int32_t tcps_rcv_ws; /* receive window scaling */
uint32_t tcps_cwnd; /* congestion window */
@@ -117,7 +121,8 @@ typedef struct tcpsinfo {
uint32_t tcps_rto; /* round-trip timeout, msec */
uint32_t tcps_mss; /* max segment size */
int tcps_retransmit; /* retransmit send event, boolean */
- int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */
+ int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */
+ int tcps_debug; /* socket has SO_DEBUG set */
} tcpsinfo_t;
/*
@@ -188,12 +193,16 @@ translator tcpsinfo_t < struct tcpcb *p
tcps_state = p == NULL ? -1 : p->t_state;
tcps_iss = p == NULL ? 0 : p->iss;
tcps_suna = p == NULL ? 0 : p->snd_una;
+ tcps_smax = p == NULL ? 0 : p->snd_max;
tcps_snxt = p == NULL ? 0 : p->snd_nxt;
tcps_rack = p == NULL ? 0 : p->last_ack_sent;
tcps_rnxt = p == NULL ? 0 : p->rcv_nxt;
tcps_swnd = p == NULL ? -1 : p->snd_wnd;
tcps_snd_ws = p == NULL ? -1 : p->snd_scale;
+ tcps_swl1 = p == NULL ? -1 : p->snd_wl1;
+ tcps_swl2 = p == NULL ? -1 : p->snd_wl2;
tcps_rwnd = p == NULL ? -1 : p->rcv_wnd;
+ tcps_rup = p == NULL ? -1 : p->rcv_up;
tcps_rcv_ws = p == NULL ? -1 : p->rcv_scale;
tcps_cwnd = p == NULL ? -1 : p->snd_cwnd;
tcps_cwnd_ssthresh = p == NULL ? -1 : p->snd_ssthresh;
@@ -203,6 +212,8 @@ translator tcpsinfo_t < struct tcpcb *p
tcps_mss = p == NULL ? -1 : p->t_maxseg;
tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0;
tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */
+ tcps_debug = p == NULL ? 0 :
+ p->t_inpcb->inp_socket->so_options & 1;
};
#pragma D binding "1.6.3" translator
@@ -242,3 +253,123 @@ translator tcpinfoh_t < struct tcphdr *p
translator tcplsinfo_t < int s > {
tcps_state = s;
};
+
+
+/* Support for TCP debug */
+
+#pragma D binding "1.12.1" TA_INPUT
+inline int TA_INPUT = 0;
+#pragma D binding "1.12.1" TA_OUTPUT
+inline int TA_OUTPUT = 1;
+#pragma D binding "1.12.1" TA_USER
+inline int TA_USER = 2;
+#pragma D binding "1.12.1" TA_RESPOND
+inline int TA_RESPOND = 3;
+#pragma D binding "1.12.1" TA_DROP
+inline int TA_DROP = 4;
+
+/* direction strings. */
+
+#pragma D binding "1.12.1" tcpdebug_dir_string
+inline string tcpdebug_dir_string[uint8_t direction] =
+ direction == TA_INPUT ? "input" :
+ direction == TA_OUTPUT ? "output" :
+ direction == TA_USER ? "user" :
+ direction == TA_RESPOND ? "respond" :
+ direction == TA_OUTPUT ? "drop" :
+ "unknown" ;
+
+#pragma D binding "1.12.1" tcpflag_string
+inline string tcpflag_string[uint8_t flags] =
+ flags & TH_FIN ? "FIN" :
+ flags & TH_SYN ? "SYN" :
+ flags & TH_RST ? "RST" :
+ flags & TH_PUSH ? "PUSH" :
+ flags & TH_ACK ? "ACK" :
+ flags & TH_URG ? "URG" :
+ flags & TH_ECE ? "ECE" :
+ flags & TH_CWR ? "CWR" :
+ "unknown" ;
+
+#pragma D binding "1.12.1" PRU_ATTACH
+inline int PRU_ATTACH = 0;
+#pragma D binding "1.12.1" PRU_DETACH
+inline int PRU_DETACH = 1;
+#pragma D binding "1.12.1" PRU_BIND
+inline int PRU_BIND = 2;
+#pragma D binding "1.12.1" PRU_LISTEN
+inline int PRU_LISTEN = 3;
+#pragma D binding "1.12.1" PRU_CONNECT
+inline int PRU_CONNECT = 4;
+#pragma D binding "1.12.1" PRU_ACCEPT
+inline int PRU_ACCEPT = 5 ;
+#pragma D binding "1.12.1" PRU_DISCONNECT
+inline int PRU_DISCONNECT= 6;
+#pragma D binding "1.12.1" PRU_SHUTDOWN
+inline int PRU_SHUTDOWN = 7;
+#pragma D binding "1.12.1" PRU_RCVD
+inline int PRU_RCVD = 8;
+#pragma D binding "1.12.1" PRU_SEND
+inline int PRU_SEND = 9;
+#pragma D binding "1.12.1" PRU_ABORT
+inline int PRU_ABORT = 10;
+#pragma D binding "1.12.1" PRU_CONTROL
+inline int PRU_CONTROL = 11;
+#pragma D binding "1.12.1" PRU_SENSE
+inline int PRU_SENSE = 12;
+#pragma D binding "1.12.1" PRU_RCVOOB
+inline int PRU_RCVOOB = 13;
+#pragma D binding "1.12.1" PRU_SENDOOB
+inline int PRU_SENDOOB = 14;
+#pragma D binding "1.12.1" PRU_SOCKADDR
+inline int PRU_SOCKADDR = 15;
+#pragma D binding "1.12.1" PRU_PEERADDR
+inline int PRU_PEERADDR = 16;
+#pragma D binding "1.12.1" PRU_CONNECT2
+inline int PRU_CONNECT2 = 17;
+#pragma D binding "1.12.1" PRU_FASTTIMO
+inline int PRU_FASTTIMO = 18;
+#pragma D binding "1.12.1" PRU_SLOWTIMO
+inline int PRU_SLOWTIMO = 19;
+#pragma D binding "1.12.1" PRU_PROTORCV
+inline int PRU_PROTORCV = 20;
+#pragma D binding "1.12.1" PRU_PROTOSEND
+inline int PRU_PROTOSEND = 21;
+#pragma D binding "1.12.1" PRU_SEND_EOF
+inline int PRU_SEND_EOF = 22;
+#pragma D binding "1.12.1" PRU_SOSETLABEL
+inline int PRU_SOSETLABEL = 23;
+#pragma D binding "1.12.1" PRU_CLOSE
+inline int PRU_CLOSE = 24;
+#pragma D binding "1.12.1" PRU_FLUSH
+inline int PRU_FLUSH = 25;
+
+#pragma D binding "1.12.1" prureq_string
+inline string prureq_string[uint8_t req] =
+ req == PRU_ATTACH ? "ATTACH" :
+ req == PRU_DETACH ? "DETACH" :
+ req == PRU_BIND ? "BIND" :
+ req == PRU_LISTEN ? "LISTEN" :
+ req == PRU_CONNECT ? "CONNECT" :
+ req == PRU_ACCEPT ? "ACCEPT" :
+ req == PRU_DISCONNECT ? "DISCONNECT" :
+ req == PRU_SHUTDOWN ? "SHUTDOWN" :
+ req == PRU_RCVD ? "RCVD" :
+ req == PRU_SEND ? "SEND" :
+ req == PRU_ABORT ? "ABORT" :
+ req == PRU_CONTROL ? "CONTROL" :
+ req == PRU_SENSE ? "SENSE" :
+ req == PRU_RCVOOB ? "RCVOOB" :
+ req == PRU_SENDOOB ? "SENDOOB" :
+ req == PRU_SOCKADDR ? "SOCKADDR" :
+ req == PRU_PEERADDR ? "PEERADDR" :
+ req == PRU_CONNECT2 ? "CONNECT2" :
+ req == PRU_FASTTIMO ? "FASTTIMO" :
+ req == PRU_SLOWTIMO ? "SLOWTIMO" :
+ req == PRU_PROTORCV ? "PROTORCV" :
+ req == PRU_PROTOSEND ? "PROTOSEND" :
+ req == PRU_SEND ? "SEND_EOF" :
+ req == PRU_SOSETLABEL ? "SOSETLABEL" :
+ req == PRU_CLOSE ? "CLOSE" :
+ req == PRU_FLUSH ? "FLUSE" :
+ "unknown" ;
Modified: projects/clang370-import/include/Makefile
==============================================================================
--- projects/clang370-import/include/Makefile Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/include/Makefile Wed Sep 16 22:35:59 2015 (r287878)
@@ -255,6 +255,7 @@ copies:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \
${DESTDIR}${INCLUDEDIR}/teken
.if ${MK_META_MODE} == "yes"
+ cd ${.OBJDIR}
touch ${.TARGET}
.endif
@@ -372,6 +373,7 @@ symlinks:
${DESTDIR}${INCLUDEDIR}/rpc; \
done
.if ${MK_META_MODE} == "yes"
+ cd ${.OBJDIR}
touch ${.TARGET}
.endif
Modified: projects/clang370-import/lib/libc/db/recno/rec_open.c
==============================================================================
--- projects/clang370-import/lib/libc/db/recno/rec_open.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/db/recno/rec_open.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -64,7 +64,7 @@ __rec_open(const char *fname, int flags,
int rfd, sverrno;
/* Open the user's file -- if this fails, we're done. */
- if (fname != NULL && (rfd = _open(fname, flags, mode)) < 0)
+ if (fname != NULL && (rfd = _open(fname, flags | O_CLOEXEC, mode)) < 0)
return (NULL);
/* Create a btree in memory (backed by disk). */
Modified: projects/clang370-import/lib/libc/gen/fts-compat.c
==============================================================================
--- projects/clang370-import/lib/libc/gen/fts-compat.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gen/fts-compat.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -635,9 +635,7 @@ __fts_set_clientptr_44bsd(FTS *sp, void
* been found, cutting the stat calls by about 2/3.
*/
static FTSENT *
-fts_build(sp, type)
- FTS *sp;
- int type;
+fts_build(FTS *sp, int type)
{
struct dirent *dp;
FTSENT *p, *head;
@@ -901,10 +899,7 @@ mem1: saved_errno = errno;
}
static u_short
-fts_stat(sp, p, follow)
- FTS *sp;
- FTSENT *p;
- int follow;
+fts_stat(FTS *sp, FTSENT *p, int follow)
{
FTSENT *t;
dev_t dev;
@@ -999,10 +994,7 @@ fts_compar(const void *a, const void *b)
}
static FTSENT *
-fts_sort(sp, head, nitems)
- FTS *sp;
- FTSENT *head;
- int nitems;
+fts_sort(FTS *sp, FTSENT *head, int nitems)
{
FTSENT **ap, *p;
@@ -1031,10 +1023,7 @@ fts_sort(sp, head, nitems)
}
static FTSENT *
-fts_alloc(sp, name, namelen)
- FTS *sp;
- char *name;
- int namelen;
+fts_alloc(FTS *sp, char *name, int namelen)
{
FTSENT *p;
size_t len;
@@ -1081,8 +1070,7 @@ fts_alloc(sp, name, namelen)
}
static void
-fts_lfree(head)
- FTSENT *head;
+fts_lfree(FTSENT *head)
{
FTSENT *p;
@@ -1100,9 +1088,7 @@ fts_lfree(head)
* plus 256 bytes so don't realloc the path 2 bytes at a time.
*/
static int
-fts_palloc(sp, more)
- FTS *sp;
- size_t more;
+fts_palloc(FTS *sp, size_t more)
{
sp->fts_pathlen += more + 256;
@@ -1127,9 +1113,7 @@ fts_palloc(sp, more)
* already returned.
*/
static void
-fts_padjust(sp, head)
- FTS *sp;
- FTSENT *head;
+fts_padjust(FTS *sp, FTSENT *head)
{
FTSENT *p;
char *addr = sp->fts_path;
@@ -1153,8 +1137,7 @@ fts_padjust(sp, head)
}
static size_t
-fts_maxarglen(argv)
- char * const *argv;
+fts_maxarglen(char * const *argv)
{
size_t len, max;
@@ -1170,11 +1153,7 @@ fts_maxarglen(argv)
* Assumes p->fts_dev and p->fts_ino are filled in.
*/
static int
-fts_safe_changedir(sp, p, fd, path)
- FTS *sp;
- FTSENT *p;
- int fd;
- char *path;
+fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path)
{
int ret, oerrno, newfd;
struct stat sb;
Modified: projects/clang370-import/lib/libc/gen/getgrent.c
==============================================================================
--- projects/clang370-import/lib/libc/gen/getgrent.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gen/getgrent.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -1238,7 +1238,7 @@ compat_setgrent(void *retval, void *mdat
int rv, stayopen;
#define set_setent(x, y) do { \
- int i; \
+ unsigned int i; \
\
for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \
x[i].mdata = (void *)y; \
@@ -1308,7 +1308,7 @@ compat_group(void *retval, void *mdata,
int rv, stayopen, *errnop;
#define set_lookup_type(x, y) do { \
- int i; \
+ unsigned int i; \
\
for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \
x[i].mdata = (void *)y; \
Modified: projects/clang370-import/lib/libc/gen/getloadavg.c
==============================================================================
--- projects/clang370-import/lib/libc/gen/getloadavg.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gen/getloadavg.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$");
* Return number of samples retrieved, or -1 on error.
*/
int
-getloadavg(loadavg, nelem)
- double loadavg[];
- int nelem;
+getloadavg(double loadavg[], int nelem)
{
struct loadavg loadinfo;
int i, mib[2];
Modified: projects/clang370-import/lib/libc/gen/getmntinfo.c
==============================================================================
--- projects/clang370-import/lib/libc/gen/getmntinfo.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gen/getmntinfo.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$");
* Return information about mounted filesystems.
*/
int
-getmntinfo(mntbufp, flags)
- struct statfs **mntbufp;
- int flags;
+getmntinfo(struct statfs **mntbufp, int flags)
{
static struct statfs *mntbuf;
static int mntsize;
Modified: projects/clang370-import/lib/libc/gen/getpwent.c
==============================================================================
--- projects/clang370-import/lib/libc/gen/getpwent.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gen/getpwent.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -1607,7 +1607,8 @@ compat_redispatch(struct compat_state *s
{ NULL, NULL, NULL }
};
void *discard;
- int rv, e, i;
+ int rv, e;
+ unsigned int i;
for (i = 0; i < sizeof(dtab)/sizeof(dtab[0]) - 1; i++)
dtab[i].mdata = (void *)lookup_how;
@@ -1702,7 +1703,7 @@ compat_setpwent(void *retval, void *mdat
int rv, stayopen;
#define set_setent(x, y) do { \
- int i; \
+ unsigned int i; \
\
for (i = 0; i < (sizeof(x)/sizeof(x[0])) - 1; i++) \
x[i].mdata = (void *)y; \
Modified: projects/clang370-import/lib/libc/gen/nlist.c
==============================================================================
--- projects/clang370-import/lib/libc/gen/nlist.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gen/nlist.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -63,9 +63,7 @@ int __aout_fdnlist(int, struct nlist *);
int __elf_fdnlist(int, struct nlist *);
int
-nlist(name, list)
- const char *name;
- struct nlist *list;
+nlist(const char *name, struct nlist *list)
{
int fd, n;
@@ -89,11 +87,10 @@ static struct nlist_handlers {
};
int
-__fdnlist(fd, list)
- int fd;
- struct nlist *list;
+__fdnlist(int fd, struct nlist *list)
{
- int n = -1, i;
+ int n = -1;
+ unsigned int i;
for (i = 0; i < sizeof(nlist_fn) / sizeof(nlist_fn[0]); i++) {
n = (nlist_fn[i].fn)(fd, list);
@@ -107,9 +104,7 @@ __fdnlist(fd, list)
#ifdef _NLIST_DO_AOUT
int
-__aout_fdnlist(fd, list)
- int fd;
- struct nlist *list;
+__aout_fdnlist(int fd, struct nlist *list)
{
struct nlist *p, *symtab;
caddr_t strtab, a_out_mmap;
@@ -235,9 +230,7 @@ __elf_is_okay__(Elf_Ehdr *ehdr)
}
int
-__elf_fdnlist(fd, list)
- int fd;
- struct nlist *list;
+__elf_fdnlist(int fd, struct nlist *list)
{
struct nlist *p;
Elf_Off symoff = 0, symstroff = 0;
@@ -377,11 +370,7 @@ __elf_fdnlist(fd, list)
* n_value and n_type members.
*/
static void
-elf_sym_to_nlist(nl, s, shdr, shnum)
- struct nlist *nl;
- Elf_Sym *s;
- Elf_Shdr *shdr;
- int shnum;
+elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum)
{
nl->n_value = s->st_value;
Modified: projects/clang370-import/lib/libc/gen/strtofflags.c
==============================================================================
--- projects/clang370-import/lib/libc/gen/strtofflags.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gen/strtofflags.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -94,14 +94,13 @@ static struct {
* are set, return the empty string.
*/
char *
-fflagstostr(flags)
- u_long flags;
+fflagstostr(u_long flags)
{
char *string;
const char *sp;
char *dp;
u_long setflags;
- int i;
+ u_int i;
if ((string = (char *)malloc(nmappings * (longestflaglen + 1))) == NULL)
return (NULL);
@@ -128,9 +127,7 @@ fflagstostr(flags)
* to the offending token.
*/
int
-strtofflags(stringp, setp, clrp)
- char **stringp;
- u_long *setp, *clrp;
+strtofflags(char **stringp, u_long *setp, u_long *clrp)
{
char *string, *p;
int i;
Modified: projects/clang370-import/lib/libc/gmon/gmon.c
==============================================================================
--- projects/clang370-import/lib/libc/gmon/gmon.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/gmon/gmon.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -70,9 +70,7 @@ void moncontrol(int);
static int hertz(void);
void
-monstartup(lowpc, highpc)
- u_long lowpc;
- u_long highpc;
+monstartup(u_long lowpc, u_long highpc)
{
int o;
char *cp;
@@ -218,8 +216,7 @@ _mcleanup(void)
* all the data structures are ready.
*/
void
-moncontrol(mode)
- int mode;
+moncontrol(int mode)
{
struct gmonparam *p = &_gmonparam;
@@ -239,7 +236,7 @@ moncontrol(mode)
* if something goes wrong, we return 0, an impossible hertz.
*/
static int
-hertz()
+hertz(void)
{
struct itimerval tim;
Modified: projects/clang370-import/lib/libc/stdlib/heapsort.c
==============================================================================
--- projects/clang370-import/lib/libc/stdlib/heapsort.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/stdlib/heapsort.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -147,16 +147,11 @@ typedef DECLARE_BLOCK(int, heapsort_bloc
*/
#ifdef I_AM_HEAPSORT_B
int
-heapsort_b(vbase, nmemb, size, compar)
- void *vbase;
- size_t nmemb, size;
- heapsort_block compar;
+heapsort_b(void *vbase, size_t nmemb, size_t size, heapsort_block compar)
#else
int
-heapsort(vbase, nmemb, size, compar)
- void *vbase;
- size_t nmemb, size;
- int (*compar)(const void *, const void *);
+heapsort(void *vbase, size_t nmemb, size_t size,
+ int (*compar)(const void *, const void *))
#endif
{
size_t cnt, i, j, l;
Modified: projects/clang370-import/lib/libc/stdlib/merge.c
==============================================================================
--- projects/clang370-import/lib/libc/stdlib/merge.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/stdlib/merge.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -104,14 +104,10 @@ static void insertionsort(u_char *, size
*/
int
#ifdef I_AM_MERGESORT_B
-mergesort_b(base, nmemb, size, cmp)
+mergesort_b(void *base, size_t nmemb, size_t size, cmp_t cmp)
#else
-mergesort(base, nmemb, size, cmp)
+mergesort(void *base, size_t nmemb, size_t size, cmp_t cmp)
#endif
- void *base;
- size_t nmemb;
- size_t size;
- cmp_t cmp;
{
size_t i;
int sense;
@@ -271,10 +267,7 @@ COPY: b = t;
* is defined. Otherwise simple pairwise merging is used.)
*/
void
-setup(list1, list2, n, size, cmp)
- size_t n, size;
- u_char *list1, *list2;
- cmp_t cmp;
+setup(u_char *list1, u_char *list2, size_t n, size_t size, cmp_t cmp)
{
int i, length, size2, tmp, sense;
u_char *f1, *f2, *s, *l2, *last, *p2;
@@ -345,10 +338,7 @@ setup(list1, list2, n, size, cmp)
* last 4 elements.
*/
static void
-insertionsort(a, n, size, cmp)
- u_char *a;
- size_t n, size;
- cmp_t cmp;
+insertionsort(u_char *a, size_t n, size_t size, cmp_t cmp)
{
u_char *ai, *s, *t, *u, tmp;
int i;
Modified: projects/clang370-import/lib/libc/stdlib/radixsort.c
==============================================================================
--- projects/clang370-import/lib/libc/stdlib/radixsort.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/stdlib/radixsort.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -88,10 +88,7 @@ static void r_sort_b(const u_char **, co
}
int
-radixsort(a, n, tab, endch)
- const u_char **a, *tab;
- int n;
- u_int endch;
+radixsort(const u_char **a, int n, const u_char *tab, u_int endch)
{
const u_char *tr;
int c;
@@ -103,10 +100,7 @@ radixsort(a, n, tab, endch)
}
int
-sradixsort(a, n, tab, endch)
- const u_char **a, *tab;
- int n;
- u_int endch;
+sradixsort(const u_char **a, int n, const u_char *tab, u_int endch)
{
const u_char *tr, **ta;
int c;
@@ -131,11 +125,7 @@ sradixsort(a, n, tab, endch)
/* Unstable, in-place sort. */
static void
-r_sort_a(a, n, i, tr, endch)
- const u_char **a;
- int n, i;
- const u_char *tr;
- u_int endch;
+r_sort_a(const u_char **a, int n, int i, const u_char *tr, u_int endch)
{
static int count[256], nc, bmin;
int c;
@@ -233,11 +223,8 @@ r_sort_a(a, n, i, tr, endch)
/* Stable sort, requiring additional memory. */
static void
-r_sort_b(a, ta, n, i, tr, endch)
- const u_char **a, **ta;
- int n, i;
- const u_char *tr;
- u_int endch;
+r_sort_b(const u_char **a, const u_char **ta, int n, int i, const u_char *tr,
+ u_int endch)
{
static int count[256], nc, bmin;
int c;
@@ -304,12 +291,9 @@ r_sort_b(a, ta, n, i, tr, endch)
}
}
+/* insertion sort */
static inline void
-simplesort(a, n, b, tr, endch) /* insertion sort */
- const u_char **a;
- int n, b;
- const u_char *tr;
- u_int endch;
+simplesort(const u_char **a, int n, int b, const u_char *tr, u_int endch)
{
u_char ch;
const u_char **ak, **ai, *s, *t;
Modified: projects/clang370-import/lib/libc/sys/setuid.2
==============================================================================
--- projects/clang370-import/lib/libc/sys/setuid.2 Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/lib/libc/sys/setuid.2 Wed Sep 16 22:35:59 2015 (r287878)
@@ -28,7 +28,7 @@
.\" @(#)setuid.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd June 4, 1993
+.Dd September 13, 2015
.Dt SETUID 2
.Os
.Sh NAME
@@ -178,15 +178,10 @@ pseudocode(void)
int fd;
/* ... */
- fd = open("/path/to/sensitive/data", O_RDWR);
+ fd = open("/path/to/sensitive/data", O_RDWR | O_CLOEXEC);
if (fd == -1)
err(1, "open");
- /*
- * Set close-on-exec flag; see fcntl(2) for more information.
- */
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
- err(1, "fcntl(F_SETFD)");
/* ... */
execve(path, argv, environ);
}
Modified: projects/clang370-import/release/Makefile
==============================================================================
--- projects/clang370-import/release/Makefile Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/release/Makefile Wed Sep 16 22:35:59 2015 (r287878)
@@ -21,6 +21,7 @@
# (by default, the directory above this one)
# PORTSDIR: location of ports tree to distribute (default: /usr/ports)
# DOCDIR: location of doc tree (default: /usr/doc)
+# XTRADIR: xtra-bits-dir argument for <arch>/mkisoimages.sh
# NOPKG: if set, do not distribute third-party packages
# NOPORTS: if set, do not distribute ports tree
# NOSRC: if set, do not distribute source tree
@@ -242,13 +243,13 @@ dvd: packagesystem
release.iso: disc1.iso
disc1.iso: disc1
- sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1
+ sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 ${XTRADIR}
dvd1.iso: dvd pkg-stage
- sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd
+ sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd ${XTRADIR}
bootonly.iso: bootonly
- sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly
+ sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly ${XTRADIR}
memstick: memstick.img
memstick.img: disc1
Modified: projects/clang370-import/sbin/geom/class/nop/geom_nop.c
==============================================================================
--- projects/clang370-import/sbin/geom/class/nop/geom_nop.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/sbin/geom/class/nop/geom_nop.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -43,14 +43,16 @@ struct g_command class_commands[] = {
{
{ 'e', "error", "-1", G_TYPE_NUMBER },
{ 'o', "offset", "0", G_TYPE_NUMBER },
+ { 'p', "stripesize", "0", G_TYPE_NUMBER },
+ { 'P', "stripeoffset", "0", G_TYPE_NUMBER },
{ 'r', "rfailprob", "-1", G_TYPE_NUMBER },
{ 's', "size", "0", G_TYPE_NUMBER },
{ 'S', "secsize", "0", G_TYPE_NUMBER },
{ 'w', "wfailprob", "-1", G_TYPE_NUMBER },
G_OPT_SENTINEL
},
- "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] "
- "[-S secsize] [-w wfailprob] dev ..."
+ "[-v] [-e error] [-o offset] [-p stripesize] [-P stripeoffset] "
+ "[-r rfailprob] [-s size] [-S secsize] [-w wfailprob] dev ..."
},
{ "configure", G_FLAG_VERBOSE, NULL,
{
Modified: projects/clang370-import/sbin/geom/class/nop/gnop.8
==============================================================================
--- projects/clang370-import/sbin/geom/class/nop/gnop.8 Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/sbin/geom/class/nop/gnop.8 Wed Sep 16 22:35:59 2015 (r287878)
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 14, 2013
+.Dd September 15, 2015
.Dt GNOP 8
.Os
.Sh NAME
@@ -36,6 +36,8 @@
.Op Fl v
.Op Fl e Ar error
.Op Fl o Ar offset
+.Op Fl p Ar stripesize
+.Op Fl P Ar stripeoffset
.Op Fl r Ar rfailprob
.Op Fl s Ar size
.Op Fl S Ar secsize
@@ -115,6 +117,10 @@ Specifies the error number to return on
Force the removal of the specified provider.
.It Fl o Ar offset
Where to begin on the original provider.
+.It Fl p Ar stripesize
+Value of the stripesize property of the transparent provider.
+.It Fl P Ar stripeoffset
+Value of the stripeoffset property of the transparent provider.
.It Fl r Ar rfailprob
Specifies read failure probability in percent.
.It Fl s Ar size
Modified: projects/clang370-import/sbin/ifconfig/ifconfig.c
==============================================================================
--- projects/clang370-import/sbin/ifconfig/ifconfig.c Wed Sep 16 22:26:52 2015 (r287877)
+++ projects/clang370-import/sbin/ifconfig/ifconfig.c Wed Sep 16 22:35:59 2015 (r287878)
@@ -995,7 +995,7 @@ setifmetric(const char *val, int dummy _
strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name));
ifr.ifr_metric = atoi(val);
if (ioctl(s, SIOCSIFMETRIC, (caddr_t)&ifr) < 0)
- warn("ioctl (set metric)");
+ err(1, "ioctl SIOCSIFMETRIC (set metric)");
}
static void
@@ -1005,7 +1005,7 @@ setifmtu(const char *val, int dummy __un
strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name));
ifr.ifr_mtu = atoi(val);
if (ioctl(s, SIOCSIFMTU, (caddr_t)&ifr) < 0)
- warn("ioctl (set mtu)");
+ err(1, "ioctl SIOCSIFMTU (set mtu)");
}
static void
@@ -1015,15 +1015,12 @@ setifname(const char *val, int dummy __u
char *newname;
newname = strdup(val);
- if (newname == NULL) {
- warn("no memory to set ifname");
- return;
- }
+ if (newname == NULL)
+ err(1, "no memory to set ifname");
ifr.ifr_data = newname;
if (ioctl(s, SIOCSIFNAME, (caddr_t)&ifr) < 0) {
- warn("ioctl (set name)");
free(newname);
- return;
+ err(1, "ioctl SIOCSIFNAME (set name)");
}
strlcpy(name, newname, sizeof(name));
free(newname);
@@ -1050,7 +1047,7 @@ setifdescr(const char *val, int dummy __
}
if (ioctl(s, SIOCSIFDESCR, (caddr_t)&ifr) < 0)
- warn("ioctl (set descr)");
+ err(1, "ioctl SIOCSIFDESCR (set descr)");
free(newdescr);
}
Copied: projects/clang370-import/share/dtrace/tcpdebug (from r287877, head/share/dtrace/tcpdebug)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang370-import/share/dtrace/tcpdebug Wed Sep 16 22:35:59 2015 (r287878, copy of r287877, head/share/dtrace/tcpdebug)
@@ -0,0 +1,165 @@
+#!/usr/sbin/dtrace -s
+/*
+ * Copyright (c) 2015 George V. Neville-Neil
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ *
+ * The tcpdebug D script uses the tcp:kernel::debug tracepoints
+ * to replicate the action of turning on TCPDEBUG in a kernel configuration.
+ *
+ * A TCP debug statement shows a connection's
+ *
+ * direction: input, output, user, drop
+ * state: CLOSED, LISTEN, SYN_SENT, SYN_RCVD, ESTABLISHED,
+ * CLOSE_WAIT, FIN_WAIT_1, CLOSING, LAST_ACK, FIN_WAIT_2,TIME_WAIT
+ * sequence: sequence space
+ *
+ * congestion: rcv_nxt, rcv_wnd, rcv_up, snd_una, snd_nxt, snx_max,
+ * snd_wl1, snd_wl2, snd_wnd
+ *
+ * NOTE: Only sockets with SO_DEBUG set will be shown.
+ *
+ * Usage: tcpdebug
+ */
+
+#pragma D option quiet
+tcp:kernel::debug-input
+/args[0]->tcps_debug/
+{
+ seq = args[1]->tcp_seq;
+ ack = args[1]->tcp_ack;
+ len = args[2]->ip_plength - sizeof(struct tcphdr);
+ flags = args[1]->tcp_flags;
+
+ printf("%p %s: input [%xu..%xu]", arg0,
+ tcp_state_string[args[0]->tcps_state], seq, seq + len);
+
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list