svn commit: r277616 - in projects/ifnet: . bin/freebsd-version bin/ln cddl/contrib/opensolaris/lib/libzfs/common cddl/contrib/opensolaris/lib/libzpool/common/sys contrib/elftoolchain/common contrib...
Gleb Smirnoff
glebius at FreeBSD.org
Fri Jan 23 22:36:02 UTC 2015
Author: glebius
Date: Fri Jan 23 22:35:55 2015
New Revision: 277616
URL: https://svnweb.freebsd.org/changeset/base/277616
Log:
Merge head r257698 through r277615.
Added:
projects/ifnet/etc/newsyslog.conf.d/
- copied from r277615, head/etc/newsyslog.conf.d/
projects/ifnet/lib/libc/sys/futimens.c
- copied unchanged from r277615, head/lib/libc/sys/futimens.c
projects/ifnet/lib/libc/sys/utimensat.2
- copied unchanged from r277615, head/lib/libc/sys/utimensat.2
projects/ifnet/lib/libc/sys/utimensat.c
- copied unchanged from r277615, head/lib/libc/sys/utimensat.c
projects/ifnet/lib/libthr/arch/common/
- copied from r277615, head/lib/libthr/arch/common/
projects/ifnet/lib/libthr/thread/thr_ctrdtr.c
- copied unchanged from r277615, head/lib/libthr/thread/thr_ctrdtr.c
projects/ifnet/release/Makefile.vm
- copied unchanged from r277615, head/release/Makefile.vm
projects/ifnet/release/scripts/mk-vmimage.sh
- copied unchanged from r277615, head/release/scripts/mk-vmimage.sh
projects/ifnet/release/tools/gce.conf
- copied unchanged from r277615, head/release/tools/gce.conf
projects/ifnet/release/tools/openstack.conf
- copied unchanged from r277615, head/release/tools/openstack.conf
projects/ifnet/release/tools/vmimage.subr
- copied unchanged from r277615, head/release/tools/vmimage.subr
projects/ifnet/sys/arm/arm/bus_space_base.c
- copied unchanged from r277615, head/sys/arm/arm/bus_space_base.c
projects/ifnet/sys/dev/drm2/i915/i915_gem_stolen.c
- copied unchanged from r277615, head/sys/dev/drm2/i915/i915_gem_stolen.c
projects/ifnet/sys/dev/drm2/i915/intel_ddi.c
- copied unchanged from r277615, head/sys/dev/drm2/i915/intel_ddi.c
projects/ifnet/sys/dev/drm2/i915/intel_pm.c
- copied unchanged from r277615, head/sys/dev/drm2/i915/intel_pm.c
Deleted:
projects/ifnet/lib/libthr/arch/amd64/amd64/pthread_md.c
projects/ifnet/lib/libthr/arch/arm/Makefile.inc
projects/ifnet/lib/libthr/arch/arm/arm/
projects/ifnet/lib/libthr/arch/i386/i386/pthread_md.c
projects/ifnet/lib/libthr/arch/mips/Makefile.inc
projects/ifnet/lib/libthr/arch/mips/mips/
projects/ifnet/lib/libthr/arch/powerpc/Makefile.inc
projects/ifnet/lib/libthr/arch/powerpc/powerpc/
projects/ifnet/lib/libthr/arch/sparc64/sparc64/pthread_md.c
projects/ifnet/release/amd64/mk-azure.sh
projects/ifnet/release/amd64/mk-vmimage.sh
projects/ifnet/release/i386/mk-azure.sh
projects/ifnet/release/i386/mk-vmimage.sh
projects/ifnet/sys/arm/arm/bus_space-v6.c
projects/ifnet/sys/arm/lpc/lpc_space.c
projects/ifnet/sys/arm/mv/bus_space.c
projects/ifnet/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c
projects/ifnet/sys/arm/versatile/bus_space.c
projects/ifnet/sys/arm/versatile/versatile_pci_bus_space.c
projects/ifnet/sys/arm/versatile/versatile_pci_bus_space.h
projects/ifnet/sys/arm/xilinx/zy7_bus_space.c
projects/ifnet/sys/arm/xscale/i80321/obio_space.c
projects/ifnet/sys/arm/xscale/i8134x/obio_space.c
projects/ifnet/tools/regression/lib/libc/stdio/test-fmemopen.t
Modified:
projects/ifnet/Makefile.inc1
projects/ifnet/bin/freebsd-version/Makefile
projects/ifnet/bin/ln/symlink.7
projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
projects/ifnet/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
projects/ifnet/contrib/elftoolchain/common/elfdefinitions.h
projects/ifnet/contrib/elftoolchain/readelf/readelf.c
projects/ifnet/contrib/gdb/gdb/remote.c
projects/ifnet/contrib/gdb/gdb/std-regs.c
projects/ifnet/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
projects/ifnet/etc/Makefile
projects/ifnet/lib/libc/include/libc_private.h
projects/ifnet/lib/libc/sys/Makefile.inc
projects/ifnet/lib/libc/sys/Symbol.map
projects/ifnet/lib/libelftc/elftc_version.c
projects/ifnet/lib/libstand/libstand.3
projects/ifnet/lib/libstand/printf.c
projects/ifnet/lib/libthr/Makefile
projects/ifnet/lib/libthr/arch/amd64/Makefile.inc
projects/ifnet/lib/libthr/arch/amd64/include/pthread_md.h
projects/ifnet/lib/libthr/arch/arm/include/pthread_md.h
projects/ifnet/lib/libthr/arch/i386/Makefile.inc
projects/ifnet/lib/libthr/arch/i386/include/pthread_md.h
projects/ifnet/lib/libthr/arch/mips/include/pthread_md.h
projects/ifnet/lib/libthr/arch/powerpc/include/pthread_md.h
projects/ifnet/lib/libthr/arch/sparc64/Makefile.inc
projects/ifnet/lib/libthr/arch/sparc64/include/pthread_md.h
projects/ifnet/lib/libthr/thread/Makefile.inc
projects/ifnet/lib/libthr/thread/thr_private.h
projects/ifnet/lib/libthr/thread/thr_sig.c
projects/ifnet/release/Makefile
projects/ifnet/release/doc/en_US.ISO8859-1/relnotes/article.xml
projects/ifnet/release/release.conf.sample
projects/ifnet/release/release.sh
projects/ifnet/release/tools/azure.conf
projects/ifnet/sbin/ping/ping.c
projects/ifnet/share/man/man4/rights.4
projects/ifnet/share/man/man7/release.7
projects/ifnet/share/man/man9/Makefile
projects/ifnet/share/man/man9/device_get_softc.9
projects/ifnet/share/man/man9/printf.9
projects/ifnet/share/man/man9/timeout.9
projects/ifnet/share/misc/committers-ports.dot
projects/ifnet/sys/arm/allwinner/a20/files.a20
projects/ifnet/sys/arm/allwinner/files.a10
projects/ifnet/sys/arm/altera/socfpga/files.socfpga
projects/ifnet/sys/arm/arm/bus_space_asm_generic.S
projects/ifnet/sys/arm/arm/bus_space_generic.c
projects/ifnet/sys/arm/arm/locore-v4.S
projects/ifnet/sys/arm/arm/physmem.c
projects/ifnet/sys/arm/arm/trap-v6.c
projects/ifnet/sys/arm/at91/at91.c
projects/ifnet/sys/arm/at91/files.at91
projects/ifnet/sys/arm/broadcom/bcm2835/files.bcm2835
projects/ifnet/sys/arm/cavium/cns11xx/econa.c
projects/ifnet/sys/arm/cavium/cns11xx/files.econa
projects/ifnet/sys/arm/conf/RK3188
projects/ifnet/sys/arm/freescale/imx/files.imx51
projects/ifnet/sys/arm/freescale/imx/files.imx53
projects/ifnet/sys/arm/freescale/imx/files.imx6
projects/ifnet/sys/arm/freescale/imx/imx6_ccm.c
projects/ifnet/sys/arm/freescale/imx/imx_iomux.c
projects/ifnet/sys/arm/freescale/vybrid/files.vybrid
projects/ifnet/sys/arm/include/bus.h
projects/ifnet/sys/arm/include/cpu-v6.h
projects/ifnet/sys/arm/include/md_var.h
projects/ifnet/sys/arm/lpc/files.lpc
projects/ifnet/sys/arm/mv/files.mv
projects/ifnet/sys/arm/rockchip/files.rk30xx
projects/ifnet/sys/arm/samsung/exynos/files.exynos5
projects/ifnet/sys/arm/samsung/s3c2xx0/files.s3c2xx0
projects/ifnet/sys/arm/samsung/s3c2xx0/s3c24x0.c
projects/ifnet/sys/arm/samsung/s3c2xx0/s3c2xx0var.h
projects/ifnet/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c
projects/ifnet/sys/arm/ti/am335x/am335x_lcd.c
projects/ifnet/sys/arm/ti/files.ti
projects/ifnet/sys/arm/ti/ti_mbox.c
projects/ifnet/sys/arm/ti/ti_pruss.c
projects/ifnet/sys/arm/versatile/files.versatile
projects/ifnet/sys/arm/versatile/versatile_pci.c
projects/ifnet/sys/arm/xilinx/files.zynq7
projects/ifnet/sys/arm/xscale/i80321/ep80219_machdep.c
projects/ifnet/sys/arm/xscale/i80321/files.ep80219
projects/ifnet/sys/arm/xscale/i80321/files.i80219
projects/ifnet/sys/arm/xscale/i80321/files.i80321
projects/ifnet/sys/arm/xscale/i80321/files.iq31244
projects/ifnet/sys/arm/xscale/i80321/i80321_space.c
projects/ifnet/sys/arm/xscale/i80321/iq31244_machdep.c
projects/ifnet/sys/arm/xscale/i80321/obio.c
projects/ifnet/sys/arm/xscale/i80321/obiovar.h
projects/ifnet/sys/arm/xscale/i80321/uart_cpu_i80321.c
projects/ifnet/sys/arm/xscale/i8134x/crb_machdep.c
projects/ifnet/sys/arm/xscale/i8134x/files.i81342
projects/ifnet/sys/arm/xscale/i8134x/i81342_space.c
projects/ifnet/sys/arm/xscale/i8134x/obio.c
projects/ifnet/sys/arm/xscale/i8134x/obiovar.h
projects/ifnet/sys/arm/xscale/i8134x/uart_cpu_i81342.c
projects/ifnet/sys/arm/xscale/ixp425/avila_ata.c
projects/ifnet/sys/arm/xscale/ixp425/cambria_exp_space.c
projects/ifnet/sys/arm/xscale/ixp425/ixp425_a4x_space.c
projects/ifnet/sys/arm/xscale/ixp425/ixp425_pci_space.c
projects/ifnet/sys/arm/xscale/ixp425/ixp425_space.c
projects/ifnet/sys/arm/xscale/pxa/pxa_space.c
projects/ifnet/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts
projects/ifnet/sys/boot/fdt/dts/arm/rk3188-radxa.dts
projects/ifnet/sys/boot/fdt/dts/arm/rk3188.dtsi
projects/ifnet/sys/boot/i386/libi386/bootinfo64.c
projects/ifnet/sys/cam/cam_xpt.c
projects/ifnet/sys/cam/ctl/ctl.c
projects/ifnet/sys/cddl/compat/opensolaris/sys/sunddi.h
projects/ifnet/sys/cddl/compat/opensolaris/sys/time.h
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
projects/ifnet/sys/compat/freebsd32/freebsd32_misc.c
projects/ifnet/sys/compat/freebsd32/freebsd32_proto.h
projects/ifnet/sys/compat/freebsd32/freebsd32_syscall.h
projects/ifnet/sys/compat/freebsd32/freebsd32_syscalls.c
projects/ifnet/sys/compat/freebsd32/freebsd32_sysent.c
projects/ifnet/sys/compat/freebsd32/freebsd32_systrace_args.c
projects/ifnet/sys/compat/freebsd32/syscalls.master
projects/ifnet/sys/contrib/rdma/krping/krping.c
projects/ifnet/sys/dev/acpica/acpi_ec.c
projects/ifnet/sys/dev/agp/agp_nvidia.c
projects/ifnet/sys/dev/cx/cxddk.c
projects/ifnet/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c
projects/ifnet/sys/dev/cxgbe/iw_cxgbe/device.c
projects/ifnet/sys/dev/dc/if_dc.c
projects/ifnet/sys/dev/dcons/dcons.c
projects/ifnet/sys/dev/dcons/dcons_crom.c
projects/ifnet/sys/dev/dcons/dcons_os.h
projects/ifnet/sys/dev/drm2/drm.h
projects/ifnet/sys/dev/drm2/drmP.h
projects/ifnet/sys/dev/drm2/drm_crtc.c
projects/ifnet/sys/dev/drm2/drm_crtc.h
projects/ifnet/sys/dev/drm2/drm_crtc_helper.c
projects/ifnet/sys/dev/drm2/drm_crtc_helper.h
projects/ifnet/sys/dev/drm2/drm_drv.c
projects/ifnet/sys/dev/drm2/drm_edid.c
projects/ifnet/sys/dev/drm2/drm_edid.h
projects/ifnet/sys/dev/drm2/drm_edid_modes.h
projects/ifnet/sys/dev/drm2/drm_fb_helper.c
projects/ifnet/sys/dev/drm2/drm_ioctl.c
projects/ifnet/sys/dev/drm2/drm_irq.c
projects/ifnet/sys/dev/drm2/drm_memory.c
projects/ifnet/sys/dev/drm2/drm_mode.h
projects/ifnet/sys/dev/drm2/drm_pciids.h
projects/ifnet/sys/dev/drm2/drm_stub.c
projects/ifnet/sys/dev/drm2/i915/i915_debug.c
projects/ifnet/sys/dev/drm2/i915/i915_dma.c
projects/ifnet/sys/dev/drm2/i915/i915_drm.h
projects/ifnet/sys/dev/drm2/i915/i915_drv.c
projects/ifnet/sys/dev/drm2/i915/i915_drv.h
projects/ifnet/sys/dev/drm2/i915/i915_gem.c
projects/ifnet/sys/dev/drm2/i915/i915_gem_context.c
projects/ifnet/sys/dev/drm2/i915/i915_gem_evict.c
projects/ifnet/sys/dev/drm2/i915/i915_gem_execbuffer.c
projects/ifnet/sys/dev/drm2/i915/i915_gem_gtt.c
projects/ifnet/sys/dev/drm2/i915/i915_gem_tiling.c
projects/ifnet/sys/dev/drm2/i915/i915_irq.c
projects/ifnet/sys/dev/drm2/i915/i915_reg.h
projects/ifnet/sys/dev/drm2/i915/i915_suspend.c
projects/ifnet/sys/dev/drm2/i915/intel_bios.c
projects/ifnet/sys/dev/drm2/i915/intel_crt.c
projects/ifnet/sys/dev/drm2/i915/intel_display.c
projects/ifnet/sys/dev/drm2/i915/intel_dp.c
projects/ifnet/sys/dev/drm2/i915/intel_drv.h
projects/ifnet/sys/dev/drm2/i915/intel_fb.c
projects/ifnet/sys/dev/drm2/i915/intel_hdmi.c
projects/ifnet/sys/dev/drm2/i915/intel_iic.c
projects/ifnet/sys/dev/drm2/i915/intel_lvds.c
projects/ifnet/sys/dev/drm2/i915/intel_modes.c
projects/ifnet/sys/dev/drm2/i915/intel_overlay.c
projects/ifnet/sys/dev/drm2/i915/intel_panel.c
projects/ifnet/sys/dev/drm2/i915/intel_ringbuffer.c
projects/ifnet/sys/dev/drm2/i915/intel_ringbuffer.h
projects/ifnet/sys/dev/drm2/i915/intel_sdvo.c
projects/ifnet/sys/dev/drm2/i915/intel_sprite.c
projects/ifnet/sys/dev/drm2/i915/intel_tv.c
projects/ifnet/sys/dev/drm2/radeon/atombios_encoders.c
projects/ifnet/sys/dev/drm2/radeon/radeon_legacy_encoders.c
projects/ifnet/sys/dev/firewire/firewire.c
projects/ifnet/sys/dev/firewire/fwmem.c
projects/ifnet/sys/dev/firewire/fwohci.c
projects/ifnet/sys/dev/hwpmc/hwpmc_core.c
projects/ifnet/sys/dev/hwpmc/pmc_events.h
projects/ifnet/sys/dev/isp/isp.c
projects/ifnet/sys/dev/isp/isp_freebsd.c
projects/ifnet/sys/dev/mii/mii.c
projects/ifnet/sys/dev/mmc/host/dwmmc.c
projects/ifnet/sys/dev/mmc/host/dwmmc.h
projects/ifnet/sys/dev/ofw/ofw_cpu.c
projects/ifnet/sys/dev/usb/controller/ehci_ixp4xx.c
projects/ifnet/sys/dev/usb/net/if_cdce.c
projects/ifnet/sys/dev/usb/usb_generic.c
projects/ifnet/sys/kern/capabilities.conf
projects/ifnet/sys/kern/init_main.c
projects/ifnet/sys/kern/init_sysent.c
projects/ifnet/sys/kern/kern_condvar.c
projects/ifnet/sys/kern/kern_descrip.c
projects/ifnet/sys/kern/kern_lock.c
projects/ifnet/sys/kern/kern_switch.c
projects/ifnet/sys/kern/kern_synch.c
projects/ifnet/sys/kern/kern_tc.c
projects/ifnet/sys/kern/kern_thread.c
projects/ifnet/sys/kern/kern_timeout.c
projects/ifnet/sys/kern/subr_dummy_vdso_tc.c
projects/ifnet/sys/kern/subr_prf.c
projects/ifnet/sys/kern/subr_sleepqueue.c
projects/ifnet/sys/kern/sys_pipe.c
projects/ifnet/sys/kern/syscalls.c
projects/ifnet/sys/kern/syscalls.master
projects/ifnet/sys/kern/systrace_args.c
projects/ifnet/sys/kern/vfs_syscalls.c
projects/ifnet/sys/mips/include/cache_mipsNN.h
projects/ifnet/sys/mips/mips/cache.c
projects/ifnet/sys/mips/mips/cache_mipsNN.c
projects/ifnet/sys/modules/drm2/i915kms/Makefile
projects/ifnet/sys/net/ieee8023ad_lacp.c
projects/ifnet/sys/net/if_lagg.c
projects/ifnet/sys/net/pfvar.h
projects/ifnet/sys/netinet/ip_carp.c
projects/ifnet/sys/netinet/sctp_sysctl.c
projects/ifnet/sys/netpfil/pf/pf.c
projects/ifnet/sys/netpfil/pf/pf_if.c
projects/ifnet/sys/netpfil/pf/pf_ioctl.c
projects/ifnet/sys/netpfil/pf/pf_norm.c
projects/ifnet/sys/netpfil/pf/pf_table.c
projects/ifnet/sys/ofed/drivers/infiniband/core/device.c
projects/ifnet/sys/ofed/drivers/infiniband/hw/mlx4/main.c
projects/ifnet/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
projects/ifnet/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
projects/ifnet/sys/ofed/drivers/net/mlx4/en_main.c
projects/ifnet/sys/ofed/drivers/net/mlx4/main.c
projects/ifnet/sys/ofed/include/linux/completion.h
projects/ifnet/sys/ofed/include/linux/module.h
projects/ifnet/sys/powerpc/aim/locore64.S
projects/ifnet/sys/powerpc/aim/machdep.c
projects/ifnet/sys/powerpc/aim/mp_cpudep.c
projects/ifnet/sys/powerpc/aim/trap_subr32.S
projects/ifnet/sys/powerpc/aim/trap_subr64.S
projects/ifnet/sys/powerpc/include/trap.h
projects/ifnet/sys/powerpc/ofw/ofw_machdep.c
projects/ifnet/sys/powerpc/ofw/rtas.c
projects/ifnet/sys/powerpc/powerpc/elf64_machdep.c
projects/ifnet/sys/powerpc/powerpc/mem.c
projects/ifnet/sys/sys/_callout.h
projects/ifnet/sys/sys/callout.h
projects/ifnet/sys/sys/capsicum.h
projects/ifnet/sys/sys/elf_common.h
projects/ifnet/sys/sys/param.h
projects/ifnet/sys/sys/pmc.h
projects/ifnet/sys/sys/proc.h
projects/ifnet/sys/sys/stat.h
projects/ifnet/sys/sys/syscall.h
projects/ifnet/sys/sys/syscall.mk
projects/ifnet/sys/sys/syscallsubr.h
projects/ifnet/sys/sys/sysproto.h
projects/ifnet/sys/sys/vdso.h
projects/ifnet/sys/x86/x86/tsc.c
projects/ifnet/sys/x86/xen/pv.c
projects/ifnet/tools/regression/file/flock/flock.c
projects/ifnet/tools/tools/nanobsd/nanobsd.sh (contents, props changed)
projects/ifnet/usr.bin/grep/file.c
projects/ifnet/usr.bin/kdump/kdump.c
projects/ifnet/usr.bin/vmstat/vmstat.c
projects/ifnet/usr.sbin/config/config.y
projects/ifnet/usr.sbin/iostat/iostat.c
projects/ifnet/usr.sbin/pmcstudy/pmcstudy.c
Directory Properties:
projects/ifnet/ (props changed)
projects/ifnet/cddl/ (props changed)
projects/ifnet/cddl/contrib/opensolaris/ (props changed)
projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/ (props changed)
projects/ifnet/contrib/elftoolchain/ (props changed)
projects/ifnet/contrib/gdb/ (props changed)
projects/ifnet/contrib/llvm/ (props changed)
projects/ifnet/contrib/llvm/tools/clang/ (props changed)
projects/ifnet/etc/ (props changed)
projects/ifnet/lib/libc/ (props changed)
projects/ifnet/sbin/ (props changed)
projects/ifnet/share/ (props changed)
projects/ifnet/share/man/man4/ (props changed)
projects/ifnet/sys/ (props changed)
projects/ifnet/sys/boot/ (props changed)
projects/ifnet/sys/cddl/contrib/opensolaris/ (props changed)
Modified: projects/ifnet/Makefile.inc1
==============================================================================
--- projects/ifnet/Makefile.inc1 Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/Makefile.inc1 Fri Jan 23 22:35:55 2015 (r277616)
@@ -1292,12 +1292,16 @@ _clang_tblgen= \
usr.bin/clang/clang-tblgen
.endif
+# ELF Tool Chain libraries are needed for ELF tools and dtrace tools.
# dtrace tools are required for older bootstrap env and cross-build
# pre libdwarf
-.if ${MK_CDDL} != "no" && (${BOOTSTRAPPING} < 1100006 \
- || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH}))
-_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \
- lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge
+.if ${BOOTSTRAPPING} < 1100006 || (${MACHINE} != ${TARGET} || \
+ ${MACHINE_ARCH} != ${TARGET_ARCH})
+_elftoolchain_libs= lib/libelf lib/libdwarf
+.if ${MK_CDDL} != "no"
+_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf cddl/usr.bin/ctfconvert \
+ cddl/usr.bin/ctfmerge
+.endif
.endif
# Default to building the GPL DTC, but build the BSDL one if users explicitly
@@ -1324,6 +1328,7 @@ bootstrap-tools: .MAKE
.for _tool in \
${_clang_tblgen} \
${_kerberos5_bootstrap_tools} \
+ ${_elftoolchain_libs} \
${_dtrace_tools} \
${_strfile} \
${_gperf} \
@@ -1428,11 +1433,13 @@ _binutils= gnu/usr.bin/binutils
.endif
.if ${MK_ELFTOOLCHAIN_TOOLS} != "no"
_elftctools= lib/libelftc \
- usr.bin/addr2line \
usr.bin/elfcopy \
usr.bin/nm \
usr.bin/size \
usr.bin/strings
+# These are not required by the build, but can be useful for developers who
+# cross-build on a FreeBSD 10 host:
+_elftctools+= usr.bin/addr2line
.endif
.endif
Modified: projects/ifnet/bin/freebsd-version/Makefile
==============================================================================
--- projects/ifnet/bin/freebsd-version/Makefile Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/bin/freebsd-version/Makefile Fri Jan 23 22:35:55 2015 (r277616)
@@ -11,7 +11,7 @@ freebsd-version.sh: ${.CURDIR}/freebsd-v
s/@@TYPE@@/$${TYPE}/g; \
s/@@REVISION@@/$${REVISION}/g; \
s/@@BRANCH@@/$${BRANCH}/g; \
- " ${.ALLSRC} >${.TARGET} ; then \
+ " ${.CURDIR}/freebsd-version.sh.in >${.TARGET} ; then \
rm -f ${.TARGET} ; \
exit 1 ; \
fi
Modified: projects/ifnet/bin/ln/symlink.7
==============================================================================
--- projects/ifnet/bin/ln/symlink.7 Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/bin/ln/symlink.7 Fri Jan 23 22:35:55 2015 (r277616)
@@ -29,7 +29,7 @@
.\" @(#)symlink.7 8.3 (Berkeley) 3/31/94
.\" $FreeBSD$
.\"
-.Dd December 29, 2014
+.Dd January 23, 2015
.Dt SYMLINK 7
.Os
.Sh NAME
@@ -147,9 +147,10 @@ unless given the
.Dv AT_SYMLINK_NOFOLLOW
flag:
.Xr fchmodat 2 ,
-.Xr fchownat 2
+.Xr fchownat 2 ,
+.Xr fstatat 2
and
-.Xr fstatat 2 .
+.Xr utimensat 2 .
.Pp
The owner and group of an existing symbolic link can be changed by
means of the
Modified: projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
==============================================================================
--- projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Fri Jan 23 22:35:55 2015 (r277616)
@@ -18,10 +18,11 @@
*
* CDDL HEADER END
*/
+
/*
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
- * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
/*
@@ -198,8 +199,10 @@ fix_paths(nvlist_t *nv, name_entry_t *na
if ((devid = get_devid(best->ne_name)) == NULL) {
(void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID);
} else {
- if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0)
+ if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) {
+ devid_str_free(devid);
return (-1);
+ }
devid_str_free(devid);
}
@@ -665,8 +668,10 @@ get_configs(libzfs_handle_t *hdl, pool_l
nvlist_add_uint64(holey,
ZPOOL_CONFIG_ID, c) != 0 ||
nvlist_add_uint64(holey,
- ZPOOL_CONFIG_GUID, 0ULL) != 0)
+ ZPOOL_CONFIG_GUID, 0ULL) != 0) {
+ nvlist_free(holey);
goto nomem;
+ }
child[c] = holey;
}
}
@@ -1118,8 +1123,10 @@ zpool_clear_label(int fd)
for (l = 0; l < VDEV_LABELS; l++) {
if (pwrite64(fd, label, sizeof (vdev_label_t),
- label_offset(size, l)) != sizeof (vdev_label_t))
+ label_offset(size, l)) != sizeof (vdev_label_t)) {
+ free(label);
return (-1);
+ }
}
free(label);
@@ -1137,7 +1144,6 @@ static nvlist_t *
zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg)
{
int i, dirs = iarg->paths;
- DIR *dirp = NULL;
struct dirent64 *dp;
char path[MAXPATHLEN];
char *end, **dir = iarg->path;
@@ -1167,6 +1173,8 @@ zpool_find_import_impl(libzfs_handle_t *
tpool_t *t;
char *rdsk;
int dfd;
+ boolean_t config_failed = B_FALSE;
+ DIR *dirp;
/* use realpath to normalize the path */
if (realpath(dir[i], path) == 0) {
@@ -1191,6 +1199,8 @@ zpool_find_import_impl(libzfs_handle_t *
if ((dfd = open64(rdsk, O_RDONLY)) < 0 ||
(dirp = fdopendir(dfd)) == NULL) {
+ if (dfd >= 0)
+ (void) close(dfd);
zfs_error_aux(hdl, strerror(errno));
(void) zfs_error_fmt(hdl, EZFS_BADPATH,
dgettext(TEXT_DOMAIN, "cannot open '%s'"),
@@ -1272,7 +1282,7 @@ skipdir:
cookie = NULL;
while ((slice = avl_destroy_nodes(&slice_cache,
&cookie)) != NULL) {
- if (slice->rn_config != NULL) {
+ if (slice->rn_config != NULL && !config_failed) {
nvlist_t *config = slice->rn_config;
boolean_t matched = B_TRUE;
@@ -1293,13 +1303,16 @@ skipdir:
}
if (!matched) {
nvlist_free(config);
- config = NULL;
- continue;
+ } else {
+ /*
+ * use the non-raw path for the config
+ */
+ (void) strlcpy(end, slice->rn_name,
+ pathleft);
+ if (add_config(hdl, &pools, path,
+ config) != 0)
+ config_failed = B_TRUE;
}
- /* use the non-raw path for the config */
- (void) strlcpy(end, slice->rn_name, pathleft);
- if (add_config(hdl, &pools, path, config) != 0)
- goto error;
}
free(slice->rn_name);
free(slice);
@@ -1307,7 +1320,9 @@ skipdir:
avl_destroy(&slice_cache);
(void) closedir(dirp);
- dirp = NULL;
+
+ if (config_failed)
+ goto error;
}
ret = get_configs(hdl, &pools, iarg->can_be_active);
@@ -1330,14 +1345,10 @@ error:
for (ne = pools.names; ne != NULL; ne = nenext) {
nenext = ne->ne_next;
- if (ne->ne_name)
- free(ne->ne_name);
+ free(ne->ne_name);
free(ne);
}
- if (dirp)
- (void) closedir(dirp);
-
return (ret);
}
@@ -1695,9 +1706,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f
cb.cb_type = ZPOOL_CONFIG_SPARES;
if (zpool_iter(hdl, find_aux, &cb) == 1) {
name = (char *)zpool_get_name(cb.cb_zhp);
- ret = TRUE;
+ ret = B_TRUE;
} else {
- ret = FALSE;
+ ret = B_FALSE;
}
break;
@@ -1711,9 +1722,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f
cb.cb_type = ZPOOL_CONFIG_L2CACHE;
if (zpool_iter(hdl, find_aux, &cb) == 1) {
name = (char *)zpool_get_name(cb.cb_zhp);
- ret = TRUE;
+ ret = B_TRUE;
} else {
- ret = FALSE;
+ ret = B_FALSE;
}
break;
Modified: projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
==============================================================================
--- projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 23 22:35:55 2015 (r277616)
@@ -20,8 +20,8 @@
*/
/*
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
*/
@@ -1715,7 +1715,7 @@ zpool_import_props(libzfs_handle_t *hdl,
thename = origname;
}
- if (props) {
+ if (props != NULL) {
uint64_t version;
prop_flags_t flags = { .create = B_FALSE, .import = B_TRUE };
@@ -1723,12 +1723,13 @@ zpool_import_props(libzfs_handle_t *hdl,
&version) == 0);
if ((props = zpool_valid_proplist(hdl, origname,
- props, version, flags, errbuf)) == NULL) {
+ props, version, flags, errbuf)) == NULL)
return (-1);
- } else if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) {
+ if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) {
nvlist_free(props);
return (-1);
}
+ nvlist_free(props);
}
(void) strlcpy(zc.zc_name, thename, sizeof (zc.zc_name));
@@ -1737,11 +1738,11 @@ zpool_import_props(libzfs_handle_t *hdl,
&zc.zc_guid) == 0);
if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) {
- nvlist_free(props);
+ zcmd_free_nvlists(&zc);
return (-1);
}
if (zcmd_alloc_dst_nvlist(hdl, &zc, zc.zc_nvlist_conf_size * 2) != 0) {
- nvlist_free(props);
+ zcmd_free_nvlists(&zc);
return (-1);
}
@@ -1757,6 +1758,9 @@ zpool_import_props(libzfs_handle_t *hdl,
error = errno;
(void) zcmd_read_dst_nvlist(hdl, &zc, &nv);
+
+ zcmd_free_nvlists(&zc);
+
zpool_get_rewind_policy(config, &policy);
if (error) {
@@ -1862,9 +1866,6 @@ zpool_import_props(libzfs_handle_t *hdl,
return (0);
}
- zcmd_free_nvlists(&zc);
- nvlist_free(props);
-
return (ret);
}
@@ -3332,8 +3333,10 @@ devid_to_path(char *devid_str)
if (ret != 0)
return (NULL);
- if ((path = strdup(list[0].devname)) == NULL)
- return (NULL);
+ /*
+ * In a case the strdup() fails, we will just return NULL below.
+ */
+ path = strdup(list[0].devname);
devid_free_nmlist(list);
Modified: projects/ifnet/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h
==============================================================================
--- projects/ifnet/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri Jan 23 22:35:55 2015 (r277616)
@@ -535,7 +535,7 @@ extern vnode_t *rootdir;
extern void delay(clock_t ticks);
#define SEC_TO_TICK(sec) ((sec) * hz)
-#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz))
+#define NSEC_TO_TICK(nsec) ((nsec) / (NANOSEC / hz))
#define gethrestime_sec() time(NULL)
#define gethrestime(t) \
Modified: projects/ifnet/contrib/elftoolchain/common/elfdefinitions.h
==============================================================================
--- projects/ifnet/contrib/elftoolchain/common/elfdefinitions.h Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/contrib/elftoolchain/common/elfdefinitions.h Fri Jan 23 22:35:55 2015 (r277616)
@@ -1948,11 +1948,17 @@ _ELF_DEFINE_RELOC(R_X86_64_TPOFF32, 23)
_ELF_DEFINE_RELOC(R_X86_64_PC64, 24) \
_ELF_DEFINE_RELOC(R_X86_64_GOTOFF64, 25) \
_ELF_DEFINE_RELOC(R_X86_64_GOTPC32, 26) \
+_ELF_DEFINE_RELOC(R_X86_64_GOT64, 27) \
+_ELF_DEFINE_RELOC(R_X86_64_GOTPCREL64, 28) \
+_ELF_DEFINE_RELOC(R_X86_64_GOTPC64, 29) \
+_ELF_DEFINE_RELOC(R_X86_64_GOTPLT64, 30) \
+_ELF_DEFINE_RELOC(R_X86_64_PLTOFF64, 31) \
_ELF_DEFINE_RELOC(R_X86_64_SIZE32, 32) \
_ELF_DEFINE_RELOC(R_X86_64_SIZE64, 33) \
_ELF_DEFINE_RELOC(R_X86_64_GOTPC32_TLSDESC, 34) \
_ELF_DEFINE_RELOC(R_X86_64_TLSDESC_CALL, 35) \
-_ELF_DEFINE_RELOC(R_X86_64_TLSDESC, 36)
+_ELF_DEFINE_RELOC(R_X86_64_TLSDESC, 36) \
+_ELF_DEFINE_RELOC(R_X86_64_IRELATIVE, 37)
#define _ELF_DEFINE_RELOCATIONS() \
_ELF_DEFINE_386_RELOCATIONS() \
Modified: projects/ifnet/contrib/elftoolchain/readelf/readelf.c
==============================================================================
--- projects/ifnet/contrib/elftoolchain/readelf/readelf.c Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/contrib/elftoolchain/readelf/readelf.c Fri Jan 23 22:35:55 2015 (r277616)
@@ -1480,6 +1480,20 @@ r_type(unsigned int mach, unsigned int t
case 21: return "R_X86_64_DTPOFF32";
case 22: return "R_X86_64_GOTTPOFF";
case 23: return "R_X86_64_TPOFF32";
+ case 24: return "R_X86_64_PC64";
+ case 25: return "R_X86_64_GOTOFF64";
+ case 26: return "R_X86_64_GOTPC32";
+ case 27: return "R_X86_64_GOT64";
+ case 28: return "R_X86_64_GOTPCREL64";
+ case 29: return "R_X86_64_GOTPC64";
+ case 30: return "R_X86_64_GOTPLT64";
+ case 31: return "R_X86_64_PLTOFF64";
+ case 32: return "R_X86_64_SIZE32";
+ case 33: return "R_X86_64_SIZE64";
+ case 34: return "R_X86_64_GOTPC32_TLSDESC";
+ case 35: return "R_X86_64_TLSDESC_CALL";
+ case 36: return "R_X86_64_TLSDESC";
+ case 37: return "R_X86_64_IRELATIVE";
default: return "";
}
default: return "";
Modified: projects/ifnet/contrib/gdb/gdb/remote.c
==============================================================================
--- projects/ifnet/contrib/gdb/gdb/remote.c Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/contrib/gdb/gdb/remote.c Fri Jan 23 22:35:55 2015 (r277616)
@@ -3463,7 +3463,7 @@ remote_store_registers (int regnum)
{
int i;
regs = alloca (rs->sizeof_g_packet);
- memset (regs, rs->sizeof_g_packet, 0);
+ memset (regs, 0, rs->sizeof_g_packet);
for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
{
struct packet_reg *r = &rs->regs[i];
Modified: projects/ifnet/contrib/gdb/gdb/std-regs.c
==============================================================================
--- projects/ifnet/contrib/gdb/gdb/std-regs.c Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/contrib/gdb/gdb/std-regs.c Fri Jan 23 22:35:55 2015 (r277616)
@@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame
val = allocate_value (builtin_type_frame_reg);
VALUE_LVAL (val) = not_lval;
buf = VALUE_CONTENTS_RAW (val);
- memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0);
+ memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val)));
/* frame.base. */
if (frame != NULL)
ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
@@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr
struct value *val = allocate_value (builtin_type_void_data_ptr);
char *buf = VALUE_CONTENTS_RAW (val);
if (frame == NULL)
- memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0);
+ memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val)));
else
ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
get_frame_base_address (frame));
@@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr
struct value *val = allocate_value (builtin_type_void_data_ptr);
char *buf = VALUE_CONTENTS_RAW (val);
if (frame == NULL)
- memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0);
+ memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val)));
else
ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
get_frame_pc (frame));
Modified: projects/ifnet/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==============================================================================
--- projects/ifnet/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Fri Jan 23 22:35:55 2015 (r277616)
@@ -6587,6 +6587,17 @@ void freebsd::Link::ConstructJob(Compila
CmdArgs.push_back("elf32ppc_fbsd");
}
+ if (Arg *A = Args.getLastArg(options::OPT_G)) {
+ if (ToolChain.getArch() == llvm::Triple::mips ||
+ ToolChain.getArch() == llvm::Triple::mipsel ||
+ ToolChain.getArch() == llvm::Triple::mips64 ||
+ ToolChain.getArch() == llvm::Triple::mips64el) {
+ StringRef v = A->getValue();
+ CmdArgs.push_back(Args.MakeArgString("-G" + v));
+ A->claim();
+ }
+ }
+
if (Output.isFilename()) {
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
Modified: projects/ifnet/etc/Makefile
==============================================================================
--- projects/ifnet/etc/Makefile Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/etc/Makefile Fri Jan 23 22:35:55 2015 (r277616)
@@ -3,8 +3,11 @@
.include <src.opts.mk>
+SUBDIR= \
+ newsyslog.conf.d
+
.if ${MK_SENDMAIL} != "no"
-SUBDIR= sendmail
+SUBDIR+=sendmail
.endif
.if ${MK_TESTS} != "no"
Modified: projects/ifnet/lib/libc/include/libc_private.h
==============================================================================
--- projects/ifnet/lib/libc/include/libc_private.h Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/lib/libc/include/libc_private.h Fri Jan 23 22:35:55 2015 (r277616)
@@ -357,6 +357,10 @@ int __libc_system(const char *);
int __libc_tcdrain(int);
int __fcntl_compat(int fd, int cmd, ...);
+int __sys_futimens(int fd, const struct timespec *times) __hidden;
+int __sys_utimensat(int fd, const char *path,
+ const struct timespec *times, int flag) __hidden;
+
/* execve() with PATH processing to implement posix_spawnp() */
int _execvpe(const char *, char * const *, char * const *);
Modified: projects/ifnet/lib/libc/sys/Makefile.inc
==============================================================================
--- projects/ifnet/lib/libc/sys/Makefile.inc Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/lib/libc/sys/Makefile.inc Fri Jan 23 22:35:55 2015 (r277616)
@@ -38,6 +38,10 @@ SRCS+= ${SYSCALL_COMPAT_SRCS}
NOASM+= ${SYSCALL_COMPAT_SRCS:S/.c/.o/}
.endif
+SRCS+= futimens.c utimensat.c
+NOASM+= futimens.o utimensat.o
+PSEUDO+= _futimens.o _utimensat.o
+
INTERPOSED = \
accept \
accept4 \
@@ -310,6 +314,7 @@ MAN+= sctp_generic_recvmsg.2 \
umask.2 \
undelete.2 \
unlink.2 \
+ utimensat.2 \
utimes.2 \
utrace.2 \
uuidgen.2 \
@@ -442,6 +447,7 @@ MLINKS+=timer_settime.2 timer_getoverrun
timer_settime.2 timer_gettime.2
MLINKS+=truncate.2 ftruncate.2
MLINKS+=unlink.2 unlinkat.2
+MLINKS+=utimensat.2 futimens.2
MLINKS+=utimes.2 futimes.2 \
utimes.2 futimesat.2 \
utimes.2 lutimes.2
Modified: projects/ifnet/lib/libc/sys/Symbol.map
==============================================================================
--- projects/ifnet/lib/libc/sys/Symbol.map Fri Jan 23 21:47:44 2015 (r277615)
+++ projects/ifnet/lib/libc/sys/Symbol.map Fri Jan 23 22:35:55 2015 (r277616)
@@ -397,7 +397,9 @@ FBSD_1.3 {
};
FBSD_1.4 {
+ futimens;
ppoll;
+ utimensat;
};
FBSDprivate_1.0 {
Copied: projects/ifnet/lib/libc/sys/futimens.c (from r277615, head/lib/libc/sys/futimens.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ifnet/lib/libc/sys/futimens.c Fri Jan 23 22:35:55 2015 (r277616, copy of r277615, head/lib/libc/sys/futimens.c)
@@ -0,0 +1,97 @@
+/*-
+ * Copyright (c) 2015 Jilles Tjoelker
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "namespace.h"
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <time.h>
+#include "un-namespace.h"
+
+#include "libc_private.h"
+
+int
+futimens(int fd, const struct timespec times[2])
+{
+ struct timeval now, tv[2], *tvp;
+ struct stat sb;
+
+ if (__getosreldate() >= 1100056)
+ return (__sys_futimens(fd, times));
+
+ if (times == NULL || (times[0].tv_nsec == UTIME_NOW &&
+ times[1].tv_nsec == UTIME_NOW))
+ tvp = NULL;
+ else if (times[0].tv_nsec == UTIME_OMIT &&
+ times[1].tv_nsec == UTIME_OMIT)
+ return (0);
+ else {
+ if ((times[0].tv_nsec < 0 || times[0].tv_nsec > 999999999) &&
+ times[0].tv_nsec != UTIME_NOW &&
+ times[0].tv_nsec != UTIME_OMIT) {
+ errno = EINVAL;
+ return (-1);
+ }
+ if ((times[1].tv_nsec < 0 || times[1].tv_nsec > 999999999) &&
+ times[1].tv_nsec != UTIME_NOW &&
+ times[1].tv_nsec != UTIME_OMIT) {
+ errno = EINVAL;
+ return (-1);
+ }
+ tv[0].tv_sec = times[0].tv_sec;
+ tv[0].tv_usec = times[0].tv_nsec / 1000;
+ tv[1].tv_sec = times[1].tv_sec;
+ tv[1].tv_usec = times[1].tv_nsec / 1000;
+ tvp = tv;
+ if (times[0].tv_nsec == UTIME_OMIT ||
+ times[1].tv_nsec == UTIME_OMIT) {
+ if (_fstat(fd, &sb) == -1)
+ return (-1);
+ if (times[0].tv_nsec == UTIME_OMIT) {
+ tv[0].tv_sec = sb.st_atim.tv_sec;
+ tv[0].tv_usec = sb.st_atim.tv_nsec / 1000;
+ }
+ if (times[1].tv_nsec == UTIME_OMIT) {
+ tv[1].tv_sec = sb.st_mtim.tv_sec;
+ tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000;
+ }
+ }
+ if (times[0].tv_nsec == UTIME_NOW ||
+ times[1].tv_nsec == UTIME_NOW) {
+ if (gettimeofday(&now, NULL) == -1)
+ return (-1);
+ if (times[0].tv_nsec == UTIME_NOW)
+ tv[0] = now;
+ if (times[1].tv_nsec == UTIME_NOW)
+ tv[1] = now;
+ }
+ }
+ return (futimes(fd, tvp));
+}
Copied: projects/ifnet/lib/libc/sys/utimensat.2 (from r277615, head/lib/libc/sys/utimensat.2)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ifnet/lib/libc/sys/utimensat.2 Fri Jan 23 22:35:55 2015 (r277616, copy of r277615, head/lib/libc/sys/utimensat.2)
@@ -0,0 +1,292 @@
+.\" $NetBSD: utimes.2,v 1.13 1999/03/22 19:45:11 garbled Exp $
+.\"
+.\" Copyright (c) 1990, 1993
+.\" The Regents of the University of California. All rights reserved.
+.\" Copyright (c) 2012, Jilles Tjoelker
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)utimes.2 8.1 (Berkeley) 6/4/93
+.\" $FreeBSD$
+.\"
+.Dd January 23, 2015
+.Dt UTIMENSAT 2
+.Os
+.Sh NAME
+.Nm futimens ,
+.Nm utimensat
+.Nd set file access and modification times
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In sys/stat.h
+.Ft int
+.Fn futimens "int fd" "const struct timespec times[2]"
+.Ft int
+.Fo utimensat
+.Fa "int fd"
+.Fa "const char *path"
+.Fa "const struct timespec times[2]"
+.Fa "int flag"
+.Fc
+.Sh DESCRIPTION
+The access and modification times of the file named by
+.Fa path
+or referenced by
+.Fa fd
+are changed as specified by the argument
+.Fa times .
+The inode-change-time of the file is set to the current time.
+.Pp
+If
+.Fa path
+specifies a relative path,
+it is relative to the current working directory if
+.Fa fd
+is
+.Dv AT_FDCWD
+and otherwise relative to the directory associated with the file descriptor
+.Fa fd .
+.Pp
+The
+.Va tv_nsec
+field of a
+.Vt timespec
+structure
+can be set to the special value
+.Dv UTIME_NOW
+to set the current time, or to
+.Dv UTIME_OMIT
+to leave the time unchanged.
+In either case, the
+.Va tv_sec
+field is ignored.
+.Pp
+If
+.Fa times
+is
+.No non- Ns Dv NULL ,
+it is assumed to point to an array of two timespec structures.
+The access time is set to the value of the first element, and the
+modification time is set to the value of the second element.
+For file systems that support file birth (creation) times (such as
+.Dv UFS2 ) ,
+the birth time will be set to the value of the second element
+if the second element is older than the currently set birth time.
+To set both a birth time and a modification time,
+two calls are required; the first to set the birth time
+and the second to set the (presumably newer) modification time.
+Ideally a new system call will be added that allows the setting
+of all three times at once.
+If
+.Fa times
+is
+.Dv NULL ,
+this is equivalent to passing
+a pointer to an array of two timespec structures
+with both
+.Va tv_nsec
+fields set to
+.Dv UTIME_NOW .
+.Pp
+If both
+.Va tv_nsec
+fields are
+.Dv UTIME_OMIT ,
+the timestamps remain unchanged and
+no permissions are needed for the file itself,
+although search permissions may be required for the path prefix.
+The call may or may not succeed if the named file does not exist.
+.Pp
+If both
+.Va tv_nsec
+fields are
+.Dv UTIME_NOW ,
+the caller must be the owner of the file, have permission to
+write the file, or be the super-user.
+.Pp
+For all other values of the timestamps,
+the caller must be the owner of the file or be the super-user.
+.Pp
+The values for the
+.Fa flag
+argument of the
+.Fn utimensat
+system call
+are constructed by a bitwise-inclusive OR of flags from the following list,
+defined in
+.In fcntl.h :
+.Bl -tag -width indent
+.It Dv AT_SYMLINK_NOFOLLOW
+If
+.Fa path
+names a symbolic link, the symbolic link's times are changed.
+By default,
+.Fn utimensat
+changes the times of the file referenced by the symbolic link.
+.El
+.Sh RETURN VALUES
+.Rv -std
+.Sh COMPATIBILITY
+If the running kernel does not support this system call,
+a wrapper emulates it using
+.Xr fstatat 2 ,
+.Xr futimesat 2
+and
+.Xr lutimes 2 .
+As a result, timestamps will be rounded down to the nearest microsecond,
+.Dv UTIME_OMIT
+is not atomic and
+.Dv AT_SYMLINK_NOFOLLOW
+is not available with a path relative to a file descriptor.
+.Sh ERRORS
+These system calls will fail if:
+.Bl -tag -width Er
+.It Bq Er EACCES
+The
+.Fa times
+argument is
+.Dv NULL ,
+or both
+.Va tv_nsec
+values are
+.Dv UTIME_NOW ,
+and the effective user ID of the process does not
+match the owner of the file, and is not the super-user, and write
+access is denied.
+.It Bq Er EFAULT
+The
+.Fa times
+argument
+points outside the process's allocated address space.
+.It Bq Er EINVAL
+The
+.Va tv_usec
+component of at least one of the values specified by the
+.Fa times
+argument has a value less than 0 or greater than 999999.
+.It Bq Er EIO
+An I/O error occurred while reading or writing the affected inode.
+.It Bq Er EPERM
+The
+.Fa times
+argument is not
+.Dv NULL
+nor are both
+.Va tv_nsec
+values
+.Dv UTIME_NOW ,
+nor are both
+.Va tv_nsec
+values
+.Dv UTIME_OMIT
+and the calling process's effective user ID
+does not match the owner of the file and is not the super-user.
+.It Bq Er EPERM
+The named file has its immutable or append-only flag set, see the
+.Xr chflags 2
+manual page for more information.
+.It Bq Er EROFS
+The file system containing the file is mounted read-only.
+.El
+.Pp
+The
+.Fn futimens
+system call
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The
+.Fa fd
+argument
+does not refer to a valid descriptor.
+.El
+.Pp
+The
+.Fn utimensat
+system call
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EACCES
+Search permission is denied for a component of the path prefix.
+.It Bq Er EBADF
+The
+.Fa path
+argument does not specify an absolute path and the
+.Fa fd
+argument is neither
+.Dv AT_FDCWD
+nor a valid file descriptor.
+.It Bq Er EFAULT
+The
+.Fa path
+argument
+points outside the process's allocated address space.
+.It Bq Er ELOOP
+Too many symbolic links were encountered in translating the pathname.
+.It Bq Er ENAMETOOLONG
+A component of a pathname exceeded
+.Dv NAME_MAX
+characters, or an entire path name exceeded
+.Dv PATH_MAX
+characters.
+.It Bq Er ENOENT
+The named file does not exist.
+.It Bq Er ENOTDIR
+A component of the path prefix is not a directory.
+.It Bq Er ENOTDIR
+The
+.Fa path
+argument is not an absolute path and
+.Fa fd
+is neither
+.Dv AT_FDCWD
+nor a file descriptor associated with a directory.
+.It Bq Er ENOTSUP
+The running kernel does not support this system call and
+.Dv AT_SYMLINK_NOFOLLOW
+is used with a path relative to a file descriptor.
+.El
+.Sh SEE ALSO
+.Xr chflags 2 ,
+.Xr stat 2 ,
+.Xr symlink 2 ,
+.Xr utimes 2 ,
+.Xr utime 3 ,
+.Xr symlink 7
+.Sh STANDARDS
+The
+.Fn futimens
+and
+.Fn utimensat
+system calls are expected to conform to
+.St -p1003.1-2008 .
+.Sh HISTORY
+The
+.Fn futimens
+and
+.Fn utimensat
+system calls appeared in
+.Fx 11.0 .
Copied: projects/ifnet/lib/libc/sys/utimensat.c (from r277615, head/lib/libc/sys/utimensat.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ifnet/lib/libc/sys/utimensat.c Fri Jan 23 22:35:55 2015 (r277616, copy of r277615, head/lib/libc/sys/utimensat.c)
@@ -0,0 +1,109 @@
+/*-
+ * Copyright (c) 2015 Jilles Tjoelker
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "namespace.h"
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <time.h>
+#include "un-namespace.h"
+
+#include "libc_private.h"
+
+int
+utimensat(int fd, const char *path, const struct timespec times[2], int flag)
+{
+ struct timeval now, tv[2], *tvp;
+ struct stat sb;
+
+ if (__getosreldate() >= 1100056)
+ return (__sys_utimensat(fd, path, times, flag));
+
+ if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) {
+ errno = EINVAL;
+ return (-1);
+ }
+ if (times == NULL || (times[0].tv_nsec == UTIME_NOW &&
+ times[1].tv_nsec == UTIME_NOW))
+ tvp = NULL;
+ else if (times[0].tv_nsec == UTIME_OMIT &&
+ times[1].tv_nsec == UTIME_OMIT)
+ return (0);
+ else {
+ if ((times[0].tv_nsec < 0 || times[0].tv_nsec > 999999999) &&
+ times[0].tv_nsec != UTIME_NOW &&
+ times[0].tv_nsec != UTIME_OMIT) {
+ errno = EINVAL;
+ return (-1);
+ }
+ if ((times[1].tv_nsec < 0 || times[1].tv_nsec > 999999999) &&
+ times[1].tv_nsec != UTIME_NOW &&
+ times[1].tv_nsec != UTIME_OMIT) {
+ errno = EINVAL;
+ return (-1);
+ }
+ tv[0].tv_sec = times[0].tv_sec;
+ tv[0].tv_usec = times[0].tv_nsec / 1000;
+ tv[1].tv_sec = times[1].tv_sec;
+ tv[1].tv_usec = times[1].tv_nsec / 1000;
+ tvp = tv;
+ if (times[0].tv_nsec == UTIME_OMIT ||
+ times[1].tv_nsec == UTIME_OMIT) {
+ if (fstatat(fd, path, &sb, flag) == -1)
+ return (-1);
+ if (times[0].tv_nsec == UTIME_OMIT) {
+ tv[0].tv_sec = sb.st_atim.tv_sec;
+ tv[0].tv_usec = sb.st_atim.tv_nsec / 1000;
+ }
+ if (times[1].tv_nsec == UTIME_OMIT) {
+ tv[1].tv_sec = sb.st_mtim.tv_sec;
+ tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000;
+ }
+ }
+ if (times[0].tv_nsec == UTIME_NOW ||
+ times[1].tv_nsec == UTIME_NOW) {
+ if (gettimeofday(&now, NULL) == -1)
+ return (-1);
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list