aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc113
-rw-r--r--Makefile.libcompat5
-rw-r--r--ObsoleteFiles.inc24
-rw-r--r--UPDATING40
-rw-r--r--bin/date/date.169
-rw-r--r--bin/date/date.c104
-rwxr-xr-xbin/date/tests/format_string_test.sh57
-rw-r--r--bin/dd/args.c2
-rw-r--r--bin/dd/dd.16
-rw-r--r--bin/dd/dd.c14
-rw-r--r--bin/dd/dd.h1
-rw-r--r--bin/dd/extern.h3
-rw-r--r--bin/dd/misc.c35
-rw-r--r--bin/ls/ls.114
-rw-r--r--bin/ls/ls.c2
-rwxr-xr-xcddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh125
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh.out7
-rwxr-xr-xcddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh113
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh.out5
-rw-r--r--cddl/contrib/opensolaris/cmd/zdb/zdb.c166
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs.856
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_main.c29
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool-features.718
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool.831
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_main.c155
-rw-r--r--cddl/contrib/opensolaris/cmd/ztest/ztest.c166
-rw-r--r--cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c2
-rw-r--r--cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c3
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h16
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c36
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c128
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c7
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h1
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c16
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c7
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c58
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c96
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c11
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c40
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c37
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h4
-rw-r--r--cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h3
-rw-r--r--cddl/lib/libdtrace/Makefile1
-rw-r--r--cddl/lib/libdtrace/ip.d3
-rw-r--r--cddl/lib/libdtrace/udplite.d77
-rw-r--r--cddl/lib/libzfs/Makefile1
-rw-r--r--cddl/lib/libzfs_core/Makefile1
-rw-r--r--cddl/lib/libzpool/Makefile1
-rw-r--r--cddl/sbin/zfs/Makefile1
-rw-r--r--cddl/sbin/zpool/Makefile1
-rw-r--r--cddl/usr.bin/zinject/Makefile1
-rw-r--r--cddl/usr.bin/zstreamdump/Makefile1
-rw-r--r--cddl/usr.bin/ztest/Makefile1
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/ip/Makefile4
-rwxr-xr-xcddl/usr.sbin/dtrace/tests/tools/exclude.sh1
-rw-r--r--cddl/usr.sbin/dwatch/libexec/Makefile3
-rw-r--r--cddl/usr.sbin/dwatch/libexec/udplite89
-rw-r--r--cddl/usr.sbin/zdb/Makefile1
-rw-r--r--cddl/usr.sbin/zfsd/Makefile.common1
-rw-r--r--cddl/usr.sbin/zhack/Makefile1
-rw-r--r--contrib/elftoolchain/libelf/elf_update.c1
-rw-r--r--contrib/elftoolchain/readelf/readelf.c1
-rw-r--r--contrib/file/ChangeLog12
-rw-r--r--contrib/file/Makefile.in115
-rw-r--r--contrib/file/README8
-rw-r--r--contrib/file/aclocal.m4443
-rwxr-xr-xcontrib/file/compile2
-rwxr-xr-xcontrib/file/config.guess469
-rw-r--r--contrib/file/config.h.in7
-rwxr-xr-xcontrib/file/config.sub120
-rwxr-xr-xcontrib/file/configure354
-rw-r--r--contrib/file/configure.ac2
-rwxr-xr-xcontrib/file/depcomp5
-rw-r--r--contrib/file/doc/Makefile.in78
-rw-r--r--contrib/file/doc/file.man12
-rw-r--r--contrib/file/doc/magic.man23
-rwxr-xr-xcontrib/file/install-sh750
-rwxr-xr-xcontrib/file/ltmain.sh24
-rw-r--r--contrib/file/magic/Magdir/animation9
-rw-r--r--contrib/file/magic/Magdir/archive5
-rw-r--r--contrib/file/magic/Magdir/audio32
-rw-r--r--contrib/file/magic/Magdir/cad12
-rw-r--r--contrib/file/magic/Magdir/console86
-rw-r--r--contrib/file/magic/Magdir/database14
-rw-r--r--contrib/file/magic/Magdir/dataone47
-rw-r--r--contrib/file/magic/Magdir/dbpf8
-rw-r--r--contrib/file/magic/Magdir/dump2
-rw-r--r--contrib/file/magic/Magdir/elf9
-rw-r--r--contrib/file/magic/Magdir/fsav8
-rw-r--r--contrib/file/magic/Magdir/images310
-rw-r--r--contrib/file/magic/Magdir/linux12
-rw-r--r--contrib/file/magic/Magdir/make13
-rw-r--r--contrib/file/magic/Magdir/measure28
-rw-r--r--contrib/file/magic/Magdir/msdos266
-rw-r--r--contrib/file/magic/Magdir/msooxml3
-rw-r--r--contrib/file/magic/Magdir/pdf6
-rw-r--r--contrib/file/magic/Magdir/sgi6
-rw-r--r--contrib/file/magic/Makefile.am3
-rw-r--r--contrib/file/magic/Makefile.in81
-rwxr-xr-xcontrib/file/missing6
-rw-r--r--contrib/file/python/CHANGELOG.md16
-rw-r--r--contrib/file/python/LICENSE25
-rw-r--r--contrib/file/python/Makefile.am3
-rw-r--r--contrib/file/python/Makefile.in82
-rw-r--r--contrib/file/python/README0
-rw-r--r--contrib/file/python/README.md31
-rw-r--r--contrib/file/python/magic.py5
-rw-r--r--contrib/file/python/setup.py7
-rw-r--r--contrib/file/python/tests.py32
-rw-r--r--contrib/file/src/Makefile.in86
-rw-r--r--contrib/file/src/apprentice.c10
-rw-r--r--contrib/file/src/compress.c23
-rw-r--r--contrib/file/src/der.c4
-rw-r--r--contrib/file/src/file.h7
-rw-r--r--contrib/file/src/funcs.c53
-rw-r--r--contrib/file/src/readcdf.c366
-rw-r--r--contrib/file/src/readelf.c305
-rw-r--r--contrib/file/src/readelf.h112
-rw-r--r--contrib/file/src/seccomp.c21
-rw-r--r--contrib/file/src/softmagic.c56
-rw-r--r--contrib/file/tests/JW07022A.mp3.result1
-rw-r--r--contrib/file/tests/JW07022A.mp3.testfilebin0 -> 15887 bytes
-rw-r--r--contrib/file/tests/Makefile.am4
-rw-r--r--contrib/file/tests/Makefile.in84
-rw-r--r--contrib/flex/main.c2
-rw-r--r--contrib/libarchive/cat/bsdcat.c2
-rw-r--r--contrib/libarchive/cpio/cpio.c2
-rw-r--r--contrib/libarchive/libarchive/archive_entry.c4
-rw-r--r--contrib/libarchive/libarchive/archive_entry.h1
-rw-r--r--contrib/libarchive/libarchive/archive_openssl_hmac_private.h3
-rw-r--r--contrib/libarchive/libarchive/archive_read.c2
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_lha.c6
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_mtree.c84
-rw-r--r--contrib/libarchive/libarchive/archive_read_support_format_zip.c8
-rw-r--r--contrib/libarchive/libarchive/archive_virtual.c4
-rw-r--r--contrib/libarchive/libarchive/archive_write_add_filter_gzip.c7
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_ar.c12
-rw-r--r--contrib/libarchive/libarchive/test/test_sparse_basic.c29
-rw-r--r--contrib/libarchive/libarchive/test/test_write_filter_gzip.c30
-rw-r--r--contrib/libarchive/libarchive/test/test_write_filter_zstd.c4
-rw-r--r--contrib/libarchive/tar/bsdtar.c2
-rw-r--r--contrib/libarchive/tar/test/test_option_C_mtree.c73
-rw-r--r--contrib/libarchive/tar/test/test_option_fflags.c4
-rw-r--r--contrib/libarchive/tar/write.c2
-rw-r--r--contrib/libarchive/test_utils/test_main.c2
-rw-r--r--contrib/llvm/include/llvm/BinaryFormat/ELF.h6
-rw-r--r--contrib/llvm/include/llvm/Support/ARMBuildAttributes.h2
-rw-r--r--contrib/llvm/tools/lld/ELF/Arch/AArch64.cpp4
-rw-r--r--contrib/llvm/tools/lld/ELF/Arch/ARM.cpp11
-rw-r--r--contrib/llvm/tools/lld/ELF/Arch/X86.cpp4
-rw-r--r--contrib/llvm/tools/lld/ELF/Config.h4
-rw-r--r--contrib/llvm/tools/lld/ELF/InputFiles.cpp42
-rw-r--r--contrib/mdocml/apropos.18
-rw-r--r--contrib/mdocml/main.c2
-rw-r--r--contrib/mdocml/man.18
-rw-r--r--contrib/mdocml/mandoc.110
-rw-r--r--contrib/netbsd-tests/lib/libc/sys/t_getcontext.c4
-rw-r--r--contrib/netbsd-tests/lib/libpthread/t_mutex.c12
-rw-r--r--contrib/pf/pflogd/pflogd.84
-rw-r--r--contrib/tnftp/src/ftp_var.h2
-rw-r--r--etc/Makefile48
-rw-r--r--etc/defaults/Makefile2
-rw-r--r--etc/mtree/BSD.tests.dist2
-rw-r--r--etc/mtree/BSD.var.dist2
-rw-r--r--etc/pkg/Makefile10
-rw-r--r--etc/root/dot.cshrc2
-rw-r--r--etc/root/dot.profile2
-rw-r--r--include/time.h5
-rw-r--r--lib/clang/include/lld/Common/Version.inc2
-rw-r--r--lib/clang/include/llvm/Config/AsmParsers.def3
-rw-r--r--lib/clang/include/llvm/Config/AsmPrinters.def3
-rw-r--r--lib/clang/include/llvm/Config/Disassemblers.def3
-rw-r--r--lib/clang/include/llvm/Config/Targets.def3
-rw-r--r--lib/clang/include/llvm/Config/config.h7
-rw-r--r--lib/clang/libllvm/Makefile43
-rw-r--r--lib/clang/llvm.build.mk3
-rw-r--r--lib/libauditd/Makefile7
-rw-r--r--lib/libbsm/Makefile7
-rw-r--r--lib/libc/gen/Makefile.inc4
-rw-r--r--lib/libc/gen/Symbol.map2
-rw-r--r--lib/libc/gen/exec.365
-rw-r--r--lib/libc/gen/ftok.c3
-rw-r--r--lib/libc/gen/getpwent.c27
-rw-r--r--lib/libc/gen/pw_scan.c16
-rw-r--r--lib/libc/gen/pw_scan.h1
-rw-r--r--lib/libc/gen/shells (renamed from etc/shells)0
-rw-r--r--lib/libc/gen/timespec_get.386
-rw-r--r--lib/libc/gen/timespec_get.c (renamed from sys/arm/xscale/i8134x/i81342_mcu.c)52
-rw-r--r--lib/libc/inet/inet_addr.c7
-rw-r--r--lib/libc/powerpcspe/gen/fabs.S3
-rw-r--r--lib/libc/powerpcspe/gen/fpgetmask.c2
-rw-r--r--lib/libc/powerpcspe/gen/fpsetmask.c4
-rw-r--r--lib/libc/sys/getlogin.22
-rw-r--r--lib/libc/sys/getloginclass.22
-rw-r--r--lib/libc/sys/gettimeofday.27
-rw-r--r--lib/libc/sys/kqueue.223
-rw-r--r--lib/libclang_rt/Makefile.inc1
-rw-r--r--lib/libgcc_eh/Makefile.inc5
-rw-r--r--lib/libkvm/kvm_minidump_mips.c2
-rw-r--r--lib/libnetbsd/sys/time.h65
-rw-r--r--lib/libnv/Makefile2
-rw-r--r--lib/libproc/tests/proc_test.c18
-rw-r--r--lib/libprocstat/zfs/Makefile1
-rw-r--r--lib/libthread_db/arch/riscv/libpthread_md.c10
-rw-r--r--lib/libutil/Makefile6
-rw-r--r--lib/libutil/libutil.h1
-rw-r--r--lib/libutil/pw_util.318
-rw-r--r--lib/libutil/pw_util.c11
-rw-r--r--libexec/getty/ttys.55
-rw-r--r--libexec/rtld-elf/malloc.c15
-rw-r--r--libexec/rtld-elf/paths.h8
-rw-r--r--libexec/rtld-elf/riscv/rtld_start.S46
-rw-r--r--libexec/rtld-elf/rtld.c30
-rw-r--r--libexec/rtld-elf/tests/ld_library_pathfds.c2
-rw-r--r--release/Makefile.ec25
-rw-r--r--release/Makefile.mirrors17
-rw-r--r--release/arm/BANANAPI.conf2
-rw-r--r--release/arm/BEAGLEBONE.conf3
-rw-r--r--release/arm/CUBIEBOARD.conf16
-rw-r--r--release/arm/CUBIEBOARD2.conf16
-rw-r--r--release/arm/CUBOX-HUMMINGBOARD.conf18
-rw-r--r--release/arm/GENERICSD.conf16
-rw-r--r--release/arm/GUMSTIX.conf38
-rw-r--r--release/arm/PANDABOARD.conf12
-rw-r--r--release/arm/RPI-B.conf7
-rw-r--r--release/arm/RPI2.conf6
-rw-r--r--release/arm/WANDBOARD.conf4
-rw-r--r--release/arm64/PINE64-LTS.conf26
-rwxr-xr-xrelease/release.sh12
-rw-r--r--release/tools/arm.subr16
-rw-r--r--release/tools/gce.conf13
-rw-r--r--sbin/devd/devd.cc8
-rw-r--r--sbin/dhclient/dhclient.817
-rw-r--r--sbin/dhclient/dhclient.c40
-rw-r--r--sbin/dump/Makefile4
-rw-r--r--sbin/fsck_ffs/fsutil.c33
-rw-r--r--sbin/ifconfig/ifconfig.c2
-rw-r--r--sbin/init/Makefile11
-rw-r--r--sbin/init/init.870
-rw-r--r--sbin/init/init.c112
-rwxr-xr-xsbin/init/netstart (renamed from etc/netstart)0
-rw-r--r--sbin/init/network.subr (renamed from etc/network.subr)0
-rwxr-xr-xsbin/init/pccard_ether (renamed from etc/pccard_ether)0
-rw-r--r--sbin/init/rc (renamed from etc/rc)0
-rw-r--r--sbin/init/rc.conf (renamed from etc/defaults/rc.conf)0
-rwxr-xr-xsbin/init/rc.d/DAEMON (renamed from etc/rc.d/DAEMON)0
-rwxr-xr-xsbin/init/rc.d/FILESYSTEMS (renamed from etc/rc.d/FILESYSTEMS)0
-rwxr-xr-xsbin/init/rc.d/LOGIN (renamed from etc/rc.d/LOGIN)0
-rw-r--r--sbin/init/rc.d/Makefile (renamed from etc/rc.d/Makefile)95
-rwxr-xr-xsbin/init/rc.d/NETWORKING (renamed from etc/rc.d/NETWORKING)0
-rwxr-xr-xsbin/init/rc.d/SERVERS (renamed from etc/rc.d/SERVERS)0
-rwxr-xr-xsbin/init/rc.d/abi (renamed from etc/rc.d/abi)0
-rwxr-xr-xsbin/init/rc.d/accounting (renamed from etc/rc.d/accounting)0
-rwxr-xr-xsbin/init/rc.d/addswap (renamed from etc/rc.d/addswap)0
-rwxr-xr-xsbin/init/rc.d/adjkerntz (renamed from etc/rc.d/adjkerntz)0
-rwxr-xr-xsbin/init/rc.d/amd (renamed from etc/rc.d/amd)0
-rwxr-xr-xsbin/init/rc.d/apm (renamed from etc/rc.d/apm)0
-rwxr-xr-xsbin/init/rc.d/apmd (renamed from etc/rc.d/apmd)0
-rwxr-xr-xsbin/init/rc.d/archdep (renamed from etc/rc.d/archdep)0
-rwxr-xr-xsbin/init/rc.d/auditd (renamed from etc/rc.d/auditd)0
-rw-r--r--sbin/init/rc.d/auditdistd (renamed from etc/rc.d/auditdistd)0
-rw-r--r--sbin/init/rc.d/automount (renamed from etc/rc.d/automount)0
-rw-r--r--sbin/init/rc.d/automountd (renamed from etc/rc.d/automountd)0
-rw-r--r--sbin/init/rc.d/autounmountd (renamed from etc/rc.d/autounmountd)0
-rwxr-xr-xsbin/init/rc.d/bgfsck (renamed from etc/rc.d/bgfsck)0
-rw-r--r--sbin/init/rc.d/blacklistd (renamed from etc/rc.d/blacklistd)0
-rwxr-xr-xsbin/init/rc.d/bluetooth (renamed from etc/rc.d/bluetooth)0
-rwxr-xr-xsbin/init/rc.d/bootparams (renamed from etc/rc.d/bootparams)0
-rwxr-xr-xsbin/init/rc.d/bridge (renamed from etc/rc.d/bridge)0
-rwxr-xr-xsbin/init/rc.d/bsnmpd (renamed from etc/rc.d/bsnmpd)0
-rwxr-xr-xsbin/init/rc.d/bthidd (renamed from etc/rc.d/bthidd)0
-rwxr-xr-xsbin/init/rc.d/ccd (renamed from etc/rc.d/ccd)0
-rwxr-xr-xsbin/init/rc.d/cfumass (renamed from etc/rc.d/cfumass)0
-rwxr-xr-xsbin/init/rc.d/cleanvar (renamed from etc/rc.d/cleanvar)0
-rwxr-xr-xsbin/init/rc.d/cleartmp (renamed from etc/rc.d/cleartmp)0
-rwxr-xr-xsbin/init/rc.d/cron (renamed from etc/rc.d/cron)0
-rwxr-xr-xsbin/init/rc.d/ctld (renamed from etc/rc.d/ctld)0
-rwxr-xr-xsbin/init/rc.d/ddb (renamed from etc/rc.d/ddb)0
-rwxr-xr-xsbin/init/rc.d/defaultroute (renamed from etc/rc.d/defaultroute)0
-rwxr-xr-xsbin/init/rc.d/devd (renamed from etc/rc.d/devd)0
-rwxr-xr-xsbin/init/rc.d/devfs (renamed from etc/rc.d/devfs)0
-rwxr-xr-xsbin/init/rc.d/devmatch (renamed from etc/rc.d/devmatch)0
-rwxr-xr-xsbin/init/rc.d/dhclient (renamed from etc/rc.d/dhclient)2
-rwxr-xr-xsbin/init/rc.d/dmesg (renamed from etc/rc.d/dmesg)0
-rwxr-xr-xsbin/init/rc.d/dumpon (renamed from etc/rc.d/dumpon)0
-rwxr-xr-xsbin/init/rc.d/fsck (renamed from etc/rc.d/fsck)0
-rwxr-xr-xsbin/init/rc.d/ftp-proxy (renamed from etc/rc.d/ftp-proxy)0
-rwxr-xr-xsbin/init/rc.d/ftpd (renamed from etc/rc.d/ftpd)0
-rwxr-xr-xsbin/init/rc.d/gbde (renamed from etc/rc.d/gbde)0
-rwxr-xr-xsbin/init/rc.d/geli (renamed from etc/rc.d/geli)0
-rwxr-xr-xsbin/init/rc.d/geli2 (renamed from etc/rc.d/geli2)0
-rwxr-xr-xsbin/init/rc.d/gptboot (renamed from etc/rc.d/gptboot)0
-rwxr-xr-xsbin/init/rc.d/growfs (renamed from etc/rc.d/growfs)0
-rwxr-xr-xsbin/init/rc.d/gssd (renamed from etc/rc.d/gssd)0
-rwxr-xr-xsbin/init/rc.d/hastd (renamed from etc/rc.d/hastd)0
-rwxr-xr-xsbin/init/rc.d/hcsecd (renamed from etc/rc.d/hcsecd)0
-rwxr-xr-xsbin/init/rc.d/hostapd (renamed from etc/rc.d/hostapd)0
-rwxr-xr-xsbin/init/rc.d/hostid (renamed from etc/rc.d/hostid)0
-rwxr-xr-xsbin/init/rc.d/hostid_save (renamed from etc/rc.d/hostid_save)0
-rwxr-xr-xsbin/init/rc.d/hostname (renamed from etc/rc.d/hostname)0
-rwxr-xr-xsbin/init/rc.d/inetd (renamed from etc/rc.d/inetd)0
-rw-r--r--sbin/init/rc.d/iovctl (renamed from etc/rc.d/iovctl)0
-rwxr-xr-xsbin/init/rc.d/ip6addrctl (renamed from etc/rc.d/ip6addrctl)0
-rwxr-xr-xsbin/init/rc.d/ipfilter (renamed from etc/rc.d/ipfilter)0
-rwxr-xr-xsbin/init/rc.d/ipfs (renamed from etc/rc.d/ipfs)0
-rwxr-xr-xsbin/init/rc.d/ipfw (renamed from etc/rc.d/ipfw)0
-rwxr-xr-xsbin/init/rc.d/ipfw_netflow (renamed from etc/rc.d/ipfw_netflow)0
-rwxr-xr-xsbin/init/rc.d/ipmon (renamed from etc/rc.d/ipmon)0
-rwxr-xr-xsbin/init/rc.d/ipnat (renamed from etc/rc.d/ipnat)0
-rwxr-xr-xsbin/init/rc.d/ipropd_master (renamed from etc/rc.d/ipropd_master)0
-rwxr-xr-xsbin/init/rc.d/ipropd_slave (renamed from etc/rc.d/ipropd_slave)0
-rwxr-xr-xsbin/init/rc.d/ipsec (renamed from etc/rc.d/ipsec)0
-rwxr-xr-xsbin/init/rc.d/iscsictl (renamed from etc/rc.d/iscsictl)0
-rwxr-xr-xsbin/init/rc.d/iscsid (renamed from etc/rc.d/iscsid)0
-rwxr-xr-xsbin/init/rc.d/jail (renamed from etc/rc.d/jail)0
-rwxr-xr-xsbin/init/rc.d/kadmind (renamed from etc/rc.d/kadmind)0
-rwxr-xr-xsbin/init/rc.d/kdc (renamed from etc/rc.d/kdc)0
-rwxr-xr-xsbin/init/rc.d/keyserv (renamed from etc/rc.d/keyserv)0
-rwxr-xr-xsbin/init/rc.d/kfd (renamed from etc/rc.d/kfd)0
-rwxr-xr-xsbin/init/rc.d/kld (renamed from etc/rc.d/kld)0
-rwxr-xr-xsbin/init/rc.d/kldxref (renamed from etc/rc.d/kldxref)0
-rwxr-xr-xsbin/init/rc.d/kpasswdd (renamed from etc/rc.d/kpasswdd)0
-rwxr-xr-xsbin/init/rc.d/ldconfig (renamed from etc/rc.d/ldconfig)0
-rwxr-xr-xsbin/init/rc.d/local (renamed from etc/rc.d/local)0
-rwxr-xr-xsbin/init/rc.d/local_unbound (renamed from etc/rc.d/local_unbound)0
-rwxr-xr-xsbin/init/rc.d/localpkg (renamed from etc/rc.d/localpkg)0
-rwxr-xr-xsbin/init/rc.d/lockd (renamed from etc/rc.d/lockd)0
-rwxr-xr-xsbin/init/rc.d/lpd (renamed from etc/rc.d/lpd)0
-rwxr-xr-xsbin/init/rc.d/mdconfig (renamed from etc/rc.d/mdconfig)0
-rwxr-xr-xsbin/init/rc.d/mdconfig2 (renamed from etc/rc.d/mdconfig2)0
-rwxr-xr-xsbin/init/rc.d/mixer (renamed from etc/rc.d/mixer)0
-rwxr-xr-xsbin/init/rc.d/motd (renamed from etc/rc.d/motd)0
-rwxr-xr-xsbin/init/rc.d/mountcritlocal (renamed from etc/rc.d/mountcritlocal)0
-rwxr-xr-xsbin/init/rc.d/mountcritremote (renamed from etc/rc.d/mountcritremote)0
-rwxr-xr-xsbin/init/rc.d/mountd (renamed from etc/rc.d/mountd)0
-rwxr-xr-xsbin/init/rc.d/mountlate (renamed from etc/rc.d/mountlate)0
-rwxr-xr-xsbin/init/rc.d/moused (renamed from etc/rc.d/moused)0
-rwxr-xr-xsbin/init/rc.d/msgs (renamed from etc/rc.d/msgs)0
-rwxr-xr-xsbin/init/rc.d/natd (renamed from etc/rc.d/natd)0
-rwxr-xr-xsbin/init/rc.d/netif (renamed from etc/rc.d/netif)0
-rwxr-xr-xsbin/init/rc.d/netoptions (renamed from etc/rc.d/netoptions)0
-rwxr-xr-xsbin/init/rc.d/netwait (renamed from etc/rc.d/netwait)0
-rwxr-xr-xsbin/init/rc.d/newsyslog (renamed from etc/rc.d/newsyslog)0
-rwxr-xr-xsbin/init/rc.d/nfscbd (renamed from etc/rc.d/nfscbd)0
-rwxr-xr-xsbin/init/rc.d/nfsclient (renamed from etc/rc.d/nfsclient)0
-rwxr-xr-xsbin/init/rc.d/nfsd (renamed from etc/rc.d/nfsd)0
-rwxr-xr-xsbin/init/rc.d/nfsuserd (renamed from etc/rc.d/nfsuserd)0
-rwxr-xr-xsbin/init/rc.d/nisdomain (renamed from etc/rc.d/nisdomain)0
-rwxr-xr-xsbin/init/rc.d/nscd (renamed from etc/rc.d/nscd)0
-rwxr-xr-xsbin/init/rc.d/nsswitch (renamed from etc/rc.d/nsswitch)0
-rwxr-xr-xsbin/init/rc.d/ntpd (renamed from etc/rc.d/ntpd)0
-rwxr-xr-xsbin/init/rc.d/ntpdate (renamed from etc/rc.d/ntpdate)0
-rwxr-xr-xsbin/init/rc.d/opensm (renamed from etc/rc.d/opensm)0
-rwxr-xr-xsbin/init/rc.d/othermta (renamed from etc/rc.d/othermta)0
-rwxr-xr-xsbin/init/rc.d/pf (renamed from etc/rc.d/pf)0
-rwxr-xr-xsbin/init/rc.d/pflog (renamed from etc/rc.d/pflog)0
-rwxr-xr-xsbin/init/rc.d/pfsync (renamed from etc/rc.d/pfsync)0
-rwxr-xr-xsbin/init/rc.d/power_profile (renamed from etc/rc.d/power_profile)0
-rwxr-xr-xsbin/init/rc.d/powerd (renamed from etc/rc.d/powerd)0
-rwxr-xr-xsbin/init/rc.d/ppp (renamed from etc/rc.d/ppp)0
-rwxr-xr-xsbin/init/rc.d/pppoed (renamed from etc/rc.d/pppoed)0
-rwxr-xr-xsbin/init/rc.d/pwcheck (renamed from etc/rc.d/pwcheck)0
-rwxr-xr-xsbin/init/rc.d/quota (renamed from etc/rc.d/quota)0
-rwxr-xr-xsbin/init/rc.d/random (renamed from etc/rc.d/random)0
-rwxr-xr-xsbin/init/rc.d/rarpd (renamed from etc/rc.d/rarpd)0
-rwxr-xr-xsbin/init/rc.d/rctl (renamed from etc/rc.d/rctl)0
-rwxr-xr-xsbin/init/rc.d/resolv (renamed from etc/rc.d/resolv)0
-rwxr-xr-xsbin/init/rc.d/rfcomm_pppd_server (renamed from etc/rc.d/rfcomm_pppd_server)0
-rwxr-xr-xsbin/init/rc.d/root (renamed from etc/rc.d/root)0
-rwxr-xr-xsbin/init/rc.d/route6d (renamed from etc/rc.d/route6d)0
-rwxr-xr-xsbin/init/rc.d/routed (renamed from etc/rc.d/routed)0
-rwxr-xr-xsbin/init/rc.d/routing (renamed from etc/rc.d/routing)0
-rwxr-xr-xsbin/init/rc.d/rpcbind (renamed from etc/rc.d/rpcbind)0
-rwxr-xr-xsbin/init/rc.d/rtadvd (renamed from etc/rc.d/rtadvd)0
-rwxr-xr-xsbin/init/rc.d/rtsold (renamed from etc/rc.d/rtsold)0
-rwxr-xr-xsbin/init/rc.d/rwho (renamed from etc/rc.d/rwho)0
-rwxr-xr-xsbin/init/rc.d/savecore (renamed from etc/rc.d/savecore)0
-rwxr-xr-xsbin/init/rc.d/sdpd (renamed from etc/rc.d/sdpd)0
-rwxr-xr-xsbin/init/rc.d/securelevel (renamed from etc/rc.d/securelevel)0
-rwxr-xr-xsbin/init/rc.d/sendmail (renamed from etc/rc.d/sendmail)0
-rwxr-xr-xsbin/init/rc.d/serial (renamed from etc/rc.d/serial)0
-rwxr-xr-xsbin/init/rc.d/sppp (renamed from etc/rc.d/sppp)0
-rwxr-xr-xsbin/init/rc.d/sshd (renamed from etc/rc.d/sshd)0
-rwxr-xr-xsbin/init/rc.d/statd (renamed from etc/rc.d/statd)0
-rwxr-xr-xsbin/init/rc.d/static_arp (renamed from etc/rc.d/static_arp)0
-rwxr-xr-xsbin/init/rc.d/static_ndp (renamed from etc/rc.d/static_ndp)0
-rwxr-xr-xsbin/init/rc.d/stf (renamed from etc/rc.d/stf)0
-rwxr-xr-xsbin/init/rc.d/swap (renamed from etc/rc.d/swap)0
-rwxr-xr-xsbin/init/rc.d/swaplate (renamed from etc/rc.d/swaplate)0
-rwxr-xr-xsbin/init/rc.d/syscons (renamed from etc/rc.d/syscons)0
-rwxr-xr-xsbin/init/rc.d/sysctl (renamed from etc/rc.d/sysctl)0
-rwxr-xr-xsbin/init/rc.d/syslogd (renamed from etc/rc.d/syslogd)0
-rwxr-xr-xsbin/init/rc.d/timed (renamed from etc/rc.d/timed)0
-rwxr-xr-xsbin/init/rc.d/tmp (renamed from etc/rc.d/tmp)0
-rwxr-xr-xsbin/init/rc.d/ubthidhci (renamed from etc/rc.d/ubthidhci)0
-rwxr-xr-xsbin/init/rc.d/ugidfw (renamed from etc/rc.d/ugidfw)0
-rwxr-xr-xsbin/init/rc.d/utx (renamed from etc/rc.d/utx)0
-rwxr-xr-xsbin/init/rc.d/var (renamed from etc/rc.d/var)0
-rwxr-xr-xsbin/init/rc.d/virecover (renamed from etc/rc.d/virecover)0
-rwxr-xr-xsbin/init/rc.d/watchdogd (renamed from etc/rc.d/watchdogd)0
-rwxr-xr-xsbin/init/rc.d/wpa_supplicant (renamed from etc/rc.d/wpa_supplicant)0
-rwxr-xr-xsbin/init/rc.d/ypbind (renamed from etc/rc.d/ypbind)0
-rwxr-xr-xsbin/init/rc.d/ypldap (renamed from etc/rc.d/ypldap)0
-rwxr-xr-xsbin/init/rc.d/yppasswdd (renamed from etc/rc.d/yppasswdd)0
-rwxr-xr-xsbin/init/rc.d/ypserv (renamed from etc/rc.d/ypserv)0
-rwxr-xr-xsbin/init/rc.d/ypset (renamed from etc/rc.d/ypset)0
-rwxr-xr-xsbin/init/rc.d/ypupdated (renamed from etc/rc.d/ypupdated)0
-rwxr-xr-xsbin/init/rc.d/ypxfrd (renamed from etc/rc.d/ypxfrd)0
-rwxr-xr-xsbin/init/rc.d/zfs (renamed from etc/rc.d/zfs)0
-rwxr-xr-xsbin/init/rc.d/zfsbe (renamed from etc/rc.d/zfsbe)0
-rw-r--r--sbin/init/rc.d/zfsd (renamed from etc/rc.d/zfsd)0
-rwxr-xr-xsbin/init/rc.d/zvol (renamed from etc/rc.d/zvol)0
-rw-r--r--sbin/init/rc.initdiskless (renamed from etc/rc.initdiskless)0
-rwxr-xr-xsbin/init/rc.resume (renamed from etc/rc.resume)0
-rw-r--r--sbin/init/rc.shutdown (renamed from etc/rc.shutdown)0
-rw-r--r--sbin/init/rc.subr (renamed from etc/rc.subr)0
-rwxr-xr-xsbin/init/rc.suspend (renamed from etc/rc.suspend)0
-rw-r--r--sbin/ipfw/ipfw.811
-rw-r--r--sbin/ipfw/ipfw2.c12
-rw-r--r--sbin/ldconfig/ldconfig.c7
-rw-r--r--sbin/mount/mount.831
-rw-r--r--sbin/mount/mount.c3
-rw-r--r--sbin/pfctl/tests/files/Makefile4
-rw-r--r--sbin/savecore/Makefile2
-rw-r--r--sbin/savecore/minfree (renamed from etc/minfree)0
-rw-r--r--share/man/man3/Makefile7
-rw-r--r--share/man/man3/timeradd.388
-rw-r--r--share/man/man4/Makefile4
-rw-r--r--share/man/man4/cxgbe.45
-rw-r--r--share/man/man4/ddb.49
-rw-r--r--share/man/man4/dtrace_sctp.43
-rw-r--r--share/man/man4/dtrace_tcp.44
-rw-r--r--share/man/man4/dtrace_udp.44
-rw-r--r--share/man/man4/dtrace_udplite.4204
-rw-r--r--share/man/man4/firewire.42
-rw-r--r--share/man/man4/jedec_dimm.47
-rw-r--r--share/man/man4/jedec_ts.4142
-rw-r--r--share/man/man4/man4.arm/Makefile2
-rw-r--r--share/man/man4/man4.arm/npe.4163
-rw-r--r--share/man/man4/pci.468
-rw-r--r--share/man/man4/pf.46
-rw-r--r--share/man/man4/qlnxe.42
-rw-r--r--share/man/man4/tcp.416
-rw-r--r--share/man/man4/uep.442
-rw-r--r--share/man/man5/src.conf.515
-rw-r--r--share/man/man7/arch.716
-rw-r--r--share/man/man7/tests.72
-rw-r--r--share/man/man8/rc.subr.84
-rw-r--r--share/man/man9/VOP_LOOKUP.99
-rw-r--r--share/man/man9/nvmem.9157
-rw-r--r--share/man/man9/vm_map.928
-rw-r--r--share/man/man9/vnet.918
-rw-r--r--share/misc/bsd-family-tree13
-rw-r--r--share/misc/committers-ports.dot5
-rw-r--r--share/mk/Makefile2
-rw-r--r--share/mk/atf.test.mk2
-rw-r--r--share/mk/bsd.confs.mk162
-rw-r--r--share/mk/bsd.cpu.mk4
-rw-r--r--share/mk/bsd.dirs.mk6
-rw-r--r--share/mk/bsd.files.mk117
-rw-r--r--share/mk/bsd.lib.mk2
-rw-r--r--share/mk/bsd.own.mk4
-rw-r--r--share/mk/bsd.sys.mk4
-rw-r--r--share/mk/bsd.test.mk2
-rw-r--r--share/mk/dirdeps-options.mk73
-rw-r--r--share/mk/dirdeps.mk76
-rw-r--r--share/mk/gendirdeps.mk34
-rw-r--r--share/mk/local.autodep.mk2
-rw-r--r--share/mk/local.dirdeps.mk6
-rw-r--r--share/mk/local.gendirdeps.mk2
-rw-r--r--share/mk/local.meta.sys.mk8
-rw-r--r--share/mk/meta.autodep.mk44
-rw-r--r--share/mk/meta.stage.mk86
-rw-r--r--share/mk/meta.sys.mk40
-rwxr-xr-xshare/mk/meta2deps.py15
-rw-r--r--share/mk/plain.test.mk2
-rw-r--r--share/mk/src.opts.mk13
-rw-r--r--share/mk/tap.test.mk2
-rw-r--r--share/skel/dot.cshrc2
-rw-r--r--share/skel/dot.mailrc2
-rw-r--r--share/skel/dot.profile2
-rw-r--r--share/vt/keymaps/INDEX.keymaps6
-rw-r--r--share/vt/keymaps/Makefile1
-rw-r--r--share/vt/keymaps/us.macbook.kbd116
-rw-r--r--stand/defs.mk2
-rw-r--r--stand/efi/loader/bootinfo.c34
-rw-r--r--stand/efi/loader/framebuffer.c9
-rw-r--r--stand/efi/loader/main.c89
-rw-r--r--stand/i386/gptboot/gptboot.c5
-rw-r--r--stand/i386/isoboot/isoboot.c2
-rw-r--r--stand/i386/libi386/biosdisk.c639
-rw-r--r--stand/i386/libi386/pxe.h2
-rw-r--r--stand/i386/zfsboot/zfsboot.c7
-rw-r--r--stand/libsa/bootp.c2
-rw-r--r--stand/libsa/bootp.h2
-rw-r--r--stand/libsa/cd9660.c2
-rw-r--r--stand/libsa/cd9660read.c2
-rw-r--r--stand/libsa/dosfs.c2
-rw-r--r--stand/libsa/gets.c8
-rw-r--r--stand/libsa/gzipfs.c2
-rw-r--r--stand/libsa/net.c4
-rw-r--r--stand/libsa/nfs.c2
-rw-r--r--stand/lua/config.lua2
-rw-r--r--stand/man/loader.866
-rw-r--r--stand/uboot/common/main.c2
-rw-r--r--sys/amd64/amd64/copyout.c178
-rw-r--r--sys/amd64/amd64/efirt_machdep.c13
-rw-r--r--sys/amd64/amd64/exception.S26
-rw-r--r--sys/amd64/amd64/fpu.c37
-rw-r--r--sys/amd64/amd64/initcpu.c32
-rw-r--r--sys/amd64/amd64/machdep.c4
-rw-r--r--sys/amd64/amd64/pmap.c39
-rw-r--r--sys/amd64/amd64/support.S396
-rw-r--r--sys/amd64/amd64/trap.c24
-rw-r--r--sys/amd64/conf/GENERIC1
-rw-r--r--sys/amd64/conf/NOTES4
-rw-r--r--sys/amd64/ia32/ia32_exception.S4
-rw-r--r--sys/amd64/include/asmacros.h4
-rw-r--r--sys/amd64/include/vmparam.h4
-rw-r--r--sys/amd64/linux/linux_machdep.c50
-rw-r--r--sys/amd64/linux/linux_support.s114
-rw-r--r--sys/amd64/linux32/linux32_machdep.c47
-rw-r--r--sys/amd64/linux32/linux32_support.s114
-rw-r--r--sys/amd64/vmm/vmm_dev.c44
-rw-r--r--sys/arm/allwinner/aw_sid.c327
-rw-r--r--sys/arm/allwinner/aw_sid.h7
-rw-r--r--sys/arm/allwinner/aw_thermal.c233
-rw-r--r--sys/arm/allwinner/clkng/ccu_a64.c19
-rw-r--r--sys/arm/allwinner/files.allwinner20
-rw-r--r--sys/arm/allwinner/if_awg.c5
-rw-r--r--sys/arm/allwinner/if_emac.c5
-rw-r--r--sys/arm/allwinner/std.allwinner3
-rw-r--r--sys/arm/altera/socfpga/std.socfpga3
-rw-r--r--sys/arm/amlogic/aml8726/std.aml87263
-rw-r--r--sys/arm/annapurna/alpine/std.alpine3
-rw-r--r--sys/arm/arm/cpufunc.c451
-rw-r--r--sys/arm/arm/cpufunc_asm.S27
-rw-r--r--sys/arm/arm/cpufunc_asm_arm9.S192
-rw-r--r--sys/arm/arm/cpufunc_asm_armv5_ec.S5
-rw-r--r--sys/arm/arm/cpufunc_asm_fa526.S207
-rw-r--r--sys/arm/arm/cpufunc_asm_sheeva.S5
-rw-r--r--sys/arm/arm/cpufunc_asm_xscale.S509
-rw-r--r--sys/arm/arm/cpufunc_asm_xscale_c3.S399
-rw-r--r--sys/arm/arm/elf_trampoline.c188
-rw-r--r--sys/arm/arm/gic.c354
-rw-r--r--sys/arm/arm/gic.h8
-rw-r--r--sys/arm/arm/gic_fdt.c16
-rw-r--r--sys/arm/arm/identcpu-v4.c7
-rw-r--r--sys/arm/arm/machdep.c5
-rw-r--r--sys/arm/arm/mp_machdep.c140
-rw-r--r--sys/arm/arm/pmap-v4.c5
-rw-r--r--sys/arm/arm/pmap-v6.c283
-rw-r--r--sys/arm/arm/trap-v4.c4
-rw-r--r--sys/arm/arm/undefined.c43
-rw-r--r--sys/arm/at91/at91.c373
-rw-r--r--sys/arm/at91/at91_aic.c184
-rw-r--r--sys/arm/at91/at91_aicreg.h53
-rw-r--r--sys/arm/at91/at91_cfata.c281
-rw-r--r--sys/arm/at91/at91_common.c121
-rw-r--r--sys/arm/at91/at91_gpio.h298
-rw-r--r--sys/arm/at91/at91_machdep.c689
-rw-r--r--sys/arm/at91/at91_mci.c1406
-rw-r--r--sys/arm/at91/at91_mcireg.h158
-rw-r--r--sys/arm/at91/at91_ohci.c236
-rw-r--r--sys/arm/at91/at91_ohci_fdt.c244
-rw-r--r--sys/arm/at91/at91_pdcreg.h50
-rw-r--r--sys/arm/at91/at91_pinctrl.c517
-rw-r--r--sys/arm/at91/at91_pio.c655
-rw-r--r--sys/arm/at91/at91_pio_sam9g20.h183
-rw-r--r--sys/arm/at91/at91_pio_sam9g45.h274
-rw-r--r--sys/arm/at91/at91_pioreg.h234
-rw-r--r--sys/arm/at91/at91_piovar.h52
-rw-r--r--sys/arm/at91/at91_pit.c222
-rw-r--r--sys/arm/at91/at91_pitreg.h49
-rw-r--r--sys/arm/at91/at91_pmc.c719
-rw-r--r--sys/arm/at91/at91_pmcreg.h146
-rw-r--r--sys/arm/at91/at91_pmcvar.h69
-rw-r--r--sys/arm/at91/at91_reset.S57
-rw-r--r--sys/arm/at91/at91_rst.c236
-rw-r--r--sys/arm/at91/at91_rstreg.h65
-rw-r--r--sys/arm/at91/at91_rtc.c366
-rw-r--r--sys/arm/at91/at91_rtcreg.h105
-rw-r--r--sys/arm/at91/at91_sdramc.c106
-rw-r--r--sys/arm/at91/at91_shdwc.c106
-rw-r--r--sys/arm/at91/at91_smc.c93
-rw-r--r--sys/arm/at91/at91_smc.h118
-rw-r--r--sys/arm/at91/at91_spi.c461
-rw-r--r--sys/arm/at91/at91_spireg.h71
-rw-r--r--sys/arm/at91/at91_ssc.c272
-rw-r--r--sys/arm/at91/at91_sscreg.h152
-rw-r--r--sys/arm/at91/at91_st.c314
-rw-r--r--sys/arm/at91/at91_streg.h63
-rw-r--r--sys/arm/at91/at91_tcb.c106
-rw-r--r--sys/arm/at91/at91_twi.c430
-rw-r--r--sys/arm/at91/at91_twiio.h64
-rw-r--r--sys/arm/at91/at91_twireg.h88
-rw-r--r--sys/arm/at91/at91_usartreg.h131
-rw-r--r--sys/arm/at91/at91_wdt.c239
-rw-r--r--sys/arm/at91/at91_wdtreg.h62
-rw-r--r--sys/arm/at91/at91board.h38
-rw-r--r--sys/arm/at91/at91reg.h92
-rw-r--r--sys/arm/at91/at91rm9200.c211
-rw-r--r--sys/arm/at91/at91rm9200_devices.c144
-rw-r--r--sys/arm/at91/at91rm9200var.h60
-rw-r--r--sys/arm/at91/at91rm92reg.h308
-rw-r--r--sys/arm/at91/at91sam9260.c219
-rw-r--r--sys/arm/at91/at91sam9260reg.h306
-rw-r--r--sys/arm/at91/at91sam9g20.c185
-rw-r--r--sys/arm/at91/at91sam9g20reg.h306
-rw-r--r--sys/arm/at91/at91sam9g45.c172
-rw-r--r--sys/arm/at91/at91sam9g45reg.h295
-rw-r--r--sys/arm/at91/at91sam9x5.c189
-rw-r--r--sys/arm/at91/at91sam9x5reg.h317
-rw-r--r--sys/arm/at91/at91soc.c53
-rw-r--r--sys/arm/at91/at91soc.h60
-rw-r--r--sys/arm/at91/at91var.h175
-rw-r--r--sys/arm/at91/board_eb9200.c70
-rw-r--r--sys/arm/at91/board_ethernut5.c151
-rw-r--r--sys/arm/at91/board_hl200.c67
-rw-r--r--sys/arm/at91/board_hl201.c123
-rw-r--r--sys/arm/at91/board_kb920x.c68
-rw-r--r--sys/arm/at91/board_qila9g20.c110
-rw-r--r--sys/arm/at91/board_sam9260ek.c264
-rw-r--r--sys/arm/at91/board_sam9g20ek.c129
-rw-r--r--sys/arm/at91/board_sam9x25ek.c130
-rw-r--r--sys/arm/at91/board_sn9g45.c57
-rw-r--r--sys/arm/at91/board_tsc4370.c610
-rw-r--r--sys/arm/at91/files.at9173
-rw-r--r--sys/arm/at91/if_ate.c1532
-rw-r--r--sys/arm/at91/if_atereg.h216
-rw-r--r--sys/arm/at91/if_macb.c1618
-rw-r--r--sys/arm/at91/if_macbreg.h107
-rw-r--r--sys/arm/at91/if_macbvar.h138
-rw-r--r--sys/arm/at91/std.at9111
-rw-r--r--sys/arm/at91/std.at91sam911
-rw-r--r--sys/arm/at91/std.at91sam9g4516
-rw-r--r--sys/arm/at91/std.atmel14
-rw-r--r--sys/arm/at91/std.bwct8
-rw-r--r--sys/arm/at91/std.eb92008
-rw-r--r--sys/arm/at91/std.ethernut59
-rw-r--r--sys/arm/at91/std.hl2008
-rw-r--r--sys/arm/at91/std.hl2019
-rw-r--r--sys/arm/at91/std.kb920x8
-rw-r--r--sys/arm/at91/std.qila9g209
-rw-r--r--sys/arm/at91/std.sam9260ek9
-rw-r--r--sys/arm/at91/std.sam9g20ek9
-rw-r--r--sys/arm/at91/std.sam9x25ek9
-rw-r--r--sys/arm/at91/std.sn9g4510
-rw-r--r--sys/arm/at91/std.tsc43708
-rw-r--r--sys/arm/at91/uart_bus_at91usart.c113
-rw-r--r--sys/arm/at91/uart_cpu_at91usart.c92
-rw-r--r--sys/arm/at91/uart_dev_at91usart.c877
-rw-r--r--sys/arm/broadcom/bcm2835/std.bcm28362
-rw-r--r--sys/arm/cavium/cns11xx/cfi_bus_econa.c67
-rw-r--r--sys/arm/cavium/cns11xx/econa.c652
-rw-r--r--sys/arm/cavium/cns11xx/econa_machdep.c336
-rw-r--r--sys/arm/cavium/cns11xx/econa_reg.h180
-rw-r--r--sys/arm/cavium/cns11xx/econa_var.h52
-rw-r--r--sys/arm/cavium/cns11xx/ehci_ebus.c248
-rw-r--r--sys/arm/cavium/cns11xx/files.econa12
-rw-r--r--sys/arm/cavium/cns11xx/if_ece.c1955
-rw-r--r--sys/arm/cavium/cns11xx/if_ecereg.h154
-rw-r--r--sys/arm/cavium/cns11xx/if_ecevar.h193
-rw-r--r--sys/arm/cavium/cns11xx/ohci_ec.c234
-rw-r--r--sys/arm/cavium/cns11xx/std.econa15
-rw-r--r--sys/arm/cavium/cns11xx/timer.c382
-rw-r--r--sys/arm/cavium/cns11xx/uart_bus_ec.c76
-rw-r--r--sys/arm/cavium/cns11xx/uart_cpu_ec.c84
-rw-r--r--sys/arm/conf/ALLWINNER_UP108
-rw-r--r--sys/arm/conf/ATMEL159
-rw-r--r--sys/arm/conf/CNS11XXNAS108
-rw-r--r--sys/arm/conf/CRB92
-rw-r--r--sys/arm/conf/GENERIC1
-rw-r--r--sys/arm/conf/GUMSTIX82
-rw-r--r--sys/arm/conf/GUMSTIX-QEMU25
-rw-r--r--sys/arm/conf/GUMSTIX.hints19
-rw-r--r--sys/arm/conf/NOTES21
-rw-r--r--sys/arm/conf/RT13104
-rw-r--r--sys/arm/conf/SAM9G20EK172
-rw-r--r--sys/arm/freescale/imx/std.imx63
-rw-r--r--sys/arm/include/at91_gpio.h110
-rw-r--r--sys/arm/include/atomic-v4.h13
-rw-r--r--sys/arm/include/cpufunc.h122
-rw-r--r--sys/arm/include/pmap-v6.h1
-rw-r--r--sys/arm/include/smp.h18
-rw-r--r--sys/arm/mv/armada38x/std.armada38x3
-rw-r--r--sys/arm/mv/armadaxp/armadaxp.c5
-rw-r--r--sys/arm/mv/armadaxp/armadaxp_mp.c2
-rw-r--r--sys/arm/nvidia/tegra124/std.tegra1243
-rw-r--r--sys/arm/qemu/std.virt3
-rw-r--r--sys/arm/ralink/rt1310_intc.c2
-rw-r--r--sys/arm/ralink/std.ralink6
-rw-r--r--sys/arm/rockchip/std.rk30xx3
-rw-r--r--sys/arm/samsung/exynos/std.exynos52503
-rw-r--r--sys/arm/samsung/exynos/std.exynos54203
-rw-r--r--sys/arm/ti/ti_cpuid.c3
-rw-r--r--sys/arm/xilinx/std.zynq73
-rw-r--r--sys/arm/xscale/i8134x/crb_machdep.c333
-rw-r--r--sys/arm/xscale/i8134x/files.crb3
-rw-r--r--sys/arm/xscale/i8134x/files.i8134212
-rw-r--r--sys/arm/xscale/i8134x/i80321_timer.c486
-rw-r--r--sys/arm/xscale/i8134x/i80321_wdog.c153
-rw-r--r--sys/arm/xscale/i8134x/i80321reg.h455
-rw-r--r--sys/arm/xscale/i8134x/i80321var.h137
-rw-r--r--sys/arm/xscale/i8134x/i81342.c468
-rw-r--r--sys/arm/xscale/i8134x/i81342_pci.c547
-rw-r--r--sys/arm/xscale/i8134x/i81342_space.c234
-rw-r--r--sys/arm/xscale/i8134x/i81342reg.h350
-rw-r--r--sys/arm/xscale/i8134x/i81342var.h72
-rw-r--r--sys/arm/xscale/i8134x/iq81342_7seg.c393
-rw-r--r--sys/arm/xscale/i8134x/iq81342reg.h35
-rw-r--r--sys/arm/xscale/i8134x/iq81342var.h34
-rw-r--r--sys/arm/xscale/i8134x/obio.c168
-rw-r--r--sys/arm/xscale/i8134x/obiovar.h56
-rw-r--r--sys/arm/xscale/i8134x/std.crb6
-rw-r--r--sys/arm/xscale/i8134x/std.i813426
-rw-r--r--sys/arm/xscale/i8134x/uart_bus_i81342.c94
-rw-r--r--sys/arm/xscale/i8134x/uart_cpu_i81342.c70
-rw-r--r--sys/arm/xscale/pxa/files.pxa14
-rw-r--r--sys/arm/xscale/pxa/if_smc_smi.c127
-rw-r--r--sys/arm/xscale/pxa/pxa_gpio.c360
-rw-r--r--sys/arm/xscale/pxa/pxa_icu.c261
-rw-r--r--sys/arm/xscale/pxa/pxa_machdep.c439
-rw-r--r--sys/arm/xscale/pxa/pxa_obio.c399
-rw-r--r--sys/arm/xscale/pxa/pxa_smi.c356
-rw-r--r--sys/arm/xscale/pxa/pxa_space.c267
-rw-r--r--sys/arm/xscale/pxa/pxa_timer.c322
-rw-r--r--sys/arm/xscale/pxa/pxareg.h758
-rw-r--r--sys/arm/xscale/pxa/pxavar.h114
-rw-r--r--sys/arm/xscale/pxa/std.pxa9
-rw-r--r--sys/arm/xscale/pxa/uart_bus_pxa.c105
-rw-r--r--sys/arm/xscale/pxa/uart_cpu_pxa.c71
-rw-r--r--sys/arm/xscale/std.xscale3
-rw-r--r--sys/arm64/arm64/cpu_errata.c47
-rw-r--r--sys/arm64/arm64/efirt_machdep.c13
-rw-r--r--sys/arm64/arm64/exception.S16
-rw-r--r--sys/arm64/arm64/genassym.c1
-rw-r--r--sys/arm64/arm64/pmap.c94
-rw-r--r--sys/arm64/conf/GENERIC3
-rw-r--r--sys/arm64/include/pcpu.h4
-rw-r--r--sys/cam/cam_ccb.h42
-rw-r--r--sys/cam/cam_iosched.c18
-rw-r--r--sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c393
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c6
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h1
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c73
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.h6
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c8
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/Makefile.files1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c116
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c277
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c135
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c30
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c12
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c82
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c7
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c109
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c89
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c11
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c9
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c33
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c23
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c620
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c23
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c28
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c281
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c50
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c14
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c79
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c814
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c18
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h18
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h18
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h12
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h18
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.h89
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h22
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h19
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/space_map.h114
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg_impl.h3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h34
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_initialize.h46
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_removal.h5
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_debug.h4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h13
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_priority.h3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c37
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/unique.c12
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c159
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c555
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c9
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_initialize.c792
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c109
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c32
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c43
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c75
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c585
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c237
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c83
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c287
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c9
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c2
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c19
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c80
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c12
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c52
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c14
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c38
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c396
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c18
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c28
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/avl.h8
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h38
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/nvpair.h3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/nvpair_impl.h29
-rw-r--r--sys/compat/cloudabi/cloudabi_sock.c17
-rw-r--r--sys/compat/freebsd32/freebsd32_ioctl.c41
-rw-r--r--sys/compat/freebsd32/freebsd32_ioctl.h12
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c83
-rw-r--r--sys/compat/freebsd32/freebsd32_proto.h6
-rw-r--r--sys/compat/freebsd32/freebsd32_syscall.h2
-rw-r--r--sys/compat/freebsd32/freebsd32_syscalls.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_systrace_args.c12
-rw-r--r--sys/compat/freebsd32/syscalls.master5
-rw-r--r--sys/compat/linux/linux_event.c16
-rw-r--r--sys/compat/linux/linux_futex.c4
-rw-r--r--sys/compat/linux/linux_misc.c4
-rw-r--r--sys/compat/linux/linux_socket.c37
-rw-r--r--sys/compat/linuxkpi/common/include/asm/atomic-long.h19
-rw-r--r--sys/compat/linuxkpi/common/include/asm/atomic.h66
-rw-r--r--sys/compat/linuxkpi/common/include/asm/atomic64.h23
-rw-r--r--sys/compat/linuxkpi/common/include/linux/bitops.h12
-rw-r--r--sys/compat/linuxkpi/common/include/linux/ktime.h14
-rw-r--r--sys/compat/linuxkpi/common/include/linux/sched.h2
-rw-r--r--sys/compat/linuxkpi/common/include/linux/time.h4
-rw-r--r--sys/compat/linuxkpi/common/include/linux/types.h1
-rw-r--r--sys/compat/linuxkpi/common/include/linux/workqueue.h4
-rw-r--r--sys/compat/linuxkpi/common/src/linux_work.c15
-rw-r--r--sys/conf/Makefile.arm6
-rw-r--r--sys/conf/NOTES12
-rw-r--r--sys/conf/files8
-rw-r--r--sys/conf/files.amd641
-rw-r--r--sys/conf/files.arm7
-rw-r--r--sys/conf/files.powerpc3
-rw-r--r--sys/conf/kern.mk2
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/conf/options2
-rw-r--r--sys/conf/options.arm12
-rw-r--r--sys/contrib/ck/include/gcc/ppc/ck_pr.h32
-rw-r--r--sys/contrib/ck/include/spinlock/hclh.h12
-rw-r--r--sys/contrib/ck/src/ck_barrier_combining.c8
-rw-r--r--sys/contrib/ipfilter/netinet/ip_compat.h4
-rw-r--r--sys/contrib/ipfilter/netinet/ip_nat.c28
-rw-r--r--sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c2
-rw-r--r--sys/ddb/db_ps.c39
-rw-r--r--sys/dev/acpica/acpi_cmbat.c2
-rw-r--r--sys/dev/acpica/acpi_smbat.c2
-rw-r--r--sys/dev/acpica/acpi_thermal.c2
-rw-r--r--sys/dev/ahci/ahci.c8
-rw-r--r--sys/dev/ath/if_ath_rx_edma.c8
-rw-r--r--sys/dev/bge/if_bge.c6
-rw-r--r--sys/dev/bwi/if_bwi.c4
-rw-r--r--sys/dev/cx/cxddk.c2
-rw-r--r--sys/dev/cxgbe/adapter.h17
-rw-r--r--sys/dev/cxgbe/common/common.h21
-rw-r--r--sys/dev/cxgbe/common/t4_hw.c3
-rw-r--r--sys/dev/cxgbe/offload.h45
-rw-r--r--sys/dev/cxgbe/t4_filter.c222
-rw-r--r--sys/dev/cxgbe/t4_main.c215
-rw-r--r--sys/dev/cxgbe/t4_netmap.c10
-rw-r--r--sys/dev/cxgbe/t4_sched.c557
-rw-r--r--sys/dev/cxgbe/t4_sge.c94
-rw-r--r--sys/dev/cxgbe/tom/t4_cpl_io.c6
-rw-r--r--sys/dev/cxgbe/tom/t4_tom.c16
-rw-r--r--sys/dev/drm2/i915/i915_gem.c4
-rw-r--r--sys/dev/drm2/i915/intel_pm.c3
-rw-r--r--sys/dev/efidev/efirt.c38
-rw-r--r--sys/dev/efidev/efirtc.c2
-rw-r--r--sys/dev/extres/clk/clk_div.c22
-rw-r--r--sys/dev/extres/nvmem/nvmem.c199
-rw-r--r--sys/dev/extres/nvmem/nvmem.h (renamed from sys/dev/nand/nfc_at91.h)32
-rw-r--r--sys/dev/extres/nvmem/nvmem_if.m (renamed from sys/modules/usb/at91dci/Makefile)55
-rw-r--r--sys/dev/filemon/filemon.c9
-rw-r--r--sys/dev/filemon/filemon_wrapper.c76
-rw-r--r--sys/dev/firewire/00README2
-rw-r--r--sys/dev/flash/mx25l.c2
-rw-r--r--sys/dev/flash/n25q.c2
-rw-r--r--sys/dev/hwpmc/pmc_events.h2
-rw-r--r--sys/dev/hyperv/pcib/vmbus_pcib.c14
-rw-r--r--sys/dev/hyperv/vmbus/amd64/vmbus_vector.S1
-rw-r--r--sys/dev/ipmi/ipmi_opal.c (renamed from sys/powerpc/powernv/opal_ipmi.c)2
-rw-r--r--sys/dev/isp/isp_freebsd.c5
-rw-r--r--sys/dev/jedec_dimm/jedec_dimm.c6
-rw-r--r--sys/dev/jedec_ts/jedec_ts.c283
-rw-r--r--sys/dev/joy/joy.c8
-rw-r--r--sys/dev/mii/icsphy.c1
-rw-r--r--sys/dev/mii/miidevs1
-rw-r--r--sys/dev/nand/nfc_at91.c295
-rw-r--r--sys/dev/nvme/nvme_qpair.c19
-rw-r--r--sys/dev/ofw/ofw_cpu.c30
-rw-r--r--sys/dev/pci/pci_user.c93
-rw-r--r--sys/dev/psci/smccc.c9
-rw-r--r--sys/dev/psci/smccc.h3
-rw-r--r--sys/dev/qlnx/qlnxe/bcm_osal.h56
-rw-r--r--sys/dev/qlnx/qlnxe/common_hsi.h569
-rw-r--r--sys/dev/qlnx/qlnxe/ecore.h250
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_chain.h71
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_cxt.c148
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_cxt.h25
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c540
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h27
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dbg_values.h5316
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dcbx.c567
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dcbx.h17
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dcbx_api.h92
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dev.c2982
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_dev_api.h248
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_fcoe.h13
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_fcoe_api.h6
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_common.h319
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h103
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_eth.h193
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h19
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_init_func.h34
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_init_tool.h107
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h11
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h238
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h73
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hsi_roce.h252
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hw.c225
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_hw.h41
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c538
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h126
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_init_ops.c55
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_init_values.h100942
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_int.c174
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_int.h3
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_int_api.h16
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_iov_api.h33
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_iro.h6
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_iro_values.h70
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_iscsi.h36
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_iscsi_api.h112
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_iwarp.h341
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_l2.c344
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_l2.h24
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_l2_api.h78
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_ll2.h3
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_ll2_api.h15
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_mcp.c1001
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_mcp.h135
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_mcp_api.h113
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_mng_tlv.c1398
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_ooo.h15
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_proto_if.h8
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_rdma.h279
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_rdma_api.h970
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_roce.h372
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_roce_api.h25
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_rt_defs.h861
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_sp_commands.c127
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_sp_commands.h19
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_spq.c191
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_spq.h23
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_sriov.c4961
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_sriov.h21
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_tcp_ip.h140
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_utils.h4
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_vf.c1951
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_vf.h66
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_vf_api.h34
-rw-r--r--sys/dev/qlnx/qlnxe/ecore_vfpf_if.h40
-rw-r--r--sys/dev/qlnx/qlnxe/eth_common.h46
-rw-r--r--sys/dev/qlnx/qlnxe/fcoe_common.h68
-rw-r--r--sys/dev/qlnx/qlnxe/iscsi_common.h107
-rw-r--r--sys/dev/qlnx/qlnxe/mcp_private.h135
-rw-r--r--sys/dev/qlnx/qlnxe/mcp_public.h324
-rw-r--r--sys/dev/qlnx/qlnxe/nvm_cfg.h101
-rw-r--r--sys/dev/qlnx/qlnxe/nvm_map.h109
-rw-r--r--sys/dev/qlnx/qlnxe/qlnx_def.h52
-rw-r--r--sys/dev/qlnx/qlnxe/qlnx_ioctl.c238
-rw-r--r--sys/dev/qlnx/qlnxe/qlnx_ioctl.h37
-rw-r--r--sys/dev/qlnx/qlnxe/qlnx_os.c1888
-rw-r--r--sys/dev/qlnx/qlnxe/qlnx_os.h6
-rw-r--r--sys/dev/qlnx/qlnxe/qlnx_ver.h6
-rw-r--r--sys/dev/qlnx/qlnxe/rdma_common.h928
-rw-r--r--sys/dev/qlnx/qlnxe/reg_addr.h16225
-rw-r--r--sys/dev/qlnx/qlnxe/roce_common.h5
-rw-r--r--sys/dev/qlnx/qlnxe/spad_layout.h23
-rw-r--r--sys/dev/qlnx/qlnxe/storage_common.h29
-rw-r--r--sys/dev/qlnx/qlnxe/tcp_common.h82
-rw-r--r--sys/dev/sk/if_sk.c2
-rw-r--r--sys/dev/sound/pci/hda/hdaa.c3
-rw-r--r--sys/dev/sound/pci/hda/hdac.c57
-rw-r--r--sys/dev/sound/pci/maestro3.c2
-rw-r--r--sys/dev/sound/pcm/dsp.c2
-rw-r--r--sys/dev/usb/controller/at91dci.c2382
-rw-r--r--sys/dev/usb/controller/at91dci.h245
-rw-r--r--sys/dev/usb/controller/at91dci_atmelarm.c319
-rw-r--r--sys/dev/usb/controller/at91dci_fdt.c325
-rw-r--r--sys/dev/usb/controller/atmegadci_atmelarm.c213
-rw-r--r--sys/dev/usb/controller/musb_otg_atmelarm.c262
-rw-r--r--sys/dev/usb/controller/usb_controller.c1
-rw-r--r--sys/dev/usb/controller/uss820dci_atmelarm.c197
-rw-r--r--sys/dev/usb/input/uep.c103
-rw-r--r--sys/dev/usb/input/wmt.c148
-rw-r--r--sys/dev/usb/net/if_muge.c4
-rw-r--r--sys/dev/vt/hw/vga/vt_vga.c8
-rw-r--r--sys/dev/xen/blkfront/blkfront.c15
-rw-r--r--sys/dev/xen/grant_table/grant_table.c2
-rw-r--r--sys/dev/xen/timer/timer.c2
-rw-r--r--sys/dts/arm/hl201.dts44
-rw-r--r--sys/dts/arm/sam9260ek.dts37
-rw-r--r--sys/fs/cd9660/cd9660_lookup.c2
-rw-r--r--sys/fs/cd9660/cd9660_rrip.c8
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c4
-rw-r--r--sys/fs/cd9660/cd9660_vnops.c4
-rw-r--r--sys/fs/ext2fs/ext2_dir.h1
-rw-r--r--sys/fs/ext2fs/ext2_htree.c2
-rw-r--r--sys/fs/ext2fs/ext2_lookup.c101
-rw-r--r--sys/fs/ext2fs/ext2_vnops.c35
-rw-r--r--sys/fs/fuse/fuse_file.c7
-rw-r--r--sys/fs/fuse/fuse_vfsops.c7
-rw-r--r--sys/fs/fuse/fuse_vnops.c2
-rw-r--r--sys/fs/msdosfs/denode.h7
-rw-r--r--sys/fs/msdosfs/direntry.h4
-rw-r--r--sys/fs/msdosfs/fat.h4
-rw-r--r--sys/fs/msdosfs/msdosfs_conv.c4
-rw-r--r--sys/fs/msdosfs/msdosfs_denode.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c10
-rw-r--r--sys/fs/msdosfs/msdosfs_lookup.c4
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c2
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c8
-rw-r--r--sys/fs/nfs/nfs.h1
-rw-r--r--sys/fs/nfs/nfs_commonkrpc.c10
-rw-r--r--sys/fs/nfs/nfs_var.h2
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c10
-rw-r--r--sys/fs/nfsclient/nfs_clstate.c7
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c10
-rw-r--r--sys/fs/nfsserver/nfs_nfsdserv.c19
-rw-r--r--sys/fs/nfsserver/nfs_nfsdstate.c106
-rw-r--r--sys/i386/i386/copyout.c3
-rw-r--r--sys/i386/i386/machdep.c2
-rw-r--r--sys/i386/i386/npx.c39
-rw-r--r--sys/i386/i386/pmap.c61
-rw-r--r--sys/i386/i386/vm_machdep.c2
-rw-r--r--sys/i386/include/atomic.h51
-rw-r--r--sys/i386/include/cserial.h2
-rw-r--r--sys/i386/include/pmap.h2
-rw-r--r--sys/i386/include/vmparam.h6
-rw-r--r--sys/kern/imgact_elf.c2
-rw-r--r--sys/kern/kern_event.c116
-rw-r--r--sys/kern/kern_intr.c93
-rw-r--r--sys/kern/kern_jail.c14
-rw-r--r--sys/kern/kern_sig.c25
-rw-r--r--sys/kern/kern_syscalls.c2
-rw-r--r--sys/kern/kern_tc.c2
-rw-r--r--sys/kern/kern_time.c20
-rw-r--r--sys/kern/kern_umtx.c10
-rw-r--r--sys/kern/link_elf_obj.c52
-rw-r--r--sys/kern/sched_ule.c7
-rw-r--r--sys/kern/subr_epoch.c38
-rw-r--r--sys/kern/subr_gtaskqueue.c18
-rw-r--r--sys/kern/subr_msgbuf.c2
-rw-r--r--sys/kern/subr_pcpu.c2
-rw-r--r--sys/kern/subr_prf.c24
-rw-r--r--sys/kern/subr_rtc.c4
-rw-r--r--sys/kern/sys_process.c2
-rw-r--r--sys/kern/uipc_mqueue.c6
-rw-r--r--sys/kern/uipc_sem.c2
-rw-r--r--sys/kern/uipc_sockbuf.c22
-rw-r--r--sys/kern/uipc_syscalls.c97
-rw-r--r--sys/kern/uipc_usrreq.c107
-rw-r--r--sys/mips/include/cca.h153
-rw-r--r--sys/mips/include/cpuregs.h94
-rw-r--r--sys/mips/include/vm.h1
-rw-r--r--sys/mips/ingenic/jz4780_smb.c4
-rw-r--r--sys/mips/mips/pmap.c16
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/dtb/am335x/Makefile7
-rw-r--r--sys/modules/dtb/atmel/Makefile9
-rw-r--r--sys/modules/dtb/rpi/Makefile9
-rw-r--r--sys/modules/i2c/Makefile1
-rw-r--r--sys/modules/i2c/jedec_ts/Makefile7
-rw-r--r--sys/modules/ipmi/Makefile15
-rw-r--r--sys/modules/qlnx/Makefile1
-rw-r--r--sys/modules/qlnx/qlnxe/Makefile10
-rw-r--r--sys/modules/qlnx/qlnxev/Makefile79
-rw-r--r--sys/modules/tcp/Makefile2
-rw-r--r--sys/modules/tcp/fastpath/Makefile18
-rw-r--r--sys/modules/usb/Makefile3
-rw-r--r--sys/modules/usb/uep/Makefile4
-rw-r--r--sys/net/altq/if_altq.h4
-rw-r--r--sys/net/bpf.c2
-rw-r--r--sys/net/ieee8023ad_lacp.c4
-rw-r--r--sys/net/if.c2
-rw-r--r--sys/net/if_bridge.c24
-rw-r--r--sys/net/if_clone.c2
-rw-r--r--sys/net/if_disc.c2
-rw-r--r--sys/net/if_edsc.c2
-rw-r--r--sys/net/if_enc.c12
-rw-r--r--sys/net/if_epair.c2
-rw-r--r--sys/net/if_ethersubr.c2
-rw-r--r--sys/net/if_gif.c4
-rw-r--r--sys/net/if_gre.c4
-rw-r--r--sys/net/if_ipsec.c8
-rw-r--r--sys/net/if_lagg.c10
-rw-r--r--sys/net/if_llatbl.c2
-rw-r--r--sys/net/if_loop.c2
-rw-r--r--sys/net/if_me.c6
-rw-r--r--sys/net/if_vlan.c2
-rw-r--r--sys/net/iflib.c77
-rw-r--r--sys/net/netisr.c2
-rw-r--r--sys/net/pfvar.h2
-rw-r--r--sys/net/route.c2
-rw-r--r--sys/net/rtsock.c2
-rw-r--r--sys/net/vnet.c2
-rw-r--r--sys/net/vnet.h20
-rw-r--r--sys/net80211/ieee80211_hwmp.c2
-rw-r--r--sys/net80211/ieee80211_node.c19
-rw-r--r--sys/netgraph/ng_base.c14
-rw-r--r--sys/netgraph/ng_eiface.c2
-rw-r--r--sys/netgraph/ng_iface.c20
-rw-r--r--sys/netgraph/ng_iface.h3
-rw-r--r--sys/netinet/cc/cc_cdg.c14
-rw-r--r--sys/netinet/cc/cc_chd.c10
-rw-r--r--sys/netinet/cc/cc_dctcp.c6
-rw-r--r--sys/netinet/cc/cc_hd.c6
-rw-r--r--sys/netinet/cc/cc_htcp.c4
-rw-r--r--sys/netinet/cc/cc_newreno.c4
-rw-r--r--sys/netinet/cc/cc_vegas.c4
-rw-r--r--sys/netinet/if_ether.c12
-rw-r--r--sys/netinet/igmp.c26
-rw-r--r--sys/netinet/in.c2
-rw-r--r--sys/netinet/in_gif.c6
-rw-r--r--sys/netinet/in_kdtrace.c15
-rw-r--r--sys/netinet/in_kdtrace.h6
-rw-r--r--sys/netinet/in_mcast.c5
-rw-r--r--sys/netinet/in_pcb.c2
-rw-r--r--sys/netinet/in_pcb.h5
-rw-r--r--sys/netinet/ip_carp.c14
-rw-r--r--sys/netinet/ip_divert.c4
-rw-r--r--sys/netinet/ip_gre.c2
-rw-r--r--sys/netinet/ip_icmp.c22
-rw-r--r--sys/netinet/ip_id.c20
-rw-r--r--sys/netinet/ip_input.c8
-rw-r--r--sys/netinet/ip_mroute.c36
-rw-r--r--sys/netinet/ip_options.c4
-rw-r--r--sys/netinet/ip_reass.c10
-rw-r--r--sys/netinet/sctp_indata.c6
-rw-r--r--sys/netinet/tcp_fastopen.c24
-rw-r--r--sys/netinet/tcp_hostcache.c4
-rw-r--r--sys/netinet/tcp_hpts.c5
-rw-r--r--sys/netinet/tcp_input.c21
-rw-r--r--sys/netinet/tcp_output.c12
-rw-r--r--sys/netinet/tcp_reass.c12
-rw-r--r--sys/netinet/tcp_stacks/fastpath.c2360
-rw-r--r--sys/netinet/tcp_stacks/rack.c18
-rw-r--r--sys/netinet/tcp_subr.c16
-rw-r--r--sys/netinet/tcp_syncache.c18
-rw-r--r--sys/netinet/tcp_timewait.c34
-rw-r--r--sys/netinet/tcp_usrreq.c143
-rw-r--r--sys/netinet/udp_usrreq.c35
-rw-r--r--sys/netinet/udplite.h11
-rw-r--r--sys/netinet6/frag6.c6
-rw-r--r--sys/netinet6/icmp6.c4
-rw-r--r--sys/netinet6/in6_gif.c6
-rw-r--r--sys/netinet6/in6_mcast.c5
-rw-r--r--sys/netinet6/in6_proto.c2
-rw-r--r--sys/netinet6/in6_rmx.c4
-rw-r--r--sys/netinet6/in6_src.c4
-rw-r--r--sys/netinet6/ip6_gre.c2
-rw-r--r--sys/netinet6/ip6_input.c2
-rw-r--r--sys/netinet6/ip6_mroute.c6
-rw-r--r--sys/netinet6/mld6.c10
-rw-r--r--sys/netinet6/nd6.c6
-rw-r--r--sys/netinet6/nd6_nbr.c8
-rw-r--r--sys/netinet6/nd6_rtr.c2
-rw-r--r--sys/netinet6/scope6.c2
-rw-r--r--sys/netinet6/send.c2
-rw-r--r--sys/netinet6/udp6_usrreq.c28
-rw-r--r--sys/netipsec/ipsec.c8
-rw-r--r--sys/netipsec/key.c74
-rw-r--r--sys/netipsec/keysock.c2
-rw-r--r--sys/netpfil/ipfw/ip_fw2.c4
-rw-r--r--sys/netpfil/ipfw/ip_fw_bpf.c8
-rw-r--r--sys/netpfil/ipfw/ip_fw_dynamic.c80
-rw-r--r--sys/netpfil/ipfw/ip_fw_pfil.c6
-rw-r--r--sys/netpfil/ipfw/ip_fw_sockopt.c2
-rw-r--r--sys/netpfil/ipfw/nptv6/nptv6.c2
-rw-r--r--sys/netpfil/ipfw/pmod/tcpmod.c4
-rw-r--r--sys/netpfil/pf/if_pflog.c2
-rw-r--r--sys/netpfil/pf/if_pfsync.c8
-rw-r--r--sys/netpfil/pf/pf.c10
-rw-r--r--sys/netpfil/pf/pf_if.c12
-rw-r--r--sys/netpfil/pf/pf_ioctl.c4
-rw-r--r--sys/netpfil/pf/pf_norm.c8
-rw-r--r--sys/netpfil/pf/pf_osfp.c2
-rw-r--r--sys/netpfil/pf/pf_table.c10
-rw-r--r--sys/netsmb/smb_iod.c6
-rw-r--r--sys/netsmb/smb_trantcp.c9
-rw-r--r--sys/ofed/include/rdma/ib_sa.h6
-rw-r--r--sys/opencrypto/crypto.c2
-rw-r--r--sys/powerpc/include/ieeefp.h8
-rw-r--r--sys/powerpc/ofw/ofw_initrd.c159
-rw-r--r--sys/powerpc/powernv/opal_dev.c11
-rw-r--r--sys/powerpc/powerpc/db_disasm.c4
-rw-r--r--sys/powerpc/powerpc/genassym.c2
-rw-r--r--sys/powerpc/powerpc/pmap_dispatch.c18
-rw-r--r--sys/powerpc/powerpc/swtch32.S8
-rw-r--r--sys/riscv/conf/GENERIC2
-rw-r--r--sys/riscv/include/atomic.h4
-rw-r--r--sys/riscv/include/cpu.h4
-rw-r--r--sys/riscv/include/vmparam.h5
-rw-r--r--sys/riscv/riscv/copyinout.S5
-rw-r--r--sys/riscv/riscv/machdep.c1
-rw-r--r--sys/riscv/riscv/pmap.c55
-rw-r--r--sys/riscv/riscv/soc.c1
-rw-r--r--sys/riscv/riscv/swtch.S7
-rw-r--r--sys/riscv/riscv/uma_machdep.c31
-rw-r--r--sys/riscv/riscv/vm_machdep.c21
-rw-r--r--sys/security/mac/mac_framework.c4
-rw-r--r--sys/sparc64/include/atomic.h11
-rw-r--r--sys/sparc64/sparc64/pmap.c7
-rw-r--r--sys/sys/cdefs.h2
-rw-r--r--sys/sys/efi.h1
-rw-r--r--sys/sys/elf_common.h6
-rw-r--r--sys/sys/interrupt.h2
-rw-r--r--sys/sys/jail.h3
-rw-r--r--sys/sys/mbuf.h5
-rw-r--r--sys/sys/msgbuf.h2
-rw-r--r--sys/sys/param.h2
-rw-r--r--sys/sys/pciio.h19
-rw-r--r--sys/sys/pcpu.h4
-rw-r--r--sys/sys/proc.h1
-rw-r--r--sys/sys/sockbuf.h4
-rw-r--r--sys/sys/socketvar.h10
-rw-r--r--sys/sys/sockopt.h1
-rw-r--r--sys/sys/stdatomic.h25
-rw-r--r--sys/sys/time.h28
-rw-r--r--sys/sys/unpcb.h9
-rw-r--r--sys/ufs/ffs/ffs_alloc.c112
-rw-r--r--sys/ufs/ffs/ffs_balloc.c4
-rw-r--r--sys/ufs/ffs/ffs_extern.h19
-rw-r--r--sys/ufs/ffs/ffs_inode.c47
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c8
-rw-r--r--sys/ufs/ffs/ffs_softdep.c113
-rw-r--r--sys/ufs/ffs/ffs_suspend.c49
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c3
-rw-r--r--sys/ufs/ffs/softdep.h1
-rw-r--r--sys/ufs/ufs/ufsmount.h4
-rw-r--r--sys/vm/pmap.h1
-rw-r--r--sys/vm/swap_pager.c143
-rw-r--r--sys/vm/vm_fault.c11
-rw-r--r--sys/vm/vm_kern.c13
-rw-r--r--sys/vm/vm_map.c11
-rw-r--r--sys/vm/vm_mmap.c6
-rw-r--r--sys/vm/vm_object.c5
-rw-r--r--sys/vm/vm_pageout.c27
-rw-r--r--sys/vm/vm_phys.c24
-rw-r--r--sys/vm/vm_swapout.c127
-rw-r--r--sys/x86/iommu/intel_dmar.h3
-rw-r--r--sys/x86/x86/cpu_machdep.c7
-rw-r--r--sys/x86/x86/stack_machdep.c10
-rw-r--r--tests/sys/Makefile1
-rw-r--r--tests/sys/audit/Makefile3
-rw-r--r--tests/sys/audit/miscellaneous.c232
-rw-r--r--tests/sys/auditpipe/Makefile10
-rw-r--r--tests/sys/auditpipe/auditpipe_test.c185
-rw-r--r--tests/sys/geom/class/nop/nop_test.sh2
-rw-r--r--tests/sys/kern/Makefile3
-rw-r--r--tests/sys/kern/unix_passfd_test.c262
-rw-r--r--tests/sys/kern/unix_socketpair_test.c (renamed from sys/arm/at91/board_bwct.c)62
-rw-r--r--tests/sys/kqueue/libkqueue/common.h4
-rw-r--r--tests/sys/kqueue/libkqueue/main.c19
-rw-r--r--tests/sys/kqueue/libkqueue/timer.c343
-rwxr-xr-xtools/boot/rootgen.sh3
-rwxr-xr-xtools/build/beinstall.sh121
-rw-r--r--tools/build/options/WITH_LLVM_TARGET_BPF5
-rw-r--r--tools/regression/posixsem/posixsem.c35
-rw-r--r--tools/regression/sockets/udp_pingpong/udp_pingpong.c41
-rw-r--r--tools/regression/sockets/unix_cmsg/uc_check_time.c18
-rw-r--r--tools/tools/git/HOWTO7
-rwxr-xr-xtools/tools/git/git-svn-init193
-rw-r--r--tools/tools/nanobsd/pcengines/Files/root/.cshrc2
-rw-r--r--tools/tools/nanobsd/rescue/Files/root/.cshrc6
-rw-r--r--tools/tools/netrate/juggle/juggle.c19
-rw-r--r--tools/tools/netrate/tcpp/tcpp_client.c12
-rw-r--r--tools/tools/sysbuild/sysbuild.sh4
-rw-r--r--tools/tools/syscall_timing/syscall_timing.c12
-rw-r--r--usr.bin/apply/apply.c41
-rw-r--r--usr.bin/calendar/calendars/calendar.freebsd1
-rw-r--r--usr.bin/diff/diffreg.c13
-rwxr-xr-xusr.bin/diff/tests/diff_test.sh11
-rw-r--r--usr.bin/find/find.c1
-rw-r--r--usr.bin/find/misc.c1
-rw-r--r--usr.bin/kdump/kdump.c82
-rw-r--r--usr.bin/mail/cmd1.c2
-rw-r--r--usr.bin/mail/mail.14
-rw-r--r--usr.bin/mail/pathnames.h2
-rw-r--r--usr.bin/man/man.16
-rwxr-xr-xusr.bin/man/man.sh2
-rw-r--r--usr.bin/msgs/msgs.16
-rw-r--r--usr.bin/msgs/pathnames.h2
-rw-r--r--usr.bin/printf/printf.c12
-rwxr-xr-xusr.bin/procstat/tests/procstat_test.sh15
-rw-r--r--usr.bin/sed/Makefile2
-rw-r--r--usr.bin/sed/compile.c6
-rw-r--r--usr.bin/sed/extern.h2
-rw-r--r--usr.bin/sed/process.c16
-rw-r--r--usr.bin/stat/stat.c12
-rw-r--r--usr.bin/tar/tests/Makefile1
-rw-r--r--usr.bin/top/display.c5
-rw-r--r--usr.bin/top/machine.c9
-rw-r--r--usr.bin/top/screen.c3
-rw-r--r--usr.bin/top/utils.c2
-rw-r--r--usr.bin/top/utils.h1
-rw-r--r--usr.bin/truncate/truncate.c5
-rw-r--r--usr.bin/truss/setup.c5
-rw-r--r--usr.bin/truss/syscalls.c3
-rw-r--r--usr.bin/truss/truss.h20
-rw-r--r--usr.bin/wc/wc.19
-rw-r--r--usr.bin/wc/wc.c16
-rw-r--r--usr.sbin/Makefile.riscv3
-rw-r--r--usr.sbin/apmd/Makefile1
-rw-r--r--usr.sbin/apmd/apmd.conf (renamed from etc/apmd.conf)0
-rw-r--r--usr.sbin/autofs/Makefile3
-rw-r--r--usr.sbin/autofs/auto_master (renamed from etc/auto_master)0
-rw-r--r--usr.sbin/autofs/autofs/Makefile (renamed from etc/autofs/Makefile)6
-rw-r--r--usr.sbin/autofs/autofs/include_ldap (renamed from etc/autofs/include_ldap)0
-rw-r--r--usr.sbin/autofs/autofs/include_nis (renamed from etc/autofs/include_nis)0
-rw-r--r--usr.sbin/autofs/autofs/include_nis_nullfs (renamed from etc/autofs/include_nis_nullfs)0
-rw-r--r--usr.sbin/autofs/autofs/special_hosts (renamed from etc/autofs/special_hosts)0
-rwxr-xr-xusr.sbin/autofs/autofs/special_media (renamed from etc/autofs/special_media)0
-rwxr-xr-xusr.sbin/autofs/autofs/special_noauto (renamed from etc/autofs/special_noauto)0
-rw-r--r--usr.sbin/autofs/autofs/special_null (renamed from etc/autofs/special_null)0
-rw-r--r--usr.sbin/bhyve/bhyverun.c10
-rw-r--r--usr.sbin/blacklistd/Makefile1
-rw-r--r--usr.sbin/blacklistd/blacklistd.conf (renamed from etc/blacklistd.conf)0
-rw-r--r--usr.sbin/camdd/camdd.c19
-rw-r--r--usr.sbin/config/mkmakefile.c40
-rw-r--r--usr.sbin/cxgbetool/cxgbetool.86
-rw-r--r--usr.sbin/cxgbetool/cxgbetool.c102
-rw-r--r--usr.sbin/daemon/daemon.84
-rw-r--r--usr.sbin/efibootmgr/efibootmgr.85
-rw-r--r--usr.sbin/efibootmgr/efibootmgr.c39
-rw-r--r--usr.sbin/freebsd-update/Makefile1
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.conf (renamed from etc/freebsd-update.conf)0
-rw-r--r--usr.sbin/freebsd-update/freebsd-update.sh2
-rw-r--r--usr.sbin/fstyp/Makefile1
-rw-r--r--usr.sbin/jail/jail.819
-rw-r--r--usr.sbin/makefs/ffs.c2
-rw-r--r--usr.sbin/makefs/ffs/buf.c2
-rw-r--r--usr.sbin/makefs/ffs/buf.h2
-rw-r--r--usr.sbin/makefs/ffs/ffs_alloc.c10
-rw-r--r--usr.sbin/makefs/ffs/ffs_balloc.c36
-rw-r--r--usr.sbin/makefs/msdos.c10
-rw-r--r--usr.sbin/makefs/msdos/msdosfs_denode.c2
-rw-r--r--usr.sbin/makefs/msdos/msdosfs_vfsops.c14
-rw-r--r--usr.sbin/makefs/msdos/msdosfs_vnops.c10
-rw-r--r--usr.sbin/mergemaster/mergemaster.86
-rwxr-xr-xusr.sbin/mergemaster/mergemaster.sh16
-rw-r--r--usr.sbin/newsyslog/Makefile1
-rw-r--r--usr.sbin/newsyslog/newsyslog.c190
-rw-r--r--usr.sbin/newsyslog/tests/legacy_test.sh26
-rw-r--r--usr.sbin/nfsd/Makefile2
-rw-r--r--usr.sbin/nfsd/nfsd.822
-rw-r--r--usr.sbin/nfsd/nfsd.c57
-rw-r--r--usr.sbin/nfsd/pnfs.48
-rw-r--r--usr.sbin/nfsd/pnfsserver.4414
-rw-r--r--usr.sbin/nscd/Makefile1
-rw-r--r--usr.sbin/nscd/nscd.conf (renamed from etc/nscd.conf)0
-rw-r--r--usr.sbin/pciconf/pciconf.839
-rw-r--r--usr.sbin/pciconf/pciconf.c182
-rw-r--r--usr.sbin/pkg/FreeBSD.conf (renamed from etc/pkg/FreeBSD.conf)0
-rw-r--r--usr.sbin/pkg/Makefile3
-rw-r--r--usr.sbin/pnfsdscopymr/pnfsdscopymr.c2
-rw-r--r--usr.sbin/portsnap/portsnap/Makefile1
-rw-r--r--usr.sbin/portsnap/portsnap/portsnap.conf (renamed from etc/portsnap.conf)0
-rw-r--r--usr.sbin/pw/pw_vpw.c20
-rw-r--r--usr.sbin/route6d/route6d.c6
-rw-r--r--usr.sbin/tzsetup/tzsetup.c10
-rw-r--r--usr.sbin/wpa/wpa_supplicant/wpa_supplicant.84
1394 files changed, 108767 insertions, 114855 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index f724337a0a01..26acc97e8478 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -830,6 +830,13 @@ IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh
.else
IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP}
.endif
+
+# When generating install media, do not allow user and group information from
+# the build host to affect the contents of the distribution.
+.if make(distributeworld)
+DB_FROM_SRC= yes
+.endif
+
.if defined(DB_FROM_SRC)
INSTALLFLAGS+= -N ${.CURDIR}/etc
MTREEFLAGS+= -N ${.CURDIR}/etc
@@ -1936,13 +1943,17 @@ update: .PHONY
_elftoolchain_libs= lib/libelf lib/libdwarf
.endif
+# libnv and libl are both requirements for config(8), which is an unconditional
+# bootstrap-tool.
+_config_deps= lib/libnv usr.bin/lex/lib
+
legacy: .PHONY
.if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0
@echo "ERROR: Source upgrades from versions prior to ${MINIMUM_SUPPORTED_REL} are not supported."; \
false
.endif
-.for _tool in tools/build ${_elftoolchain_libs} lib/libnv
+.for _tool in tools/build ${_elftoolchain_libs} ${_config_deps}
${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \
cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJWALK}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
diff --git a/Makefile.libcompat b/Makefile.libcompat
index eb4a247aa096..c2c729fdcfe1 100644
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -126,10 +126,11 @@ LIBCOMPATWMAKE+= ${LIBCOMPATWMAKEENV} ${MAKE} ${LIBCOMPATWMAKEFLAGS} \
MAKEOBJDIRPREFIX= \
MK_MAN=no MK_HTML=no
LIBCOMPATIMAKE+= ${LIBCOMPATWMAKE:NINSTALL=*:NDESTDIR=*} \
- MK_TOOLCHAIN=no ${IMAKE_INSTALL} \
+ ${IMAKE_INSTALL} \
-DLIBRARIES_ONLY
-_LC_LIBDIRS.yes= lib gnu/lib
+_LC_LIBDIRS.yes= lib
+_LC_LIBDIRS.yes+= gnu/lib
_LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib
_LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib
_LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 5a79a9a195ae..88baf45ed007 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -38,6 +38,8 @@
# xargs -n1 | sort | uniq -d;
# done
+# 20180725: Cleanup old libcasper.so.0
+OLD_LIBS+=lib/libcasper.so.0
# 20180722: indent(1) option renamed, test files follow
OLD_FILES+=usr/bin/indent/tests/nsac.0
OLD_FILES+=usr/bin/indent/tests/nsac.0.pro
@@ -588,8 +590,6 @@ OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-arm.
# 20171104: libcap_random should be in /lib not in /usr/lib
OLD_LIBS+=usr/lib/libcap_random.so.0
# 20171104: Casper can work only as shared library
-OLD_FILES+=usr/lib/libcasper.a
-OLD_FILES+=usr/lib/libcasper_p.a
OLD_FILES+=usr/lib/libcap_dns.a
OLD_FILES+=usr/lib/libcap_dns_p.a
OLD_FILES+=usr/lib/libcap_grp.a
@@ -600,6 +600,20 @@ OLD_FILES+=usr/lib/libcap_random.a
OLD_FILES+=usr/lib/libcap_random_p.a
OLD_FILES+=usr/lib/libcap_sysctl.a
OLD_FILES+=usr/lib/libcap_sysctl_p.a
+OLD_FILES+=usr/lib/libcasper.a
+OLD_FILES+=usr/lib/libcasper_p.a
+OLD_FILES+=usr/lib32/libcap_dns.a
+OLD_FILES+=usr/lib32/libcap_dns_p.a
+OLD_FILES+=usr/lib32/libcap_grp.a
+OLD_FILES+=usr/lib32/libcap_grp_p.a
+OLD_FILES+=usr/lib32/libcap_pwd.a
+OLD_FILES+=usr/lib32/libcap_pwd_p.a
+OLD_FILES+=usr/lib32/libcap_random.a
+OLD_FILES+=usr/lib32/libcap_random_p.a
+OLD_FILES+=usr/lib32/libcap_sysctl.a
+OLD_FILES+=usr/lib32/libcap_sysctl_p.a
+OLD_FILES+=usr/lib32/libcasper.a
+OLD_FILES+=usr/lib32/libcasper_p.a
# 20171031: Removal of adding_user man page
OLD_FILES+=usr/share/man/man7/adding_user.7.gz
# 20171031: Disconnected libpathconv tests
@@ -620,6 +634,8 @@ OLD_FILES+=usr/share/man/man9/mbp_sync.9.gz
# 20171010: Remove libstand
OLD_FILES+=usr/lib/libstand.a
OLD_FILES+=usr/lib/libstand_p.a
+OLD_FILES+=usr/lib32/libstand.a
+OLD_FILES+=usr/lib32/libstand_p.a
OLD_FILES+=usr/include/stand.h
OLD_FILES+=usr/share/man/man3/libstand.3.gz
# 20171003: remove RCMDS
@@ -1372,6 +1388,10 @@ OLD_FILES+=usr/lib/libifc.a
OLD_FILES+=usr/lib/libifc_p.a
OLD_FILES+=usr/lib/libifconfig.a
OLD_FILES+=usr/lib/libifconfig_p.a
+OLD_FILES+=usr/lib32/libifc.a
+OLD_FILES+=usr/lib32/libifc_p.a
+OLD_FILES+=usr/lib32/libifconfig.a
+OLD_FILES+=usr/lib32/libifconfig_p.a
# 20170529: mount.conf(8) -> mount.conf(5)
OLD_FILES+=usr/share/man/man8/mount.conf.8.gz
# 20170525: remove misleading template
diff --git a/UPDATING b/UPDATING
index d47672e12038..e83250bcaace 100644
--- a/UPDATING
+++ b/UPDATING
@@ -1,4 +1,4 @@
-Updating Information for FreeBSD current users.
+ Updating Information for FreeBSD current users.
This file is maintained and copyrighted by M. Warner Losh <imp@freebsd.org>.
See end of file for further details. For commonly done items, please see the
@@ -31,6 +31,29 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
+20180808:
+ The default pager for most commands has been changed to "less". To
+ restore the old behavior, set PAGER="more" and MANPAGER="more -s" in
+ your environment.
+
+20180731:
+ The jedec_ts(4) driver has been removed. A superset of its functionality
+ is available in the jedec_dimm(4) driver, and the manpage for that
+ driver includes migration instructions. If you have "device jedec_ts"
+ in your kernel configuration file, it must be removed.
+
+20180730:
+ amd64/GENERIC now has EFI runtime services, EFIRT, enabled by default.
+ This should have no effect if the kernel is booted via BIOS/legacy boot.
+ EFIRT may be disabled via a loader tunable, efi.rt.disabled, if a system
+ has a buggy firmware that prevents a successful boot due to use of
+ runtime services.
+
+20180727:
+ Atmel AT91RM9200 and AT91SAM9, Cavium CNS 11xx and XScale
+ support has been removed from the tree. These ports were
+ obsolete and/or known to be broken for many years.
+
20180723:
loader.efi has been augmented to participate more fully in the
UEFI boot manager protocol. loader.efi will now look at the
@@ -40,13 +63,24 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
20180720:
zfsloader's functionality has now been folded into loader.
- zfsloader is no longer necesasary once you've updated your
+ zfsloader is no longer necessary once you've updated your
boot blocks. For a transition period, we will install a
hardlink for zfsloader to loader to allow a smooth transition
until the boot blocks can be updated (hard link because old
zfs boot blocks don't understand symlinks).
20180719:
+ ARM64 now have efifb support, if you want to have serial console
+ on your arm64 board when an screen is connected and the bootloader
+ setup a frambuffer for us to use, just add :
+ boot_serial=YES
+ boot_multicons=YES
+ in /boot/loader.conf
+ For Raspberry Pi 3 (RPI) users, this is needed even if you don't have
+ an screen connected as the firmware will setup a framebuffer are that
+ u-boot will expose as an EFI framebuffer.
+
+20180719:
New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster
or take steps to update /etc/passwd before doing installworld on
existing systems. Also, rc.d/ntpd now starts ntpd(8) as user ntpd
@@ -164,7 +198,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
Support for FDDI networks has been removed. If you have device
fddi or device fpa in your kernel config file they must be
removed.
-
+
20180406:
In addition to supporting RFC 3164 formatted messages, the
syslogd(8) service is now capable of parsing RFC 5424 formatted
diff --git a/bin/date/date.1 b/bin/date/date.1
index fa8bc211c3ac..355e4bf2d02b 100644
--- a/bin/date/date.1
+++ b/bin/date/date.1
@@ -32,7 +32,7 @@
.\" @(#)date.1 8.3 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
-.Dd June 1, 2018
+.Dd August 4, 2018
.Dt DATE 1
.Os
.Sh NAME
@@ -64,6 +64,13 @@
.Nm
.Op Fl d Ar dst
.Op Fl t Ar minutes_west
+.Nm
+.Op Fl jnu
+.Op Fl I Ns Op Ar FMT
+.Op Fl f Ar input_fmt
+.Op Fl r Ar ...
+.Op Fl v Ar ...
+.Op Ar new_date
.Sh DESCRIPTION
When invoked without arguments, the
.Nm
@@ -113,6 +120,33 @@ provided rather than using the default
format.
Parsing is done using
.Xr strptime 3 .
+.It Fl I Ns Op Ar FMT
+Use
+.St -iso8601
+output format.
+.Ar FMT
+may be omitted, in which case the default is
+.Sq date .
+Valid
+.Ar FMT
+values are
+.Sq date ,
+.Sq hours ,
+.Sq minutes ,
+and
+.Sq seconds .
+The date and time is formatted to the specified precision.
+When
+.Ar FMT
+is
+.Sq hours
+(or the more precise
+.Sq minutes
+or
+.Sq seconds ) ,
+the
+.St -iso8601
+format includes the timezone.
.It Fl j
Do not try to set the date.
This allows you to use the
@@ -401,6 +435,14 @@ sets the time to
.Li "2:32 PM" ,
without modifying the date.
.Pp
+The command
+.Pp
+.Dl "TZ=America/Los_Angeles date -Iseconds -r 1533415339"
+.Pp
+will display
+.Pp
+.Dl "2018-08-04T13:42:19-07:00"
+.Pp
Finally the command:
.Pp
.Dl "date -j -f ""%a %b %d %T %Z %Y"" ""`date`"" ""+%s"""
@@ -425,6 +467,19 @@ between
and
.Xr timed 8
fails.
+.Pp
+It is invalid to combine the
+.Fl I
+flag with either
+.Fl R
+or an output format
+.Dq ( + Ns ... )
+operand.
+If this occurs,
+.Nm
+prints:
+.Ql multiple output formats specified
+and exits with an error status.
.Sh SEE ALSO
.Xr locale 1 ,
.Xr gettimeofday 2 ,
@@ -443,12 +498,22 @@ The
utility is expected to be compatible with
.St -p1003.2 .
The
-.Fl d , f , j , n , r , t ,
+.Fl d , f , I , j , n , r , t ,
and
.Fl v
options are all extensions to the standard.
+.Pp
+The format selected by the
+.Fl I
+flag is compatible with
+.St -iso8601 .
.Sh HISTORY
A
.Nm
command appeared in
.At v1 .
+.Pp
+The
+.Fl I
+flag was added in
+.Fx 12.0 .
diff --git a/bin/date/date.c b/bin/date/date.c
index 6d0e3d986f1e..a658ae1c38a6 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <ctype.h>
#include <err.h>
#include <locale.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -68,10 +69,25 @@ __FBSDID("$FreeBSD$");
static time_t tval;
int retval;
-static void setthetime(const char *, const char *, int, int);
static void badformat(void);
+static void iso8601_usage(const char *);
+static void multipleformats(void);
+static void printdate(const char *);
+static void printisodate(struct tm *);
+static void setthetime(const char *, const char *, int, int);
static void usage(void);
+static const struct iso8601_fmt {
+ const char *refname;
+ const char *format_string;
+} iso8601_fmts[] = {
+ { "date", "%Y-%m-%d" },
+ { "hours", "T%H" },
+ { "minutes", ":%M" },
+ { "seconds", ":%S" },
+};
+static const struct iso8601_fmt *iso8601_selected;
+
static const char *rfc2822_format = "%a, %d %b %Y %T %z";
int
@@ -79,7 +95,7 @@ main(int argc, char *argv[])
{
struct timezone tz;
int ch, rflag;
- int jflag, nflag, Rflag;
+ bool Iflag, jflag, nflag, Rflag;
const char *format;
char buf[1024];
char *endptr, *fmt;
@@ -89,15 +105,16 @@ main(int argc, char *argv[])
const struct vary *badv;
struct tm *lt;
struct stat sb;
+ size_t i;
v = NULL;
fmt = NULL;
(void) setlocale(LC_TIME, "");
tz.tz_dsttime = tz.tz_minuteswest = 0;
rflag = 0;
- jflag = nflag = Rflag = 0;
+ Iflag = jflag = nflag = Rflag = 0;
set_timezone = 0;
- while ((ch = getopt(argc, argv, "d:f:jnRr:t:uv:")) != -1)
+ while ((ch = getopt(argc, argv, "d:f:I::jnRr:t:uv:")) != -1)
switch((char)ch) {
case 'd': /* daylight savings time */
tz.tz_dsttime = strtol(optarg, &endptr, 10) ? 1 : 0;
@@ -108,6 +125,22 @@ main(int argc, char *argv[])
case 'f':
fmt = optarg;
break;
+ case 'I':
+ if (Rflag)
+ multipleformats();
+ Iflag = 1;
+ if (optarg == NULL) {
+ iso8601_selected = iso8601_fmts;
+ break;
+ }
+ for (i = 0; i < nitems(iso8601_fmts); i++)
+ if (strcmp(optarg, iso8601_fmts[i].refname) == 0)
+ break;
+ if (i == nitems(iso8601_fmts))
+ iso8601_usage(optarg);
+
+ iso8601_selected = &iso8601_fmts[i];
+ break;
case 'j':
jflag = 1; /* don't set time */
break;
@@ -115,6 +148,8 @@ main(int argc, char *argv[])
nflag = 1;
break;
case 'R': /* RFC 2822 datetime format */
+ if (Iflag)
+ multipleformats();
Rflag = 1;
break;
case 'r': /* user specified seconds */
@@ -163,6 +198,8 @@ main(int argc, char *argv[])
/* allow the operands in any order */
if (*argv && **argv == '+') {
+ if (Iflag)
+ multipleformats();
format = *argv + 1;
++argv;
}
@@ -173,8 +210,11 @@ main(int argc, char *argv[])
} else if (fmt != NULL)
usage();
- if (*argv && **argv == '+')
+ if (*argv && **argv == '+') {
+ if (Iflag)
+ multipleformats();
format = *argv + 1;
+ }
lt = localtime(&tval);
if (lt == NULL)
@@ -188,6 +228,9 @@ main(int argc, char *argv[])
}
vary_destroy(v);
+ if (Iflag)
+ printisodate(lt);
+
if (format == rfc2822_format)
/*
* When using RFC 2822 datetime format, don't honor the
@@ -196,12 +239,40 @@ main(int argc, char *argv[])
setlocale(LC_TIME, "C");
(void)strftime(buf, sizeof(buf), format, lt);
+ printdate(buf);
+}
+
+static void
+printdate(const char *buf)
+{
(void)printf("%s\n", buf);
if (fflush(stdout))
err(1, "stdout");
exit(retval);
}
+static void
+printisodate(struct tm *lt)
+{
+ const struct iso8601_fmt *it;
+ char fmtbuf[32], buf[32], tzbuf[8];
+
+ fmtbuf[0] = 0;
+ for (it = iso8601_fmts; it <= iso8601_selected; it++)
+ strlcat(fmtbuf, it->format_string, sizeof(fmtbuf));
+
+ (void)strftime(buf, sizeof(buf), fmtbuf, lt);
+
+ if (iso8601_selected > iso8601_fmts) {
+ (void)strftime(tzbuf, sizeof(tzbuf), "%z", lt);
+ memmove(&tzbuf[4], &tzbuf[3], 3);
+ tzbuf[3] = ':';
+ strlcat(buf, tzbuf, sizeof(buf));
+ }
+
+ printdate(buf);
+}
+
#define ATOI2(s) ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0'))
static void
@@ -327,12 +398,27 @@ badformat(void)
}
static void
+iso8601_usage(const char *badarg)
+{
+ errx(1, "invalid argument '%s' for -I", badarg);
+}
+
+static void
+multipleformats(void)
+{
+ errx(1, "multiple output formats specified");
+}
+
+static void
usage(void)
{
- (void)fprintf(stderr, "%s\n%s\n",
- "usage: date [-jnRu] [-d dst] [-r seconds] [-t west] "
- "[-v[+|-]val[ymwdHMS]] ... ",
+ (void)fprintf(stderr, "%s\n%s\n%s\n",
+ "usage: date [-jnRu] [-d dst] [-r seconds|file] [-t west] "
+ "[-v[+|-]val[ymwdHMS]]",
+ " "
+ "[-I[date | hours | minutes | seconds]]",
" "
- "[-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]");
+ "[-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]"
+ );
exit(1);
}
diff --git a/bin/date/tests/format_string_test.sh b/bin/date/tests/format_string_test.sh
index 0bd4f1ea7b95..7ae323b50adc 100755
--- a/bin/date/tests/format_string_test.sh
+++ b/bin/date/tests/format_string_test.sh
@@ -48,6 +48,55 @@ ${desc}_test_body() {
atf_add_test_case ${desc}_test
}
+iso8601_check()
+{
+ local arg flags exp_output_1 exp_output_2
+
+ arg="${1}"
+ flags="${2}"
+ exp_output_1="${3}"
+ exp_output_2="${4}"
+
+ atf_check -o "inline:${exp_output_1}\n" \
+ date $flags -r ${TEST1} "-I${arg}"
+ atf_check -o "inline:${exp_output_2}\n" \
+ date $flags -r ${TEST2} "-I${arg}"
+}
+
+iso8601_string_test()
+{
+ local desc arg exp_output_1 exp_output_2 flags
+
+ desc="${1}"
+ arg="${2}"
+ flags="${3}"
+ exp_output_1="${4}"
+ exp_output_2="${5}"
+
+ atf_test_case iso8601_${desc}_test
+ eval "
+iso8601_${desc}_test_body() {
+ iso8601_check '${arg}' '${flags}' '${exp_output_1}' '${exp_output_2}'
+}"
+ atf_add_test_case iso8601_${desc}_test
+
+ if [ -z "$flags" ]; then
+ atf_test_case iso8601_${desc}_parity
+ eval "
+iso8601_${desc}_parity_body() {
+ local exp1 exp2
+
+ atf_require_prog gdate
+
+ exp1=\"\$(gdate --date '@${TEST1}' '-I${arg}')\"
+ exp2=\"\$(gdate --date '@${TEST2}' '-I${arg}')\"
+
+ iso8601_check '${arg}' '' \"\${exp1}\" \"\${exp2}\"
+}"
+ atf_add_test_case iso8601_${desc}_parity
+ fi
+}
+
atf_init_test_cases()
{
format_string_test A A Saturday Monday
@@ -89,4 +138,12 @@ atf_init_test_cases()
format_string_test z z +0000 +0000
format_string_test percent % % %
format_string_test plus + "Sat Feb 7 07:04:03 UTC 1970" "Mon Nov 12 21:20:00 UTC 2001"
+
+ iso8601_string_test default "" "" "1970-02-07" "2001-11-12"
+ iso8601_string_test date date "" "1970-02-07" "2001-11-12"
+ iso8601_string_test hours hours "" "1970-02-07T07+00:00" "2001-11-12T21+00:00"
+ iso8601_string_test minutes minutes "" "1970-02-07T07:04+00:00" "2001-11-12T21:20+00:00"
+ iso8601_string_test seconds seconds "" "1970-02-07T07:04:03+00:00" "2001-11-12T21:20:00+00:00"
+ # BSD date(1) does not support fractional seconds at this time.
+ #iso8601_string_test ns ns "" "1970-02-07T07:04:03,000000000+00:00" "2001-11-12T21:20:00,000000000+00:00"
}
diff --git a/bin/dd/args.c b/bin/dd/args.c
index 4a2f13f96b08..f58551dec6a5 100644
--- a/bin/dd/args.c
+++ b/bin/dd/args.c
@@ -306,6 +306,8 @@ f_status(char *arg)
ddflags |= C_NOINFO;
else if (strcmp(arg, "noxfer") == 0)
ddflags |= C_NOXFER;
+ else if (strcmp(arg, "progress") == 0)
+ ddflags |= C_PROGRESS;
else
errx(1, "unknown status %s", arg);
}
diff --git a/bin/dd/dd.1 b/bin/dd/dd.1
index 3008dbd8a46a..64a0977b1c11 100644
--- a/bin/dd/dd.1
+++ b/bin/dd/dd.1
@@ -32,7 +32,7 @@
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
.\" $FreeBSD$
.\"
-.Dd April 2, 2017
+.Dd August 8, 2018
.Dt DD 1
.Os
.Sh NAME
@@ -164,12 +164,14 @@ bytes per second.
Where
.Cm value
is one of the symbols from the following list.
-.Bl -tag -width "noxfer"
+.Bl -tag -width "progress"
.It Cm noxfer
Do not print the transfer statistics as the last line of status output.
.It Cm none
Do not print the status output.
Error messages are shown; informational messages are not.
+.It Cm progress
+Print basic transfer statistics once per second.
.El
.It Cm conv Ns = Ns Ar value Ns Op , Ns Ar value ...
Where
diff --git a/bin/dd/dd.c b/bin/dd/dd.c
index acec74709896..358d2c06190c 100644
--- a/bin/dd/dd.c
+++ b/bin/dd/dd.c
@@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
#include <sys/disklabel.h>
#include <sys/filio.h>
#include <sys/mtio.h>
+#include <sys/time.h>
#include <assert.h>
#include <capsicum_helpers.h>
@@ -89,6 +90,7 @@ const u_char *ctab; /* conversion table */
char fill_char; /* Character to fill with if defined */
size_t speed = 0; /* maximum speed, in bytes per second */
volatile sig_atomic_t need_summary;
+volatile sig_atomic_t need_progress;
int
main(int argc __unused, char *argv[])
@@ -102,6 +104,7 @@ main(int argc __unused, char *argv[])
err(1, "unable to enter capability mode");
(void)signal(SIGINFO, siginfo_handler);
+ (void)signal(SIGALRM, sigalrm_handler);
(void)signal(SIGINT, terminate);
atexit(summary);
@@ -281,6 +284,14 @@ setup(void)
ctab = casetab;
}
+ if ((ddflags & C_PROGRESS)) {
+ struct itimerval timer = {
+ .it_interval = { .tv_sec = 1, .tv_usec = 0 },
+ .it_value = { .tv_sec = 1, .tv_usec = 0 },
+ };
+ setitimer(ITIMER_REAL, &timer, NULL);
+ }
+
if (clock_gettime(CLOCK_MONOTONIC, &st.start))
err(1, "clock_gettime");
}
@@ -461,6 +472,9 @@ dd_in(void)
if (need_summary) {
summary();
}
+ if (need_progress) {
+ progress();
+ }
}
}
diff --git a/bin/dd/dd.h b/bin/dd/dd.h
index e67f0657d692..0f7c680a6ee0 100644
--- a/bin/dd/dd.h
+++ b/bin/dd/dd.h
@@ -100,5 +100,6 @@ typedef struct {
#define C_STATUS 0x08000000
#define C_NOXFER 0x10000000
#define C_NOINFO 0x20000000
+#define C_PROGRESS 0x40000000
#define C_PARITY (C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET)
diff --git a/bin/dd/extern.h b/bin/dd/extern.h
index 885f40e330d0..ca80a87f1621 100644
--- a/bin/dd/extern.h
+++ b/bin/dd/extern.h
@@ -46,7 +46,9 @@ void pos_in(void);
void pos_out(void);
double secs_elapsed(void);
void summary(void);
+void progress(void);
void siginfo_handler(int);
+void sigalrm_handler(int);
void terminate(int);
void unblock(void);
void unblock_close(void);
@@ -66,3 +68,4 @@ extern const u_char a2ibm_32V[], a2ibm_POSIX[];
extern u_char casetab[];
extern char fill_char;
extern volatile sig_atomic_t need_summary;
+extern volatile sig_atomic_t need_progress;
diff --git a/bin/dd/misc.c b/bin/dd/misc.c
index cd1db9e0386b..e778f275fcef 100644
--- a/bin/dd/misc.c
+++ b/bin/dd/misc.c
@@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$");
#include "dd.h"
#include "extern.h"
+static int need_newline;
+
double
secs_elapsed(void)
{
@@ -83,6 +85,9 @@ summary(void)
if (ddflags & C_NOINFO)
return;
+ if (need_newline && !need_summary)
+ fprintf(stderr, "\n");
+
secs = secs_elapsed();
(void)fprintf(stderr,
@@ -102,6 +107,28 @@ summary(void)
need_summary = 0;
}
+void
+progress(void)
+{
+ double secs;
+ static int lastlen;
+ int len;
+
+ secs = secs_elapsed();
+ len = fprintf(stderr,
+ "\r%ju bytes transferred in %.0f secs (%.0f bytes/sec)",
+ st.bytes, secs, st.bytes / secs);
+
+ if (len > 0) {
+ if (len < lastlen)
+ (void)fprintf(stderr, "%*s", len - lastlen, "");
+ lastlen = len;
+ }
+
+ need_newline = 1;
+ need_progress = 0;
+}
+
/* ARGSUSED */
void
siginfo_handler(int signo __unused)
@@ -112,6 +139,14 @@ siginfo_handler(int signo __unused)
/* ARGSUSED */
void
+sigalrm_handler(int signo __unused)
+{
+
+ need_progress = 1;
+}
+
+/* ARGSUSED */
+void
terminate(int sig)
{
diff --git a/bin/ls/ls.1 b/bin/ls/ls.1
index c7b24ae5a55a..8495367de4e7 100644
--- a/bin/ls/ls.1
+++ b/bin/ls/ls.1
@@ -32,7 +32,7 @@
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\" $FreeBSD$
.\"
-.Dd January 17, 2018
+.Dd August 8, 2018
.Dt LS 1
.Os
.Sh NAME
@@ -132,6 +132,8 @@ after each that is a
Enable colorized output.
This option is equivalent to defining
.Ev CLICOLOR
+or
+.Ev COLORTERM
in the environment.
(See below.)
This functionality can be compiled out by removing the definition of
@@ -628,6 +630,10 @@ The
variable still needs to reference a color capable terminal however
otherwise it is not possible to determine which color sequences to
use.
+.It Ev COLORTERM
+See description for
+.Ev CLICOLOR
+above.
.It Ev COLUMNS
If this variable contains a string representing a
decimal integer, it is used as the
@@ -652,7 +658,9 @@ for more information.
.It Ev LSCOLORS
The value of this variable describes what color to use for which
attribute when colors are enabled with
-.Ev CLICOLOR .
+.Ev CLICOLOR
+or
+.Ev COLORTERM .
This string is a concatenation of pairs of the format
.Ar f Ns Ar b ,
where
@@ -759,6 +767,8 @@ option for more details.
.It Ev TERM
The
.Ev CLICOLOR
+and
+.Ev COLORTERM
functionality depends on a terminal type with color capabilities.
.It Ev TZ
The timezone to use when displaying dates.
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index 87b314cbdff1..7c7174f25f4f 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -368,7 +368,7 @@ main(int argc, char *argv[])
f_listdot = 1;
/* Enabling of colours is conditional on the environment. */
- if (getenv("CLICOLOR") &&
+ if ((getenv("CLICOLOR") || getenv("COLORTERM")) &&
(isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE")))
#ifdef COLORLS
if (tgetent(termcapbuf, getenv("TERM")) == 1) {
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh
new file mode 100755
index 000000000000..902d278a8388
--- /dev/null
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh
@@ -0,0 +1,125 @@
+#!/usr/bin/env ksh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# Test {ip,udplite}:::{send,receive} of IPv4 UDP-Lite to a local address.
+#
+# This may fail due to:
+#
+# 1. A change to the ip stack breaking expected probe behavior,
+# which is the reason we are testing.
+# 2. No physical network interface is plumbed and up.
+# 3. No other hosts on this subnet are reachable and listening on rpcbind.
+# 4. An unlikely race causes the unlocked global send/receive
+# variables to be corrupted.
+#
+# This test sends a UDP-Lite message using perl and checks that at least the
+# following counts were traced:
+#
+# 1 x ip:::send (UDPLite sent to UDP-Lite port 33434)
+# 1 x udplite:::send (UDPLite sent to UDP-Lite port 33434)
+# 1 x ip:::receive (UDP-Lite received)
+# 1 x udplite:::receive (UDP-Lite received)
+#
+# A udplite:::receive event is expected even if the received UDP-Lite packet
+# elicits an ICMP PORT_UNREACHABLE message since there is no UDP-Lite
+# socket for receiving the packet.
+#
+
+if (( $# != 1 )); then
+ print -u2 "expected one argument: <dtrace-path>"
+ exit 2
+fi
+
+dtrace=$1
+local=127.0.0.1
+port=33434
+DIR=/var/tmp/dtest.$$
+
+mkdir $DIR
+cd $DIR
+
+cat > test.pl <<-EOPERL
+ use IO::Socket;
+ my \$s = IO::Socket::INET->new(
+ Type => SOCK_DGRAM,
+ Proto => "udplite",
+ PeerAddr => "$local",
+ PeerPort => $port);
+ die "Could not create UDP-Lite socket $local port $port" unless \$s;
+ send \$s, "Hello", 0;
+ close \$s;
+ sleep(2);
+EOPERL
+
+$dtrace -c 'perl test.pl' -qs /dev/stdin <<EODTRACE
+BEGIN
+{
+ ipsend = udplitesend = ipreceive = udplitereceive = 0;
+}
+
+ip:::send
+/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
+ args[4]->ipv4_protocol == IPPROTO_UDPLITE/
+{
+ ipsend++;
+}
+
+udplite:::send
+/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local"/
+{
+ udplitesend++;
+}
+
+ip:::receive
+/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
+ args[4]->ipv4_protocol == IPPROTO_UDPLITE/
+{
+ ipreceive++;
+}
+
+udplite:::receive
+/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local"/
+{
+ udplitereceive++;
+}
+
+END
+{
+ printf("Minimum UDP-Lite events seen\n\n");
+ printf("ip:::send - %s\n", ipsend >= 1 ? "yes" : "no");
+ printf("ip:::receive - %s\n", ipreceive >= 1 ? "yes" : "no");
+ printf("udplite:::send - %s\n", udplitesend >= 1 ? "yes" : "no");
+ printf("udplite:::receive - %s\n", udplitereceive >= 1 ? "yes" : "no");
+}
+EODTRACE
+
+status=$?
+
+cd /
+/bin/rm -rf $DIR
+
+exit $status
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh.out
new file mode 100644
index 000000000000..b5970ffa57fb
--- /dev/null
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localudplite.ksh.out
@@ -0,0 +1,7 @@
+Minimum UDP-Lite events seen
+
+ip:::send - yes
+ip:::receive - yes
+udplite:::send - yes
+udplite:::receive - yes
+
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh
new file mode 100755
index 000000000000..8837112d5d78
--- /dev/null
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh
@@ -0,0 +1,113 @@
+#!/usr/bin/env ksh93
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# Test {udplite,ip}:::{send,receive} of IPv4 UDP-Lite to a remote host.
+#
+# This may fail due to:
+#
+# 1. A change to the ip stack breaking expected probe behavior,
+# which is the reason we are testing.
+# 2. No physical network interface is plumbed and up.
+# 3. No other hosts on this subnet are reachable and listening on rpcbind.
+# 4. An unlikely race causes the unlocked global send/receive
+# variables to be corrupted.
+#
+# This test sends a UDP-Lite message using perl and checks that at least the
+# following counts were traced:
+#
+# 1 x ip:::send (UDP-Lite sent to UDP-Lite port 33434)
+# 1 x udplite:::send (UDP-Lite sent to UDP-Lite port 33434)
+#
+
+if (( $# != 1 )); then
+ print -u2 "expected one argument: <dtrace-path>"
+ exit 2
+fi
+
+dtrace=$1
+getaddr=./get.ipv4remote.pl
+port=33434
+DIR=/var/tmp/dtest.$$
+
+if [[ ! -x $getaddr ]]; then
+ print -u2 "could not find or execute sub program: $getaddr"
+ exit 3
+fi
+$getaddr | read source dest
+if (( $? != 0 )); then
+ exit 4
+fi
+
+mkdir $DIR
+cd $DIR
+
+cat > test.pl <<-EOPERL
+ use IO::Socket;
+ my \$s = IO::Socket::INET->new(
+ Type => SOCK_DGRAM,
+ Proto => "udplite",
+ PeerAddr => "$dest",
+ PeerPort => $port);
+ die "Could not create UDP-Lite socket $dest port $port" unless \$s;
+ send \$s, "Hello", 0;
+ close \$s;
+ sleep(2);
+EOPERL
+
+$dtrace -c 'perl test.pl' -qs /dev/stdin <<EODTRACE
+BEGIN
+{
+ ipsend = udplitesend = 0;
+}
+
+ip:::send
+/args[2]->ip_saddr == "$source" && args[2]->ip_daddr == "$dest" &&
+ args[4]->ipv4_protocol == IPPROTO_UDPLITE/
+{
+ ipsend++;
+}
+
+udplite:::send
+/args[2]->ip_saddr == "$source" && args[2]->ip_daddr == "$dest"/
+{
+ udplitesend++;
+}
+
+END
+{
+ printf("Minimum UDPLite events seen\n\n");
+ printf("ip:::send - %s\n", ipsend >= 1 ? "yes" : "no");
+ printf("udplite:::send - %s\n", udplitesend >= 1 ? "yes" : "no");
+}
+EODTRACE
+
+status=$?
+
+cd /
+/bin/rm -rf $DIR
+
+exit $status
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh.out
new file mode 100644
index 000000000000..66e39e736e23
--- /dev/null
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteudplite.ksh.out
@@ -0,0 +1,5 @@
+Minimum UDP-Lite events seen
+
+ip:::send - yes
+udplite:::send - yes
+
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
index 9231fd8c1038..3c72caf1e466 100644
--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c
+++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
@@ -108,6 +108,7 @@ static uint64_t *zopt_object = NULL;
static unsigned zopt_objects = 0;
static libzfs_handle_t *g_zfs;
static uint64_t max_inflight = 1000;
+static int leaked_objects = 0;
static void snprintf_blkptr_compact(char *, size_t, const blkptr_t *);
@@ -774,7 +775,6 @@ verify_spacemap_refcounts(spa_t *spa)
static void
dump_spacemap(objset_t *os, space_map_t *sm)
{
- uint64_t alloc, offset, entry;
char *ddata[] = { "ALLOC", "FREE", "CONDENSE", "INVALID",
"INVALID", "INVALID", "INVALID", "INVALID" };
@@ -791,41 +791,73 @@ dump_spacemap(objset_t *os, space_map_t *sm)
/*
* Print out the freelist entries in both encoded and decoded form.
*/
- alloc = 0;
- for (offset = 0; offset < space_map_length(sm);
- offset += sizeof (entry)) {
- uint8_t mapshift = sm->sm_shift;
+ uint8_t mapshift = sm->sm_shift;
+ int64_t alloc = 0;
+ uint64_t word;
+ for (uint64_t offset = 0; offset < space_map_length(sm);
+ offset += sizeof (word)) {
VERIFY0(dmu_read(os, space_map_object(sm), offset,
- sizeof (entry), &entry, DMU_READ_PREFETCH));
- if (SM_DEBUG_DECODE(entry)) {
+ sizeof (word), &word, DMU_READ_PREFETCH));
+ if (sm_entry_is_debug(word)) {
(void) printf("\t [%6llu] %s: txg %llu, pass %llu\n",
- (u_longlong_t)(offset / sizeof (entry)),
- ddata[SM_DEBUG_ACTION_DECODE(entry)],
- (u_longlong_t)SM_DEBUG_TXG_DECODE(entry),
- (u_longlong_t)SM_DEBUG_SYNCPASS_DECODE(entry));
+ (u_longlong_t)(offset / sizeof (word)),
+ ddata[SM_DEBUG_ACTION_DECODE(word)],
+ (u_longlong_t)SM_DEBUG_TXG_DECODE(word),
+ (u_longlong_t)SM_DEBUG_SYNCPASS_DECODE(word));
+ continue;
+ }
+
+ uint8_t words;
+ char entry_type;
+ uint64_t entry_off, entry_run, entry_vdev = SM_NO_VDEVID;
+
+ if (sm_entry_is_single_word(word)) {
+ entry_type = (SM_TYPE_DECODE(word) == SM_ALLOC) ?
+ 'A' : 'F';
+ entry_off = (SM_OFFSET_DECODE(word) << mapshift) +
+ sm->sm_start;
+ entry_run = SM_RUN_DECODE(word) << mapshift;
+ words = 1;
} else {
- (void) printf("\t [%6llu] %c range:"
- " %010llx-%010llx size: %06llx\n",
- (u_longlong_t)(offset / sizeof (entry)),
- SM_TYPE_DECODE(entry) == SM_ALLOC ? 'A' : 'F',
- (u_longlong_t)((SM_OFFSET_DECODE(entry) <<
- mapshift) + sm->sm_start),
- (u_longlong_t)((SM_OFFSET_DECODE(entry) <<
- mapshift) + sm->sm_start +
- (SM_RUN_DECODE(entry) << mapshift)),
- (u_longlong_t)(SM_RUN_DECODE(entry) << mapshift));
- if (SM_TYPE_DECODE(entry) == SM_ALLOC)
- alloc += SM_RUN_DECODE(entry) << mapshift;
- else
- alloc -= SM_RUN_DECODE(entry) << mapshift;
+ /* it is a two-word entry so we read another word */
+ ASSERT(sm_entry_is_double_word(word));
+
+ uint64_t extra_word;
+ offset += sizeof (extra_word);
+ VERIFY0(dmu_read(os, space_map_object(sm), offset,
+ sizeof (extra_word), &extra_word,
+ DMU_READ_PREFETCH));
+
+ ASSERT3U(offset, <=, space_map_length(sm));
+
+ entry_run = SM2_RUN_DECODE(word) << mapshift;
+ entry_vdev = SM2_VDEV_DECODE(word);
+ entry_type = (SM2_TYPE_DECODE(extra_word) == SM_ALLOC) ?
+ 'A' : 'F';
+ entry_off = (SM2_OFFSET_DECODE(extra_word) <<
+ mapshift) + sm->sm_start;
+ words = 2;
}
+
+ (void) printf("\t [%6llu] %c range:"
+ " %010llx-%010llx size: %06llx vdev: %06llu words: %u\n",
+ (u_longlong_t)(offset / sizeof (word)),
+ entry_type, (u_longlong_t)entry_off,
+ (u_longlong_t)(entry_off + entry_run),
+ (u_longlong_t)entry_run,
+ (u_longlong_t)entry_vdev, words);
+
+ if (entry_type == 'A')
+ alloc += entry_run;
+ else
+ alloc -= entry_run;
}
- if (alloc != space_map_allocated(sm)) {
- (void) printf("space_map_object alloc (%llu) INCONSISTENT "
- "with space map summary (%llu)\n",
- (u_longlong_t)space_map_allocated(sm), (u_longlong_t)alloc);
+ if ((uint64_t)alloc != space_map_allocated(sm)) {
+ (void) printf("space_map_object alloc (%lld) INCONSISTENT "
+ "with space map summary (%lld)\n",
+ (longlong_t)space_map_allocated(sm), (longlong_t)alloc);
}
}
@@ -1155,7 +1187,7 @@ dump_ddt(ddt_t *ddt, enum ddt_type type, enum ddt_class class)
while ((error = ddt_object_walk(ddt, type, class, &walk, &dde)) == 0)
dump_dde(ddt, &dde, walk);
- ASSERT(error == ENOENT);
+ ASSERT3U(error, ==, ENOENT);
(void) printf("\n");
}
@@ -1957,9 +1989,12 @@ dump_znode(objset_t *os, uint64_t object, void *data, size_t size)
if (dump_opt['d'] > 4) {
error = zfs_obj_to_path(os, object, path, sizeof (path));
- if (error != 0) {
+ if (error == ESTALE) {
+ (void) snprintf(path, sizeof (path), "on delete queue");
+ } else if (error != 0) {
+ leaked_objects++;
(void) snprintf(path, sizeof (path),
- "\?\?\?<object#%llu>", (u_longlong_t)object);
+ "path not found, possibly leaked");
}
(void) printf("\tpath %s\n", path);
}
@@ -2289,6 +2324,12 @@ dump_dir(objset_t *os)
}
ASSERT3U(object_count, ==, usedobjs);
+
+ if (leaked_objects != 0) {
+ (void) printf("%d potentially leaked objects detected\n",
+ leaked_objects);
+ leaked_objects = 0;
+ }
}
static void
@@ -3002,7 +3043,7 @@ zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb)
spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER);
spa_vdev_removal_t *svr = spa->spa_vdev_removal;
- vdev_t *vd = svr->svr_vdev;
+ vdev_t *vd = vdev_lookup_top(spa, svr->svr_vdev_id);
vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
for (uint64_t msi = 0; msi < vd->vdev_ms_count; msi++) {
@@ -3018,13 +3059,17 @@ zdb_claim_removing(spa_t *spa, zdb_cb_t *zcb)
svr->svr_allocd_segs, SM_ALLOC));
/*
- * Clear everything past what has been synced,
- * because we have not allocated mappings for it yet.
+ * Clear everything past what has been synced unless
+ * it's past the spacemap, because we have not allocated
+ * mappings for it yet.
*/
- range_tree_clear(svr->svr_allocd_segs,
- vdev_indirect_mapping_max_offset(vim),
- msp->ms_sm->sm_start + msp->ms_sm->sm_size -
- vdev_indirect_mapping_max_offset(vim));
+ uint64_t vim_max_offset =
+ vdev_indirect_mapping_max_offset(vim);
+ uint64_t sm_end = msp->ms_sm->sm_start +
+ msp->ms_sm->sm_size;
+ if (sm_end > vim_max_offset)
+ range_tree_clear(svr->svr_allocd_segs,
+ vim_max_offset, sm_end - vim_max_offset);
}
zcb->zcb_removing_size +=
@@ -3097,15 +3142,14 @@ typedef struct checkpoint_sm_exclude_entry_arg {
} checkpoint_sm_exclude_entry_arg_t;
static int
-checkpoint_sm_exclude_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
- void *arg)
+checkpoint_sm_exclude_entry_cb(space_map_entry_t *sme, void *arg)
{
checkpoint_sm_exclude_entry_arg_t *cseea = arg;
vdev_t *vd = cseea->cseea_vd;
- metaslab_t *ms = vd->vdev_ms[offset >> vd->vdev_ms_shift];
- uint64_t end = offset + size;
+ metaslab_t *ms = vd->vdev_ms[sme->sme_offset >> vd->vdev_ms_shift];
+ uint64_t end = sme->sme_offset + sme->sme_run;
- ASSERT(type == SM_FREE);
+ ASSERT(sme->sme_type == SM_FREE);
/*
* Since the vdev_checkpoint_sm exists in the vdev level
@@ -3123,7 +3167,7 @@ checkpoint_sm_exclude_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
* metaslab boundaries. So if needed we could add code
* that handles metaslab-crossing segments in the future.
*/
- VERIFY3U(offset, >=, ms->ms_start);
+ VERIFY3U(sme->sme_offset, >=, ms->ms_start);
VERIFY3U(end, <=, ms->ms_start + ms->ms_size);
/*
@@ -3131,10 +3175,10 @@ checkpoint_sm_exclude_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
* also verify that the entry is there to begin with.
*/
mutex_enter(&ms->ms_lock);
- range_tree_remove(ms->ms_allocatable, offset, size);
+ range_tree_remove(ms->ms_allocatable, sme->sme_offset, sme->sme_run);
mutex_exit(&ms->ms_lock);
- cseea->cseea_checkpoint_size += size;
+ cseea->cseea_checkpoint_size += sme->sme_run;
return (0);
}
@@ -4109,15 +4153,14 @@ typedef struct verify_checkpoint_sm_entry_cb_arg {
#define ENTRIES_PER_PROGRESS_UPDATE 10000
static int
-verify_checkpoint_sm_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
- void *arg)
+verify_checkpoint_sm_entry_cb(space_map_entry_t *sme, void *arg)
{
verify_checkpoint_sm_entry_cb_arg_t *vcsec = arg;
vdev_t *vd = vcsec->vcsec_vd;
- metaslab_t *ms = vd->vdev_ms[offset >> vd->vdev_ms_shift];
- uint64_t end = offset + size;
+ metaslab_t *ms = vd->vdev_ms[sme->sme_offset >> vd->vdev_ms_shift];
+ uint64_t end = sme->sme_offset + sme->sme_run;
- ASSERT(type == SM_FREE);
+ ASSERT(sme->sme_type == SM_FREE);
if ((vcsec->vcsec_entryid % ENTRIES_PER_PROGRESS_UPDATE) == 0) {
(void) fprintf(stderr,
@@ -4131,7 +4174,7 @@ verify_checkpoint_sm_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
/*
* See comment in checkpoint_sm_exclude_entry_cb()
*/
- VERIFY3U(offset, >=, ms->ms_start);
+ VERIFY3U(sme->sme_offset, >=, ms->ms_start);
VERIFY3U(end, <=, ms->ms_start + ms->ms_size);
/*
@@ -4140,7 +4183,7 @@ verify_checkpoint_sm_entry_cb(maptype_t type, uint64_t offset, uint64_t size,
* their respective ms_allocateable trees should not contain them.
*/
mutex_enter(&ms->ms_lock);
- range_tree_verify(ms->ms_allocatable, offset, size);
+ range_tree_verify(ms->ms_allocatable, sme->sme_offset, sme->sme_run);
mutex_exit(&ms->ms_lock);
return (0);
@@ -4386,7 +4429,7 @@ verify_checkpoint(spa_t *spa)
DMU_POOL_ZPOOL_CHECKPOINT, sizeof (uint64_t),
sizeof (uberblock_t) / sizeof (uint64_t), &checkpoint);
- if (error == ENOENT) {
+ if (error == ENOENT && !dump_opt['L']) {
/*
* If the feature is active but the uberblock is missing
* then we must be in the middle of discarding the
@@ -4409,7 +4452,7 @@ verify_checkpoint(spa_t *spa)
error = 3;
}
- if (error == 0)
+ if (error == 0 && !dump_opt['L'])
verify_checkpoint_blocks(spa);
return (error);
@@ -4514,7 +4557,7 @@ dump_zpool(spa_t *spa)
if (dump_opt['h'])
dump_history(spa);
- if (rc == 0 && !dump_opt['L'])
+ if (rc == 0)
rc = verify_checkpoint(spa);
if (rc != 0) {
@@ -4907,19 +4950,18 @@ zdb_embedded_block(char *thing)
words + 8, words + 9, words + 10, words + 11,
words + 12, words + 13, words + 14, words + 15);
if (err != 16) {
- (void) printf("invalid input format\n");
+ (void) fprintf(stderr, "invalid input format\n");
exit(1);
}
ASSERT3U(BPE_GET_LSIZE(&bp), <=, SPA_MAXBLOCKSIZE);
buf = malloc(SPA_MAXBLOCKSIZE);
if (buf == NULL) {
- (void) fprintf(stderr, "%s: failed to allocate %llu bytes\n",
- __func__, SPA_MAXBLOCKSIZE);
+ (void) fprintf(stderr, "out of memory\n");
exit(1);
}
err = decode_embedded_bp(&bp, buf, BPE_GET_LSIZE(&bp));
if (err != 0) {
- (void) printf("decode failed: %u\n", err);
+ (void) fprintf(stderr, "decode failed: %u\n", err);
free(buf);
exit(1);
}
@@ -5372,5 +5414,5 @@ main(int argc, char **argv)
libzfs_fini(g_zfs);
kernel_fini();
- return (0);
+ return (error);
}
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs.8 b/cddl/contrib/opensolaris/cmd/zfs/zfs.8
index 51ac88086250..f6e9bbb57972 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs.8
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs.8
@@ -28,6 +28,7 @@
.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
+.\" Copyright 2018 Joyent, Inc.
.\"
.\" $FreeBSD$
.\"
@@ -319,7 +320,8 @@ namespace. For example:
.Pp
where the maximum length of a dataset name is
.Dv MAXNAMELEN
-(256 bytes).
+(256 bytes)
+and the maximum amount of nesting allowed in a path is 50 levels deep.
.Pp
A dataset can be one of the following:
.Bl -hang -width 12n
@@ -546,6 +548,13 @@ property. Compression can be turned on by running:
.Qq Nm Cm set compression=on Ar dataset
The default value is
.Cm off .
+.It Sy createtxg
+The transaction group (txg) in which the dataset was created.
+Bookmarks have the same
+.Sy createtxg
+as the snapshot they are initially tied to.
+This property is suitable for ordering a list of snapshots,
+e.g. for incremental send and receive.
.It Sy creation
The time this dataset was created.
.It Sy clones
@@ -573,6 +582,14 @@ This value is only available when a
.Sy filesystem_limit
has
been set somewhere in the tree under which the dataset resides.
+.It Sy guid
+The 64 bit GUID of this dataset or bookmark which does not change over its
+entire lifetime.
+When a snapshot is sent to another pool, the received snapshot has the same
+GUID.
+Thus, the
+.Sy guid
+is suitable to identify a snapshot across pools.
.It Sy logicalreferenced
The amount of space that is
.Qq logically
@@ -1311,7 +1328,7 @@ The default value is
Limits the amount of space a dataset can consume. This property enforces a hard
limit on the amount of space used. This hard limit does not include space used
by descendents, including file systems and snapshots.
-.It Sy refreservation Ns = Ns Ar size | Cm none
+.It Sy refreservation Ns = Ns Ar size | Cm none | Cm auto
The minimum amount of space guaranteed to a dataset, not including its
descendents. When the amount of space used is below this value, the dataset is
treated as if it were taking up the amount of space specified by
@@ -1327,6 +1344,18 @@ is set, a snapshot is only allowed if there is enough free pool space outside
of this reservation to accommodate the current number of "referenced" bytes in
the dataset.
.Pp
+If
+.Sy refreservation
+is set to
+.Sy auto ,
+a volume is thick provisioned or not sparse.
+.Sy refreservation Ns = Cm auto
+is only supported on volumes.
+See
+.Sy volsize
+in the Native Properties
+section for more information about sparse volumes.
+.Pp
This property can also be referred to by its shortened column name,
.Sy refreserv .
.It Sy reservation Ns = Ns Ar size | Cm none
@@ -1459,18 +1488,33 @@ on how the volume is used. These effects can also occur when the volume size is
changed while it is in use (particularly when shrinking the size). Extreme care
should be used when adjusting the volume size.
.Pp
-Though not recommended, a "sparse volume" (also known as "thin provisioning")
+Though not recommended, a "sparse volume" (also known as "thin provisioned")
can be created by specifying the
.Fl s
option to the
.Qq Nm Cm create Fl V
-command, or by changing the reservation after the volume has been created. A
-"sparse volume" is a volume where the reservation is less then the volume size.
+command, or by changing the value of the
+.Sy refreservation
+property, or
+.Sy reservation
+property on pool version 8 or earlier
+.Pc
+after the volume has been created.
+A "sparse volume" is a volume where the value of
+.Sy refreservation
+is less then the size of the volume plus the space required to store its
+metadata.
Consequently, writes to a sparse volume can fail with
.Sy ENOSPC
when the pool is low on space. For a sparse volume, changes to
.Sy volsize
-are not reflected in the reservation.
+are not reflected in the
+.Sy refreservation .
+A volume that is not sparse is said to be "thick provisioned".
+A sparse volume can become thick provisioned by setting
+.Sy refreservation
+to
+.Sy auto .
.It Sy volmode Ns = Ns Cm default | geom | dev | none
This property specifies how volumes should be exposed to the OS.
Setting it to
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
index d571d3f9c527..bbf2d4ba262b 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
@@ -72,6 +72,7 @@
#include <aclutils.h>
#include <directory.h>
#include <idmap.h>
+#include <libshare.h>
#endif
#include "zfs_iter.h"
@@ -6221,6 +6222,17 @@ share_mount(int op, int argc, char **argv)
return (0);
qsort(dslist, count, sizeof (void *), libzfs_dataset_cmp);
+#ifdef illumos
+ sa_init_selective_arg_t sharearg;
+ sharearg.zhandle_arr = dslist;
+ sharearg.zhandle_len = count;
+ if ((ret = zfs_init_libshare_arg(zfs_get_handle(dslist[0]),
+ SA_INIT_SHARE_API_SELECTIVE, &sharearg)) != SA_OK) {
+ (void) fprintf(stderr,
+ gettext("Could not initialize libshare, %d"), ret);
+ return (ret);
+ }
+#endif
for (i = 0; i < count; i++) {
if (verbose)
@@ -7026,11 +7038,28 @@ zfs_do_diff(int argc, char **argv)
return (err != 0);
}
+/*
+ * zfs remap <filesystem | volume>
+ *
+ * Remap the indirect blocks in the given fileystem or volume.
+ */
static int
zfs_do_remap(int argc, char **argv)
{
const char *fsname;
int err = 0;
+ int c;
+
+ /* check options */
+ while ((c = getopt(argc, argv, "")) != -1) {
+ switch (c) {
+ case '?':
+ (void) fprintf(stderr,
+ gettext("invalid option '%c'\n"), optopt);
+ usage(B_FALSE);
+ }
+ }
+
if (argc != 2) {
(void) fprintf(stderr, gettext("wrong number of arguments\n"));
usage(B_FALSE);
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7 b/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
index cc4e7c35b032..4e6b63514456 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool-features.7
@@ -482,6 +482,24 @@ This feature becomes
when the "zpool remove" command is
used on a top-level vdev, and will never return to being
.Sy enabled .
+.It Sy spacemap_v2
+.Bl -column "READ\-ONLY COMPATIBLE" "com.delphix:spacemap_v2"
+.It GUID Ta com.delphix:spacemap_v2
+.It READ\-ONLY COMPATIBLE Ta yes
+.It DEPENDENCIES Ta none
+.El
+.Pp
+This feature enables the use of the new space map encoding which
+consists of two words (instead of one) whenever it is advantageous.
+The new encoding allows space maps to represent large regions of
+space more efficiently on-disk while also increasing their maximum
+addressable offset.
+.Pp
+This feature becomes
+.Sy active
+as soon as it is enabled and will
+never return to being
+.Sy enabled .
.It Sy large_blocks
.Bl -column "READ\-ONLY COMPATIBLE" "org.open-zfs:large_block"
.It GUID Ta org.open-zfs:large_block
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool.8 b/cddl/contrib/opensolaris/cmd/zpool/zpool.8
index b0c21436308a..d5a8d97b1435 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool.8
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool.8
@@ -121,6 +121,11 @@
.Ar pool | id
.Op Ar newpool
.Nm
+.Cm initialize
+.Op Fl cs
+.Ar pool
+.Op Ar device Ns ...
+.Nm
.Cm iostat
.Op Fl T Cm d Ns | Ns Cm u
.Op Fl v
@@ -1437,6 +1442,32 @@ to fully rewind.
.El
.It Xo
.Nm
+.Cm initialize
+.Op Fl cs
+.Ar pool
+.Op Ar device Ns ...
+.Xc
+Begins initializing by writing to all unallocated regions on the specified
+devices, or all eligible devices in the pool if no individual devices are
+specified.
+Only leaf data or log devices may be initialized.
+.Bl -tag -width Ds
+.It Fl c, -cancel
+Cancel initializing on the specified devices, or all eligible devices if none
+are specified.
+If one or more target devices are invalid or are not currently being
+initialized, the command will fail and no cancellation will occur on any device.
+.It Fl s -suspend
+Suspend initializing on the specified devices, or all eligible devices if none
+are specified.
+If one or more target devices are invalid or are not currently being
+initialized, the command will fail and no suspension will occur on any device.
+Initializing can then be resumed by running
+.Nm zpool Cm initialize
+with no flags on the relevant target devices.
+.El
+.It Xo
+.Nm
.Cm iostat
.Op Fl T Cm d Ns | Ns Cm u
.Op Fl v
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
index cb0c777bb76c..1a81991c1d25 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
@@ -87,6 +87,7 @@ static int zpool_do_detach(int, char **);
static int zpool_do_replace(int, char **);
static int zpool_do_split(int, char **);
+static int zpool_do_initialize(int, char **);
static int zpool_do_scrub(int, char **);
static int zpool_do_import(int, char **);
@@ -136,6 +137,7 @@ typedef enum {
HELP_ONLINE,
HELP_REPLACE,
HELP_REMOVE,
+ HELP_INITIALIZE,
HELP_SCRUB,
HELP_STATUS,
HELP_UPGRADE,
@@ -187,6 +189,7 @@ static zpool_command_t command_table[] = {
{ "replace", zpool_do_replace, HELP_REPLACE },
{ "split", zpool_do_split, HELP_SPLIT },
{ NULL },
+ { "initialize", zpool_do_initialize, HELP_INITIALIZE },
{ "scrub", zpool_do_scrub, HELP_SCRUB },
{ NULL },
{ "import", zpool_do_import, HELP_IMPORT },
@@ -261,6 +264,8 @@ get_usage(zpool_help_t idx)
return (gettext("\tremove [-nps] <pool> <device> ...\n"));
case HELP_REOPEN:
return (gettext("\treopen <pool>\n"));
+ case HELP_INITIALIZE:
+ return (gettext("\tinitialize [-cs] <pool> [<device> ...]\n"));
case HELP_SCRUB:
return (gettext("\tscrub [-s | -p] <pool> ...\n"));
case HELP_STATUS:
@@ -1650,6 +1655,43 @@ print_status_config(zpool_handle_t *zhp, const char *name, nvlist_t *nv,
"resilvering" : "repairing");
}
+ if ((vs->vs_initialize_state == VDEV_INITIALIZE_ACTIVE ||
+ vs->vs_initialize_state == VDEV_INITIALIZE_SUSPENDED ||
+ vs->vs_initialize_state == VDEV_INITIALIZE_COMPLETE) &&
+ !vs->vs_scan_removing) {
+ char zbuf[1024];
+ char tbuf[256];
+ struct tm zaction_ts;
+
+ time_t t = vs->vs_initialize_action_time;
+ int initialize_pct = 100;
+ if (vs->vs_initialize_state != VDEV_INITIALIZE_COMPLETE) {
+ initialize_pct = (vs->vs_initialize_bytes_done * 100 /
+ (vs->vs_initialize_bytes_est + 1));
+ }
+
+ (void) localtime_r(&t, &zaction_ts);
+ (void) strftime(tbuf, sizeof (tbuf), "%c", &zaction_ts);
+
+ switch (vs->vs_initialize_state) {
+ case VDEV_INITIALIZE_SUSPENDED:
+ (void) snprintf(zbuf, sizeof (zbuf),
+ ", suspended, started at %s", tbuf);
+ break;
+ case VDEV_INITIALIZE_ACTIVE:
+ (void) snprintf(zbuf, sizeof (zbuf),
+ ", started at %s", tbuf);
+ break;
+ case VDEV_INITIALIZE_COMPLETE:
+ (void) snprintf(zbuf, sizeof (zbuf),
+ ", completed at %s", tbuf);
+ break;
+ }
+
+ (void) printf(gettext(" (%d%% initialized%s)"),
+ initialize_pct, zbuf);
+ }
+
(void) printf("\n");
for (c = 0; c < children; c++) {
@@ -4238,6 +4280,119 @@ zpool_do_scrub(int argc, char **argv)
return (for_each_pool(argc, argv, B_TRUE, NULL, scrub_callback, &cb));
}
+static void
+zpool_collect_leaves(zpool_handle_t *zhp, nvlist_t *nvroot, nvlist_t *res)
+{
+ uint_t children = 0;
+ nvlist_t **child;
+ uint_t i;
+
+ (void) nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN,
+ &child, &children);
+
+ if (children == 0) {
+ char *path = zpool_vdev_name(g_zfs, zhp, nvroot, B_FALSE);
+ fnvlist_add_boolean(res, path);
+ free(path);
+ return;
+ }
+
+ for (i = 0; i < children; i++) {
+ zpool_collect_leaves(zhp, child[i], res);
+ }
+}
+
+/*
+ * zpool initialize [-cs] <pool> [<vdev> ...]
+ * Initialize all unused blocks in the specified vdevs, or all vdevs in the pool
+ * if none specified.
+ *
+ * -c Cancel. Ends active initializing.
+ * -s Suspend. Initializing can then be restarted with no flags.
+ */
+int
+zpool_do_initialize(int argc, char **argv)
+{
+ int c;
+ char *poolname;
+ zpool_handle_t *zhp;
+ nvlist_t *vdevs;
+ int err = 0;
+
+ struct option long_options[] = {
+ {"cancel", no_argument, NULL, 'c'},
+ {"suspend", no_argument, NULL, 's'},
+ {0, 0, 0, 0}
+ };
+
+ pool_initialize_func_t cmd_type = POOL_INITIALIZE_DO;
+ while ((c = getopt_long(argc, argv, "cs", long_options, NULL)) != -1) {
+ switch (c) {
+ case 'c':
+ if (cmd_type != POOL_INITIALIZE_DO) {
+ (void) fprintf(stderr, gettext("-c cannot be "
+ "combined with other options\n"));
+ usage(B_FALSE);
+ }
+ cmd_type = POOL_INITIALIZE_CANCEL;
+ break;
+ case 's':
+ if (cmd_type != POOL_INITIALIZE_DO) {
+ (void) fprintf(stderr, gettext("-s cannot be "
+ "combined with other options\n"));
+ usage(B_FALSE);
+ }
+ cmd_type = POOL_INITIALIZE_SUSPEND;
+ break;
+ case '?':
+ if (optopt != 0) {
+ (void) fprintf(stderr,
+ gettext("invalid option '%c'\n"), optopt);
+ } else {
+ (void) fprintf(stderr,
+ gettext("invalid option '%s'\n"),
+ argv[optind - 1]);
+ }
+ usage(B_FALSE);
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc < 1) {
+ (void) fprintf(stderr, gettext("missing pool name argument\n"));
+ usage(B_FALSE);
+ return (-1);
+ }
+
+ poolname = argv[0];
+ zhp = zpool_open(g_zfs, poolname);
+ if (zhp == NULL)
+ return (-1);
+
+ vdevs = fnvlist_alloc();
+ if (argc == 1) {
+ /* no individual leaf vdevs specified, so add them all */
+ nvlist_t *config = zpool_get_config(zhp, NULL);
+ nvlist_t *nvroot = fnvlist_lookup_nvlist(config,
+ ZPOOL_CONFIG_VDEV_TREE);
+ zpool_collect_leaves(zhp, nvroot, vdevs);
+ } else {
+ int i;
+ for (i = 1; i < argc; i++) {
+ fnvlist_add_boolean(vdevs, argv[i]);
+ }
+ }
+
+ err = zpool_initialize(zhp, cmd_type, vdevs);
+
+ fnvlist_free(vdevs);
+ zpool_close(zhp);
+
+ return (err);
+}
+
typedef struct status_cbdata {
int cb_count;
boolean_t cb_allpools;
diff --git a/cddl/contrib/opensolaris/cmd/ztest/ztest.c b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
index 834a2852ef1f..af8bd1867dae 100644
--- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c
+++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2016 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2017 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
@@ -104,6 +104,7 @@
#include <sys/zil_impl.h>
#include <sys/vdev_impl.h>
#include <sys/vdev_file.h>
+#include <sys/vdev_initialize.h>
#include <sys/spa_impl.h>
#include <sys/metaslab_impl.h>
#include <sys/dsl_prop.h>
@@ -195,6 +196,7 @@ extern uint64_t zfs_deadman_synctime_ms;
extern int metaslab_preload_limit;
extern boolean_t zfs_compressed_arc_enabled;
extern boolean_t zfs_abd_scatter_enabled;
+extern boolean_t zfs_force_some_double_word_sm_entries;
static ztest_shared_opts_t *ztest_shared_opts;
static ztest_shared_opts_t ztest_opts;
@@ -347,6 +349,7 @@ ztest_func_t ztest_spa_upgrade;
ztest_func_t ztest_device_removal;
ztest_func_t ztest_remap_blocks;
ztest_func_t ztest_spa_checkpoint_create_discard;
+ztest_func_t ztest_initialize;
uint64_t zopt_always = 0ULL * NANOSEC; /* all the time */
uint64_t zopt_incessant = 1ULL * NANOSEC / 10; /* every 1/10 second */
@@ -390,7 +393,8 @@ ztest_info_t ztest_info[] = {
&ztest_opts.zo_vdevtime },
{ ztest_device_removal, 1, &zopt_sometimes },
{ ztest_remap_blocks, 1, &zopt_sometimes },
- { ztest_spa_checkpoint_create_discard, 1, &zopt_rarely }
+ { ztest_spa_checkpoint_create_discard, 1, &zopt_rarely },
+ { ztest_initialize, 1, &zopt_sometimes }
};
#define ZTEST_FUNCS (sizeof (ztest_info) / sizeof (ztest_info_t))
@@ -437,6 +441,7 @@ static ztest_ds_t *ztest_ds;
static kmutex_t ztest_vdev_lock;
static kmutex_t ztest_checkpoint_lock;
+static boolean_t ztest_device_removal_active = B_FALSE;
/*
* The ztest_name_lock protects the pool and dataset namespace used by
@@ -2881,7 +2886,7 @@ ztest_vdev_attach_detach(ztest_ds_t *zd, uint64_t id)
* value. Don't bother trying to attach while we are in the middle
* of removal.
*/
- if (spa->spa_vdev_removal != NULL) {
+ if (ztest_device_removal_active) {
spa_config_exit(spa, SCL_ALL, FTAG);
mutex_exit(&ztest_vdev_lock);
return;
@@ -3056,16 +3061,49 @@ ztest_device_removal(ztest_ds_t *zd, uint64_t id)
spa_t *spa = ztest_spa;
vdev_t *vd;
uint64_t guid;
+ int error;
mutex_enter(&ztest_vdev_lock);
+ if (ztest_device_removal_active) {
+ mutex_exit(&ztest_vdev_lock);
+ return;
+ }
+
+ /*
+ * Remove a random top-level vdev and wait for removal to finish.
+ */
spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER);
vd = vdev_lookup_top(spa, ztest_random_vdev_top(spa, B_FALSE));
guid = vd->vdev_guid;
spa_config_exit(spa, SCL_VDEV, FTAG);
- (void) spa_vdev_remove(spa, guid, B_FALSE);
+ error = spa_vdev_remove(spa, guid, B_FALSE);
+ if (error == 0) {
+ ztest_device_removal_active = B_TRUE;
+ mutex_exit(&ztest_vdev_lock);
+
+ while (spa->spa_vdev_removal != NULL)
+ txg_wait_synced(spa_get_dsl(spa), 0);
+ } else {
+ mutex_exit(&ztest_vdev_lock);
+ return;
+ }
+
+ /*
+ * The pool needs to be scrubbed after completing device removal.
+ * Failure to do so may result in checksum errors due to the
+ * strategy employed by ztest_fault_inject() when selecting which
+ * offset are redundant and can be damaged.
+ */
+ error = spa_scan(spa, POOL_SCAN_SCRUB);
+ if (error == 0) {
+ while (dsl_scan_scrubbing(spa_get_dsl(spa)))
+ txg_wait_synced(spa_get_dsl(spa), 0);
+ }
+ mutex_enter(&ztest_vdev_lock);
+ ztest_device_removal_active = B_FALSE;
mutex_exit(&ztest_vdev_lock);
}
@@ -3204,7 +3242,7 @@ ztest_vdev_LUN_growth(ztest_ds_t *zd, uint64_t id)
* that the metaslab_class space increased (because it decreases
* when the device removal completes).
*/
- if (spa->spa_vdev_removal != NULL) {
+ if (ztest_device_removal_active) {
spa_config_exit(spa, SCL_STATE, spa);
mutex_exit(&ztest_vdev_lock);
mutex_exit(&ztest_checkpoint_lock);
@@ -4985,6 +5023,18 @@ ztest_fault_inject(ztest_ds_t *zd, uint64_t id)
boolean_t islog = B_FALSE;
mutex_enter(&ztest_vdev_lock);
+
+ /*
+ * Device removal is in progress, fault injection must be disabled
+ * until it completes and the pool is scrubbed. The fault injection
+ * strategy for damaging blocks does not take in to account evacuated
+ * blocks which may have already been damaged.
+ */
+ if (ztest_device_removal_active) {
+ mutex_exit(&ztest_vdev_lock);
+ return;
+ }
+
maxfaults = MAXFAULTS();
leaves = MAX(zs->zs_mirrors, 1) * ztest_opts.zo_raidz;
mirror_save = zs->zs_mirrors;
@@ -5330,6 +5380,12 @@ ztest_scrub(ztest_ds_t *zd, uint64_t id)
{
spa_t *spa = ztest_spa;
+ /*
+ * Scrub in progress by device removal.
+ */
+ if (ztest_device_removal_active)
+ return;
+
(void) spa_scan(spa, POOL_SCAN_SCRUB);
(void) poll(NULL, 0, 100); /* wait a moment, then force a restart */
(void) spa_scan(spa, POOL_SCAN_SCRUB);
@@ -5418,6 +5474,97 @@ ztest_spa_rename(ztest_ds_t *zd, uint64_t id)
rw_exit(&ztest_name_lock);
}
+static vdev_t *
+ztest_random_concrete_vdev_leaf(vdev_t *vd)
+{
+ if (vd == NULL)
+ return (NULL);
+
+ if (vd->vdev_children == 0)
+ return (vd);
+
+ vdev_t *eligible[vd->vdev_children];
+ int eligible_idx = 0, i;
+ for (i = 0; i < vd->vdev_children; i++) {
+ vdev_t *cvd = vd->vdev_child[i];
+ if (cvd->vdev_top->vdev_removing)
+ continue;
+ if (cvd->vdev_children > 0 ||
+ (vdev_is_concrete(cvd) && !cvd->vdev_detached)) {
+ eligible[eligible_idx++] = cvd;
+ }
+ }
+ VERIFY(eligible_idx > 0);
+
+ uint64_t child_no = ztest_random(eligible_idx);
+ return (ztest_random_concrete_vdev_leaf(eligible[child_no]));
+}
+
+/* ARGSUSED */
+void
+ztest_initialize(ztest_ds_t *zd, uint64_t id)
+{
+ spa_t *spa = ztest_spa;
+ int error = 0;
+
+ mutex_enter(&ztest_vdev_lock);
+
+ spa_config_enter(spa, SCL_VDEV, FTAG, RW_READER);
+
+ /* Random leaf vdev */
+ vdev_t *rand_vd = ztest_random_concrete_vdev_leaf(spa->spa_root_vdev);
+ if (rand_vd == NULL) {
+ spa_config_exit(spa, SCL_VDEV, FTAG);
+ mutex_exit(&ztest_vdev_lock);
+ return;
+ }
+
+ /*
+ * The random vdev we've selected may change as soon as we
+ * drop the spa_config_lock. We create local copies of things
+ * we're interested in.
+ */
+ uint64_t guid = rand_vd->vdev_guid;
+ char *path = strdup(rand_vd->vdev_path);
+ boolean_t active = rand_vd->vdev_initialize_thread != NULL;
+
+ zfs_dbgmsg("vd %p, guid %llu", rand_vd, guid);
+ spa_config_exit(spa, SCL_VDEV, FTAG);
+
+ uint64_t cmd = ztest_random(POOL_INITIALIZE_FUNCS);
+ error = spa_vdev_initialize(spa, guid, cmd);
+ switch (cmd) {
+ case POOL_INITIALIZE_CANCEL:
+ if (ztest_opts.zo_verbose >= 4) {
+ (void) printf("Cancel initialize %s", path);
+ if (!active)
+ (void) printf(" failed (no initialize active)");
+ (void) printf("\n");
+ }
+ break;
+ case POOL_INITIALIZE_DO:
+ if (ztest_opts.zo_verbose >= 4) {
+ (void) printf("Start initialize %s", path);
+ if (active && error == 0)
+ (void) printf(" failed (already active)");
+ else if (error != 0)
+ (void) printf(" failed (error %d)", error);
+ (void) printf("\n");
+ }
+ break;
+ case POOL_INITIALIZE_SUSPEND:
+ if (ztest_opts.zo_verbose >= 4) {
+ (void) printf("Suspend initialize %s", path);
+ if (!active)
+ (void) printf(" failed (no initialize active)");
+ (void) printf("\n");
+ }
+ break;
+ }
+ free(path);
+ mutex_exit(&ztest_vdev_lock);
+}
+
/*
* Verify pool integrity by running zdb.
*/
@@ -5868,7 +6015,6 @@ ztest_run(ztest_shared_t *zs)
*/
kernel_init(FREAD | FWRITE);
VERIFY0(spa_open(ztest_opts.zo_pool, &spa, FTAG));
- spa->spa_debug = B_TRUE;
metaslab_preload_limit = ztest_random(20) + 1;
ztest_spa = spa;
@@ -6025,7 +6171,6 @@ ztest_freeze(void)
kernel_init(FREAD | FWRITE);
VERIFY3U(0, ==, spa_open(ztest_opts.zo_pool, &spa, FTAG));
VERIFY3U(0, ==, ztest_dataset_open(0));
- spa->spa_debug = B_TRUE;
ztest_spa = spa;
/*
@@ -6096,7 +6241,6 @@ ztest_freeze(void)
VERIFY3U(0, ==, ztest_dataset_open(0));
ztest_dataset_close(0);
- spa->spa_debug = B_TRUE;
ztest_spa = spa;
txg_wait_synced(spa_get_dsl(spa), 0);
ztest_reguid(NULL, 0);
@@ -6397,6 +6541,12 @@ main(int argc, char **argv)
dprintf_setup(&argc, argv);
zfs_deadman_synctime_ms = 300000;
+ /*
+ * As two-word space map entries may not come up often (especially
+ * if pool and vdev sizes are small) we want to force at least some
+ * of them so the feature get tested.
+ */
+ zfs_force_some_double_word_sm_entries = B_TRUE;
ztest_fd_rand = open("/dev/urandom", O_RDONLY);
ASSERT3S(ztest_fd_rand, >=, 0);
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
index 3bf6196ad034..492fb937cba2 100644
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
@@ -343,13 +343,13 @@ static const dt_ident_t _dtrace_globals[] = {
&dt_idops_func, "void(@)" },
{ "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN,
DT_VERS_1_2, &dt_idops_func, "_symaddr(uintptr_t)" },
+#ifdef illumos
{ "msgdsize", DT_IDENT_FUNC, 0, DIF_SUBR_MSGDSIZE,
DT_ATTR_STABCMN, DT_VERS_1_0,
&dt_idops_func, "size_t(mblk_t *)" },
{ "msgsize", DT_IDENT_FUNC, 0, DIF_SUBR_MSGSIZE,
DT_ATTR_STABCMN, DT_VERS_1_0,
&dt_idops_func, "size_t(mblk_t *)" },
-#ifdef illumos
{ "mutex_owned", DT_IDENT_FUNC, 0, DIF_SUBR_MUTEX_OWNED,
DT_ATTR_EVOLCMN, DT_VERS_1_0,
&dt_idops_func, "int(genunix`kmutex_t *)" },
diff --git a/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c b/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c
index 7cece36ced1b..b687a2f5761a 100644
--- a/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c
+++ b/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c
@@ -10,6 +10,7 @@
*/
/*
* Copyright (c) 2014, Joyent, Inc.
+ * Copyright (c) 2017 by Delphix. All rights reserved.
*/
#include <stdio.h>
@@ -394,8 +395,10 @@ nvlist_print_json(FILE *fp, nvlist_t *nvl)
}
case DATA_TYPE_UNKNOWN:
+ case DATA_TYPE_DONTCARE:
return (-1);
}
+
}
FPRINTF(fp, "}");
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
index d518abb86644..4f8a68e4d296 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
@@ -137,6 +137,9 @@ typedef enum zfs_error {
EZFS_NO_CHECKPOINT, /* pool has no checkpoint */
EZFS_DEVRM_IN_PROGRESS, /* a device is currently being removed */
EZFS_VDEV_TOO_BIG, /* a device is too big to be used */
+ EZFS_TOOMANY, /* argument list too long */
+ EZFS_INITIALIZING, /* currently initializing */
+ EZFS_NO_INITIALIZE, /* no active initialize */
EZFS_UNKNOWN
} zfs_error_t;
@@ -262,6 +265,8 @@ typedef struct splitflags {
* Functions to manipulate pool and vdev state
*/
extern int zpool_scan(zpool_handle_t *, pool_scan_func_t, pool_scrub_cmd_t);
+extern int zpool_initialize(zpool_handle_t *, pool_initialize_func_t,
+ nvlist_t *);
extern int zpool_clear(zpool_handle_t *, const char *, nvlist_t *);
extern int zpool_reguid(zpool_handle_t *);
extern int zpool_reopen(zpool_handle_t *);
@@ -838,6 +843,17 @@ extern int zmount(const char *, const char *, int, char *, char *, int, char *,
#endif
extern int zfs_remap_indirects(libzfs_handle_t *hdl, const char *);
+/* Allow consumers to initialize libshare externally for optimal performance */
+extern int zfs_init_libshare_arg(libzfs_handle_t *, int, void *);
+/*
+ * For most consumers, zfs_init_libshare_arg is sufficient on its own, and
+ * zfs_uninit_libshare is unnecessary. zfs_uninit_libshare should only be called
+ * if the caller has already initialized libshare for one set of zfs handles,
+ * and wishes to share or unshare filesystems outside of that set. In that case,
+ * the caller should uninitialize libshare, and then re-initialize it with the
+ * new handles being shared or unshared.
+ */
+extern void zfs_uninit_libshare(libzfs_handle_t *);
#ifdef __cplusplus
}
#endif
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c
index 277e99e103cc..7bbb68328f29 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c
@@ -26,7 +26,7 @@
* Portions Copyright 2007 Ramprakash Jelari
* Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
* All rights reserved.
- * Copyright (c) 2014, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2014, 2016 by Delphix. All rights reserved.
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
*/
@@ -166,6 +166,11 @@ changelist_postfix(prop_changelist_t *clp)
char shareopts[ZFS_MAXPROPLEN];
int errors = 0;
libzfs_handle_t *hdl;
+#ifdef illumos
+ size_t num_datasets = 0, i;
+ zfs_handle_t **zhandle_arr;
+ sa_init_selective_arg_t sharearg;
+#endif
/*
* If we're changing the mountpoint, attempt to destroy the underlying
@@ -192,8 +197,33 @@ changelist_postfix(prop_changelist_t *clp)
hdl = cn->cn_handle->zfs_hdl;
assert(hdl != NULL);
zfs_uninit_libshare(hdl);
- }
+#ifdef illumos
+ /*
+ * For efficiencies sake, we initialize libshare for only a few
+ * shares (the ones affected here). Future initializations in
+ * this process should just use the cached initialization.
+ */
+ for (cn = uu_list_last(clp->cl_list); cn != NULL;
+ cn = uu_list_prev(clp->cl_list, cn)) {
+ num_datasets++;
+ }
+
+ zhandle_arr = zfs_alloc(hdl,
+ num_datasets * sizeof (zfs_handle_t *));
+ for (i = 0, cn = uu_list_last(clp->cl_list); cn != NULL;
+ cn = uu_list_prev(clp->cl_list, cn)) {
+ zhandle_arr[i++] = cn->cn_handle;
+ zfs_refresh_properties(cn->cn_handle);
+ }
+ assert(i == num_datasets);
+ sharearg.zhandle_arr = zhandle_arr;
+ sharearg.zhandle_len = num_datasets;
+ errors = zfs_init_libshare_arg(hdl, SA_INIT_SHARE_API_SELECTIVE,
+ &sharearg);
+ free(zhandle_arr);
+#endif
+ }
/*
* We walk the datasets in reverse, because we want to mount any parent
* datasets before mounting the children. We walk all datasets even if
@@ -218,7 +248,9 @@ changelist_postfix(prop_changelist_t *clp)
continue;
cn->cn_needpost = B_FALSE;
+#ifndef illumos
zfs_refresh_properties(cn->cn_handle);
+#endif
if (ZFS_IS_VOLUME(cn->cn_handle))
continue;
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
index 2f25631c5e22..34d49768e49b 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc. All rights reserved.
* Copyright (c) 2011, 2016 by Delphix. All rights reserved.
* Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright (c) 2011-2012 Pawel Jakub Dawidek. All rights reserved.
@@ -50,7 +50,9 @@
#include <pwd.h>
#include <grp.h>
#include <stddef.h>
+#ifdef illumos
#include <idmap.h>
+#endif
#include <sys/dnode.h>
#include <sys/spa.h>
@@ -785,15 +787,13 @@ typedef struct mnttab_node {
static int
libzfs_mnttab_cache_compare(const void *arg1, const void *arg2)
{
- const mnttab_node_t *mtn1 = arg1;
- const mnttab_node_t *mtn2 = arg2;
+ const mnttab_node_t *mtn1 = (const mnttab_node_t *)arg1;
+ const mnttab_node_t *mtn2 = (const mnttab_node_t *)arg2;
int rv;
rv = strcmp(mtn1->mtn_mt.mnt_special, mtn2->mtn_mt.mnt_special);
- if (rv == 0)
- return (0);
- return (rv > 0 ? 1 : -1);
+ return (AVL_ISIGN(rv));
}
void
@@ -1407,7 +1407,6 @@ badlabel:
switch (prop) {
case ZFS_PROP_RESERVATION:
- case ZFS_PROP_REFRESERVATION:
if (intval > volsize) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"'%s' is greater than current "
@@ -1418,6 +1417,17 @@ badlabel:
}
break;
+ case ZFS_PROP_REFRESERVATION:
+ if (intval > volsize && intval != UINT64_MAX) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "'%s' is greater than current "
+ "volume size"), propname);
+ (void) zfs_error(hdl, EZFS_BADPROP,
+ errbuf);
+ goto error;
+ }
+ break;
+
case ZFS_PROP_VOLSIZE:
if (intval % blocksize != 0) {
zfs_nicenum(blocksize, buf,
@@ -1519,6 +1529,61 @@ zfs_add_synthetic_resv(zfs_handle_t *zhp, nvlist_t *nvl)
return (1);
}
+/*
+ * Helper for 'zfs {set|clone} refreservation=auto'. Must be called after
+ * zfs_valid_proplist(), as it is what sets the UINT64_MAX sentinal value.
+ * Return codes must match zfs_add_synthetic_resv().
+ */
+static int
+zfs_fix_auto_resv(zfs_handle_t *zhp, nvlist_t *nvl)
+{
+ uint64_t volsize;
+ uint64_t resvsize;
+ zfs_prop_t prop;
+ nvlist_t *props;
+
+ if (!ZFS_IS_VOLUME(zhp)) {
+ return (0);
+ }
+
+ if (zfs_which_resv_prop(zhp, &prop) != 0) {
+ return (-1);
+ }
+
+ if (prop != ZFS_PROP_REFRESERVATION) {
+ return (0);
+ }
+
+ if (nvlist_lookup_uint64(nvl, zfs_prop_to_name(prop), &resvsize) != 0) {
+ /* No value being set, so it can't be "auto" */
+ return (0);
+ }
+ if (resvsize != UINT64_MAX) {
+ /* Being set to a value other than "auto" */
+ return (0);
+ }
+
+ props = fnvlist_alloc();
+
+ fnvlist_add_uint64(props, zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE),
+ zfs_prop_get_int(zhp, ZFS_PROP_VOLBLOCKSIZE));
+
+ if (nvlist_lookup_uint64(nvl, zfs_prop_to_name(ZFS_PROP_VOLSIZE),
+ &volsize) != 0) {
+ volsize = zfs_prop_get_int(zhp, ZFS_PROP_VOLSIZE);
+ }
+
+ resvsize = zvol_volsize_to_reservation(volsize, props);
+ fnvlist_free(props);
+
+ (void) nvlist_remove_all(nvl, zfs_prop_to_name(prop));
+ if (nvlist_add_uint64(nvl, zfs_prop_to_name(prop), resvsize) != 0) {
+ (void) no_memory(zhp->zfs_hdl);
+ return (-1);
+ }
+ return (1);
+}
+
void
zfs_setprop_error(libzfs_handle_t *hdl, zfs_prop_t prop, int err,
char *errbuf)
@@ -1685,6 +1750,12 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
goto error;
}
}
+
+ if (added_resv != 1 &&
+ (added_resv = zfs_fix_auto_resv(zhp, nvl)) == -1) {
+ goto error;
+ }
+
/*
* Check how many properties we're setting and allocate an array to
* store changelist pointers for postfix().
@@ -2711,6 +2782,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
break;
case ZFS_PROP_GUID:
+ case ZFS_PROP_CREATETXG:
/*
* GUIDs are stored as numbers, but they are identifiers.
* We don't want them to be pretty printed, because pretty
@@ -3376,8 +3448,22 @@ zfs_create_ancestors(libzfs_handle_t *hdl, const char *path)
{
int prefix;
char *path_copy;
+ char errbuf[1024];
int rc = 0;
+ (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
+ "cannot create '%s'"), path);
+
+ /*
+ * Check that we are not passing the nesting limit
+ * before we start creating any ancestors.
+ */
+ if (dataset_nestcheck(path) != 0) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "maximum name nesting depth exceeded"));
+ return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
+ }
+
if (check_parents(hdl, path, NULL, B_TRUE, &prefix) != 0)
return (-1);
@@ -3413,6 +3499,12 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
if (!zfs_validate_name(hdl, path, type, B_TRUE))
return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
+ if (dataset_nestcheck(path) != 0) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "maximum name nesting depth exceeded"));
+ return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
+ }
+
/* validate parents exist */
if (check_parents(hdl, path, &zoned, B_FALSE, NULL) != 0)
return (-1);
@@ -3715,6 +3807,7 @@ zfs_clone(zfs_handle_t *zhp, const char *target, nvlist_t *props)
if (props) {
zfs_type_t type;
+
if (ZFS_IS_VOLUME(zhp)) {
type = ZFS_TYPE_VOLUME;
} else {
@@ -3723,6 +3816,10 @@ zfs_clone(zfs_handle_t *zhp, const char *target, nvlist_t *props)
if ((props = zfs_valid_proplist(hdl, type, props, zoned,
zhp, zhp->zpool_hdl, errbuf)) == NULL)
return (-1);
+ if (zfs_fix_auto_resv(zhp, props) == -1) {
+ nvlist_free(props);
+ return (-1);
+ }
}
ret = lzc_clone(target, zhp->zfs_name, props);
@@ -3839,12 +3936,24 @@ zfs_remap_indirects(libzfs_handle_t *hdl, const char *fs)
char errbuf[1024];
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
- "cannot remap filesystem '%s' "), fs);
+ "cannot remap dataset '%s'"), fs);
err = lzc_remap(fs);
if (err != 0) {
- (void) zfs_standard_error(hdl, err, errbuf);
+ switch (err) {
+ case ENOTSUP:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "pool must be upgraded"));
+ (void) zfs_error(hdl, EZFS_BADVERSION, errbuf);
+ break;
+ case EINVAL:
+ (void) zfs_error(hdl, EZFS_BADTYPE, errbuf);
+ break;
+ default:
+ (void) zfs_standard_error(hdl, err, errbuf);
+ break;
+ }
}
return (err);
@@ -4196,6 +4305,7 @@ zfs_rename(zfs_handle_t *zhp, const char *source, const char *target,
errbuf));
}
}
+
if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE))
return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
} else {
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
index 840c814ff4c0..c36067389585 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
@@ -22,7 +22,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2015, 2017 by Delphix. All rights reserved.
* Copyright 2016 Joyent, Inc.
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
*/
@@ -101,7 +101,10 @@ get_stats_for_obj(differ_info_t *di, const char *dsname, uint64_t obj,
return (0);
}
- if (di->zerr == EPERM) {
+ if (di->zerr == ESTALE) {
+ (void) snprintf(pn, maxlen, "(on_delete_queue)");
+ return (0);
+ } else if (di->zerr == EPERM) {
(void) snprintf(di->errbuf, sizeof (di->errbuf),
dgettext(TEXT_DOMAIN,
"The sys_config privilege or diff delegated permission "
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
index 522a7e63f051..bdb9ffeadf75 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
@@ -207,7 +207,6 @@ void namespace_clear(libzfs_handle_t *);
*/
extern int zfs_init_libshare(libzfs_handle_t *, int);
-extern void zfs_uninit_libshare(libzfs_handle_t *);
extern int zfs_parse_options(char *, zfs_share_proto_t);
extern int zfs_unshare_proto(zfs_handle_t *,
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
index 8af6351d9f37..664f6b42df9e 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
@@ -33,7 +33,7 @@
* ZFS label of each device. If we successfully read the label, then we
* organize the configuration information in the following hierarchy:
*
- * pool guid -> toplevel vdev guid -> label txg
+ * pool guid -> toplevel vdev guid -> label txg
*
* Duplicate entries matching this same tuple will be discarded. Once we have
* examined every device, we pick the best label txg config for each toplevel
@@ -245,7 +245,6 @@ add_config(libzfs_handle_t *hdl, pool_list_t *pl, const char *path,
ne->ne_next = pl->names;
pl->names = ne;
- nvlist_free(config);
return (0);
}
@@ -265,7 +264,6 @@ add_config(libzfs_handle_t *hdl, pool_list_t *pl, const char *path,
&top_guid) != 0 ||
nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG,
&txg) != 0 || txg == 0) {
- nvlist_free(config);
return (0);
}
@@ -280,7 +278,6 @@ add_config(libzfs_handle_t *hdl, pool_list_t *pl, const char *path,
if (pe == NULL) {
if ((pe = zfs_alloc(hdl, sizeof (pool_entry_t))) == NULL) {
- nvlist_free(config);
return (-1);
}
pe->pe_guid = pool_guid;
@@ -299,7 +296,6 @@ add_config(libzfs_handle_t *hdl, pool_list_t *pl, const char *path,
if (ve == NULL) {
if ((ve = zfs_alloc(hdl, sizeof (vdev_entry_t))) == NULL) {
- nvlist_free(config);
return (-1);
}
ve->ve_guid = top_guid;
@@ -319,15 +315,12 @@ add_config(libzfs_handle_t *hdl, pool_list_t *pl, const char *path,
if (ce == NULL) {
if ((ce = zfs_alloc(hdl, sizeof (config_entry_t))) == NULL) {
- nvlist_free(config);
return (-1);
}
ce->ce_txg = txg;
- ce->ce_config = config;
+ ce->ce_config = fnvlist_dup(config);
ce->ce_next = ve->ve_configs;
ve->ve_configs = ce;
- } else {
- nvlist_free(config);
}
/*
@@ -1396,9 +1389,7 @@ skipdir:
&this_guid) == 0 &&
iarg->guid == this_guid;
}
- if (!matched) {
- nvlist_free(config);
- } else {
+ if (matched) {
/*
* use the non-raw path for the config
*/
@@ -1408,6 +1399,7 @@ skipdir:
config) != 0)
config_failed = B_TRUE;
}
+ nvlist_free(config);
}
free(slice->rn_name);
free(slice);
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
index 433fea3ef51d..6bca98816f7c 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
@@ -272,12 +272,7 @@ zfs_snapshot_compare(const void *larg, const void *rarg)
lcreate = zfs_prop_get_int(l, ZFS_PROP_CREATETXG);
rcreate = zfs_prop_get_int(r, ZFS_PROP_CREATETXG);
- if (lcreate < rcreate)
- return (-1);
- else if (lcreate > rcreate)
- return (+1);
- else
- return (0);
+ return (AVL_CMP(lcreate, rcreate));
}
int
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
index 84b716794ac3..d8723d37d385 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c
@@ -579,6 +579,7 @@ zfs_is_shared_smb(zfs_handle_t *zhp, char **where)
#ifdef illumos
static sa_handle_t (*_sa_init)(int);
+static sa_handle_t (*_sa_init_arg)(int, void *);
static void (*_sa_fini)(sa_handle_t);
static sa_share_t (*_sa_find_share)(sa_handle_t, char *);
static int (*_sa_enable_share)(sa_share_t, char *);
@@ -620,6 +621,8 @@ _zfs_init_libshare(void)
if ((libshare = dlopen(path, RTLD_LAZY | RTLD_GLOBAL)) != NULL) {
_sa_init = (sa_handle_t (*)(int))dlsym(libshare, "sa_init");
+ _sa_init_arg = (sa_handle_t (*)(int, void *))dlsym(libshare,
+ "sa_init_arg");
_sa_fini = (void (*)(sa_handle_t))dlsym(libshare, "sa_fini");
_sa_find_share = (sa_share_t (*)(sa_handle_t, char *))
dlsym(libshare, "sa_find_share");
@@ -639,14 +642,15 @@ _zfs_init_libshare(void)
char *, char *))dlsym(libshare, "sa_zfs_process_share");
_sa_update_sharetab_ts = (void (*)(sa_handle_t))
dlsym(libshare, "sa_update_sharetab_ts");
- if (_sa_init == NULL || _sa_fini == NULL ||
- _sa_find_share == NULL || _sa_enable_share == NULL ||
- _sa_disable_share == NULL || _sa_errorstr == NULL ||
- _sa_parse_legacy_options == NULL ||
+ if (_sa_init == NULL || _sa_init_arg == NULL ||
+ _sa_fini == NULL || _sa_find_share == NULL ||
+ _sa_enable_share == NULL || _sa_disable_share == NULL ||
+ _sa_errorstr == NULL || _sa_parse_legacy_options == NULL ||
_sa_needs_refresh == NULL || _sa_get_zfs_handle == NULL ||
_sa_zfs_process_share == NULL ||
_sa_update_sharetab_ts == NULL) {
_sa_init = NULL;
+ _sa_init_arg = NULL;
_sa_fini = NULL;
_sa_disable_share = NULL;
_sa_enable_share = NULL;
@@ -670,8 +674,8 @@ _zfs_init_libshare(void)
* service value is which part(s) of the API to initialize and is a
* direct map to the libshare sa_init(service) interface.
*/
-int
-zfs_init_libshare(libzfs_handle_t *zhandle, int service)
+static int
+zfs_init_libshare_impl(libzfs_handle_t *zhandle, int service, void *arg)
{
#ifdef illumos
/*
@@ -694,11 +698,11 @@ zfs_init_libshare(libzfs_handle_t *zhandle, int service)
if (_sa_needs_refresh != NULL &&
_sa_needs_refresh(zhandle->libzfs_sharehdl)) {
zfs_uninit_libshare(zhandle);
- zhandle->libzfs_sharehdl = _sa_init(service);
+ zhandle->libzfs_sharehdl = _sa_init_arg(service, arg);
}
if (zhandle && zhandle->libzfs_sharehdl == NULL)
- zhandle->libzfs_sharehdl = _sa_init(service);
+ zhandle->libzfs_sharehdl = _sa_init_arg(service, arg);
if (zhandle->libzfs_sharehdl == NULL)
return (SA_NO_MEMORY);
@@ -706,6 +710,18 @@ zfs_init_libshare(libzfs_handle_t *zhandle, int service)
return (SA_OK);
}
+int
+zfs_init_libshare(libzfs_handle_t *zhandle, int service)
+{
+ return (zfs_init_libshare_impl(zhandle, service, NULL));
+}
+
+int
+zfs_init_libshare_arg(libzfs_handle_t *zhandle, int service, void *arg)
+{
+ return (zfs_init_libshare_impl(zhandle, service, arg));
+}
+
/*
* zfs_uninit_libshare(zhandle)
@@ -817,9 +833,9 @@ zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto)
ZFS_MAXPROPLEN, B_FALSE) != 0 ||
strcmp(shareopts, "off") == 0)
continue;
-
#ifdef illumos
- ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API);
+ ret = zfs_init_libshare_arg(hdl, SA_INIT_ONE_SHARE_FROM_HANDLE,
+ zhp);
if (ret != SA_OK) {
(void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED,
dgettext(TEXT_DOMAIN, "cannot share '%s': %s"),
@@ -930,6 +946,7 @@ unshare_one(libzfs_handle_t *hdl, const char *name, const char *mountpoint,
sa_share_t share;
int err;
char *mntpt;
+
/*
* Mountpoint could get trashed if libshare calls getmntany
* which it does during API initialization, so strdup the
@@ -937,8 +954,14 @@ unshare_one(libzfs_handle_t *hdl, const char *name, const char *mountpoint,
*/
mntpt = zfs_strdup(hdl, mountpoint);
- /* make sure libshare initialized */
- if ((err = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) {
+ /*
+ * make sure libshare initialized, initialize everything because we
+ * don't know what other unsharing may happen later. Functions up the
+ * stack are allowed to initialize instead a subset of shares at the
+ * time the set is known.
+ */
+ if ((err = zfs_init_libshare_arg(hdl, SA_INIT_ONE_SHARE_FROM_NAME,
+ (void *)name)) != SA_OK) {
free(mntpt); /* don't need the copy anymore */
return (zfs_error_fmt(hdl, proto_table[proto].p_unshare_err,
dgettext(TEXT_DOMAIN, "cannot unshare '%s': %s"),
@@ -1289,6 +1312,9 @@ zpool_disable_datasets(zpool_handle_t *zhp, boolean_t force)
int i;
int ret = -1;
int flags = (force ? MS_FORCE : 0);
+#ifdef illumos
+ sa_init_selective_arg_t sharearg;
+#endif
namelen = strlen(zhp->zpool_name);
@@ -1363,6 +1389,14 @@ zpool_disable_datasets(zpool_handle_t *zhp, boolean_t force)
* At this point, we have the entire list of filesystems, so sort it by
* mountpoint.
*/
+#ifdef illumos
+ sharearg.zhandle_arr = datasets;
+ sharearg.zhandle_len = used;
+ ret = zfs_init_libshare_arg(hdl, SA_INIT_SHARE_API_SELECTIVE,
+ &sharearg);
+ if (ret != 0)
+ goto out;
+#endif
qsort(mountpoints, used, sizeof (char *), mountpoint_compare);
/*
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
index 1eec116b9fa7..392ed3cfa868 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
@@ -1981,6 +1981,100 @@ zpool_scan(zpool_handle_t *zhp, pool_scan_func_t func, pool_scrub_cmd_t cmd)
}
}
+static int
+xlate_init_err(int err)
+{
+ switch (err) {
+ case ENODEV:
+ return (EZFS_NODEVICE);
+ case EINVAL:
+ case EROFS:
+ return (EZFS_BADDEV);
+ case EBUSY:
+ return (EZFS_INITIALIZING);
+ case ESRCH:
+ return (EZFS_NO_INITIALIZE);
+ }
+ return (err);
+}
+
+/*
+ * Begin, suspend, or cancel the initialization (initializing of all free
+ * blocks) for the given vdevs in the given pool.
+ */
+int
+zpool_initialize(zpool_handle_t *zhp, pool_initialize_func_t cmd_type,
+ nvlist_t *vds)
+{
+ char msg[1024];
+ libzfs_handle_t *hdl = zhp->zpool_hdl;
+
+ nvlist_t *errlist;
+
+ /* translate vdev names to guids */
+ nvlist_t *vdev_guids = fnvlist_alloc();
+ nvlist_t *guids_to_paths = fnvlist_alloc();
+ boolean_t spare, cache;
+ nvlist_t *tgt;
+ nvpair_t *elem;
+
+ for (elem = nvlist_next_nvpair(vds, NULL); elem != NULL;
+ elem = nvlist_next_nvpair(vds, elem)) {
+ char *vd_path = nvpair_name(elem);
+ tgt = zpool_find_vdev(zhp, vd_path, &spare, &cache, NULL);
+
+ if ((tgt == NULL) || cache || spare) {
+ (void) snprintf(msg, sizeof (msg),
+ dgettext(TEXT_DOMAIN, "cannot initialize '%s'"),
+ vd_path);
+ int err = (tgt == NULL) ? EZFS_NODEVICE :
+ (spare ? EZFS_ISSPARE : EZFS_ISL2CACHE);
+ fnvlist_free(vdev_guids);
+ fnvlist_free(guids_to_paths);
+ return (zfs_error(hdl, err, msg));
+ }
+
+ uint64_t guid = fnvlist_lookup_uint64(tgt, ZPOOL_CONFIG_GUID);
+ fnvlist_add_uint64(vdev_guids, vd_path, guid);
+
+ (void) snprintf(msg, sizeof (msg), "%llu", guid);
+ fnvlist_add_string(guids_to_paths, msg, vd_path);
+ }
+
+ int err = lzc_initialize(zhp->zpool_name, cmd_type, vdev_guids,
+ &errlist);
+ fnvlist_free(vdev_guids);
+
+ if (err == 0) {
+ fnvlist_free(guids_to_paths);
+ return (0);
+ }
+
+ nvlist_t *vd_errlist = NULL;
+ if (errlist != NULL) {
+ vd_errlist = fnvlist_lookup_nvlist(errlist,
+ ZPOOL_INITIALIZE_VDEVS);
+ }
+
+ (void) snprintf(msg, sizeof (msg),
+ dgettext(TEXT_DOMAIN, "operation failed"));
+
+ for (elem = nvlist_next_nvpair(vd_errlist, NULL); elem != NULL;
+ elem = nvlist_next_nvpair(vd_errlist, elem)) {
+ int64_t vd_error = xlate_init_err(fnvpair_value_int64(elem));
+ char *path = fnvlist_lookup_string(guids_to_paths,
+ nvpair_name(elem));
+ (void) zfs_error_fmt(hdl, vd_error, "cannot initialize '%s'",
+ path);
+ }
+
+ fnvlist_free(guids_to_paths);
+ if (vd_errlist != NULL)
+ return (-1);
+
+ return (zpool_standard_error(hdl, err, msg));
+}
+
#ifdef illumos
/*
* This provides a very minimal check whether a given string is likely a
@@ -2836,7 +2930,7 @@ zpool_vdev_attach(zpool_handle_t *zhp,
case EBUSY:
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "%s is busy, "
- "or pool has removing/removed vdevs"),
+ "or device removal is in progress"),
new_disk);
(void) zfs_error(hdl, EZFS_BADDEV, msg);
break;
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
index a0e06c032791..2368fda9f681 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
@@ -489,15 +489,10 @@ typedef struct fsavl_node {
static int
fsavl_compare(const void *arg1, const void *arg2)
{
- const fsavl_node_t *fn1 = arg1;
- const fsavl_node_t *fn2 = arg2;
+ const fsavl_node_t *fn1 = (const fsavl_node_t *)arg1;
+ const fsavl_node_t *fn2 = (const fsavl_node_t *)arg2;
- if (fn1->fn_guid > fn2->fn_guid)
- return (+1);
- else if (fn1->fn_guid < fn2->fn_guid)
- return (-1);
- else
- return (0);
+ return (AVL_CMP(fn1->fn_guid, fn2->fn_guid));
}
/*
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
index 822c3af26ad0..faf00486751c 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2018 Joyent, Inc.
* Copyright (c) 2011, 2017 by Delphix. All rights reserved.
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
* Copyright (c) 2017 Datto Inc.
@@ -254,6 +254,13 @@ libzfs_error_description(libzfs_handle_t *hdl)
return (dgettext(TEXT_DOMAIN, "device removal in progress"));
case EZFS_VDEV_TOO_BIG:
return (dgettext(TEXT_DOMAIN, "device exceeds supported size"));
+ case EZFS_TOOMANY:
+ return (dgettext(TEXT_DOMAIN, "argument list too long"));
+ case EZFS_INITIALIZING:
+ return (dgettext(TEXT_DOMAIN, "currently initializing"));
+ case EZFS_NO_INITIALIZE:
+ return (dgettext(TEXT_DOMAIN, "there is no active "
+ "initialization"));
case EZFS_UNKNOWN:
return (dgettext(TEXT_DOMAIN, "unknown error"));
default:
@@ -1227,6 +1234,7 @@ zprop_parse_value(libzfs_handle_t *hdl, nvpair_t *elem, int prop,
const char *propname;
char *value;
boolean_t isnone = B_FALSE;
+ boolean_t isauto = B_FALSE;
if (type == ZFS_TYPE_POOL) {
proptype = zpool_prop_get_type(prop);
@@ -1262,8 +1270,9 @@ zprop_parse_value(libzfs_handle_t *hdl, nvpair_t *elem, int prop,
(void) nvpair_value_string(elem, &value);
if (strcmp(value, "none") == 0) {
isnone = B_TRUE;
- } else if (zfs_nicestrtonum(hdl, value, ivalp)
- != 0) {
+ } else if (strcmp(value, "auto") == 0) {
+ isauto = B_TRUE;
+ } else if (zfs_nicestrtonum(hdl, value, ivalp) != 0) {
goto error;
}
} else if (datatype == DATA_TYPE_UINT64) {
@@ -1293,6 +1302,31 @@ zprop_parse_value(libzfs_handle_t *hdl, nvpair_t *elem, int prop,
prop == ZFS_PROP_SNAPSHOT_LIMIT)) {
*ivalp = UINT64_MAX;
}
+
+ /*
+ * Special handling for setting 'refreservation' to 'auto'. Use
+ * UINT64_MAX to tell the caller to use zfs_fix_auto_resv().
+ * 'auto' is only allowed on volumes.
+ */
+ if (isauto) {
+ switch (prop) {
+ case ZFS_PROP_REFRESERVATION:
+ if ((type & ZFS_TYPE_VOLUME) == 0) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "'%s=auto' only allowed on "
+ "volumes"), nvpair_name(elem));
+ goto error;
+ }
+ *ivalp = UINT64_MAX;
+ break;
+ default:
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "'auto' is invalid value for '%s'"),
+ nvpair_name(elem));
+ goto error;
+ }
+ }
+
break;
case PROP_TYPE_INDEX:
diff --git a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
index 3dda53395a1f..61fb4af24194 100644
--- a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
+++ b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
@@ -1085,3 +1085,40 @@ lzc_channel_program_nosync(const char *pool, const char *program,
return (lzc_channel_program_impl(pool, program, B_FALSE, timeout,
memlimit, argnvl, outnvl));
}
+
+/*
+ * Changes initializing state.
+ *
+ * vdevs should be a list of (<key>, guid) where guid is a uint64 vdev GUID.
+ * The key is ignored.
+ *
+ * If there are errors related to vdev arguments, per-vdev errors are returned
+ * in an nvlist with the key "vdevs". Each error is a (guid, errno) pair where
+ * guid is stringified with PRIu64, and errno is one of the following as
+ * an int64_t:
+ * - ENODEV if the device was not found
+ * - EINVAL if the devices is not a leaf or is not concrete (e.g. missing)
+ * - EROFS if the device is not writeable
+ * - EBUSY start requested but the device is already being initialized
+ * - ESRCH cancel/suspend requested but device is not being initialized
+ *
+ * If the errlist is empty, then return value will be:
+ * - EINVAL if one or more arguments was invalid
+ * - Other spa_open failures
+ * - 0 if the operation succeeded
+ */
+int
+lzc_initialize(const char *poolname, pool_initialize_func_t cmd_type,
+ nvlist_t *vdevs, nvlist_t **errlist)
+{
+ int error;
+ nvlist_t *args = fnvlist_alloc();
+ fnvlist_add_uint64(args, ZPOOL_INITIALIZE_COMMAND, (uint64_t)cmd_type);
+ fnvlist_add_nvlist(args, ZPOOL_INITIALIZE_VDEVS, vdevs);
+
+ error = lzc_ioctl(ZFS_IOC_POOL_INITIALIZE, poolname, args, errlist);
+
+ fnvlist_free(args);
+
+ return (error);
+}
diff --git a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
index 0eaa89cc1e9e..24781cb0fd68 100644
--- a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
+++ b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h
@@ -31,6 +31,8 @@
#include <libnvpair.h>
#include <sys/param.h>
#include <sys/types.h>
+#include <sys/fs/zfs.h>
+
#ifdef __cplusplus
extern "C" {
@@ -56,6 +58,8 @@ int lzc_destroy_snaps(nvlist_t *, boolean_t, nvlist_t **);
int lzc_bookmark(nvlist_t *, nvlist_t **);
int lzc_get_bookmarks(const char *, nvlist_t *, nvlist_t **);
int lzc_destroy_bookmarks(nvlist_t *, nvlist_t **);
+int lzc_initialize(const char *, pool_initialize_func_t, nvlist_t *,
+ nvlist_t **);
int lzc_snaprange_space(const char *, const char *, uint64_t *);
diff --git a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
index 060d9a094ba1..e93ca2f4ad7b 100644
--- a/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
+++ b/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
@@ -670,6 +670,9 @@ extern zoneid_t getzoneid(void);
#define root_mount_wait() do { } while (0)
#define root_mounted() (1)
+#define noinline __attribute__((noinline))
+#define likely(x) __builtin_expect((x), 1)
+
struct file {
void *dummy;
};
diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile
index c33a8c2dd882..13cf557ad53e 100644
--- a/cddl/lib/libdtrace/Makefile
+++ b/cddl/lib/libdtrace/Makefile
@@ -56,6 +56,7 @@ DSRCS= errno.d \
tcp.d \
socket.d \
udp.d \
+ udplite.d \
unistd.d
FILES= ${DSRCS}
diff --git a/cddl/lib/libdtrace/ip.d b/cddl/lib/libdtrace/ip.d
index d413a300284c..f591a965af68 100644
--- a/cddl/lib/libdtrace/ip.d
+++ b/cddl/lib/libdtrace/ip.d
@@ -167,6 +167,8 @@ inline short IPPROTO_IPCOMP = 108;
inline short IPPROTO_SCTP = 132;
#pragma D binding "1.5" IPPROTO_RAW
inline short IPPROTO_RAW = 255;
+#pragma D binding "1.13" IPPROTO_UDPLITE
+inline short IPPROTO_UDPLITE = 136;
inline uint8_t INP_IPV4 = 0x01;
inline uint8_t INP_IPV6 = 0x02;
@@ -193,6 +195,7 @@ inline string protocols[int proto] =
proto == IPPROTO_PIM ? "PIM" :
proto == IPPROTO_IPCOMP ? "IPCOMP" :
proto == IPPROTO_SCTP ? "SCTP" :
+ proto == IPPROTO_UDPLITE ? "UDPLITE" :
proto == IPPROTO_RAW ? "RAW" :
"<unknown>";
diff --git a/cddl/lib/libdtrace/udplite.d b/cddl/lib/libdtrace/udplite.d
new file mode 100644
index 000000000000..e41a6faa36a8
--- /dev/null
+++ b/cddl/lib/libdtrace/udplite.d
@@ -0,0 +1,77 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ * $FreeBSD$
+ */
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013 Mark Johnston <markj@FreeBSD.org>
+ * Copyright (c) 2018 Michael Tuexen <tuexen@FreeBSD.org>
+ */
+
+#pragma D depends_on library ip.d
+#pragma D depends_on module kernel
+#pragma D depends_on provider udplite
+
+/*
+ * udplitesinfo contains stable UDPLite details.
+ */
+typedef struct udplitesinfo {
+ uintptr_t udplites_addr;
+ uint16_t udplites_lport; /* local port */
+ uint16_t udplites_rport; /* remote port */
+ string udplites_laddr; /* local address, as a string */
+ string udplites_raddr; /* remote address, as a string */
+} udplitesinfo_t;
+
+/*
+ * udpliteinfo is the UDPLite header fields.
+ */
+typedef struct udpliteinfo {
+ uint16_t udplite_sport; /* source port */
+ uint16_t udplite_dport; /* destination port */
+ uint16_t udplite_coverage; /* checksum coverage */
+ uint16_t udplite_checksum; /* headers + data checksum */
+ struct udplitehdr *udplite_hdr; /* raw UDPLite header */
+} udpliteinfo_t;
+
+#pragma D binding "1.13" translator
+translator udplitesinfo_t < struct inpcb *p > {
+ udplites_addr = (uintptr_t)p;
+ udplites_lport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_lport);
+ udplites_rport = p == NULL ? 0 : ntohs(p->inp_inc.inc_ie.ie_fport);
+ udplites_laddr = p == NULL ? "<unknown>" :
+ p->inp_vflag == INP_IPV4 ?
+ inet_ntoa(&p->inp_inc.inc_ie.ie_dependladdr.id46_addr.ia46_addr4.s_addr) :
+ inet_ntoa6(&p->inp_inc.inc_ie.ie_dependladdr.id6_addr);
+ udplites_raddr = p == NULL ? "<unknown>" :
+ p->inp_vflag == INP_IPV4 ?
+ inet_ntoa(&p->inp_inc.inc_ie.ie_dependfaddr.id46_addr.ia46_addr4.s_addr) :
+ inet_ntoa6(&p->inp_inc.inc_ie.ie_dependfaddr.id6_addr);
+};
+
+#pragma D binding "1.13" translator
+translator udpliteinfo_t < struct udphdr *p > {
+ udplite_sport = p == NULL ? 0 : ntohs(p->uh_sport);
+ udplite_dport = p == NULL ? 0 : ntohs(p->uh_dport);
+ udplite_coverage = p == NULL ? 0 : ntohs(p->uh_ulen);
+ udplite_checksum = p == NULL ? 0 : ntohs(p->uh_sum);
+ udplite_hdr = (struct udplitehdr *)p;
+};
diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile
index c873f3e80d77..73013bdd887c 100644
--- a/cddl/lib/libzfs/Makefile
+++ b/cddl/lib/libzfs/Makefile
@@ -50,7 +50,6 @@ CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
diff --git a/cddl/lib/libzfs_core/Makefile b/cddl/lib/libzfs_core/Makefile
index 0df1d0c8920b..6728f63104fb 100644
--- a/cddl/lib/libzfs_core/Makefile
+++ b/cddl/lib/libzfs_core/Makefile
@@ -25,7 +25,6 @@ CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile
index 920cf865aa45..c3e64911ebd8 100644
--- a/cddl/lib/libzpool/Makefile
+++ b/cddl/lib/libzpool/Makefile
@@ -47,7 +47,6 @@ CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris
CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/lib/libumem
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
diff --git a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile
index 9d6075e6ad8f..f07b7a33b41e 100644
--- a/cddl/sbin/zfs/Makefile
+++ b/cddl/sbin/zfs/Makefile
@@ -19,7 +19,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libumem/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
LIBADD= jail nvpair uutil zfs_core zfs
diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile
index 723bb754503a..0276258dcaf5 100644
--- a/cddl/sbin/zpool/Makefile
+++ b/cddl/sbin/zpool/Makefile
@@ -23,7 +23,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/cmd/stat/common
diff --git a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile
index 1cc403fbbd1f..5cfd7e29edb0 100644
--- a/cddl/usr.bin/zinject/Makefile
+++ b/cddl/usr.bin/zinject/Makefile
@@ -15,7 +15,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs/
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
diff --git a/cddl/usr.bin/zstreamdump/Makefile b/cddl/usr.bin/zstreamdump/Makefile
index d6b5e30972c8..7f759caa74e2 100644
--- a/cddl/usr.bin/zstreamdump/Makefile
+++ b/cddl/usr.bin/zstreamdump/Makefile
@@ -13,7 +13,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
diff --git a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile
index 367512999c41..4631ae2c6210 100644
--- a/cddl/usr.bin/ztest/Makefile
+++ b/cddl/usr.bin/ztest/Makefile
@@ -14,7 +14,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libcmdutils
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
diff --git a/cddl/usr.sbin/dtrace/tests/common/ip/Makefile b/cddl/usr.sbin/dtrace/tests/common/ip/Makefile
index 805c31f6cde4..c47aac901cb4 100644
--- a/cddl/usr.sbin/dtrace/tests/common/ip/Makefile
+++ b/cddl/usr.sbin/dtrace/tests/common/ip/Makefile
@@ -13,12 +13,16 @@ ${PACKAGE}FILES= \
tst.ipv4localtcp.ksh.out \
tst.ipv4localudp.ksh \
tst.ipv4localudp.ksh.out \
+ tst.ipv4localudplite.ksh \
+ tst.ipv4localudplite.ksh.out \
tst.ipv4remoteicmp.ksh \
tst.ipv4remoteicmp.ksh.out \
tst.ipv4remotetcp.ksh \
tst.ipv4remotetcp.ksh.out \
tst.ipv4remoteudp.ksh \
tst.ipv4remoteudp.ksh.out \
+ tst.ipv4remoteudplite.ksh \
+ tst.ipv4remoteudplite.ksh.out \
tst.ipv6localicmp.ksh \
tst.ipv6localicmp.ksh.out \
tst.ipv6remoteicmp.ksh \
diff --git a/cddl/usr.sbin/dtrace/tests/tools/exclude.sh b/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
index f7d856940d17..1a4d8bd7cdb9 100755
--- a/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
+++ b/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
@@ -119,6 +119,7 @@ exclude SKIP common/builtinvar/tst.ipl1.d
# These tests rely on being able to find a host via broadcast pings.
exclude EXFAIL common/ip/tst.ipv4remotetcp.ksh
exclude EXFAIL common/ip/tst.ipv4remoteudp.ksh
+exclude EXFAIL common/ip/tst.ipv4remoteudplite.ksh
exclude EXFAIL common/ip/tst.ipv6remoteicmp.ksh
exclude EXFAIL common/ip/tst.ipv4remoteicmp.ksh
exclude EXFAIL common/ip/tst.remotetcpstate.ksh
diff --git a/cddl/usr.sbin/dwatch/libexec/Makefile b/cddl/usr.sbin/dwatch/libexec/Makefile
index b0d3940914e0..eeba83eef3da 100644
--- a/cddl/usr.sbin/dwatch/libexec/Makefile
+++ b/cddl/usr.sbin/dwatch/libexec/Makefile
@@ -14,6 +14,7 @@ FILES= chmod \
sendrecv \
tcp \
udp \
+ udplite \
vop_create \
vop_readdir \
vop_rename \
@@ -78,6 +79,8 @@ LINKS+= ${LIBEXECDIR}/dwatch/tcp ${LIBEXECDIR}/dwatch/tcp-state-change
LINKS+= ${LIBEXECDIR}/dwatch/tcp ${LIBEXECDIR}/dwatch/tcp-status
LINKS+= ${LIBEXECDIR}/dwatch/udp ${LIBEXECDIR}/dwatch/udp-receive
LINKS+= ${LIBEXECDIR}/dwatch/udp ${LIBEXECDIR}/dwatch/udp-send
+LINKS+= ${LIBEXECDIR}/dwatch/udplite ${LIBEXECDIR}/dwatch/udplite-receive
+LINKS+= ${LIBEXECDIR}/dwatch/udplite ${LIBEXECDIR}/dwatch/udplite-send
LINKS+= ${LIBEXECDIR}/dwatch/vop_create ${LIBEXECDIR}/dwatch/vop_lookup
LINKS+= ${LIBEXECDIR}/dwatch/vop_create ${LIBEXECDIR}/dwatch/vop_mkdir
LINKS+= ${LIBEXECDIR}/dwatch/vop_create ${LIBEXECDIR}/dwatch/vop_mknod
diff --git a/cddl/usr.sbin/dwatch/libexec/udplite b/cddl/usr.sbin/dwatch/libexec/udplite
new file mode 100644
index 000000000000..093c0857f865
--- /dev/null
+++ b/cddl/usr.sbin/dwatch/libexec/udplite
@@ -0,0 +1,89 @@
+# -*- tab-width: 4 -*- ;; Emacs
+# vi: set filetype=sh tabstop=8 shiftwidth=8 noexpandtab :: Vi/ViM
+############################################################ IDENT(1)
+#
+# $Title: dwatch(8) module for dtrace_udplite(4) $
+# $Copyright: 2014-2018 Devin Teske. All rights reserved. $
+# $FreeBSD$
+#
+############################################################ DESCRIPTION
+#
+# Display local/remote UDP addresses/ports and bytes sent/received for UDP I/O
+#
+############################################################ PROBE
+
+case "$PROFILE" in
+udplite) : ${PROBE:=udplite:::send, udplite:::receive} ;;
+ *) : ${PROBE:=udplite:::${PROFILE#udplite-}}
+esac
+
+############################################################ ACTIONS
+
+exec 9<<EOF
+this string flow;
+this string local;
+this string remote;
+this u_char local6;
+this u_char recv;
+this u_char remote6;
+this uint16_t coverage;
+this uint16_t lport;
+this uint16_t rport;
+
+$PROBE /* probe ID $ID */
+{${TRACE:+
+ printf("<$ID>");
+}
+ /*
+ * dtrace_udplite(4)
+ */
+ this->recv = probename == "receive" ? 1 : 0;
+ this->flow = this->recv ? "<-" : "->";
+
+ /*
+ * ipinfo_t *
+ */
+ this->local = this->recv ? args[2]->ip_daddr : args[2]->ip_saddr;
+ this->remote = this->recv ? args[2]->ip_saddr : args[2]->ip_daddr;
+
+ /*
+ * udpliteinfo_t *
+ */
+ this->coverage = (uint16_t)args[4]->udplite_coverage;
+ this->lport = this->recv ? args[4]->udplite_dport : args[4]->udplite_sport;
+ this->rport = this->recv ? args[4]->udplite_sport : args[4]->udplite_dport;
+
+ /*
+ * IPv6 support
+ */
+ this->local6 = strstr(this->local, ":") != NULL ? 1 : 0;
+ this->remote6 = strstr(this->remote, ":") != NULL ? 1 : 0;
+ this->local = strjoin(strjoin(this->local6 ? "[" : "",
+ this->local), this->local6 ? "]" : "");
+ this->remote = strjoin(strjoin(this->remote6 ? "[" : "",
+ this->remote), this->remote6 ? "]" : "");
+}
+EOF
+ACTIONS=$( cat <&9 )
+ID=$(( $ID + 1 ))
+
+############################################################ EVENT DETAILS
+
+if [ ! "$CUSTOM_DETAILS" ]; then
+exec 9<<EOF
+ /*
+ * Print network I/O details
+ */
+ printf("%s:%u %s %s:%u %d byte%s",
+ this->local, this->lport,
+ this->flow,
+ this->remote, this->rport,
+ this->coverage,
+ this->coverage == 1 ? "" : "s");
+EOF
+EVENT_DETAILS=$( cat <&9 )
+fi
+
+################################################################################
+# END
+################################################################################
diff --git a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile
index d5c7d254855a..cccfe15c823b 100644
--- a/cddl/usr.sbin/zdb/Makefile
+++ b/cddl/usr.sbin/zdb/Makefile
@@ -20,7 +20,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common
index 3b1430cea978..061a26a28343 100644
--- a/cddl/usr.sbin/zfsd/Makefile.common
+++ b/cddl/usr.sbin/zfsd/Makefile.common
@@ -28,7 +28,6 @@ INCFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libnvpair
INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
-INCFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile
index 72641c1b8efb..1347111c7c17 100644
--- a/cddl/usr.sbin/zhack/Makefile
+++ b/cddl/usr.sbin/zhack/Makefile
@@ -18,7 +18,6 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzfs_core/common
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/lib/libzpool/common
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common
-CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/uts/common/sys
CFLAGS+= -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/zfs
CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
diff --git a/contrib/elftoolchain/libelf/elf_update.c b/contrib/elftoolchain/libelf/elf_update.c
index 0c4471246475..9f5230d1df19 100644
--- a/contrib/elftoolchain/libelf/elf_update.c
+++ b/contrib/elftoolchain/libelf/elf_update.c
@@ -1212,5 +1212,6 @@ elf_update(Elf *e, Elf_Cmd c)
done:
_libelf_release_extents(&extents);
+ e->e_flags &= ~LIBELF_F_SHDRS_LOADED;
return (rc);
}
diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c
index 3d6692822d97..6db564a32366 100644
--- a/contrib/elftoolchain/readelf/readelf.c
+++ b/contrib/elftoolchain/readelf/readelf.c
@@ -1189,6 +1189,7 @@ note_type_gnu(unsigned int nt)
case 2: return "NT_GNU_HWCAP (Hardware capabilities)";
case 3: return "NT_GNU_BUILD_ID (Build id set by ld(1))";
case 4: return "NT_GNU_GOLD_VERSION (GNU gold version)";
+ case 5: return "NT_GNU_PROPERTY_TYPE_0";
default: return (note_type_unknown(nt));
}
}
diff --git a/contrib/file/ChangeLog b/contrib/file/ChangeLog
index 5e5999718d9c..4923bc3c163e 100644
--- a/contrib/file/ChangeLog
+++ b/contrib/file/ChangeLog
@@ -1,3 +1,15 @@
+2018-07-25 8:50 Christos Zoulas <christos@zoulas.com>
+
+ * release 5.34
+
+2018-06-22 16:38 Christos Zoulas <christos@zoulas.com>
+
+ * Add Quad indirect offsets
+
+2018-05-24 14:10 Christos Zoulas <christos@zoulas.com>
+
+ * Enable parsing of ELF dynamic sections to handle PIE better
+
2018-04-15 14:52 Christos Zoulas <christos@zoulas.com>
* release 5.33
diff --git a/contrib/file/Makefile.in b/contrib/file/Makefile.in
index 10d122d51590..cb2dfc3a34d9 100644
--- a/contrib/file/Makefile.in
+++ b/contrib/file/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,23 +14,61 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
esac; \
- test $$am__dry = yes; \
- }
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -49,11 +87,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/config.h.in AUTHORS COPYING ChangeLog INSTALL NEWS \
- README TODO compile config.guess config.sub depcomp install-sh \
- missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -61,6 +94,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
@@ -124,6 +159,9 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
+ COPYING ChangeLog INSTALL NEWS README TODO compile \
+ config.guess config.sub depcomp install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -178,6 +216,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -193,6 +232,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -306,7 +346,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -327,8 +366,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then rm -f stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -357,13 +396,12 @@ distclean-libtool:
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
@@ -538,10 +576,16 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
@@ -576,16 +620,17 @@ distcheck: dist
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -762,6 +807,8 @@ uninstall-am:
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
+.PRECIOUS: Makefile
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/file/README b/contrib/file/README
index 47f5ce803976..f57a76dbda3b 100644
--- a/contrib/file/README
+++ b/contrib/file/README
@@ -1,10 +1,10 @@
## README for file(1) Command ##
- @(#) $File: README,v 1.53 2018/03/11 13:06:47 glen Exp $
+ @(#) $File: README,v 1.54 2018/05/30 03:06:56 christos Exp $
-Mailing List: file@mx.gw.com [currently down]
-Mailing List archives: http://mx.gw.com/pipermail/file/ [currently down]
-Bug tracker: http://bugs.gw.com/ [currently down]
+Mailing List: file@astron.com
+Mailing List archives: http://mailman.astron.com/pipermail/file/
+Bug tracker: http://bugs.astron.com/
E-mail: christos@astron.com
Build Status: https://travis-ci.org/file/file
diff --git a/contrib/file/aclocal.m4 b/contrib/file/aclocal.m4
index 94855828ff62..158e1494b339 100644
--- a/contrib/file/aclocal.m4
+++ b/contrib/file/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.13.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,85 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# visibility.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl Mac OS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ dnl First, check whether -Werror can be added to the command line, or
+ dnl whether it leads to an error because of some other option that the
+ dnl user has put into $CC $CFLAGS $CPPFLAGS.
+ AC_MSG_CHECKING([whether the -Werror option is usable])
+ AC_CACHE_VAL([gl_cv_cc_vis_werror], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_vis_werror=yes],
+ [gl_cv_cc_vis_werror=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_vis_werror])
+ dnl Now check whether visibility declarations are supported.
+ AC_MSG_CHECKING([for simple visibility declarations])
+ AC_CACHE_VAL([gl_cv_cc_visibility], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ dnl We use the option -Werror and a function dummyfunc, because on some
+ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+ dnl "visibility attribute not supported in this configuration; ignored"
+ dnl at the first function definition in every compilation unit, and we
+ dnl don't want to use the option in this case.
+ if test $gl_cv_cc_vis_werror = yes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ void dummyfunc (void) {}
+ ]],
+ [[]])],
+ [gl_cv_cc_visibility=yes],
+ [gl_cv_cc_visibility=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_visibility])
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+ AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([HAVE_VISIBILITY])
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -32,10 +110,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.13'
+[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.13.1], [],
+m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +129,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.13.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -103,15 +181,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -142,7 +219,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -333,7 +410,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -373,7 +450,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
@@ -409,7 +486,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -418,6 +495,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -493,8 +576,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -526,6 +609,51 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
@@ -534,7 +662,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -556,7 +683,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -567,7 +694,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -577,7 +704,7 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -598,7 +725,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -646,41 +773,9 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
-
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -719,7 +814,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -748,9 +843,73 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -831,7 +990,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -891,7 +1050,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -919,7 +1078,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -938,7 +1097,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -957,76 +1116,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
+#
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
- [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
diff --git a/contrib/file/compile b/contrib/file/compile
index 531136b068ef..a85b723c7e67 100755
--- a/contrib/file/compile
+++ b/contrib/file/compile
@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/contrib/file/config.guess b/contrib/file/config.guess
index 1804e9fcdcbc..bbd48b60e88b 100755
--- a/contrib/file/config.guess
+++ b/contrib/file/config.guess
@@ -1,10 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012, 2013 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2012-12-29'
+timestamp='2017-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -26,12 +24,12 @@ timestamp='2012-12-29'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -52,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -136,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -151,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -180,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
@@ -190,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
+ echo "${machine}-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -206,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@@ -218,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -234,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
@@ -342,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
- SUN_ARCH="i386"
+ SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -376,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
@@ -562,8 +603,9 @@ EOF
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
@@ -600,13 +642,13 @@ EOF
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
@@ -645,11 +687,11 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
@@ -662,12 +704,12 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -772,14 +814,14 @@ EOF
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -809,7 +851,7 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- i*:MSYS*:*)
+ *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@@ -857,21 +899,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -884,59 +926,60 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -955,54 +998,69 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1078,7 +1136,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@@ -1227,6 +1285,9 @@ EOF
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1235,24 +1296,36 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
@@ -1283,7 +1356,7 @@ EOF
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
@@ -1325,7 +1398,7 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
@@ -1336,171 +1409,25 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+esac
cat >&2 <<EOF
$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
diff --git a/contrib/file/config.h.in b/contrib/file/config.h.in
index 92de31f0b1e5..3c8ffa3b0250 100644
--- a/contrib/file/config.h.in
+++ b/contrib/file/config.h.in
@@ -230,6 +230,10 @@
/* Define to 1 if you have the <vfork.h> header file. */
#undef HAVE_VFORK_H
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+ declarations. */
+#undef HAVE_VISIBILITY
+
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
@@ -263,9 +267,6 @@
<sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Name of package */
#undef PACKAGE
diff --git a/contrib/file/config.sub b/contrib/file/config.sub
index 802a224de605..7e792b4ae17b 100755
--- a/contrib/file/config.sub
+++ b/contrib/file/config.sub
@@ -1,10 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012, 2013 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2012-12-29'
+timestamp='2017-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,7 +25,7 @@ timestamp='2012-12-29'
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -35,7 +33,7 @@ timestamp='2012-12-29'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -55,8 +53,7 @@ timestamp='2012-12-29'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@@ -70,9 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-2012, 2013 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -121,8 +116,8 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -256,19 +251,21 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc \
+ | arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
+ | ba \
| be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -286,26 +283,30 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -313,6 +314,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -327,7 +329,10 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -369,21 +374,23 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | elxsi-* \
+ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
@@ -403,28 +410,34 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@@ -432,6 +445,7 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -508,6 +522,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -628,6 +645,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -769,6 +794,9 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -796,7 +824,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -824,6 +852,10 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -832,7 +864,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1000,7 +1032,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@@ -1010,7 +1042,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@@ -1354,29 +1386,30 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1500,9 +1533,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1511,6 +1541,8 @@ case $os in
;;
-nacl*)
;;
+ -ios)
+ ;;
-none)
;;
*)
@@ -1551,6 +1583,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
@@ -1603,6 +1638,9 @@ case $basic_machine in
sparc-* | *-sun)
os=-sunos4.1.1
;;
+ pru-*)
+ os=-elf
+ ;;
*-be)
os=-beos
;;
diff --git a/contrib/file/configure b/contrib/file/configure
index 8a35694019a7..436a9460a043 100755
--- a/contrib/file/configure
+++ b/contrib/file/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.33.
+# Generated by GNU Autoconf 2.69 for file 5.34.
#
# Report bugs to <christos@astron.com>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='file'
PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.33'
-PACKAGE_STRING='file 5.33'
+PACKAGE_VERSION='5.34'
+PACKAGE_STRING='file 5.34'
PACKAGE_BUGREPORT='christos@astron.com'
PACKAGE_URL=''
@@ -638,6 +638,8 @@ LTLIBOBJS
IS_CROSS_COMPILE_FALSE
IS_CROSS_COMPILE_TRUE
LIBOBJS
+HAVE_VISIBILITY
+CFLAG_VISIBILITY
OTOOL64
OTOOL
LIPO
@@ -1327,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures file 5.33 to adapt to many kinds of systems.
+\`configure' configures file 5.34 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1397,7 +1399,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of file 5.33:";;
+ short | recursive ) echo "Configuration of file 5.34:";;
esac
cat <<\_ACEOF
@@ -1509,7 +1511,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-file configure 5.33
+file configure 5.34
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2165,7 +2167,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by file $as_me 5.33, which was
+It was created by file $as_me 5.34, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2516,7 +2518,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-am__api_version='1.13'
+am__api_version='1.15'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2717,8 +2719,8 @@ test "$program_suffix" != NONE &&
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
@@ -2737,7 +2739,7 @@ else
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3031,7 +3033,7 @@ fi
# Define the identity of the package.
PACKAGE='file'
- VERSION='5.33'
+ VERSION='5.34'
cat >>confdefs.h <<_ACEOF
@@ -3065,18 +3067,65 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
# Check whether --enable-silent-rules was given.
if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
@@ -4171,6 +4220,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -5050,131 +5158,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
@@ -12512,7 +12495,92 @@ CC="$lt_save_CC"
# Only expand once:
-gl_VISIBILITY
+
+
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
+$as_echo_n "checking whether the -Werror option is usable... " >&6; }
+ if ${gl_cv_cc_vis_werror+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_cc_vis_werror=yes
+else
+ gl_cv_cc_vis_werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
+$as_echo "$gl_cv_cc_vis_werror" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
+$as_echo_n "checking for simple visibility declarations... " >&6; }
+ if ${gl_cv_cc_visibility+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ if test $gl_cv_cc_vis_werror = yes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ void dummyfunc (void) {}
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_cc_visibility=yes
+else
+ gl_cv_cc_visibility=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
+$as_echo "$gl_cv_cc_visibility" >&6; }
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_VISIBILITY $HAVE_VISIBILITY
+_ACEOF
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
if ${ac_cv_header_stdc+:} false; then :
@@ -15066,7 +15134,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by file $as_me 5.33, which was
+This file was extended by file $as_me 5.34, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15132,7 +15200,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-file config.status 5.33
+file config.status 5.34
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -16194,7 +16262,7 @@ $as_echo X"$mf" |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
diff --git a/contrib/file/configure.ac b/contrib/file/configure.ac
index 4edd98ef90b9..ab4f6fc21cf4 100644
--- a/contrib/file/configure.ac
+++ b/contrib/file/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([file],[5.33],[christos@astron.com])
+AC_INIT([file],[5.34],[christos@astron.com])
AM_INIT_AUTOMAKE([subdir-objects foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
diff --git a/contrib/file/depcomp b/contrib/file/depcomp
index 06b0882dd079..fc98710e2a1d 100755
--- a/contrib/file/depcomp
+++ b/contrib/file/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2012-10-18.11; # UTC
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -552,6 +552,7 @@ $ {
G
p
}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
diff --git a/contrib/file/doc/Makefile.in b/contrib/file/doc/Makefile.in
index a6d1d6be29c4..165918a5e42a 100644
--- a/contrib/file/doc/Makefile.in
+++ b/contrib/file/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.13.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,23 +14,61 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -49,7 +87,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -57,6 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -116,6 +154,7 @@ man5dir = $(mandir)/man5
NROFF = nroff
MANS = $(man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkgdatadir = @pkgdatadir@
ACLOCAL = @ACLOCAL@
@@ -129,6 +168,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -144,6 +184,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -256,7 +297,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign doc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -612,6 +652,8 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man4 \
tags-am uninstall uninstall-am uninstall-man uninstall-man1 \
uninstall-man3 uninstall-man4 uninstall-man5
+.PRECIOUS: Makefile
+
file.1: Makefile file.man
@rm -f $@
diff --git a/contrib/file/doc/file.man b/contrib/file/doc/file.man
index a33c5613d2f9..00909db73a1e 100644
--- a/contrib/file/doc/file.man
+++ b/contrib/file/doc/file.man
@@ -1,5 +1,5 @@
-.\" $File: file.man,v 1.129 2018/03/02 16:17:54 christos Exp $
-.Dd March 2, 2018
+.\" $File: file.man,v 1.131 2018/07/24 21:33:56 christos Exp $
+.Dd July 25, 2018
.Dt FILE __CSECTION__
.Os
.Sh NAME
@@ -353,7 +353,7 @@ This option also causes
to disregard the file size as reported by
.Xr stat 2
since on some systems it reports a zero size for raw disk partitions.
-.If Fl S , Fl Fl no-sandbox
+.It Fl S , Fl Fl no-sandbox
On systems where libseccomp
.Pa ( https://github.com/seccomp/libseccomp )
is available, the
@@ -629,11 +629,11 @@ were written by John Gilmore from his public-domain
program, and are not covered by the above license.
.Sh BUGS
Please report bugs and send patches to the bug tracker at
-.Pa http://bugs.gw.com/
+.Pa http://bugs.astron.com/
or the mailing list at
-.Aq file@mx.gw.com
+.Aq file@astron.com
(visit
-.Pa http://mx.gw.com/mailman/listinfo/file
+.Pa http://mailman.astron.com/mailman/listinfo/file
first to subscribe).
.Sh TODO
Fix output so that tests for MIME and APPLE flags are not needed all
diff --git a/contrib/file/doc/magic.man b/contrib/file/doc/magic.man
index 1b89879f6fdb..15165daa5eab 100644
--- a/contrib/file/doc/magic.man
+++ b/contrib/file/doc/magic.man
@@ -1,5 +1,6 @@
-.\" $File: magic.man,v 1.92 2017/11/04 01:11:32 christos Exp $
-.Dd Noveber 3, 2017
+.It S2
+.\" $File: magic.man,v 1.93 2018/06/22 20:39:49 christos Exp $
+.Dd June 22, 2018
.Dt MAGIC __FSECTION__
.Os
.\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
@@ -553,12 +554,12 @@ the file.
The value at that offset is read, and is used again as an offset
in the file.
Indirect offsets are of the form:
-.Em (( x [[.,][bislBISL]][+\-][ y ]) .
+.Em (( x [[.,][bBcCeEfFgGhHiIlmsSqQ]][+\-][ y ]) .
The value of
.Em x
is used as an offset in the file.
A byte, id3 length, short or long is read at that offset depending on the
-.Em [bislBISLm]
+.Em [bBcCeEfFgGhHiIlmsSqQ]
type specifier.
The value is treated as signed if
.Dq ,
@@ -575,6 +576,20 @@ To that number the value of
.Em y
is added and the result is used as an offset in the file.
The default type if one is not specified is long.
+The following types are recognized:
+.Bl -column -offset indent "Type" "Half/Short" "Little" "Size"
+.It Sy Type Sy Mnemonic Sy Endian Sy Size
+.It bcBc Byte/Char N/A 1
+.It efg Double Little 8
+.It EFG Double Big 8
+.It hs Half/Short Little 2
+.It HS Half/Short Big 2
+.It i ID3 Little 4
+.It I ID3 Big 4
+.It m Middle Middle 4
+.It q Quad Little 8
+.It Q Quad Big 8
+.El
.Pp
That way variable length structures can be examined:
.Bd -literal -offset indent
diff --git a/contrib/file/install-sh b/contrib/file/install-sh
index 377bb8687ffe..b12c0f718920 100755
--- a/contrib/file/install-sh
+++ b/contrib/file/install-sh
@@ -1,527 +1,301 @@
#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2011-11-20.07; # UTC
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
+# $NetBSD: install-sh.in,v 1.6 2012/01/11 13:07:31 hans Exp $
+# This script now also installs multiple files, but might choke on installing
+# multiple files with spaces in the file names.
#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
#
+# Copyright 1991 by the Massachusetts Institute of Technology
#
-# FSF changes to this file are in the public domain.
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# 'make' implicit rules from creating a file called install from it
+# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
-nl='
-'
-IFS=" "" $nl"
-
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+awkprog="${AWKPROG-awk}"
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+instcmd="$cpprog"
+instflags=""
+pathcompchmodcmd="$chmodprog 755"
+chmodcmd="$chmodprog 755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+stripflags=""
rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
+mvcmd="$mvprog"
+src=""
+msrc=""
+dst=""
+dir_arg=""
+suffix=""
+suffixfmt=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -b) suffix=".old"
+ shift
+ continue;;
+
+ -B) suffixfmt="$2"
+ shift
+ shift
+ continue;;
+
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -m*)
+ chmodcmd="$chmodprog ${1#-m}"
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -S) stripcmd="$stripprog"
+ stripflags="-S $2 $stripflags"
+ shift
+ shift
+ continue;;
+
+ -p) instflags="-p"
+ shift
+ continue;;
+
+ *) if [ x"$msrc" = x ]
+ then
+ msrc="$dst"
+ else
+ msrc="$msrc $dst"
+ fi
+ src="$dst"
+ dst="$1"
+ shift
+ continue;;
+ esac
+done
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
+if [ x"$dir_arg" = x ]
+then
+ dstisfile=""
+ if [ ! -d "$dst" ]
+ then
+ if [ x"$msrc" = x"$src" ]
+ then
+ dstisfile=true
+ else
+ echo "install: destination is not a directory"
+ exit 1
+ fi
+ fi
+else
+ msrc="$msrc $dst"
+fi
-while test $# -ne 0; do
- case $1 in
- -c) ;;
+if [ x"$msrc" = x ]
+then
+ echo "install: no destination specified"
+ exit 1
+fi
- -C) copy_on_change=true;;
+for srcarg in $msrc; do
- -d) dir_arg=true;;
+if [ x"$dir_arg" != x ]; then
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
+ dstarg="$srcarg"
+else
+ dstarg="$dst"
+
+# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f "$srcarg" ]
+ then
+ doinst="$instcmd $instflags"
+ elif [ -d "$srcarg" ]
+ then
+ echo "install: $srcarg: not a regular file"
+ exit 1
+ elif [ "$srcarg" = "/dev/null" ]
+ then
+ doinst="$cpprog"
+ else
+ echo "install: $srcarg does not exist"
+ exit 1
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
- --help) echo "$usage"; exit $?;;
+ if [ -d "$dstarg" ]
+ then
+ dstarg="$dstarg"/`basename "$srcarg"`
+ fi
+fi
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+## this sed command emulates the dirname command
+dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
- -o) chowncmd="$chownprog $2"
- shift;;
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
- -s) stripcmd=$stripprog;;
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
- -t) dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
- -T) no_target_directory=true;;
+pathcomp=''
- --version) echo "$0 $scriptversion"; exit $?;;
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
- --) shift
- break;;
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $doit $mkdirprog "${pathcomp}"
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi &&
+ if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ else
+ true
+ fi
- *) break;;
- esac
- shift
+ pathcomp="${pathcomp}/"
done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- done
fi
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call 'install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names problematic for 'test' and other utilities.
- case $src in
- -* | [=\(\)!]) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
- dst=$dst_arg
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
+ if [ x"$dir_arg" != x ]
+ then
+ if [ -d "$dstarg" ]; then
+ true
+ else
+ $doit $mkdirprog "$dstarg" &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi
+ fi
else
- mkdir_mode=
+
+ if [ x"$dstisfile" = x ]
+ then
+ file=$srcarg
+ else
+ file=$dst
+ fi
+
+ dstfile=`basename "$file"`
+ dstfinal="$dstdir/$dstfile"
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Make a backup file name in the proper directory.
+ case x$suffixfmt in
+ *%*) suffix=`echo x |
+ $awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" '
+ { cnt = 0;
+ do {
+ sfx = sprintf(fmt, cnt++);
+ name = bname sfx;
+ } while (system("test -f " name) == 0);
+ print sfx; }' -`;;
+ x) ;;
+ *) suffix="$suffixfmt";;
+ esac
+ dstbackup="$dstfinal$suffix"
+
+# Move or copy the file name to the temp name
+
+ $doit $doinst $srcarg "$dsttmp" &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ if [ x"$suffix" != x ] && [ -f "$dstfinal" ]
+ then
+ $doit $mvcmd "$dstfinal" "$dstbackup"
+ else
+ $doit $rmcmd -f "$dstfinal"
+ fi &&
+ $doit $mvcmd "$dsttmp" "$dstfinal"
fi
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
+done &&
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
+exit 0
diff --git a/contrib/file/ltmain.sh b/contrib/file/ltmain.sh
index 63ae69dc6fec..fcc4d744b45e 100755
--- a/contrib/file/ltmain.sh
+++ b/contrib/file/ltmain.sh
@@ -133,8 +133,9 @@ $lt_unset CDPATH
# function.
progpath="$0"
-
-
+unset CP
+unset MV
+unset RM
: ${CP="cp -f"}
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
: ${MAKE="make"}
@@ -6899,7 +6900,11 @@ func_mode_link ()
# Finalize command for both is simple: just hardcode it.
if test "$hardcode_direct" = yes &&
test "$hardcode_direct_absolute" = no; then
- add="$libdir/$linklib"
+ if test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
add="-l$name"
@@ -7391,6 +7396,7 @@ func_mode_link ()
# Calculate the version variables.
major=
versuffix=
+ versuffix2=
verstring=
case $version_type in
none) ;;
@@ -7451,6 +7457,7 @@ func_mode_link ()
func_arith $current - $age
major=.$func_arith_result
versuffix="$major.$age.$revision"
+ versuffix2="$major.$age"
;;
osf)
@@ -7511,8 +7518,10 @@ func_mode_link ()
esac
if test "$need_version" = no; then
versuffix=
+ versuffix2=
else
versuffix=".0.0"
+ versuffix2=".0.0"
fi
fi
@@ -7520,6 +7529,7 @@ func_mode_link ()
if test "$avoid_version" = yes && test "$need_version" = no; then
major=
versuffix=
+ versuffix2=
verstring=""
fi
@@ -7630,7 +7640,7 @@ func_mode_link ()
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ *-*-openbsd* | *-*-mirbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
;;
*-*-sco3.2v5* | *-*-sco5v6*)
@@ -7653,12 +7663,14 @@ func_mode_link ()
libname_save=$libname
release_save=$release
versuffix_save=$versuffix
+ versuffix2_save=$versuffix2
major_save=$major
# I'm not sure if I'm treating the release correctly. I think
# release should show up in the -l (ie -lgmp5) so we don't want to
# add it in twice. Is that correct?
release=""
versuffix=""
+ versuffix2=""
major=""
newdeplibs=
droppeddeps=no
@@ -7935,6 +7947,7 @@ EOF
;;
esac
versuffix=$versuffix_save
+ versuffix2=$versuffix2_save
major=$major_save
release=$release_save
libname=$libname_save
@@ -9419,7 +9432,8 @@ dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
+ if test "$installed" = no && test "$need_relink" = yes && \
+ test -n "$relink_command"; then
$ECHO >> $output "\
relink_command=\"$relink_command\""
fi
diff --git a/contrib/file/magic/Magdir/animation b/contrib/file/magic/Magdir/animation
index 046830b77fda..76e45de57e89 100644
--- a/contrib/file/magic/Magdir/animation
+++ b/contrib/file/magic/Magdir/animation
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: animation,v 1.66 2017/10/06 15:36:38 christos Exp $
+# $File: animation,v 1.68 2018/05/06 16:08:07 christos Exp $
# animation: file(1) magic for animation/movie formats
#
# animation formats
@@ -1057,3 +1057,10 @@
0 string \x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02 Material exchange container format
!:ext mxf
!:mime application/mxf
+
+# Recognize LucasArts Smush video files (cf.
+# https://wiki.multimedia.cx/index.php/Smush)
+0 string ANIM
+>8 string AHDR LucasArts Smush Animation Format (SAN) video
+0 string SANM
+>8 string SHDR LucasArts Smush v2 (SANM) video
diff --git a/contrib/file/magic/Magdir/archive b/contrib/file/magic/Magdir/archive
index 12fcfe989c46..f8cf3a2684b5 100644
--- a/contrib/file/magic/Magdir/archive
+++ b/contrib/file/magic/Magdir/archive
@@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
-# $File: archive,v 1.117 2018/03/17 02:11:04 christos Exp $
+# $File: archive,v 1.119 2018/04/24 23:19:45 christos Exp $
# archive: file(1) magic for archive formats (see also "msdos" for self-
# extracting compressed archives)
#
@@ -11,6 +11,7 @@
# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current
# header mainly padded with nul bytes
500 quad 0
+!:strength /2
# filename or extended attribute printable strings in range space null til umlaut ue
>0 ubeshort >0x1F00
>>0 ubeshort <0xFCFD
@@ -261,7 +262,7 @@
#
# BSD/SVR2-and-later portable archive formats.
#
-0 string =!<arch> current ar archive
+0 string =!<arch>\n current ar archive
!:mime application/x-archive
>8 string __.SYMDEF random library
>68 string __.SYMDEF\ SORTED random library
diff --git a/contrib/file/magic/Magdir/audio b/contrib/file/magic/Magdir/audio
index e12ef6881216..1c92cf5d9fae 100644
--- a/contrib/file/magic/Magdir/audio
+++ b/contrib/file/magic/Magdir/audio
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: audio,v 1.86 2018/03/11 00:53:11 christos Exp $
+# $File: audio,v 1.89 2018/07/03 20:55:37 christos Exp $
# audio: file(1) magic for sound formats (see also "iff")
#
# Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
@@ -858,3 +858,33 @@
2 string ADLIB- AdLib instrument data
>0 byte x \b, version %u
>1 byte x \b.%u
+
+# CRI ADX ADPCM audio
+# Used by various Sega games.
+# https://en.wikipedia.org/wiki/ADX_(file_format)
+# https://wiki.multimedia.cx/index.php/CRI_ADX_file
+# Added by David Korth <gerbilsoft@gerbilsoft.com>
+0x00 beshort 0x8000
+>(2.S-2) string (c)CRI CRI ADX ADPCM audio
+>>0x12 byte x v%u
+>>0x04 byte 0x02 \b, pre-set prediction coefficients
+>>0x04 byte 0x03 \b, standard ADX
+>>0x04 byte 0x04 \b, exponential scale
+>>0x04 byte 0x05 \b, AHX
+>>0x08 belong x \b, %u Hz
+>>0x12 byte 0x03
+>>>0x02 beshort >0x2B
+>>>>0x18 belong !0 \b, looping
+>>0x12 byte 0x04
+>>>0x02 beshort >0x37
+>>>>0x24 belong !0 \b, looping
+>>0x13 byte&0x08 0x08 \b, encrypted
+
+# Lossless audio (.la) (http://www.lossless-audio.com/)
+0 string LA
+>2 string 03 Lossless audio version 0.3
+>2 string 04 Lossless audio version 0.4
+
+# Sony PlayStation Audio (.xa)
+0 leshort 0x4158 Sony PlayStation Audio
+
diff --git a/contrib/file/magic/Magdir/cad b/contrib/file/magic/Magdir/cad
index daafba9d444c..3a71e06b6901 100644
--- a/contrib/file/magic/Magdir/cad
+++ b/contrib/file/magic/Magdir/cad
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: cad,v 1.15 2017/06/24 15:24:56 christos Exp $
+# $File: cad,v 1.16 2018/05/07 23:26:31 christos Exp $
# autocad: file(1) magic for cad files
#
@@ -153,9 +153,17 @@
>>8 lelong 0xa
>>>16 leshort 0x3d3d 3D Studio model
!:mime image/x-3ds
-!:extension 3ds
+!:ext 3ds
# MegaCAD 2D/3D drawing (.prt)
# http://megacad.de/
# From: Markus Heidelberg <markus.heidelberg@web.de>
0 string MegaCad23\0 MegaCAD 2D/3D drawing
+
+# Hoops CAD files
+# https://docs.techsoft3d.com/visualize/3df/latest/build/general/hsf/\
+# HSF_architecture.html
+# Stephane Charette <stephane.charette@gmail.com>
+0 string ;;\020HSF\020V OpenHSF (Hoops Stream Format)
+>7 regex/9 V[.0-9]{4,5}\020 %s
+!:ext hsf
diff --git a/contrib/file/magic/Magdir/console b/contrib/file/magic/Magdir/console
index 5a867b83696e..ab2954f0b5af 100644
--- a/contrib/file/magic/Magdir/console
+++ b/contrib/file/magic/Magdir/console
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
-# $File: console,v 1.35 2017/11/14 15:48:36 christos Exp $
+# $File: console,v 1.40 2018/06/23 16:40:40 christos Exp $
# Console game magic
# Toby Deshane <hac@shoelace.digivill.net>
@@ -47,10 +47,12 @@
# Standard iNES ROM header.
0 string NES\x1A NES ROM image (iNES)
+!:mime application/x-nes-rom
>0 use nes-rom-image-ines
# Wii U Virtual Console iNES ROM header.
0 belong 0x4E455300 NES ROM image (Wii U Virtual Console)
+!:mime application/x-nes-rom
>0 use nes-rom-image-ines
#------------------------------------------------------------------------------
@@ -63,6 +65,7 @@
#
0 string UNIF
>4 lelong <16 NES ROM image (UNIF v%d format)
+!:mime application/x-nes-rom
#------------------------------------------------------------------------------
# fds: file(1) magic for Famciom Disk System disk images
@@ -81,12 +84,14 @@
# Headered version.
0 string FDS\x1A
>0x11 string *NINTENDO-HVC* Famicom Disk System disk image:
+!:mime application/x-fds-disk
>>0x10 use nintendo-fds-disk-info-block
>4 byte 1 (%u side)
>4 byte !1 (%u sides)
# Unheadered version.
1 string *NINTENDO-HVC* Famicom Disk System disk image:
+!:mime application/x-fds-disk
>0 use nintendo-fds-disk-info-block
#------------------------------------------------------------------------------
@@ -95,6 +100,7 @@
# From: David Korth <gerbilsoft@gerbilsoft.com>
#
0 string TNES NES ROM image (Nintendo 3DS Virtual Console)
+!:mime application/x-nes-rom
>4 byte 100 \b: FDS,
>>0x2010 use nintendo-fds-disk-info-block
>4 byte !100 \b: TNES mapper %u
@@ -110,6 +116,8 @@
# Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header
#
0x104 bequad 0xCEED6666CC0D000B Game Boy ROM image
+# TODO: application/x-gameboy-color-rom for GBC.
+!:mime application/x-gameboy-rom
>0x143 byte&0x80 0x80
>>0x134 string >\0 \b: "%.15s"
>0x143 byte&0x80 !0x80
@@ -124,6 +132,7 @@
>>0x146 byte !0x03
>>>0x143 byte&0xC0 0x80 [CGB]
>>>0x143 byte&0xC0 0xC0 [CGB ONLY]
+>0x14b byte !0x33
# Mapper.
>0x147 byte 0x00 [ROM ONLY]
@@ -199,29 +208,37 @@
# TODO: Check for 32X CD?
# Sega Mega CD disc images: 2048-byte sectors.
0 string SEGADISCSYSTEM\ \ Sega Mega CD disc image
+!:mime application/x-sega-cd-rom
>0 use sega-mega-drive-header
>0 byte x \b, 2048-byte sectors
0 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image
+!:mime application/x-sega-cd-rom
>0 use sega-mega-drive-header
>0 byte x \b, 2048-byte sectors
# Sega Mega CD disc images: 2352-byte sectors.
0x10 string SEGADISCSYSTEM\ \ Sega Mega CD disc image
+!:mime application/x-sega-cd-rom
>0x10 use sega-mega-drive-header
>0 byte x \b, 2352-byte sectors
0x10 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image
+!:mime application/x-sega-cd-rom
>0x10 use sega-mega-drive-header
>0 byte x \b, 2352-byte sectors
# Sega Mega Drive, 32X, Pico, and Mega CD Boot ROM images.
0x100 string SEGA
>0x3C0 bequad 0x4D41525320434845 Sega 32X ROM image
+!:mime application/x-genesis-32x-rom
>>0 use sega-mega-drive-header
>0x3C0 bequad !0x4D41525320434845
>>0x105 belong 0x5049434F Sega Pico ROM image
+!:mime application/x-sega-pico-rom
>>>0 use sega-mega-drive-header
>>0x105 belong !0x5049434F
>>>0x180 beshort 0x4252 Sega Mega CD Boot ROM image
+!:mime application/x-genesis-rom
>>>0x180 beshort !0x4252 Sega Mega Drive / Genesis ROM image
+!:mime application/x-genesis-rom
>>>0 use sega-mega-drive-header
#------------------------------------------------------------------------------
@@ -238,11 +255,13 @@
# "Sega Genesis" header.
0x280 string EAGN
>8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format):
+!:mime application/x-genesis-rom
>>0 use sega-genesis-smd-header
# "Sega Mega Drive" header.
0x280 string EAMG
>8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format):
+!:mime application/x-genesis-rom
>>0 use sega-genesis-smd-header
#------------------------------------------------------------------------------
@@ -258,12 +277,17 @@
0 name sega-master-system-rom-header
# Machine type.
>0x0F byte&0xF0 0x30 Sega Master System
+!:mime application/x-sms-rom
>0x0F byte&0xF0 0x40 Sega Master System
+!:mime application/x-sms-rom
>0x0F byte&0xF0 0x50 Sega Game Gear
+!:mime application/x-gamegear-rom
>0x0F byte&0xF0 0x60 Sega Game Gear
+!:mime application/x-gamegear-rom
>0x0F byte&0xF0 0x70 Sega Game Gear
->0x0F byte&0xF0 <0x30 Sega Master System / Game Gear
->0x0F byte&0xF0 >0x70 Sega Master System / Game Gear
+!:mime application/x-gamegear-rom
+>0x0F default x Sega Master System / Game Gear
+!:mime application/x-sms-rom
>0 byte x ROM image:
# Product code.
>0x0E byte&0xF0 0x10 1
@@ -323,10 +347,12 @@
# 2048-byte sector version.
0 string SEGA\ SEGASATURN\ Sega Saturn disc image
+!:mime application/x-saturn-rom
>0 use sega-saturn-disc-header
>0 byte x (2048-byte sectors)
# 2352-byte sector version.
0x10 string SEGA\ SEGASATURN\ Sega Saturn disc image
+!:mime application/x-saturn-rom
>0x10 use sega-saturn-disc-header
>0 byte x (2352-byte sectors)
@@ -347,10 +373,12 @@
# 2048-byte sector version.
0 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image
+!:mime application/x-dc-rom
>0 use sega-dreamcast-disc-header
>0 byte x (2048-byte sectors)
# 2352-byte sector version.
0x10 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image
+!:mime application/x-dc-rom
>0x10 use sega-dreamcast-disc-header
>0 byte x (2352-byte sectors)
@@ -366,6 +394,7 @@
# From: David Korth <gerbilsoft@gerbilsoft.com>
#
0 bequad 0x803712400000000F Nintendo 64 ROM image
+!:mime application/x-n64-rom
>0x20 string >\0 \b: "%.20s"
>0x3B string x (%.4s
>0x3F byte x \b, Rev.%02u)
@@ -375,18 +404,21 @@
# Same as z64 format, but with 16-bit byteswapping.
#
0 bequad 0x3780401200000F00 Nintendo 64 ROM image (V64)
+!:mime application/x-n64-rom
#------------------------------------------------------------------------------
# n64-swap2: file(1) magic for the swap2 format N64 ROM dumps
# Same as z64 format, but with swapped 16-bit words.
#
0 bequad 0x12408037000F0000 Nintendo 64 ROM image (wordswapped)
+!:mime application/x-n64-rom
#------------------------------------------------------------------------------
# n64-le32: file(1) magic for the 32-bit byteswapped format N64 ROM dumps
# Same as z64 format, but with 32-bit byteswapping.
#
0 bequad 0x401237800F000000 Nintendo 64 ROM image (32-bit byteswapped)
+!:mime application/x-n64-rom
#------------------------------------------------------------------------------
# gba: file(1) magic for the Nintendo Game Boy Advance raw ROM format
@@ -396,6 +428,7 @@
# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
#
4 bequad 0x24FFAE51699AA221 Game Boy Advance ROM image
+!:mime application/x-gba-rom
>0xA0 string >\0 \b: "%.12s"
>0xAC string x (%.6s
>0xBC byte x \b, Rev.%02u)
@@ -408,6 +441,7 @@
# Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
#
0xC0 bequad 0x24FFAE51699AA221 Nintendo DS ROM image
+!:mime application/x-nintendo-ds-rom
>0x00 string >\0 \b: "%.12s"
>0x0C string x (%.6s
>0x1E byte x \b, Rev.%02u)
@@ -428,6 +462,7 @@
# This is also used for loading .nds files using the MSET exploit on 3DS.
# Reference: https://github.com/devkitPro/ndstool/blob/master/source/ndscreate.cpp
0xC0 bequad 0xC8604FE201708FE2 Nintendo DS Slot-2 ROM image (PassMe)
+!:mime application/x-nintendo-ds-rom
#------------------------------------------------------------------------------
# ngp: file(1) magic for the Neo Geo Pocket (Color) raw ROM format.
@@ -437,6 +472,7 @@
# - http://www.devrs.com/ngp/files/ngpctech.txt
#
0x0A string BY\ SNK\ CORPORATION Neo Geo Pocket
+!:mime application/x-neo-geo-pocket-rom
>0x23 byte 0x10 Color
>0 byte x ROM image
>0x24 string >\0 \b: "%.12s"
@@ -502,8 +538,10 @@
# 8 character OMF-86 object file headers.
0 beshort 0x8008
>6 string BS93 Lynx homebrew cartridge
+!:mime application/x-atari-lynx-rom
>>2 beshort x \b, RAM start $%04x
>6 string LYNX Lynx cartridge
+!:mime application/x-atari-lynx-rom
>>2 beshort x \b, RAM start $%04x
# Opera file system that is used on the 3DO console
@@ -518,11 +556,11 @@
# Gameboy%20Sound%20System%20(.gbs).txt
0 string GBS Nintendo Gameboy Music/Audio Data
#12 string GameBoy\ Music\ Module Nintendo Gameboy Music Module
->16 string >\0 ("%s" by
->48 string >\0 %s, copyright
->80 string >\0 %s),
->3 byte x version %d,
->4 byte x %d tracks
+>16 string >\0 ("%.32s" by
+>48 string >\0 %.32s, copyright
+>80 string >\0 %.32s),
+>3 byte x version %u,
+>4 byte x %u tracks
# IPS Patch Files from: From: Thomas Klausner <tk@giga.or.at>
# see http://zerosoft.zophar.net/ips.php
@@ -625,11 +663,14 @@
>>0x06 byte 2 \b, Disc 3
>>0x06 byte 3 \b, Disc 4
>0x07 byte x \b, Rev.%02u)
+>0x18 belong 0x5D1C9EA3
+>>0x60 beshort 0x0101 \b (Unencrypted)
# Type: Nintendo GameCube disc image
# From: David Korth <gerbilsoft@gerbilsoft.com>
# Reference: http://wiibrew.org/wiki/Wii_Disc
0x1C belong 0xC2339F3D Nintendo GameCube disc image:
+!:mime application/x-gamecube-rom
>0 use nintendo-gcn-disc-common
# Type: Nintendo GameCube embedded disc image
@@ -639,6 +680,7 @@
0 belong 0xAE0F38A2
>0x0C belong 0x00100000
>>(8.L+0x1C) belong 0xC2339F3D Nintendo GameCube embedded disc image:
+!:mime application/x-gamecube-rom
>>>(8.L) use nintendo-gcn-disc-common
# Type: Nintendo Wii disc image
@@ -652,6 +694,7 @@
# Reference: http://wiibrew.org/wiki/Wii_Disc
0 string WBFS
>0x218 belong 0x5D1C9EA3 Nintendo Wii disc image (WBFS format):
+!:mime application/x-wii-rom
>>0x200 use nintendo-gcn-disc-common
# Type: Nintendo GameCube/Wii disc image (CISO format)
@@ -665,41 +708,61 @@
>4 lelong 0x200000
>>8 byte 1
>&