svn commit: r311684 - in projects/clang400-import: . bin/chmod contrib/llvm/projects/libunwind/src contrib/ngatm/snmp_atm contrib/tcp_wrappers contrib/tcpdump crypto/openssh etc gnu/lib/libgcc gnu/...
Dimitry Andric
dim at FreeBSD.org
Sun Jan 8 14:36:22 UTC 2017
Author: dim
Date: Sun Jan 8 14:36:18 2017
New Revision: 311684
URL: https://svnweb.freebsd.org/changeset/base/311684
Log:
Merge ^/head r311546 through r311683.
Added:
projects/clang400-import/lib/libc/stdlib/cxa_thread_atexit_impl.c
- copied unchanged from r311683, head/lib/libc/stdlib/cxa_thread_atexit_impl.c
projects/clang400-import/sys/net80211/ieee80211_vht.c
- copied unchanged from r311683, head/sys/net80211/ieee80211_vht.c
projects/clang400-import/sys/net80211/ieee80211_vht.h
- copied unchanged from r311683, head/sys/net80211/ieee80211_vht.h
projects/clang400-import/usr.bin/cmp/tests/cmp_test2.sh
- copied unchanged from r311683, head/usr.bin/cmp/tests/cmp_test2.sh
Modified:
projects/clang400-import/Makefile.inc1
projects/clang400-import/Makefile.libcompat
projects/clang400-import/bin/chmod/chmod.1
projects/clang400-import/bin/chmod/chmod.c
projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S
projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S
projects/clang400-import/contrib/ngatm/snmp_atm/snmp_atm.c
projects/clang400-import/contrib/tcp_wrappers/tcpd.h
projects/clang400-import/contrib/tcpdump/print-tcp.c
projects/clang400-import/crypto/openssh/config.h
projects/clang400-import/etc/snmpd.config
projects/clang400-import/gnu/lib/libgcc/Makefile
projects/clang400-import/gnu/usr.bin/binutils/ld/Makefile.mips
projects/clang400-import/lib/lib80211/lib80211_regdomain.c
projects/clang400-import/lib/lib80211/lib80211_regdomain.h
projects/clang400-import/lib/libc/include/libc_private.h
projects/clang400-import/lib/libc/stdlib/Makefile.inc
projects/clang400-import/lib/libc/stdlib/Symbol.map
projects/clang400-import/lib/libc/stdlib/cxa_thread_atexit.c
projects/clang400-import/lib/libcam/scsi_cmdparse.c
projects/clang400-import/lib/libprocstat/cd9660.c
projects/clang400-import/lib/libstand/bootp.c
projects/clang400-import/lib/libsysdecode/mktables
projects/clang400-import/sbin/camcontrol/camcontrol.8
projects/clang400-import/sbin/camcontrol/camcontrol.c
projects/clang400-import/sbin/camcontrol/camcontrol.h
projects/clang400-import/sbin/camcontrol/modeedit.c
projects/clang400-import/sbin/ifconfig/ifieee80211.c
projects/clang400-import/sbin/md5/md5.1
projects/clang400-import/secure/usr.sbin/sshd/Makefile
projects/clang400-import/share/man/man5/src.conf.5
projects/clang400-import/share/misc/scsi_modes
projects/clang400-import/sys/cam/ctl/ctl.c
projects/clang400-import/sys/cam/scsi/scsi_all.c
projects/clang400-import/sys/cam/scsi/scsi_all.h
projects/clang400-import/sys/cam/scsi/scsi_ch.c
projects/clang400-import/sys/conf/files
projects/clang400-import/sys/contrib/dev/acpica/components/namespace/nsxfeval.c
projects/clang400-import/sys/contrib/dev/acpica/components/tables/tbxface.c
projects/clang400-import/sys/contrib/dev/acpica/include/acpixf.h
projects/clang400-import/sys/crypto/skein/amd64/skein_block_asm.s
projects/clang400-import/sys/dev/cxgbe/tom/t4_connect.c
projects/clang400-import/sys/dev/cxgbe/tom/t4_listen.c
projects/clang400-import/sys/dev/cxgbe/tom/t4_tom.c
projects/clang400-import/sys/dev/cxgbe/tom/t4_tom.h
projects/clang400-import/sys/dev/gpio/ofw_gpiobus.c
projects/clang400-import/sys/dev/kbd/kbd.c
projects/clang400-import/sys/dev/mmc/mmcreg.h
projects/clang400-import/sys/dev/sdhci/sdhci.c
projects/clang400-import/sys/dev/sdhci/sdhci.h
projects/clang400-import/sys/dev/sdhci/sdhci_if.m
projects/clang400-import/sys/dev/sfxge/common/ef10_tx.c
projects/clang400-import/sys/dev/sfxge/common/efx.h
projects/clang400-import/sys/dev/sfxge/common/efx_tx.c
projects/clang400-import/sys/dev/sfxge/common/hunt_nic.c
projects/clang400-import/sys/dev/sfxge/common/medford_nic.c
projects/clang400-import/sys/dev/sfxge/common/siena_nic.c
projects/clang400-import/sys/dev/sfxge/sfxge.h
projects/clang400-import/sys/dev/sfxge/sfxge_port.c
projects/clang400-import/sys/dev/sfxge/sfxge_tx.c
projects/clang400-import/sys/fs/cd9660/cd9660_lookup.c
projects/clang400-import/sys/fs/cd9660/cd9660_node.c
projects/clang400-import/sys/fs/cd9660/cd9660_node.h
projects/clang400-import/sys/fs/cd9660/cd9660_rrip.c
projects/clang400-import/sys/fs/cd9660/cd9660_vfsops.c
projects/clang400-import/sys/fs/cd9660/cd9660_vnops.c
projects/clang400-import/sys/fs/cd9660/iso.h
projects/clang400-import/sys/fs/cd9660/iso_rrip.h
projects/clang400-import/sys/kern/sys_socket.c
projects/clang400-import/sys/kern/uipc_socket.c
projects/clang400-import/sys/mips/conf/MALTA64
projects/clang400-import/sys/modules/wlan/Makefile
projects/clang400-import/sys/net80211/ieee80211.c
projects/clang400-import/sys/net80211/ieee80211.h
projects/clang400-import/sys/net80211/ieee80211_ioctl.c
projects/clang400-import/sys/net80211/ieee80211_ioctl.h
projects/clang400-import/sys/net80211/ieee80211_node.h
projects/clang400-import/sys/net80211/ieee80211_proto.h
projects/clang400-import/sys/net80211/ieee80211_scan.c
projects/clang400-import/sys/net80211/ieee80211_scan.h
projects/clang400-import/sys/net80211/ieee80211_var.h
projects/clang400-import/sys/netipsec/ipsec.c
projects/clang400-import/sys/sys/socket.h
projects/clang400-import/sys/sys/unistd.h
projects/clang400-import/tools/build/mk/OptionalObsoleteFiles.inc
projects/clang400-import/tools/build/options/WITHOUT_USB_GADGET_EXAMPLES
projects/clang400-import/usr.bin/clang/llvm-ar/Makefile
projects/clang400-import/usr.bin/cmp/special.c
projects/clang400-import/usr.bin/cmp/tests/Makefile
projects/clang400-import/usr.bin/users/users.cc
projects/clang400-import/usr.sbin/chown/chgrp.1
projects/clang400-import/usr.sbin/chown/chown.8
projects/clang400-import/usr.sbin/chown/chown.c
Directory Properties:
projects/clang400-import/ (props changed)
projects/clang400-import/contrib/llvm/ (props changed)
projects/clang400-import/contrib/llvm/projects/libunwind/ (props changed)
projects/clang400-import/contrib/tcpdump/ (props changed)
projects/clang400-import/crypto/openssh/ (props changed)
projects/clang400-import/gnu/lib/ (props changed)
projects/clang400-import/gnu/usr.bin/binutils/ (props changed)
projects/clang400-import/sys/contrib/dev/acpica/ (props changed)
Modified: projects/clang400-import/Makefile.inc1
==============================================================================
--- projects/clang400-import/Makefile.inc1 Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/Makefile.inc1 Sun Jan 8 14:36:18 2017 (r311684)
@@ -606,7 +606,7 @@ XCFLAGS+= ${BFLAGS}
.endif
.if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
- ${TARGET_ARCH} == "powerpc64")
+ ${TARGET_ARCH} == "powerpc64") || ${TARGET_ARCH:Mmips64*} != ""
LIBCOMPAT= 32
.include "Makefile.libcompat"
.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6"
Modified: projects/clang400-import/Makefile.libcompat
==============================================================================
--- projects/clang400-import/Makefile.libcompat Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/Makefile.libcompat Sun Jan 8 14:36:18 2017 (r311684)
@@ -4,8 +4,7 @@
__<${_this:T}>__:
# Makefile for the compatibility libraries.
-# - 32-bit compat libraries on PowerPC and AMD64.
-# could also be for mips, but that doesn't work today.
+# - 32-bit compat libraries on MIPS, PowerPC, and AMD64.
# -------------------------------------------------------------------
# 32 bit world
@@ -15,6 +14,7 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse -
.else
LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
.endif
+LIB32CPUFLAGS+= -m32
LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \
MACHINE_CPU="i686 mmx sse sse2"
LIB32WMAKEFLAGS= \
@@ -28,14 +28,30 @@ LIB32CPUFLAGS= -mcpu=powerpc
.else
LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE}
.endif
+LIB32CPUFLAGS+= -m32
LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc
LIB32WMAKEFLAGS= \
LD="${XLD} -m elf32ppc_fbsd" \
OBJCOPY="${XOBJCOPY}"
+
+.elif ${TARGET_ARCH:Mmips64*} != ""
+.if empty(TARGET_CPUTYPE)
+LIB32CPUFLAGS= -march=mips3
+.else
+LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
+.endif
+LIB32CPUFLAGS+= -mabi=32
+LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips
+.if ${TARGET_ARCH:Mmips64el*} != ""
+LIB32WMAKEFLAGS= LD="${XLD} -m elf32ltsmip_fbsd"
+.else
+LIB32WMAKEFLAGS= LD="${XLD} -m elf32btsmip_fbsd"
+.endif
+LIB32WMAKEFLAGS+= OBJCOPY="${XOBJCOPY}"
.endif
-LIB32CFLAGS= -m32 -DCOMPAT_32BIT
+LIB32CFLAGS= -DCOMPAT_32BIT
LIB32DTRACE= ${DTRACE} -32
LIB32WMAKEFLAGS+= -DCOMPAT_32BIT
Modified: projects/clang400-import/bin/chmod/chmod.1
==============================================================================
--- projects/clang400-import/bin/chmod/chmod.1 Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/bin/chmod/chmod.1 Sun Jan 8 14:36:18 2017 (r311684)
@@ -32,7 +32,7 @@
.\" @(#)chmod.1 8.4 (Berkeley) 3/31/94
.\" $FreeBSD$
.\"
-.Dd April 20, 2015
+.Dd January 7, 2017
.Dt CHMOD 1
.Os
.Sh NAME
@@ -106,6 +106,16 @@ option is specified.
In addition, these options override each other and the
command's actions are determined by the last one specified.
.Pp
+If
+.Nm
+receives a
+.Dv SIGINFO
+signal (see the
+.Cm status
+argument for
+.Xr stty 1 ) ,
+then the current filename as well as the old and new modes are displayed.
+.Pp
Only the owner of a file or the super-user is permitted to change
the mode of a file.
.Sh EXIT STATUS
Modified: projects/clang400-import/bin/chmod/chmod.c
==============================================================================
--- projects/clang400-import/bin/chmod/chmod.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/bin/chmod/chmod.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -49,14 +49,24 @@ __FBSDID("$FreeBSD$");
#include <fcntl.h>
#include <fts.h>
#include <limits.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+static volatile sig_atomic_t siginfo;
+
static void usage(void);
static int may_have_nfs4acl(const FTSENT *ent, int hflag);
+static void
+siginfo_handler(int sig __unused)
+{
+
+ siginfo = 1;
+}
+
int
main(int argc, char *argv[])
{
@@ -125,6 +135,8 @@ done: argv += optind;
if (argc < 2)
usage();
+ (void)signal(SIGINFO, siginfo_handler);
+
if (Rflag) {
if (hflag)
errx(1, "the -R and -h options may not be "
@@ -192,10 +204,10 @@ done: argv += optind;
&& !fflag) {
warn("%s", p->fts_path);
rval = 1;
- } else if (vflag) {
+ } else if (vflag || siginfo) {
(void)printf("%s", p->fts_path);
- if (vflag > 1) {
+ if (vflag > 1 || siginfo) {
char m1[12], m2[12];
strmode(p->fts_statp->st_mode, m1);
@@ -207,6 +219,7 @@ done: argv += optind;
newmode, m2);
}
(void)printf("\n");
+ siginfo = 0;
}
}
if (errno)
Modified: projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S
==============================================================================
--- projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S Sun Jan 8 14:36:18 2017 (r311684)
@@ -527,3 +527,5 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9li
ret // jump to ra
#endif
+
+ .section .note.GNU-stack,"", at progbits
Modified: projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S
==============================================================================
--- projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S Sun Jan 8 14:36:18 2017 (r311684)
@@ -469,3 +469,5 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext
/* RISCVTODO */
#endif
+
+ .section .note.GNU-stack,"", at progbits
Modified: projects/clang400-import/contrib/ngatm/snmp_atm/snmp_atm.c
==============================================================================
--- projects/clang400-import/contrib/ngatm/snmp_atm/snmp_atm.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/contrib/ngatm/snmp_atm/snmp_atm.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -170,7 +170,7 @@ atmif_check_carrier(struct atmif_priv *a
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
- if (!ifmr.ifm_status & IFM_AVALID) {
+ if (!(ifmr.ifm_status & IFM_AVALID)) {
aif->pub.carrier = ATMIF_CARRIER_UNKNOWN;
return;
}
Modified: projects/clang400-import/contrib/tcp_wrappers/tcpd.h
==============================================================================
--- projects/clang400-import/contrib/tcp_wrappers/tcpd.h Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/contrib/tcp_wrappers/tcpd.h Sun Jan 8 14:36:18 2017 (r311684)
@@ -12,6 +12,11 @@
#define TCPD_SOCKADDR struct sockaddr_in
#endif
+#ifndef _STDFILE_DECLARED
+#define _STDFILE_DECLARED
+typedef struct __sFILE FILE;
+#endif
+
/* Structure to describe one communications endpoint. */
#define STRING_LENGTH 128 /* hosts, users, processes */
Modified: projects/clang400-import/contrib/tcpdump/print-tcp.c
==============================================================================
--- projects/clang400-import/contrib/tcpdump/print-tcp.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/contrib/tcpdump/print-tcp.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -253,7 +253,7 @@ tcp_print(netdissect_options *ndo,
if (ip6) {
register struct tcp_seq_hash6 *th;
struct tcp_seq_hash6 *tcp_seq_hash;
- const struct in6_addr *src, *dst;
+ const void *src, *dst;
struct tha6 tha;
tcp_seq_hash = tcp_seq_hash6;
@@ -309,7 +309,7 @@ tcp_print(netdissect_options *ndo,
#endif /*INET6*/
register struct tcp_seq_hash *th;
struct tcp_seq_hash *tcp_seq_hash;
- const struct in_addr *src, *dst;
+ const void *src, *dst;
struct tha tha;
tcp_seq_hash = tcp_seq_hash4;
Modified: projects/clang400-import/crypto/openssh/config.h
==============================================================================
--- projects/clang400-import/crypto/openssh/config.h Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/crypto/openssh/config.h Sun Jan 8 14:36:18 2017 (r311684)
@@ -1408,7 +1408,7 @@
/* #undef LASTLOG_WRITE_PUTUTXLINE */
/* Define if you want TCP Wrappers support */
-#define LIBWRAP 1
+/* #undef LIBWRAP */
/* Define to whatever link() returns for "not supported" if it doesn't return
EOPNOTSUPP. */
Modified: projects/clang400-import/etc/snmpd.config
==============================================================================
--- projects/clang400-import/etc/snmpd.config Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/etc/snmpd.config Sun Jan 8 14:36:18 2017 (r311684)
@@ -122,6 +122,14 @@ snmpEnableAuthenTraps = 2
# order to use the enclosed variables, e.g. `usmUserStatus.$(engine).$(user1)`
# can only be used if %usm is uncommented.
#
+# Modules are loaded in the order listed, so they must be before any
+# dependent modules, e.g. "mibII" vs "bridge".
+#
+
+#
+# MIB-2 module
+#
+begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so"
#
# Bridge module
@@ -141,11 +149,6 @@ snmpEnableAuthenTraps = 2
#begemotSnmpdModulePath."lm75" = "/usr/lib/snmp_lm75.so"
#
-# MIB-2 module
-#
-begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so"
-
-#
# Netgraph module
#
#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"
Modified: projects/clang400-import/gnu/lib/libgcc/Makefile
==============================================================================
--- projects/clang400-import/gnu/lib/libgcc/Makefile Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/gnu/lib/libgcc/Makefile Sun Jan 8 14:36:18 2017 (r311684)
@@ -133,7 +133,8 @@ LIBADD+= compiler_rt
.if ${TARGET_CPUARCH} == mips
LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c
# ABIs other than o32 need this
-.if ${TARGET_ARCH:Mmips64*} != "" || ${TARGET_ARCH:Mmipsn32*} != ""
+.if (${TARGET_ARCH:Mmips64*} != "" || ${TARGET_ARCH:Mmipsn32*} != "") && \
+ !defined(COMPAT_32BIT)
LIB2FUNCS_EXTRA+= floatdidf.c fixunsdfsi.c
LIB2FUNCS_EXTRA+= floatdisf.c floatundidf.c
LIB2FUNCS_EXTRA+= fixsfdi.c floatundisf.c
Modified: projects/clang400-import/gnu/usr.bin/binutils/ld/Makefile.mips
==============================================================================
--- projects/clang400-import/gnu/usr.bin/binutils/ld/Makefile.mips Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/gnu/usr.bin/binutils/ld/Makefile.mips Sun Jan 8 14:36:18 2017 (r311684)
@@ -8,6 +8,7 @@ _EMULATION_ENDIAN=b
.if ${TARGET_ARCH:Mmips64*} != ""
NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd
+LIBSEARCHPATH.elf32${_EMULATION_ENDIAN}tsmip_fbsd=\"=/usr/lib32\"
.elif ${TARGET_ARCH:Mmipsn32*} != ""
NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
.else
Modified: projects/clang400-import/lib/lib80211/lib80211_regdomain.c
==============================================================================
--- projects/clang400-import/lib/lib80211/lib80211_regdomain.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/lib80211/lib80211_regdomain.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -123,6 +123,10 @@ start_element(void *data, const char *na
mt->curband = &mt->rd->bands_11ng;
else if (iseq(mode, "11na"))
mt->curband = &mt->rd->bands_11na;
+ else if (iseq(mode, "11ac"))
+ mt->curband = &mt->rd->bands_11ac;
+ else if (iseq(mode, "11acg"))
+ mt->curband = &mt->rd->bands_11acg;
else
warnx("unknown mode \"%s\" at line %ld",
__DECONST(char *, mode),
@@ -184,6 +188,14 @@ decode_flag(struct mystate *mt, const ch
FLAG(IEEE80211_CHAN_G),
FLAG(IEEE80211_CHAN_HT20),
FLAG(IEEE80211_CHAN_HT40),
+ FLAG(IEEE80211_CHAN_VHT20),
+ FLAG(IEEE80211_CHAN_VHT40),
+ FLAG(IEEE80211_CHAN_VHT80),
+ /*
+ * XXX VHT80_80? This likely should be done by
+ * 80MHz chan logic in net80211 / ifconfig.
+ */
+ FLAG(IEEE80211_CHAN_VHT160),
FLAG(IEEE80211_CHAN_ST),
FLAG(IEEE80211_CHAN_TURBO),
FLAG(IEEE80211_CHAN_PASSIVE),
@@ -515,6 +527,24 @@ lib80211_regdomain_readconfig(struct reg
}
nb->band = id;
}
+ LIST_FOREACH(nb, &dp->bands_11ac, next) {
+ id = findid(rdp, nb->band, FREQBAND);
+ if (id == NULL) {
+ warnx("undefined 11ac band \"%s\"",
+ __DECONST(char *, nb->band));
+ errors++;
+ }
+ nb->band = id;
+ }
+ LIST_FOREACH(nb, &dp->bands_11acg, next) {
+ id = findid(rdp, nb->band, FREQBAND);
+ if (id == NULL) {
+ warnx("undefined 11acg band \"%s\"",
+ __DECONST(char *, nb->band));
+ errors++;
+ }
+ nb->band = id;
+ }
}
LIST_FOREACH(cp, &rdp->countries, next) {
id = cp->rd;
@@ -562,6 +592,8 @@ lib80211_regdomain_cleanup(struct regdat
cleanup_bands(&dp->bands_11a);
cleanup_bands(&dp->bands_11ng);
cleanup_bands(&dp->bands_11na);
+ cleanup_bands(&dp->bands_11ac);
+ cleanup_bands(&dp->bands_11acg);
if (dp->name != NULL)
free(__DECONST(char *, dp->name));
}
Modified: projects/clang400-import/lib/lib80211/lib80211_regdomain.h
==============================================================================
--- projects/clang400-import/lib/lib80211/lib80211_regdomain.h Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/lib80211/lib80211_regdomain.h Sun Jan 8 14:36:18 2017 (r311684)
@@ -75,6 +75,8 @@ struct regdomain {
netband_head bands_11a; /* 11a operation */
netband_head bands_11ng;/* 11ng operation */
netband_head bands_11na;/* 11na operation */
+ netband_head bands_11ac;/* 11ac 5GHz operation */
+ netband_head bands_11acg;/* 11ac 2GHz operation */
LIST_ENTRY(regdomain) next;
};
Modified: projects/clang400-import/lib/libc/include/libc_private.h
==============================================================================
--- projects/clang400-import/lib/libc/include/libc_private.h Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libc/include/libc_private.h Sun Jan 8 14:36:18 2017 (r311684)
@@ -272,6 +272,8 @@ void _malloc_thread_cleanup(void);
* thread is exiting, so its thread-local dtors should be called.
*/
void __cxa_thread_call_dtors(void);
+int __cxa_thread_atexit_hidden(void (*dtor_func)(void *), void *obj,
+ void *dso_symbol) __hidden;
/*
* These functions are used by the threading libraries in order to protect
Modified: projects/clang400-import/lib/libc/stdlib/Makefile.inc
==============================================================================
--- projects/clang400-import/lib/libc/stdlib/Makefile.inc Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libc/stdlib/Makefile.inc Sun Jan 8 14:36:18 2017 (r311684)
@@ -5,7 +5,9 @@
.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib
MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \
- bsearch.c cxa_thread_atexit.c div.c exit.c getenv.c getopt.c getopt_long.c \
+ bsearch.c \
+ cxa_thread_atexit.c cxa_thread_atexit_impl.c \
+ div.c exit.c getenv.c getopt.c getopt_long.c \
getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \
hsearch_r.c imaxabs.c imaxdiv.c \
insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \
Modified: projects/clang400-import/lib/libc/stdlib/Symbol.map
==============================================================================
--- projects/clang400-import/lib/libc/stdlib/Symbol.map Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libc/stdlib/Symbol.map Sun Jan 8 14:36:18 2017 (r311684)
@@ -118,6 +118,7 @@ FBSD_1.4 {
FBSD_1.5 {
__cxa_thread_atexit;
+ __cxa_thread_atexit_impl;
};
FBSDprivate_1.0 {
Modified: projects/clang400-import/lib/libc/stdlib/cxa_thread_atexit.c
==============================================================================
--- projects/clang400-import/lib/libc/stdlib/cxa_thread_atexit.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libc/stdlib/cxa_thread_atexit.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -1,7 +1,10 @@
/*-
- * Copyright (c) 2016 Mahdi Mokhtari <mokhi64 at gmail.com>
+ * Copyright (c) 2017 The FreeBSD Foundation
* All rights reserved.
*
+ * Portions of this software were developed by Konstantin Belousov
+ * under sponsorship from the FreeBSD Foundation.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -27,114 +30,11 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/queue.h>
-#include "namespace.h"
-#include <errno.h>
-#include <link.h>
-#include <pthread.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include "un-namespace.h"
#include "libc_private.h"
-/*
- * C++11 introduces the thread_local scope (like __thread with some
- * additions). As a key-feature it should support non-trivial
- * destructors, registered with __cxa_thread_atexit() to be executed
- * at the thread termination.
- *
- * The implemention keeps a _Thread_local list of destructors per each
- * thread, and calls __cxa_thread_call_dtors() on each thread's exit
- * to do cleanup. For a thread calling exit(3), in particular, for
- * the initial thread returning from main(), we call
- * __cxa_thread_call_dtors() inside exit().
- *
- * It could be possible that a dynamically loaded library, use
- * thread_local variable but is dlclose()'d before thread exit. The
- * destructor of this variable will then try to access the address,
- * for calling it but it's unloaded, so it'll crash. We're using
- * __elf_phdr_match_addr() to detect and prevent such cases and so
- * prevent the crash.
- */
-
-#define CXA_DTORS_ITERATIONS 4
-
-struct cxa_thread_dtor {
- void *obj;
- void (*func)(void *);
- void *dso;
- LIST_ENTRY(cxa_thread_dtor) entry;
-};
-static _Thread_local LIST_HEAD(dtor_list, cxa_thread_dtor) dtors =
- LIST_HEAD_INITIALIZER(dtors);
-
int
__cxa_thread_atexit(void (*dtor_func)(void *), void *obj, void *dso_symbol)
{
- struct cxa_thread_dtor *new_dtor;
-
- new_dtor = malloc(sizeof(*new_dtor));
- if (new_dtor == NULL) {
- errno = ENOMEM; /* forcibly override malloc(3) error */
- return (-1);
- }
-
- new_dtor->obj = obj;
- new_dtor->func = dtor_func;
- new_dtor->dso = dso_symbol;
- LIST_INSERT_HEAD(&dtors, new_dtor, entry);
- return (0);
-}
-
-static void
-walk_cb_call(struct cxa_thread_dtor *dtor)
-{
- struct dl_phdr_info phdr_info;
-
- if (_rtld_addr_phdr(dtor->dso, &phdr_info) &&
- __elf_phdr_match_addr(&phdr_info, dtor->func))
- dtor->func(dtor->obj);
- else
- fprintf(stderr, "__cxa_thread_call_dtors: dtr %p from "
- "unloaded dso, skipping\n", (void *)(dtor->func));
-}
-
-static void
-walk_cb_nocall(struct cxa_thread_dtor *dtor __unused)
-{
-}
-
-static void
-cxa_thread_walk(void (*cb)(struct cxa_thread_dtor *))
-{
- struct cxa_thread_dtor *dtor, *tdtor;
-
- LIST_FOREACH_SAFE(dtor, &dtors, entry, tdtor) {
- LIST_REMOVE(dtor, entry);
- cb(dtor);
- free(dtor);
- }
-}
-
-/*
- * This is the callback function we use to call destructors, once for
- * each thread. It is called in exit(3) in libc/stdlib/exit.c and
- * before exit_thread() in libthr/thread/thr_exit.c.
- */
-void
-__cxa_thread_call_dtors(void)
-{
- int i;
-
- for (i = 0; i < CXA_DTORS_ITERATIONS && !LIST_EMPTY(&dtors); i++)
- cxa_thread_walk(walk_cb_call);
- if (!LIST_EMPTY(&dtors)) {
- fprintf(stderr, "Thread %p is exiting with more "
- "thread-specific dtors created after %d iterations "
- "of destructor calls\n",
- _pthread_self(), i);
- cxa_thread_walk(walk_cb_nocall);
- }
+ return (__cxa_thread_atexit_hidden(dtor_func, obj, dso_symbol));
}
Copied: projects/clang400-import/lib/libc/stdlib/cxa_thread_atexit_impl.c (from r311683, head/lib/libc/stdlib/cxa_thread_atexit_impl.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/clang400-import/lib/libc/stdlib/cxa_thread_atexit_impl.c Sun Jan 8 14:36:18 2017 (r311684, copy of r311683, head/lib/libc/stdlib/cxa_thread_atexit_impl.c)
@@ -0,0 +1,153 @@
+/*-
+ * Copyright (c) 2016 Mahdi Mokhtari <mokhi64 at gmail.com>
+ * Copyright (c) 2016, 2017 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Konstantin Belousov
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/queue.h>
+#include "namespace.h"
+#include <errno.h>
+#include <link.h>
+#include <pthread.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "un-namespace.h"
+#include "libc_private.h"
+
+/*
+ * C++11 introduces the thread_local scope (like __thread with some
+ * additions). As a key-feature it should support non-trivial
+ * destructors, registered with __cxa_thread_atexit() to be executed
+ * at the thread termination.
+ *
+ * The implemention keeps a _Thread_local list of destructors per each
+ * thread, and calls __cxa_thread_call_dtors() on each thread's exit
+ * to do cleanup. For a thread calling exit(3), in particular, for
+ * the initial thread returning from main(), we call
+ * __cxa_thread_call_dtors() inside exit().
+ *
+ * It could be possible that a dynamically loaded library, use
+ * thread_local variable but is dlclose()'d before thread exit. The
+ * destructor of this variable will then try to access the address,
+ * for calling it but it's unloaded, so it'll crash. We're using
+ * __elf_phdr_match_addr() to detect and prevent such cases and so
+ * prevent the crash.
+ */
+
+#define CXA_DTORS_ITERATIONS 4
+
+struct cxa_thread_dtor {
+ void *obj;
+ void (*func)(void *);
+ void *dso;
+ LIST_ENTRY(cxa_thread_dtor) entry;
+};
+static _Thread_local LIST_HEAD(dtor_list, cxa_thread_dtor) dtors =
+ LIST_HEAD_INITIALIZER(dtors);
+
+int
+__cxa_thread_atexit_impl(void (*dtor_func)(void *), void *obj,
+ void *dso_symbol)
+{
+
+ return (__cxa_thread_atexit_hidden(dtor_func, obj, dso_symbol));
+}
+
+int
+__cxa_thread_atexit_hidden(void (*dtor_func)(void *), void *obj,
+ void *dso_symbol)
+{
+ struct cxa_thread_dtor *new_dtor;
+
+ new_dtor = malloc(sizeof(*new_dtor));
+ if (new_dtor == NULL) {
+ errno = ENOMEM; /* forcibly override malloc(3) error */
+ return (-1);
+ }
+
+ new_dtor->obj = obj;
+ new_dtor->func = dtor_func;
+ new_dtor->dso = dso_symbol;
+ LIST_INSERT_HEAD(&dtors, new_dtor, entry);
+ return (0);
+}
+
+static void
+walk_cb_call(struct cxa_thread_dtor *dtor)
+{
+ struct dl_phdr_info phdr_info;
+
+ if (_rtld_addr_phdr(dtor->dso, &phdr_info) &&
+ __elf_phdr_match_addr(&phdr_info, dtor->func))
+ dtor->func(dtor->obj);
+ else
+ fprintf(stderr, "__cxa_thread_call_dtors: dtr %p from "
+ "unloaded dso, skipping\n", (void *)(dtor->func));
+}
+
+static void
+walk_cb_nocall(struct cxa_thread_dtor *dtor __unused)
+{
+}
+
+static void
+cxa_thread_walk(void (*cb)(struct cxa_thread_dtor *))
+{
+ struct cxa_thread_dtor *dtor, *tdtor;
+
+ LIST_FOREACH_SAFE(dtor, &dtors, entry, tdtor) {
+ LIST_REMOVE(dtor, entry);
+ cb(dtor);
+ free(dtor);
+ }
+}
+
+/*
+ * This is the callback function we use to call destructors, once for
+ * each thread. It is called in exit(3) in libc/stdlib/exit.c and
+ * before exit_thread() in libthr/thread/thr_exit.c.
+ */
+void
+__cxa_thread_call_dtors(void)
+{
+ int i;
+
+ for (i = 0; i < CXA_DTORS_ITERATIONS && !LIST_EMPTY(&dtors); i++)
+ cxa_thread_walk(walk_cb_call);
+
+ if (!LIST_EMPTY(&dtors)) {
+ fprintf(stderr, "Thread %p is exiting with more "
+ "thread-specific dtors created after %d iterations "
+ "of destructor calls\n",
+ _pthread_self(), i);
+ cxa_thread_walk(walk_cb_nocall);
+ }
+}
Modified: projects/clang400-import/lib/libcam/scsi_cmdparse.c
==============================================================================
--- projects/clang400-import/lib/libcam/scsi_cmdparse.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libcam/scsi_cmdparse.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -100,10 +100,11 @@ __FBSDID("$FreeBSD$");
*/
static int
-do_buff_decode(u_int8_t *databuf, size_t len,
+do_buff_decode(u_int8_t *buff, size_t len,
void (*arg_put)(void *, int , void *, int, char *),
void *puthook, const char *fmt, va_list *ap)
{
+ int ind = 0;
int assigned = 0;
int width;
int suppress;
@@ -112,21 +113,17 @@ do_buff_decode(u_int8_t *databuf, size_t
static u_char mask[] = {0, 0x01, 0x03, 0x07, 0x0f,
0x1f, 0x3f, 0x7f, 0xff};
int value;
- u_char *base = databuf;
char *intendp;
char letter;
char field_name[80];
-# define ARG_PUT(ARG) \
- do \
- { \
- if (!suppress) \
- { \
+#define ARG_PUT(ARG) \
+ do { \
+ if (!suppress) { \
if (arg_put) \
- (*arg_put)(puthook, (letter == 't' ? \
- 'b' : letter), \
- (void *)((long)(ARG)), width, \
- field_name); \
+ (*arg_put)(puthook, (letter == 't' ? 'b' : \
+ letter), (void *)((long)(ARG)), width, \
+ field_name); \
else \
*(va_arg(*ap, int *)) = (ARG); \
assigned++; \
@@ -187,7 +184,11 @@ do_buff_decode(u_int8_t *databuf, size_t
done = 1;
else {
if (shift <= 0) {
- bits = *databuf++;
+ if (ind >= len) {
+ done = 1;
+ break;
+ }
+ bits = buff[ind++];
shift = 8;
}
value = (bits >> (shift - width)) &
@@ -209,29 +210,31 @@ do_buff_decode(u_int8_t *databuf, size_t
fmt++;
width = strtol(fmt, &intendp, 10);
fmt = intendp;
+ if (ind + width > len) {
+ done = 1;
+ break;
+ }
switch(width) {
case 1:
- ARG_PUT(*databuf);
- databuf++;
+ ARG_PUT(buff[ind]);
+ ind++;
break;
case 2:
- ARG_PUT((*databuf) << 8 | *(databuf + 1));
- databuf += 2;
+ ARG_PUT(buff[ind] << 8 | buff[ind + 1]);
+ ind += 2;
break;
case 3:
- ARG_PUT((*databuf) << 16 |
- (*(databuf + 1)) << 8 | *(databuf + 2));
- databuf += 3;
+ ARG_PUT(buff[ind] << 16 |
+ buff[ind + 1] << 8 | buff[ind + 2]);
+ ind += 3;
break;
case 4:
- ARG_PUT((*databuf) << 24 |
- (*(databuf + 1)) << 16 |
- (*(databuf + 2)) << 8 |
- *(databuf + 3));
- databuf += 4;
+ ARG_PUT(buff[ind] << 24 | buff[ind + 1] << 16 |
+ buff[ind + 2] << 8 | buff[ind + 3]);
+ ind += 4;
break;
default:
@@ -242,32 +245,35 @@ do_buff_decode(u_int8_t *databuf, size_t
break;
case 'c': /* Characters (i.e., not swapped) */
- case 'z': /* Characters with zeroed trailing
- spaces */
+ case 'z': /* Characters with zeroed trailing spaces */
shift = 0;
fmt++;
width = strtol(fmt, &intendp, 10);
fmt = intendp;
+ if (ind + width > len) {
+ done = 1;
+ break;
+ }
if (!suppress) {
if (arg_put)
(*arg_put)(puthook,
- (letter == 't' ? 'b' : letter),
- databuf, width, field_name);
+ (letter == 't' ? 'b' : letter),
+ &buff[ind], width, field_name);
else {
char *dest;
dest = va_arg(*ap, char *);
- bcopy(databuf, dest, width);
+ bcopy(&buff[ind], dest, width);
if (letter == 'z') {
char *p;
for (p = dest + width - 1;
- (p >= (char *)dest)
- && (*p == ' '); p--)
+ p >= dest && *p == ' ';
+ p--)
*p = 0;
}
}
assigned++;
}
- databuf += width;
+ ind += width;
field_name[0] = 0;
suppress = 0;
break;
@@ -295,9 +301,9 @@ do_buff_decode(u_int8_t *databuf, size_t
}
if (plus)
- databuf += width; /* Relative seek */
+ ind += width; /* Relative seek */
else
- databuf = base + width; /* Absolute seek */
+ ind = width; /* Absolute seek */
break;
Modified: projects/clang400-import/lib/libprocstat/cd9660.c
==============================================================================
--- projects/clang400-import/lib/libprocstat/cd9660.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libprocstat/cd9660.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -53,10 +53,10 @@ __FBSDID("$FreeBSD$");
#include <err.h>
-#include <isofs/cd9660/cd9660_node.h>
#define _KERNEL
#include <isofs/cd9660/iso.h>
#undef _KERNEL
+#include <isofs/cd9660/cd9660_node.h>
#include <kvm.h>
#include <stdio.h>
Modified: projects/clang400-import/lib/libstand/bootp.c
==============================================================================
--- projects/clang400-import/lib/libstand/bootp.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libstand/bootp.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -62,8 +62,6 @@ __FBSDID("$FreeBSD$");
struct in_addr servip;
-static n_long nmask, smask;
-
static time_t bot;
static char vm_rfc1048[4] = VM_RFC1048;
@@ -223,30 +221,19 @@ bootp(sock, flag)
bcopy(rbuf.rbootp.bp_file, bootfile, sizeof(bootfile));
bootfile[sizeof(bootfile) - 1] = '\0';
- if (IN_CLASSA(ntohl(myip.s_addr)))
- nmask = htonl(IN_CLASSA_NET);
- else if (IN_CLASSB(ntohl(myip.s_addr)))
- nmask = htonl(IN_CLASSB_NET);
- else
- nmask = htonl(IN_CLASSC_NET);
-#ifdef BOOTP_DEBUG
- if (debug)
- printf("'native netmask' is %s\n", intoa(nmask));
-#endif
-
- /* Check subnet mask against net mask; toss if bogus */
- if ((nmask & smask) != nmask) {
+ if (!netmask) {
+ if (IN_CLASSA(ntohl(myip.s_addr)))
+ netmask = htonl(IN_CLASSA_NET);
+ else if (IN_CLASSB(ntohl(myip.s_addr)))
+ netmask = htonl(IN_CLASSB_NET);
+ else
+ netmask = htonl(IN_CLASSC_NET);
#ifdef BOOTP_DEBUG
if (debug)
- printf("subnet mask (%s) bad\n", intoa(smask));
+ printf("'native netmask' is %s\n", intoa(netmask));
#endif
- smask = 0;
}
- /* Get subnet (or natural net) mask */
- netmask = nmask;
- if (smask)
- netmask = smask;
#ifdef BOOTP_DEBUG
if (debug)
printf("mask: %s\n", intoa(netmask));
@@ -385,7 +372,7 @@ vend_rfc1048(cp, len)
break;
if (tag == TAG_SUBNET_MASK) {
- bcopy(cp, &smask, sizeof(smask));
+ bcopy(cp, &netmask, sizeof(netmask));
}
if (tag == TAG_GATEWAY) {
bcopy(cp, &gateip.s_addr, sizeof(gateip.s_addr));
@@ -445,7 +432,7 @@ vend_cmu(cp)
vp = (struct cmu_vend *)cp;
if (vp->v_smask.s_addr != 0) {
- smask = vp->v_smask.s_addr;
+ netmask = vp->v_smask.s_addr;
}
if (vp->v_dgate.s_addr != 0) {
gateip = vp->v_dgate;
Modified: projects/clang400-import/lib/libsysdecode/mktables
==============================================================================
--- projects/clang400-import/lib/libsysdecode/mktables Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/lib/libsysdecode/mktables Sun Jan 8 14:36:18 2017 (r311684)
@@ -142,7 +142,7 @@ gen_table "seekwhence" "SEEK_[A-Z]+
gen_table "fcntlcmd" "F_[A-Z0-9_]+[[:space:]]+[0-9]+[[:space:]]+" "sys/fcntl.h" "F_CANCEL|F_..LCK"
gen_table "mmapflags" "MAP_[A-Z_]+[[:space:]]+0x[0-9A-Fa-f]+" "sys/mman.h"
gen_table "rtpriofuncs" "RTP_[A-Z]+[[:space:]]+[0-9]+" "sys/rtprio.h"
-gen_table "msgflags" "MSG_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" "MSG_SOCALLBCK"
+gen_table "msgflags" "MSG_[A-Z]+[[:space:]]+0x[0-9]+" "sys/socket.h" "MSG_SOCALLBCK|MSG_MORETOCOME"
gen_table "sigcode" "SI_[A-Z]+[[:space:]]+0(x[0-9abcdef]+)?" "sys/signal.h"
gen_table "umtxcvwaitflags" "CVWAIT_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/umtx.h"
gen_table "umtxrwlockflags" "URWLOCK_PREFER_READER[[:space:]]+0x[0-9]+" "sys/umtx.h"
Modified: projects/clang400-import/sbin/camcontrol/camcontrol.8
==============================================================================
--- projects/clang400-import/sbin/camcontrol/camcontrol.8 Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/sbin/camcontrol/camcontrol.8 Sun Jan 8 14:36:18 2017 (r311684)
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd November 30, 2016
+.Dd January 6, 2017
.Dt CAMCONTROL 8
.Os
.Sh NAME
@@ -121,7 +121,7 @@
.Ic modepage
.Op device id
.Op generic args
-.Aq Fl m Ar page | Fl l
+.Aq Fl m Ar page[,subpage] | Fl l
.Op Fl P Ar pgctl
.Op Fl b | Fl e
.Op Fl d
@@ -702,9 +702,10 @@ The editor will be invoked if
detects that standard input is terminal.
.It Fl l
Lists all available mode pages.
-.It Fl m Ar mode_page
-This specifies the number of the mode page the user would like to view
-and/or edit.
+If specified more then once, also lists subpages.
+.It Fl m Ar page[,subpage]
+This specifies the number of the mode page and optionally subpage the user
+would like to view and/or edit.
This argument is mandatory unless
.Fl l
is specified.
Modified: projects/clang400-import/sbin/camcontrol/camcontrol.c
==============================================================================
--- projects/clang400-import/sbin/camcontrol/camcontrol.c Sun Jan 8 13:38:17 2017 (r311683)
+++ projects/clang400-import/sbin/camcontrol/camcontrol.c Sun Jan 8 14:36:18 2017 (r311684)
@@ -125,12 +125,9 @@ typedef enum {
CAM_ARG_GET_STDINQ = 0x00002000,
CAM_ARG_GET_XFERRATE = 0x00004000,
CAM_ARG_INQ_MASK = 0x00007000,
- CAM_ARG_MODE_EDIT = 0x00008000,
- CAM_ARG_PAGE_CNTL = 0x00010000,
CAM_ARG_TIMEOUT = 0x00020000,
CAM_ARG_CMD_IN = 0x00040000,
CAM_ARG_CMD_OUT = 0x00080000,
- CAM_ARG_DBD = 0x00100000,
CAM_ARG_ERR_RECOVER = 0x00200000,
CAM_ARG_RETRIES = 0x00400000,
CAM_ARG_START_UNIT = 0x00800000,
@@ -3987,8 +3984,8 @@ reassignblocks(struct cam_device *device
#ifndef MINIMALISTIC
void
-mode_sense(struct cam_device *device, int mode_page, int page_control,
- int dbd, int retry_count, int timeout, u_int8_t *data, int datalen)
+mode_sense(struct cam_device *device, int dbd, int pc, int page, int subpage,
+ int retry_count, int timeout, u_int8_t *data, int datalen)
{
union ccb *ccb;
int retval;
@@ -4000,15 +3997,17 @@ mode_sense(struct cam_device *device, in
CCB_CLEAR_ALL_EXCEPT_HDR(&ccb->csio);
- scsi_mode_sense(&ccb->csio,
+ scsi_mode_sense_subpage(&ccb->csio,
/* retries */ retry_count,
/* cbfcnp */ NULL,
/* tag_action */ MSG_SIMPLE_Q_TAG,
/* dbd */ dbd,
- /* page_code */ page_control << 6,
- /* page */ mode_page,
+ /* pc */ pc << 6,
+ /* page */ page,
+ /* subpage */ subpage,
/* param_buf */ data,
/* param_len */ datalen,
+ /* minimum_cmd_size */ 0,
/* sense_len */ SSD_FULL_SIZE,
/* timeout */ timeout ? timeout : 5000);
@@ -4089,8 +4088,9 @@ void
modepage(struct cam_device *device, int argc, char **argv, char *combinedopt,
int retry_count, int timeout)
{
- int c, mode_page = -1, page_control = 0;
- int binary = 0, list = 0;
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list