svn commit: r294777 - in projects/clang380-import: bin/setfacl bin/sh cddl/lib contrib/elftoolchain/libelf contrib/gcc/config/riscv64 contrib/ofed/librdmacm/examples/build/rping etc etc/defaults et...
Dimitry Andric
dim at FreeBSD.org
Tue Jan 26 07:49:16 UTC 2016
Author: dim
Date: Tue Jan 26 07:49:11 2016
New Revision: 294777
URL: https://svnweb.freebsd.org/changeset/base/294777
Log:
Merge ^/head r294599 through r294776.
Added:
projects/clang380-import/contrib/gcc/config/riscv64/
- copied from r294776, head/contrib/gcc/config/riscv64/
projects/clang380-import/etc/periodic/daily/480.leapfile-ntpd
- copied unchanged from r294776, head/etc/periodic/daily/480.leapfile-ntpd
projects/clang380-import/sys/arm/allwinner/allwinner_machdep.c
- copied unchanged from r294776, head/sys/arm/allwinner/allwinner_machdep.c
projects/clang380-import/sys/arm/allwinner/allwinner_machdep.h
- copied unchanged from r294776, head/sys/arm/allwinner/allwinner_machdep.h
projects/clang380-import/sys/arm/arm/debug_monitor.c
- copied unchanged from r294776, head/sys/arm/arm/debug_monitor.c
projects/clang380-import/sys/arm/include/debug_monitor.h
- copied unchanged from r294776, head/sys/arm/include/debug_monitor.h
projects/clang380-import/sys/boot/common/paths.h
- copied unchanged from r294776, head/sys/boot/common/paths.h
projects/clang380-import/sys/boot/common/rbx.h
- copied unchanged from r294776, head/sys/boot/common/rbx.h
projects/clang380-import/sys/dev/extres/
- copied from r294776, head/sys/dev/extres/
projects/clang380-import/sys/net/route_var.h
- copied unchanged from r294776, head/sys/net/route_var.h
Deleted:
projects/clang380-import/sys/arm/allwinner/a10_machdep.c
projects/clang380-import/sys/boot/i386/common/rbx.h
Modified:
projects/clang380-import/bin/setfacl/setfacl.1
projects/clang380-import/bin/sh/cd.c
projects/clang380-import/bin/sh/expand.c
projects/clang380-import/cddl/lib/Makefile
projects/clang380-import/contrib/elftoolchain/libelf/_libelf_config.h
projects/clang380-import/contrib/ofed/librdmacm/examples/build/rping/Makefile
projects/clang380-import/etc/defaults/periodic.conf
projects/clang380-import/etc/defaults/rc.conf
projects/clang380-import/etc/ntp.conf
projects/clang380-import/etc/periodic/daily/Makefile
projects/clang380-import/etc/rc.d/jail
projects/clang380-import/etc/rc.d/ntpd
projects/clang380-import/gnu/lib/libreadline/readline/Makefile
projects/clang380-import/lib/Makefile
projects/clang380-import/lib/libc/Makefile
projects/clang380-import/lib/libc/gen/readpassphrase.c
projects/clang380-import/lib/libc/net/sctp_sys_calls.c
projects/clang380-import/lib/libelftc/Makefile
projects/clang380-import/lib/libproc/proc_bkpt.c
projects/clang380-import/lib/libproc/proc_regs.c
projects/clang380-import/libexec/rtld-elf/riscv/rtld_machdep.h
projects/clang380-import/sbin/ifconfig/iflagg.c
projects/clang380-import/sbin/kldstat/Makefile
projects/clang380-import/sbin/kldstat/kldstat.8
projects/clang380-import/sbin/kldstat/kldstat.c
projects/clang380-import/share/dtrace/watch_kill
projects/clang380-import/share/man/man4/lagg.4
projects/clang380-import/share/man/man5/ext2fs.5
projects/clang380-import/share/man/man9/hashinit.9
projects/clang380-import/share/mk/auto.obj.mk
projects/clang380-import/share/mk/bsd.dep.mk
projects/clang380-import/share/mk/gendirdeps.mk
projects/clang380-import/share/mk/host-target.mk
projects/clang380-import/share/mk/meta.subdir.mk
projects/clang380-import/sys/amd64/linux/linux.h
projects/clang380-import/sys/amd64/linux/linux_machdep.c
projects/clang380-import/sys/arm/allwinner/a10_clk.c
projects/clang380-import/sys/arm/allwinner/a10_clk.h
projects/clang380-import/sys/arm/allwinner/a10_common.c
projects/clang380-import/sys/arm/allwinner/files.allwinner
projects/clang380-import/sys/arm/arm/db_trace.c
projects/clang380-import/sys/arm/arm/elf_machdep.c
projects/clang380-import/sys/arm/arm/machdep.c
projects/clang380-import/sys/arm/arm/minidump_machdep.c
projects/clang380-import/sys/arm/arm/physmem.c
projects/clang380-import/sys/arm/arm/pmap-v6-new.c
projects/clang380-import/sys/arm/arm/pmap-v6.c
projects/clang380-import/sys/arm/arm/pmap.c
projects/clang380-import/sys/arm/arm/trap-v6.c
projects/clang380-import/sys/arm/conf/A20
projects/clang380-import/sys/arm/conf/CUBIEBOARD
projects/clang380-import/sys/arm/include/cpu-v6.h
projects/clang380-import/sys/arm/include/db_machdep.h
projects/clang380-import/sys/arm/include/kdb.h
projects/clang380-import/sys/arm/include/ofw_machdep.h
projects/clang380-import/sys/arm/include/physmem.h
projects/clang380-import/sys/arm/include/pmap-v6.h
projects/clang380-import/sys/arm/include/pmap.h
projects/clang380-import/sys/arm/include/pte.h
projects/clang380-import/sys/arm/include/sysreg.h
projects/clang380-import/sys/arm64/arm64/gic.c
projects/clang380-import/sys/arm64/arm64/gic.h
projects/clang380-import/sys/arm64/arm64/gic_fdt.c
projects/clang380-import/sys/arm64/arm64/gic_v3.c
projects/clang380-import/sys/arm64/arm64/gic_v3_fdt.c
projects/clang380-import/sys/arm64/arm64/gic_v3_its.c
projects/clang380-import/sys/boot/arm/at91/boot2/boot2.c
projects/clang380-import/sys/boot/arm/ixp425/boot2/boot2.c
projects/clang380-import/sys/boot/efi/boot1/boot1.c
projects/clang380-import/sys/boot/efi/libefi/libefi.c
projects/clang380-import/sys/boot/efi/loader/main.c
projects/clang380-import/sys/boot/i386/boot2/boot2.c
projects/clang380-import/sys/boot/i386/gptboot/gptboot.c
projects/clang380-import/sys/boot/i386/zfsboot/zfsboot.c
projects/clang380-import/sys/boot/mips/beri/boot2/boot2.c
projects/clang380-import/sys/boot/pc98/boot2/boot2.c
projects/clang380-import/sys/boot/powerpc/boot1.chrp/boot1.c
projects/clang380-import/sys/boot/sparc64/boot1/boot1.c
projects/clang380-import/sys/boot/usb/tools/Makefile
projects/clang380-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
projects/clang380-import/sys/conf/files
projects/clang380-import/sys/conf/files.arm
projects/clang380-import/sys/conf/options
projects/clang380-import/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.h
projects/clang380-import/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
projects/clang380-import/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.h
projects/clang380-import/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
projects/clang380-import/sys/dev/cxgbe/iw_cxgbe/cm.c
projects/clang380-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h
projects/clang380-import/sys/dev/cxgbe/iw_cxgbe/provider.c
projects/clang380-import/sys/dev/hyperv/netvsc/hv_net_vsc.c
projects/clang380-import/sys/dev/hyperv/netvsc/hv_net_vsc.h
projects/clang380-import/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
projects/clang380-import/sys/dev/hyperv/netvsc/hv_rndis.h
projects/clang380-import/sys/dev/hyperv/netvsc/hv_rndis_filter.c
projects/clang380-import/sys/dev/hyperv/netvsc/hv_rndis_filter.h
projects/clang380-import/sys/dev/hyperv/vmbus/hv_channel.c
projects/clang380-import/sys/dev/ixgbe/ixgbe_osdep.h
projects/clang380-import/sys/dev/ofw/openfirm.c
projects/clang380-import/sys/dev/sound/pci/hdspe.h
projects/clang380-import/sys/dev/uart/uart_tty.c
projects/clang380-import/sys/fs/ext2fs/ext2_alloc.c
projects/clang380-import/sys/fs/ext2fs/ext2_dinode.h
projects/clang380-import/sys/fs/ext2fs/ext2_htree.c
projects/clang380-import/sys/fs/ext2fs/ext2_inode_cnv.c
projects/clang380-import/sys/fs/ext2fs/ext2_lookup.c
projects/clang380-import/sys/fs/ext2fs/inode.h
projects/clang380-import/sys/geom/geom_flashmap.c
projects/clang380-import/sys/kern/kern_sysctl.c
projects/clang380-import/sys/kern/tty.c
projects/clang380-import/sys/kern/vfs_export.c
projects/clang380-import/sys/mips/conf/AR934X_BASE
projects/clang380-import/sys/net/if_lagg.c
projects/clang380-import/sys/net/if_lagg.h
projects/clang380-import/sys/net/radix.c
projects/clang380-import/sys/net/radix.h
projects/clang380-import/sys/net/radix_mpath.c
projects/clang380-import/sys/net/radix_mpath.h
projects/clang380-import/sys/net/route.c
projects/clang380-import/sys/net/route.h
projects/clang380-import/sys/net/rtsock.c
projects/clang380-import/sys/net/vnet.c
projects/clang380-import/sys/net80211/ieee80211_ioctl.c
projects/clang380-import/sys/netinet/in_fib.c
projects/clang380-import/sys/netinet/in_rmx.c
projects/clang380-import/sys/netinet/in_var.h
projects/clang380-import/sys/netinet/tcp_subr.c
projects/clang380-import/sys/netinet6/in6_fib.c
projects/clang380-import/sys/netinet6/in6_rmx.c
projects/clang380-import/sys/netinet6/nd6_rtr.c
projects/clang380-import/sys/netpfil/ipfw/dn_sched_qfq.c
projects/clang380-import/sys/netpfil/ipfw/ip_fw_table_algo.c
projects/clang380-import/sys/netpfil/pf/pf_table.c
projects/clang380-import/sys/nfs/bootp_subr.c
projects/clang380-import/sys/ofed/drivers/infiniband/core/cma.c
projects/clang380-import/sys/ofed/drivers/infiniband/core/iwcm.c
projects/clang380-import/sys/ofed/include/rdma/iw_cm.h
projects/clang380-import/sys/ofed/include/rdma/rdma_cm.h
projects/clang380-import/sys/powerpc/booke/pmap.c
projects/clang380-import/sys/sys/ttydevsw.h
projects/clang380-import/sys/vm/vm_map.c
projects/clang380-import/tools/regression/sockets/unix_cmsg/unix_cmsg.c
projects/clang380-import/tools/regression/sockets/zerosend/zerosend.c
projects/clang380-import/tools/tools/ath/ath_ee_v4k_print/v4k.c
projects/clang380-import/tools/tools/nanobsd/embedded/qemu-amd64.cfg
projects/clang380-import/tools/tools/nanobsd/embedded/qemu-i386.cfg
projects/clang380-import/tools/tools/nanobsd/embedded/qemu-mips.cfg
projects/clang380-import/tools/tools/nanobsd/embedded/qemu-mips64.cfg
projects/clang380-import/tools/tools/nanobsd/embedded/qemu-powerpc.cfg
projects/clang380-import/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg
projects/clang380-import/tools/tools/nanobsd/embedded/qemu-sparc64.cfg
projects/clang380-import/usr.bin/Makefile
projects/clang380-import/usr.bin/elfdump/elfdump.c
projects/clang380-import/usr.bin/ldd/ldd.c
projects/clang380-import/usr.bin/whois/whois.1
projects/clang380-import/usr.bin/whois/whois.c
projects/clang380-import/usr.sbin/autofs/automount.c
projects/clang380-import/usr.sbin/autofs/automountd.c
projects/clang380-import/usr.sbin/autofs/autounmountd.c
projects/clang380-import/usr.sbin/autofs/common.c
projects/clang380-import/usr.sbin/autofs/defined.c
projects/clang380-import/usr.sbin/bhyve/block_if.c
projects/clang380-import/usr.sbin/bhyve/pci_ahci.c
projects/clang380-import/usr.sbin/bsdconfig/share/strings.subr
projects/clang380-import/usr.sbin/iscsid/iscsid.c
Directory Properties:
projects/clang380-import/ (props changed)
projects/clang380-import/cddl/ (props changed)
projects/clang380-import/contrib/elftoolchain/ (props changed)
projects/clang380-import/contrib/gcc/ (props changed)
projects/clang380-import/gnu/lib/ (props changed)
projects/clang380-import/lib/libc/ (props changed)
projects/clang380-import/sbin/ (props changed)
projects/clang380-import/share/ (props changed)
projects/clang380-import/share/man/man4/ (props changed)
projects/clang380-import/sys/ (props changed)
projects/clang380-import/sys/boot/ (props changed)
projects/clang380-import/sys/boot/powerpc/boot1.chrp/ (props changed)
projects/clang380-import/sys/cddl/contrib/opensolaris/ (props changed)
projects/clang380-import/sys/conf/ (props changed)
projects/clang380-import/sys/dev/hyperv/ (props changed)
projects/clang380-import/usr.sbin/bhyve/ (props changed)
Modified: projects/clang380-import/bin/setfacl/setfacl.1
==============================================================================
--- projects/clang380-import/bin/setfacl/setfacl.1 Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/bin/setfacl/setfacl.1 Tue Jan 26 07:49:11 2016 (r294777)
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 4, 2015
+.Dd January 23, 2016
.Dt SETFACL 1
.Os
.Sh NAME
@@ -62,8 +62,9 @@ starting at position
counting from zero.
This option is only applicable to NFSv4 ACLs.
.It Fl b
-Remove all ACL entries except for the three required entries
-(POSIX.1e ACLs) or six "canonical" entries (NFSv4 ACLs).
+Remove all ACL entries except for the ones synthesized
+from the file mode - the three mandatory entries in case
+of POSIX.1e ACL.
If the POSIX.1e ACL contains a
.Dq Li mask
entry, the permissions of the
Modified: projects/clang380-import/bin/sh/cd.c
==============================================================================
--- projects/clang380-import/bin/sh/cd.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/bin/sh/cd.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -68,15 +68,13 @@ __FBSDID("$FreeBSD$");
static int cdlogical(char *);
static int cdphysical(char *);
static int docd(char *, int, int);
-static char *getcomponent(void);
+static char *getcomponent(char **);
static char *findcwd(char *);
static void updatepwd(char *);
static char *getpwd(void);
static char *getpwd2(void);
static char *curdir = NULL; /* current working directory */
-static char *prevdir; /* previous working directory */
-static char *cdcomppath;
int
cdcmd(int argc __unused, char **argv __unused)
@@ -112,11 +110,10 @@ cdcmd(int argc __unused, char **argv __u
if (*dest == '\0')
dest = ".";
if (dest[0] == '-' && dest[1] == '\0') {
- dest = prevdir ? prevdir : curdir;
- if (dest)
- print = 1;
- else
- dest = ".";
+ dest = bltinlookup("OLDPWD", 1);
+ if (dest == NULL)
+ error("OLDPWD not set");
+ print = 1;
}
if (dest[0] == '/' ||
(dest[0] == '.' && (dest[1] == '/' || dest[1] == '\0')) ||
@@ -179,6 +176,7 @@ cdlogical(char *dest)
char *p;
char *q;
char *component;
+ char *path;
struct stat statb;
int first;
int badstat;
@@ -189,14 +187,14 @@ cdlogical(char *dest)
* next time we get the value of the current directory.
*/
badstat = 0;
- cdcomppath = stsavestr(dest);
+ path = stsavestr(dest);
STARTSTACKSTR(p);
if (*dest == '/') {
STPUTC('/', p);
- cdcomppath++;
+ path++;
}
first = 1;
- while ((q = getcomponent()) != NULL) {
+ while ((q = getcomponent(&path)) != NULL) {
if (q[0] == '\0' || (q[0] == '.' && q[1] == '\0'))
continue;
if (! first)
@@ -245,25 +243,25 @@ cdphysical(char *dest)
}
/*
- * Get the next component of the path name pointed to by cdcomppath.
- * This routine overwrites the string pointed to by cdcomppath.
+ * Get the next component of the path name pointed to by *path.
+ * This routine overwrites *path and the string pointed to by it.
*/
static char *
-getcomponent(void)
+getcomponent(char **path)
{
char *p;
char *start;
- if ((p = cdcomppath) == NULL)
+ if ((p = *path) == NULL)
return NULL;
- start = cdcomppath;
+ start = *path;
while (*p != '/' && *p != '\0')
p++;
if (*p == '\0') {
- cdcomppath = NULL;
+ *path = NULL;
} else {
*p++ = '\0';
- cdcomppath = p;
+ *path = p;
}
return start;
}
@@ -274,6 +272,7 @@ findcwd(char *dir)
{
char *new;
char *p;
+ char *path;
/*
* If our argument is NULL, we don't know the current directory
@@ -282,14 +281,14 @@ findcwd(char *dir)
*/
if (dir == NULL || curdir == NULL)
return getpwd2();
- cdcomppath = stsavestr(dir);
+ path = stsavestr(dir);
STARTSTACKSTR(new);
if (*dir != '/') {
STPUTS(curdir, new);
if (STTOPC(new) == '/')
STUNPUTC(new);
}
- while ((p = getcomponent()) != NULL) {
+ while ((p = getcomponent(&path)) != NULL) {
if (equal(p, "..")) {
while (new > stackblock() && (STUNPUTC(new), *new) != '/');
} else if (*p != '\0' && ! equal(p, ".")) {
@@ -311,14 +310,15 @@ findcwd(char *dir)
static void
updatepwd(char *dir)
{
+ char *prevdir;
+
hashcd(); /* update command hash table */
- if (prevdir)
- ckfree(prevdir);
+ setvar("PWD", dir, VEXPORT);
+ setvar("OLDPWD", curdir, VEXPORT);
prevdir = curdir;
curdir = dir ? savestr(dir) : NULL;
- setvar("PWD", curdir, VEXPORT);
- setvar("OLDPWD", prevdir, VEXPORT);
+ ckfree(prevdir);
}
int
Modified: projects/clang380-import/bin/sh/expand.c
==============================================================================
--- projects/clang380-import/bin/sh/expand.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/bin/sh/expand.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -91,13 +91,13 @@ struct worddest {
static char *expdest; /* output of current string */
static struct nodelist *argbackq; /* list of back quote expressions */
-static char *argstr(char *, int, struct worddest *);
-static char *exptilde(char *, int);
-static char *expari(char *, int, struct worddest *);
+static const char *argstr(const char *, int, struct worddest *);
+static const char *exptilde(const char *, int);
+static const char *expari(const char *, int, struct worddest *);
static void expbackq(union node *, int, int, struct worddest *);
-static void subevalvar_trim(char *, int, int, int);
-static int subevalvar_misc(char *, const char *, int, int, int);
-static char *evalvar(char *, int, struct worddest *);
+static void subevalvar_trim(const char *, int, int, int);
+static int subevalvar_misc(const char *, const char *, int, int, int);
+static const char *evalvar(const char *, int, struct worddest *);
static int varisset(const char *, int);
static void strtodest(const char *, int, int, int, struct worddest *);
static void reprocess(int, int, int, int, struct worddest *);
@@ -262,8 +262,8 @@ expandarg(union node *arg, struct arglis
*
* If EXP_SPLIT is set, dst receives any complete words produced.
*/
-static char *
-argstr(char *p, int flag, struct worddest *dst)
+static const char *
+argstr(const char *p, int flag, struct worddest *dst)
{
char c;
int quotes = flag & (EXP_GLOB | EXP_CASE); /* do CTLESC */
@@ -352,12 +352,15 @@ argstr(char *p, int flag, struct worddes
* Perform tilde expansion, placing the result in the stack string and
* returning the next position in the input string to process.
*/
-static char *
-exptilde(char *p, int flag)
+static const char *
+exptilde(const char *p, int flag)
{
- char c, *startp = p;
+ char c;
+ const char *startp = p;
+ const char *user;
struct passwd *pw;
char *home;
+ int len;
for (;;) {
c = *p;
@@ -377,14 +380,17 @@ exptilde(char *p, int flag)
case '\0':
case '/':
case CTLENDVAR:
- *p = '\0';
- if (*(startp+1) == '\0') {
+ len = p - startp - 1;
+ STPUTBIN(startp + 1, len, expdest);
+ STACKSTRNUL(expdest);
+ user = expdest - len;
+ if (*user == '\0') {
home = lookupvar("HOME");
} else {
- pw = getpwnam(startp+1);
+ pw = getpwnam(user);
home = pw != NULL ? pw->pw_dir : NULL;
}
- *p = c;
+ STADJUST(-len, expdest);
if (home == NULL || *home == '\0')
return (startp);
strtodest(home, flag, VSNORMAL, 1, NULL);
@@ -398,8 +404,8 @@ exptilde(char *p, int flag)
/*
* Expand arithmetic expression.
*/
-static char *
-expari(char *p, int flag, struct worddest *dst)
+static const char *
+expari(const char *p, int flag, struct worddest *dst)
{
char *q, *start;
arith_t result;
@@ -532,7 +538,7 @@ recordleft(const char *str, const char *
}
static void
-subevalvar_trim(char *p, int strloc, int subtype, int startloc)
+subevalvar_trim(const char *p, int strloc, int subtype, int startloc)
{
char *startp;
char *loc = NULL;
@@ -606,7 +612,7 @@ subevalvar_trim(char *p, int strloc, int
static int
-subevalvar_misc(char *p, const char *var, int subtype, int startloc,
+subevalvar_misc(const char *p, const char *var, int subtype, int startloc,
int varflags)
{
char *startp;
@@ -645,12 +651,12 @@ subevalvar_misc(char *p, const char *var
* input string.
*/
-static char *
-evalvar(char *p, int flag, struct worddest *dst)
+static const char *
+evalvar(const char *p, int flag, struct worddest *dst)
{
int subtype;
int varflags;
- char *var;
+ const char *var;
const char *val;
int patloc;
int c;
Modified: projects/clang380-import/cddl/lib/Makefile
==============================================================================
--- projects/clang380-import/cddl/lib/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/cddl/lib/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -26,7 +26,7 @@ _libzpool= libzpool
.endif
.endif
-.if ${MACHINE_CPUARCH} != "sparc64"
+.if ${MACHINE_CPUARCH} != "sparc64" && ${MACHINE_CPUARCH} != "riscv"
_drti= drti
_libdtrace= libdtrace
.endif
Modified: projects/clang380-import/contrib/elftoolchain/libelf/_libelf_config.h
==============================================================================
--- projects/clang380-import/contrib/elftoolchain/libelf/_libelf_config.h Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/contrib/elftoolchain/libelf/_libelf_config.h Tue Jan 26 07:49:11 2016 (r294777)
@@ -97,6 +97,12 @@
#define LIBELF_BYTEORDER ELFDATA2MSB
#define LIBELF_CLASS ELFCLASS32
+#elif defined(__riscv64)
+
+#define LIBELF_ARCH EM_RISCV
+#define LIBELF_BYTEORDER ELFDATA2LSB
+#define LIBELF_CLASS ELFCLASS64
+
#elif defined(__sparc__)
#define LIBELF_ARCH EM_SPARCV9
Modified: projects/clang380-import/contrib/ofed/librdmacm/examples/build/rping/Makefile
==============================================================================
--- projects/clang380-import/contrib/ofed/librdmacm/examples/build/rping/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/contrib/ofed/librdmacm/examples/build/rping/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -5,7 +5,8 @@
PROG= rping
MAN=
SRCS= rping.c
-LDADD+= -libverbs -lrdmacm -lpthread
-LDADD+= -lmlx4
+LIBADD+= ibverbs rdmacm pthread
+LIBADD+= mlx4
+LIBADD+= cxgb4
.include <bsd.prog.mk>
Modified: projects/clang380-import/etc/defaults/periodic.conf
==============================================================================
--- projects/clang380-import/etc/defaults/periodic.conf Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/etc/defaults/periodic.conf Tue Jan 26 07:49:11 2016 (r294777)
@@ -134,6 +134,11 @@ daily_status_mail_rejects_enable="YES"
daily_status_mail_rejects_logs=3 # How many logs to check
daily_status_mail_rejects_shorten="NO" # Shorten output
+# 480.leapfile-ntpd
+daily_ntpd_leapfile_enable="NO" # Fetch NTP leapfile
+daily_ntpd_avoid_congestion="YES" # Avoid congesting
+ # leapfile sources
+
# 480.status-ntpd
daily_status_ntpd_enable="NO" # Check NTP status
Modified: projects/clang380-import/etc/defaults/rc.conf
==============================================================================
--- projects/clang380-import/etc/defaults/rc.conf Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/etc/defaults/rc.conf Tue Jan 26 07:49:11 2016 (r294777)
@@ -362,6 +362,15 @@ ntpd_config="/etc/ntp.conf" # ntpd(8) co
ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if offset is high
ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
# Flags to ntpd (if enabled).
+ntp_src_leapfile="/etc/ntp/leap-seconds"
+ # Initial source for ntpd leapfile
+ntp_db_leapfile="/var/db/ntpd.leap-seconds.list"
+ # Working copy (updated weekly) leapfile
+ntp_leapfile_sources="https://www.ietf.org/timezones/data/leap-seconds.list"
+ # Source from which to fetch leapfile
+ntp_leapfile_expiry_days=30 # Check for new leapfile 30 days prior to
+ # expiry.
+ntp_leapfile_fetch_verbose="NO" # Be verbose during NTP leapfile fetch
# Network Information Services (NIS) options: All need rpcbind_enable="YES" ###
nis_client_enable="NO" # We're an NIS client (or NO).
Modified: projects/clang380-import/etc/ntp.conf
==============================================================================
--- projects/clang380-import/etc/ntp.conf Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/etc/ntp.conf Tue Jan 26 07:49:11 2016 (r294777)
@@ -81,4 +81,6 @@ restrict 127.127.1.0
# See http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14.
# for documentation regarding leapfile. Updates to the file can be obtained
# from ftp://time.nist.gov/pub/ or ftp://tycho.usno.navy.mil/pub/ntp/.
-leapfile "/etc/ntp/leap-seconds"
+# Use either leapfile in /etc/ntp or weekly updated leapfile in /var/db.
+#leapfile "/etc/ntp/leap-seconds"
+leapfile "/var/db/ntpd.leap-seconds.list"
Copied: projects/clang380-import/etc/periodic/daily/480.leapfile-ntpd (from r294776, head/etc/periodic/daily/480.leapfile-ntpd)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang380-import/etc/periodic/daily/480.leapfile-ntpd Tue Jan 26 07:49:11 2016 (r294777, copy of r294776, head/etc/periodic/daily/480.leapfile-ntpd)
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]
+then
+ . /etc/defaults/periodic.conf
+ source_periodic_confs
+fi
+
+case "$daily_ntpd_leapfile_enable" in
+ [Yy][Ee][Ss])
+ case "$daily_ntpd_avoid_congestion" in
+ [Yy][Ee][Ss])
+ # Avoid dogpiling
+ (sleep $(jot -r 1 0 86400); service ntpd fetch) &
+ ;;
+ *)
+ service ntpd fetch
+ ;;
+ esac
+ ;;
+esac
+
+exit $rc
Modified: projects/clang380-import/etc/periodic/daily/Makefile
==============================================================================
--- projects/clang380-import/etc/periodic/daily/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/etc/periodic/daily/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -35,7 +35,8 @@ FILES+= 130.clean-msgs
.endif
.if ${MK_NTP} != "no"
-FILES+= 480.status-ntpd
+FILES+= 480.status-ntpd \
+ 480.leapfile-ntpd
.endif
.if ${MK_RCMDS} != "no"
Modified: projects/clang380-import/etc/rc.d/jail
==============================================================================
--- projects/clang380-import/etc/rc.d/jail Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/etc/rc.d/jail Tue Jan 26 07:49:11 2016 (r294777)
@@ -32,7 +32,7 @@ need_dad_wait=
# Extract value from ${jail_$jv_$name} or ${jail_$name} and
# set it to $param. If not defined, $defval is used.
# When $num is [0-9]*, ${jail_$jv_$name$num} are looked up and
-# $param is set by using +=.
+# $param is set by using +=. $num=0 is optional (params may start at 1).
# When $num is YN or NY, the value is interpret as boolean.
extract_var()
{
@@ -72,7 +72,7 @@ extract_var()
eval _tmpargs=\"\${$_name1:-\${$_name2:-$_def}}\"
if [ -n "$_tmpargs" ]; then
echo " $_param += \"$_tmpargs\";"
- else
+ elif [ $i != 0 ]; then
break;
fi
i=$(($i + 1))
@@ -202,7 +202,7 @@ parse_options()
extract_var $_jv exec_poststop exec.poststop 0 ""
echo " exec.start += \"$_exec_start\";"
- extract_var $_jv exec_afterstart exec.start 1 ""
+ extract_var $_jv exec_afterstart exec.start 0 ""
echo " exec.stop = \"$_exec_stop\";"
extract_var $_jv consolelog exec.consolelog - \
Modified: projects/clang380-import/etc/rc.d/ntpd
==============================================================================
--- projects/clang380-import/etc/rc.d/ntpd Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/etc/rc.d/ntpd Tue Jan 26 07:49:11 2016 (r294777)
@@ -14,6 +14,8 @@ name="ntpd"
rcvar="ntpd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
+extra_commands="fetch"
+fetch_cmd="ntpd_fetch_leapfile"
start_precmd="ntpd_precmd"
load_rc_config $name
@@ -30,6 +32,10 @@ ntpd_precmd()
return 0;
fi
+ if [ ! -f $ntp_db_leapfile ]; then
+ ntpd_fetch_leapfile
+ fi
+
# If running in a chroot cage, ensure that the appropriate files
# exist inside the cage, as well as helper symlinks into the cage
# from outside.
@@ -44,10 +50,71 @@ ntpd_precmd()
( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" )
fi
ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift
+ ln -fs "${ntpd_chrootdir}${ntp_tmp_leapfile}" ${ntp_tmp_leapfile}
# Change run_rc_commands()'s internal copy of $ntpd_flags
#
rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"
}
+current_ntp_ts() {
+ # Seconds between 1900-01-01 and 1970-01-01
+ # echo $(((70*365+17)*86400))
+ ntp_to_unix=2208988800
+
+ echo $(($(date -u +%s)+$ntp_to_unix))
+}
+
+get_ntp_leapfile_ver() {
+ expr "$(awk '$1 == "#$" { print $2 }' "$1" 2>/dev/null)" : \
+ '^\([1-9][0-9]*\)$' \| 0
+}
+
+get_ntp_leapfile_expiry() {
+ expr "$(awk '$1 == "#@" { print $2 }' "$1" 2>/dev/null)" : \
+ '^\([1-9][0-9]*\)$' \| 0
+}
+
+ntpd_fetch_leapfile() {
+ local ntp_tmp_leapfile rc verbose
+
+ if checkyesno ntp_leapfile_fetch_verbose; then
+ verbose=echo
+ else
+ verbose=:
+ fi
+
+ ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list"
+
+ ntp_ver_no_src=$(get_ntp_leapfile_ver $ntp_src_leapfile)
+ ntp_ver_no_db=$(get_ntp_leapfile_ver $ntp_db_leapfile)
+ $verbose ntp_src_leapfile version is $ntp_ver_no_src
+ $verbose ntp_db_leapfile version is $ntp_ver_no_db
+
+ if [ "$ntp_ver_no_src" -gt "$ntp_ver_no_db" ]; then
+ $verbose replacing $ntp_db_leapfile with $ntp_src_leapfile
+ cp -p $ntp_src_leapfile $ntp_db_leapfile
+ ntp_ver_no_db=$ntp_ver_no_src
+ else
+ $verbose not replacing $ntp_db_leapfile with $ntp_src_leapfile
+ fi
+ ntp_leap_expiry=$(get_ntp_leapfile_expiry $ntp_db_leapfile)
+ ntp_leapfile_expiry_seconds=$((ntp_leapfile_expiry_days*86400))
+ ntp_leap_fetch_date=$((ntp_leap_expiry-ntp_leapfile_expiry_seconds))
+ if [ $(current_ntp_ts) -ge $ntp_leap_fetch_date ]; then
+ $verbose Within ntp leapfile expiry limit, initiating fetch
+ for url in $ntp_leapfile_sources ; do
+ $verbose fetching $url
+ fetch -mqo $ntp_tmp_leapfile $url && break
+ done
+ ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile)
+ if [ "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then
+ $verbose using $url as $ntp_db_leapfile
+ mv $ntp_tmp_leapfile $ntp_db_leapfile
+ else
+ $verbose using existing $ntp_db_leapfile
+ fi
+ fi
+}
+
run_rc_command "$1"
Modified: projects/clang380-import/gnu/lib/libreadline/readline/Makefile
==============================================================================
--- projects/clang380-import/gnu/lib/libreadline/readline/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/gnu/lib/libreadline/readline/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -2,7 +2,7 @@
LIB= readline
INTERNALLIB= yes
-NO_MAN= yes
+MAN=
TILDESRC= tilde.c
SRCS= readline.c vi_mode.c funmap.c keymaps.c parens.c search.c \
Modified: projects/clang380-import/lib/Makefile
==============================================================================
--- projects/clang380-import/lib/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/lib/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -264,7 +264,8 @@ _libproc= libproc
_librtld_db= librtld_db
.endif
-.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm"
+.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \
+ ${MACHINE_CPUARCH} == "riscv"
_libproc= libproc
_librtld_db= librtld_db
.endif
Modified: projects/clang380-import/lib/libc/Makefile
==============================================================================
--- projects/clang380-import/lib/libc/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/lib/libc/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -169,15 +169,15 @@ SUBDIR+= tests
.if !defined(_SKIP_BUILD)
# We need libutil.h, get it directly to avoid
# recording a build dependency
-CFLAGS+= -I${.CURDIR:H}/libutil
+CFLAGS+= -I${SRCTOP}/lib/libutil
# Same issue with libm
-MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${.CURDIR:H}/msun -V ARCH_SUBDIR
+MSUN_ARCH_SUBDIR != ${MAKE} -B -C ${SRCTOP}/lib/msun -V ARCH_SUBDIR
# unfortunately msun/src contains both private and public headers
-CFLAGS+= -I${.CURDIR:H}/msun/${MSUN_ARCH_SUBDIR}
+CFLAGS+= -I${SRCTOP}/lib/msun/${MSUN_ARCH_SUBDIR}
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+= -I${.CURDIR:H}/msun/x86
+CFLAGS+= -I${SRCTOP}/lib/msun/x86
.endif
-CFLAGS+= -I${.CURDIR:H}/msun/src
+CFLAGS+= -I${SRCTOP}/lib/msun/src
# and we do not want to record a dependency on msun
.if ${.MAKE.LEVEL} > 0
GENDIRDEPS_FILTER+= N${RELDIR:H}/msun
Modified: projects/clang380-import/lib/libc/gen/readpassphrase.c
==============================================================================
--- projects/clang380-import/lib/libc/gen/readpassphrase.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/lib/libc/gen/readpassphrase.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -46,7 +46,7 @@ char *
readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
{
ssize_t nr;
- int input, output, save_errno, i, need_restart;
+ int input, output, save_errno, i, need_restart, input_is_tty;
char ch, *p, *end;
struct termios term, oterm;
struct sigaction sa, savealrm, saveint, savehup, savequit, saveterm;
@@ -68,12 +68,20 @@ restart:
* Read and write to /dev/tty if available. If not, read from
* stdin and write to stderr unless a tty is required.
*/
- if ((flags & RPP_STDIN) ||
- (input = output = _open(_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) {
- if (flags & RPP_REQUIRE_TTY) {
- errno = ENOTTY;
- return(NULL);
+ input_is_tty = 0;
+ if (!(flags & RPP_STDIN)) {
+ input = output = _open(_PATH_TTY, O_RDWR | O_CLOEXEC);
+ if (input == -1) {
+ if (flags & RPP_REQUIRE_TTY) {
+ errno = ENOTTY;
+ return(NULL);
+ }
+ input = STDIN_FILENO;
+ output = STDERR_FILENO;
+ } else {
+ input_is_tty = 1;
}
+ } else {
input = STDIN_FILENO;
output = STDERR_FILENO;
}
@@ -83,7 +91,7 @@ restart:
* If we are using a tty but are not the foreground pgrp this will
* generate SIGTTOU, so do it *before* installing the signal handlers.
*/
- if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) {
+ if (input_is_tty && tcgetattr(input, &oterm) == 0) {
memcpy(&term, &oterm, sizeof(term));
if (!(flags & RPP_ECHO_ON))
term.c_lflag &= ~(ECHO | ECHONL);
@@ -152,7 +160,7 @@ restart:
(void)__libc_sigaction(SIGTSTP, &savetstp, NULL);
(void)__libc_sigaction(SIGTTIN, &savettin, NULL);
(void)__libc_sigaction(SIGTTOU, &savettou, NULL);
- if (input != STDIN_FILENO)
+ if (input_is_tty)
(void)_close(input);
/*
Modified: projects/clang380-import/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- projects/clang380-import/lib/libc/net/sctp_sys_calls.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/lib/libc/net/sctp_sys_calls.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -700,14 +700,19 @@ sctp_sendx(int sd, const void *msg, size
#ifdef SYS_sctp_generic_sendmsg
if (addrcnt == 1) {
socklen_t l;
+ ssize_t ret;
/*
* Quick way, we don't need to do a connectx so lets use the
* syscall directly.
*/
l = addrs->sa_len;
- return (syscall(SYS_sctp_generic_sendmsg, sd,
- msg, msg_len, addrs, l, sinfo, flags));
+ ret = syscall(SYS_sctp_generic_sendmsg, sd,
+ msg, msg_len, addrs, l, sinfo, flags);
+ if ((ret >= 0) && (sinfo != NULL)) {
+ sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs);
+ }
+ return (ret);
}
#endif
@@ -984,6 +989,7 @@ sctp_sendv(int sd,
struct sockaddr *addr;
struct sockaddr_in *addr_in;
struct sockaddr_in6 *addr_in6;
+ sctp_assoc_t *assoc_id;
if ((addrcnt < 0) ||
(iovcnt < 0) ||
@@ -1002,6 +1008,7 @@ sctp_sendv(int sd,
errno = ENOMEM;
return (-1);
}
+ assoc_id = NULL;
msg.msg_control = cmsgbuf;
msg.msg_controllen = 0;
cmsg = (struct cmsghdr *)cmsgbuf;
@@ -1025,6 +1032,7 @@ sctp_sendv(int sd,
memcpy(CMSG_DATA(cmsg), info, sizeof(struct sctp_sndinfo));
msg.msg_controllen += CMSG_SPACE(sizeof(struct sctp_sndinfo));
cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_sndinfo)));
+ assoc_id = &(((struct sctp_sndinfo *)info)->snd_assoc_id);
break;
case SCTP_SENDV_PRINFO:
if ((info == NULL) || (infolen < sizeof(struct sctp_prinfo))) {
@@ -1066,6 +1074,7 @@ sctp_sendv(int sd,
memcpy(CMSG_DATA(cmsg), &spa_info->sendv_sndinfo, sizeof(struct sctp_sndinfo));
msg.msg_controllen += CMSG_SPACE(sizeof(struct sctp_sndinfo));
cmsg = (struct cmsghdr *)((caddr_t)cmsg + CMSG_SPACE(sizeof(struct sctp_sndinfo)));
+ assoc_id = &(spa_info->sendv_sndinfo.snd_assoc_id);
}
if (spa_info->sendv_flags & SCTP_SEND_PRINFO_VALID) {
cmsg->cmsg_level = IPPROTO_SCTP;
@@ -1164,6 +1173,9 @@ sctp_sendv(int sd,
msg.msg_flags = 0;
ret = sendmsg(sd, &msg, flags);
free(cmsgbuf);
+ if ((ret >= 0) && (addrs != NULL) && (assoc_id != NULL)) {
+ *assoc_id = sctp_getassocid(sd, addrs);
+ }
return (ret);
}
Modified: projects/clang380-import/lib/libelftc/Makefile
==============================================================================
--- projects/clang380-import/lib/libelftc/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/lib/libelftc/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -25,6 +25,6 @@ SRCS= elftc_bfdtarget.c
INCS= libelftc.h
CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
-NO_MAN= yes
+MAN=
.include <bsd.lib.mk>
Modified: projects/clang380-import/lib/libproc/proc_bkpt.c
==============================================================================
--- projects/clang380-import/lib/libproc/proc_bkpt.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/lib/libproc/proc_bkpt.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -61,6 +61,9 @@ __FBSDID("$FreeBSD$");
#elif defined(__powerpc__)
#define BREAKPOINT_INSTR 0x7fe00008 /* trap */
#define BREAKPOINT_INSTR_SZ 4
+#elif defined(__riscv__)
+#define BREAKPOINT_INSTR 0x00100073 /* sbreak */
+#define BREAKPOINT_INSTR_SZ 4
#else
#error "Add support for your architecture"
#endif
Modified: projects/clang380-import/lib/libproc/proc_regs.c
==============================================================================
--- projects/clang380-import/lib/libproc/proc_regs.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/lib/libproc/proc_regs.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -66,6 +66,8 @@ proc_regget(struct proc_handle *phdl, pr
*regvalue = regs.r_regs[PC];
#elif defined(__powerpc__)
*regvalue = regs.pc;
+#elif defined(__riscv__)
+ *regvalue = regs.sepc;
#endif
break;
case REG_SP:
@@ -81,6 +83,8 @@ proc_regget(struct proc_handle *phdl, pr
*regvalue = regs.r_regs[SP];
#elif defined(__powerpc__)
*regvalue = regs.fixreg[1];
+#elif defined(__riscv__)
+ *regvalue = regs.sp;
#endif
break;
default:
@@ -117,6 +121,8 @@ proc_regset(struct proc_handle *phdl, pr
regs.r_regs[PC] = regvalue;
#elif defined(__powerpc__)
regs.pc = regvalue;
+#elif defined(__riscv__)
+ regs.sepc = regvalue;
#endif
break;
case REG_SP:
@@ -132,6 +138,8 @@ proc_regset(struct proc_handle *phdl, pr
regs.r_regs[PC] = regvalue;
#elif defined(__powerpc__)
regs.fixreg[1] = regvalue;
+#elif defined(__riscv__)
+ regs.sp = regvalue;
#endif
break;
default:
Modified: projects/clang380-import/libexec/rtld-elf/riscv/rtld_machdep.h
==============================================================================
--- projects/clang380-import/libexec/rtld-elf/riscv/rtld_machdep.h Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/libexec/rtld-elf/riscv/rtld_machdep.h Tue Jan 26 07:49:11 2016 (r294777)
@@ -108,4 +108,6 @@ extern void *__tls_get_addr(tls_index* t
#define RTLD_DEFAULT_STACK_PF_EXEC PF_X
#define RTLD_DEFAULT_STACK_EXEC PROT_EXEC
+#define md_abi_variant_hook(x)
+
#endif
Modified: projects/clang380-import/sbin/ifconfig/iflagg.c
==============================================================================
--- projects/clang380-import/sbin/ifconfig/iflagg.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/sbin/ifconfig/iflagg.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -100,6 +100,19 @@ setlaggflowidshift(const char *val, int
}
static void
+setlaggrr_limit(const char *val, int d, int s, const struct afswtch *afp)
+{
+ struct lagg_reqopts ro;
+
+ bzero(&ro, sizeof(ro));
+ strlcpy(ro.ro_ifname, name, sizeof(ro.ro_ifname));
+ ro.ro_bkt = (int)strtol(val, NULL, 10);
+
+ if (ioctl(s, SIOCSLAGGOPTS, &ro) != 0)
+ err(1, "SIOCSLAGG");
+}
+
+static void
setlaggsetopt(const char *val, int d, int s, const struct afswtch *afp)
{
struct lagg_reqopts ro;
@@ -252,6 +265,8 @@ lagg_status(int s)
printb("\t\tflags", ro.ro_opts, LAGG_OPT_BITS);
putchar('\n');
printf("\t\tflowid_shift: %d\n", ro.ro_flowid_shift);
+ if (ra.ra_proto == LAGG_PROTO_ROUNDROBIN)
+ printf("\t\trr_limit: %d\n", ro.ro_bkt);
printf("\tlagg statistics:\n");
printf("\t\tactive ports: %d\n", ro.ro_active);
printf("\t\tflapping: %u\n", ro.ro_flapping);
@@ -298,6 +313,7 @@ static struct cmd lagg_cmds[] = {
DEF_CMD("lacp_fast_timeout", LAGG_OPT_LACP_TIMEOUT, setlaggsetopt),
DEF_CMD("-lacp_fast_timeout", -LAGG_OPT_LACP_TIMEOUT, setlaggsetopt),
DEF_CMD_ARG("flowid_shift", setlaggflowidshift),
+ DEF_CMD_ARG("rr_limit", setlaggrr_limit),
};
static struct afswtch af_lagg = {
.af_name = "af_lagg",
Modified: projects/clang380-import/sbin/kldstat/Makefile
==============================================================================
--- projects/clang380-import/sbin/kldstat/Makefile Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/sbin/kldstat/Makefile Tue Jan 26 07:49:11 2016 (r294777)
@@ -29,4 +29,6 @@
PROG= kldstat
MAN= kldstat.8
+LIBADD= util
+
.include <bsd.prog.mk>
Modified: projects/clang380-import/sbin/kldstat/kldstat.8
==============================================================================
--- projects/clang380-import/sbin/kldstat/kldstat.8 Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/sbin/kldstat/kldstat.8 Tue Jan 26 07:49:11 2016 (r294777)
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 22, 2014
+.Dd January 19, 2016
.Dt KLDSTAT 8
.Os
.Sh NAME
@@ -33,6 +33,7 @@
.Nd display status of dynamic kernel linker
.Sh SYNOPSIS
.Nm
+.Op Fl h
.Op Fl q
.Op Fl v
.Op Fl i Ar id
@@ -48,6 +49,9 @@ kernel.
.Pp
The following options are available:
.Bl -tag -width indentXX
+.It Fl h
+Display the size field in a human-readable form, using unit suffixes
+instead of hex values.
.It Fl v
Be more verbose.
.It Fl i Ar id
Modified: projects/clang380-import/sbin/kldstat/kldstat.c
==============================================================================
--- projects/clang380-import/sbin/kldstat/kldstat.c Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/sbin/kldstat/kldstat.c Tue Jan 26 07:49:11 2016 (r294777)
@@ -28,6 +28,7 @@
__FBSDID("$FreeBSD$");
#include <err.h>
+#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -51,18 +52,27 @@ printmod(int modid)
}
static void
-printfile(int fileid, int verbose)
+printfile(int fileid, int verbose, int humanized)
{
struct kld_file_stat stat;
int modid;
+ char buf[5];
stat.version = sizeof(struct kld_file_stat);
- if (kldstat(fileid, &stat) < 0)
+ if (kldstat(fileid, &stat) < 0) {
err(1, "can't stat file id %d", fileid);
- else
- printf("%2d %4d %p %-8zx %s",
- stat.id, stat.refs, stat.address, stat.size,
- stat.name);
+ } else {
+ if (humanized) {
+ humanize_number(buf, sizeof(buf), stat.size,
+ "", HN_AUTOSCALE, HN_DECIMAL | HN_NOSPACE);
+
+ printf("%2d %4d %p %5s %s",
+ stat.id, stat.refs, stat.address, buf, stat.name);
+ } else {
+ printf("%2d %4d %p %-8zx %s",
+ stat.id, stat.refs, stat.address, stat.size, stat.name);
+ }
+ }
if (verbose) {
printf(" (%s)\n", stat.pathname);
@@ -78,7 +88,7 @@ printfile(int fileid, int verbose)
static void
usage(void)
{
- fprintf(stderr, "usage: kldstat [-q] [-v] [-i id] [-n filename]\n");
+ fprintf(stderr, "usage: kldstat [-h] [-q] [-v] [-i id] [-n filename]\n");
fprintf(stderr, " kldstat [-q] [-m modname]\n");
exit(1);
}
@@ -87,6 +97,7 @@ int
main(int argc, char** argv)
{
int c;
+ int humanized = 0;
int verbose = 0;
int fileid = 0;
int quiet = 0;
@@ -94,8 +105,11 @@ main(int argc, char** argv)
char* modname = NULL;
char* p;
- while ((c = getopt(argc, argv, "i:m:n:qv")) != -1)
+ while ((c = getopt(argc, argv, "hi:m:n:qv")) != -1)
switch (c) {
+ case 'h':
+ humanized = 1;
+ break;
case 'i':
fileid = (int)strtoul(optarg, &p, 10);
if (*p != '\0')
@@ -155,12 +169,15 @@ main(int argc, char** argv)
}
}
- printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' ');
+ if (humanized)
+ printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' ');
+ else
+ printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' ');
if (fileid != 0)
- printfile(fileid, verbose);
+ printfile(fileid, verbose, humanized);
else
for (fileid = kldnext(0); fileid > 0; fileid = kldnext(fileid))
- printfile(fileid, verbose);
+ printfile(fileid, verbose, humanized);
return 0;
}
Modified: projects/clang380-import/share/dtrace/watch_kill
==============================================================================
--- projects/clang380-import/share/dtrace/watch_kill Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/share/dtrace/watch_kill Tue Jan 26 07:49:11 2016 (r294777)
@@ -1,6 +1,6 @@
#!/usr/sbin/dtrace -s
/* -
- * Copyright (c) 2014-2015 Devin Teske <dteske at FreeBSD.org>
+ * Copyright (c) 2014-2016 Devin Teske <dteske at FreeBSD.org>
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Modified: projects/clang380-import/share/man/man4/lagg.4
==============================================================================
--- projects/clang380-import/share/man/man4/lagg.4 Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/share/man/man4/lagg.4 Tue Jan 26 07:49:11 2016 (r294777)
@@ -16,7 +16,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 6, 2015
+.Dd January 23, 2016
.Dt LAGG 4
.Os
.Sh NAME
@@ -110,6 +110,11 @@ available, the VLAN tag, and the IP sour
Distributes outgoing traffic using a round-robin scheduler
through all active ports and accepts incoming traffic from
any active port.
+Using
+.Ic roundrobin
+mode can cause unordered packet arrival at the client.
+Throughput might be limited as the client performs CPU-intensive packet
+reordering.
.It Ic broadcast
Sends frames to all ports of the LAG and receives frames on
any port of the LAG.
@@ -161,6 +166,19 @@ Gigabit Ethernet interfaces:
192.168.1.1 netmask 255.255.255.0
.Ed
.Pp
+Create a link aggregation using ROUNDROBIN with two
+.Xr bge 4
+Gigabit Ethernet interfaces and set the limit of 500 packets
+per interface:
+.Bd -literal -offset indent
+# ifconfig bge0 up
+# ifconfig bge1 up
+# ifconfig lagg0 create
+# ifconfig lagg0 laggproto roundrobin laggport bge0 laggport bge1 \e
+ 192.168.1.1 netmask 255.255.255.0
+# ifconfig lagg0 rr_limit 500
+.Ed
+.Pp
The following example uses an active failover interface to set up roaming
between wired and wireless networks using two network devices.
Whenever the wired master interface is unplugged, the wireless failover
Modified: projects/clang380-import/share/man/man5/ext2fs.5
==============================================================================
--- projects/clang380-import/share/man/man5/ext2fs.5 Tue Jan 26 07:44:26 2016 (r294776)
+++ projects/clang380-import/share/man/man5/ext2fs.5 Tue Jan 26 07:49:11 2016 (r294777)
@@ -26,12 +26,12 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 1, 2013
+.Dd January 23, 2016
.Dt EXT2FS 5
.Os
.Sh NAME
.Nm ext2fs
-.Nd "Ext2fs file system"
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list