svn commit: r332339 - in user/markj/netdump: . contrib/opencsd etc/mtree include lib lib/libc/aarch64/sys lib/libc/amd64/sys lib/libc/arm/sys lib/libc/gen lib/libc/i386/sys lib/libc/mips/sys lib/li...
Mark Johnston
markj at FreeBSD.org
Mon Apr 9 21:38:49 UTC 2018
Author: markj
Date: Mon Apr 9 21:38:45 2018
New Revision: 332339
URL: https://svnweb.freebsd.org/changeset/base/332339
Log:
MFH at r332338.
Added:
user/markj/netdump/contrib/opencsd/
- copied from r332338, head/contrib/opencsd/
user/markj/netdump/lib/libc/stdio/gets_s.c
- copied unchanged from r332338, head/lib/libc/stdio/gets_s.c
user/markj/netdump/lib/libc/tests/stdio/gets_s_test.c
- copied unchanged from r332338, head/lib/libc/tests/stdio/gets_s_test.c
user/markj/netdump/lib/libopencsd/
- copied from r332338, head/lib/libopencsd/
user/markj/netdump/share/man/man4/spigen.4
- copied unchanged from r332338, head/share/man/man4/spigen.4
user/markj/netdump/share/man/man9/ofw_bus_is_compatible.9
- copied unchanged from r332338, head/share/man/man9/ofw_bus_is_compatible.9
user/markj/netdump/share/man/man9/ofw_bus_status_okay.9
- copied unchanged from r332338, head/share/man/man9/ofw_bus_status_okay.9
user/markj/netdump/stand/i386/isoboot/
- copied from r332338, head/stand/i386/isoboot/
user/markj/netdump/stand/libsa/cd9660read.c
- copied unchanged from r332338, head/stand/libsa/cd9660read.c
user/markj/netdump/sys/arm/mv/armada38x/armada38x_pl310.h
- copied unchanged from r332338, head/sys/arm/mv/armada38x/armada38x_pl310.h
user/markj/netdump/sys/arm/mv/armv5_machdep.c
- copied unchanged from r332338, head/sys/arm/mv/armv5_machdep.c
user/markj/netdump/sys/arm/mv/files.arm7
- copied unchanged from r332338, head/sys/arm/mv/files.arm7
user/markj/netdump/sys/arm/mv/mv_armv7_machdep.c
- copied unchanged from r332338, head/sys/arm/mv/mv_armv7_machdep.c
user/markj/netdump/sys/arm64/coresight/
- copied from r332338, head/sys/arm64/coresight/
user/markj/netdump/sys/dev/vmware/vmci/LICENSE
- copied unchanged from r332338, head/sys/dev/vmware/vmci/LICENSE
user/markj/netdump/sys/dts/arm/overlays/sun8i-a83t-bananapi-m3-emac.dtso
- copied unchanged from r332338, head/sys/dts/arm/overlays/sun8i-a83t-bananapi-m3-emac.dtso
user/markj/netdump/sys/dts/arm/overlays/sun8i-a83t-emac.dtso
- copied unchanged from r332338, head/sys/dts/arm/overlays/sun8i-a83t-emac.dtso
user/markj/netdump/sys/dts/arm/overlays/sun8i-a83t-sid.dtso
- copied unchanged from r332338, head/sys/dts/arm/overlays/sun8i-a83t-sid.dtso
user/markj/netdump/tests/sys/netpfil/pf/ioctl/
- copied from r332338, head/tests/sys/netpfil/pf/ioctl/
user/markj/netdump/tools/diag/prtblknos/main.c
- copied unchanged from r332338, head/tools/diag/prtblknos/main.c
user/markj/netdump/usr.bin/etdump/
- copied from r332338, head/usr.bin/etdump/
Deleted:
user/markj/netdump/lib/libc/aarch64/sys/shmat.S
user/markj/netdump/lib/libc/aarch64/sys/sigreturn.S
user/markj/netdump/lib/libc/amd64/sys/setlogin.S
user/markj/netdump/lib/libc/amd64/sys/sigreturn.S
user/markj/netdump/lib/libc/arm/sys/shmat.S
user/markj/netdump/lib/libc/arm/sys/sigreturn.S
user/markj/netdump/lib/libc/i386/sys/setlogin.S
user/markj/netdump/lib/libc/i386/sys/sigreturn.S
user/markj/netdump/lib/libc/mips/sys/shmat.S
user/markj/netdump/lib/libc/powerpc/sys/setlogin.S
user/markj/netdump/lib/libc/powerpc64/sys/setlogin.S
user/markj/netdump/lib/libc/riscv/sys/shmat.S
user/markj/netdump/lib/libc/riscv/sys/sigreturn.S
user/markj/netdump/lib/libc/sparc64/sys/setlogin.S
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_gpio.h
user/markj/netdump/sys/arm/mv/mv_machdep.c
user/markj/netdump/sys/geom/geom_aes.c
Modified:
user/markj/netdump/Makefile.inc1
user/markj/netdump/UPDATING
user/markj/netdump/etc/mtree/BSD.include.dist
user/markj/netdump/etc/mtree/BSD.tests.dist
user/markj/netdump/include/pthread.h
user/markj/netdump/include/stdio.h
user/markj/netdump/lib/Makefile
user/markj/netdump/lib/libc/aarch64/sys/Makefile.inc
user/markj/netdump/lib/libc/amd64/sys/Makefile.inc
user/markj/netdump/lib/libc/arm/sys/Makefile.inc
user/markj/netdump/lib/libc/gen/getlogin.c
user/markj/netdump/lib/libc/gen/syslog.3
user/markj/netdump/lib/libc/gen/syslog.c
user/markj/netdump/lib/libc/i386/sys/Makefile.inc
user/markj/netdump/lib/libc/powerpc/sys/Makefile.inc
user/markj/netdump/lib/libc/powerpc64/sys/Makefile.inc
user/markj/netdump/lib/libc/riscv/sys/Makefile.inc
user/markj/netdump/lib/libc/sparc64/sys/Makefile.inc
user/markj/netdump/lib/libc/stdio/Makefile.inc
user/markj/netdump/lib/libc/stdio/Symbol.map
user/markj/netdump/lib/libc/stdio/fgets.3
user/markj/netdump/lib/libc/tests/stdio/Makefile
user/markj/netdump/lib/libufs/inode.c
user/markj/netdump/lib/libufs/type.c
user/markj/netdump/lib/libvmmapi/vmmapi.c
user/markj/netdump/lib/libvmmapi/vmmapi.h
user/markj/netdump/sbin/fsdb/Makefile
user/markj/netdump/sbin/fsdb/fsdbutil.c
user/markj/netdump/sbin/reboot/reboot.c
user/markj/netdump/share/examples/etc/make.conf
user/markj/netdump/share/man/man4/cfumass.4
user/markj/netdump/share/man/man4/geom.4
user/markj/netdump/share/man/man4/vmci.4
user/markj/netdump/share/man/man8/rc.subr.8
user/markj/netdump/share/man/man9/BUS_ADD_CHILD.9
user/markj/netdump/share/man/man9/Makefile
user/markj/netdump/share/man/man9/timeout.9
user/markj/netdump/share/mk/bsd.cpu.mk
user/markj/netdump/share/mk/bsd.libnames.mk
user/markj/netdump/share/mk/src.libnames.mk
user/markj/netdump/share/mk/src.opts.mk
user/markj/netdump/stand/common/disk.c
user/markj/netdump/stand/common/part.c
user/markj/netdump/stand/common/part.h
user/markj/netdump/stand/forth/efi.4th
user/markj/netdump/stand/forth/loader.4th
user/markj/netdump/stand/forth/loader.rc
user/markj/netdump/stand/i386/Makefile
user/markj/netdump/stand/i386/Makefile.inc
user/markj/netdump/stand/i386/gptboot/gptboot.c
user/markj/netdump/stand/i386/loader/loader.rc
user/markj/netdump/stand/libsa/cd9660.c
user/markj/netdump/stand/lua/loader.lua
user/markj/netdump/sys/amd64/amd64/db_trace.c
user/markj/netdump/sys/amd64/amd64/exception.S
user/markj/netdump/sys/amd64/amd64/genassym.c
user/markj/netdump/sys/amd64/amd64/machdep.c
user/markj/netdump/sys/amd64/amd64/minidump_machdep.c
user/markj/netdump/sys/amd64/amd64/mp_machdep.c
user/markj/netdump/sys/amd64/amd64/mpboot.S
user/markj/netdump/sys/amd64/amd64/pmap.c
user/markj/netdump/sys/amd64/amd64/ptrace_machdep.c
user/markj/netdump/sys/amd64/amd64/vm_machdep.c
user/markj/netdump/sys/amd64/ia32/ia32_misc.c
user/markj/netdump/sys/amd64/ia32/ia32_reg.c
user/markj/netdump/sys/amd64/ia32/ia32_signal.c
user/markj/netdump/sys/amd64/ia32/ia32_sigtramp.S
user/markj/netdump/sys/amd64/ia32/ia32_syscall.c
user/markj/netdump/sys/amd64/include/smp.h
user/markj/netdump/sys/amd64/include/vmm.h
user/markj/netdump/sys/amd64/include/vmm_dev.h
user/markj/netdump/sys/amd64/linux/linux_dummy.c
user/markj/netdump/sys/amd64/linux/linux_sysvec.c
user/markj/netdump/sys/amd64/linux32/linux32_dummy.c
user/markj/netdump/sys/amd64/linux32/linux32_sysent.c
user/markj/netdump/sys/amd64/linux32/linux32_sysvec.c
user/markj/netdump/sys/amd64/linux32/syscalls.master
user/markj/netdump/sys/amd64/vmm/amd/svm.c
user/markj/netdump/sys/amd64/vmm/intel/vmx.c
user/markj/netdump/sys/amd64/vmm/vmm.c
user/markj/netdump/sys/amd64/vmm/vmm_dev.c
user/markj/netdump/sys/amd64/vmm/x86.c
user/markj/netdump/sys/arm/allwinner/aw_gpio.c
user/markj/netdump/sys/arm/allwinner/aw_if_dwc.c
user/markj/netdump/sys/arm/allwinner/aw_sid.c
user/markj/netdump/sys/arm/allwinner/axp81x.c
user/markj/netdump/sys/arm/allwinner/clkng/aw_clk.h
user/markj/netdump/sys/arm/allwinner/clkng/aw_clk_nm.c
user/markj/netdump/sys/arm/allwinner/clkng/aw_clk_nm.h
user/markj/netdump/sys/arm/allwinner/clkng/ccu_sun8i_r.c
user/markj/netdump/sys/arm/allwinner/if_awg.c
user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_ccm.c
user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_mmc.c
user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_pinctrl.c
user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_sdxc-m8.c
user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c
user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_usb_phy-m6.c
user/markj/netdump/sys/arm/arm/machdep.c
user/markj/netdump/sys/arm/arm/vm_machdep.c
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_intr.c
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_spi.c
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_spivar.h
user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2836.c
user/markj/netdump/sys/arm/conf/ARMADA38X
user/markj/netdump/sys/arm/conf/ARMADAXP
user/markj/netdump/sys/arm/conf/RPI-B
user/markj/netdump/sys/arm/conf/RPI2
user/markj/netdump/sys/arm/freescale/vybrid/vf_ccm.c
user/markj/netdump/sys/arm/include/intr.h
user/markj/netdump/sys/arm/mv/armada/wdt.c
user/markj/netdump/sys/arm/mv/armada38x/armada38x.c
user/markj/netdump/sys/arm/mv/armada38x/armada38x_mp.c
user/markj/netdump/sys/arm/mv/armada38x/armada38x_pl310.c
user/markj/netdump/sys/arm/mv/armada38x/std.armada38x
user/markj/netdump/sys/arm/mv/armadaxp/armadaxp.c
user/markj/netdump/sys/arm/mv/armadaxp/armadaxp_mp.c
user/markj/netdump/sys/arm/mv/armadaxp/std.mv78x60
user/markj/netdump/sys/arm/mv/files.mv
user/markj/netdump/sys/arm/mv/gpio.c
user/markj/netdump/sys/arm/mv/mpic.c
user/markj/netdump/sys/arm/mv/mv_common.c
user/markj/netdump/sys/arm/mv/mv_localbus.c
user/markj/netdump/sys/arm/mv/mv_pci.c
user/markj/netdump/sys/arm/mv/mv_pci_ctrl.c
user/markj/netdump/sys/arm/mv/mvreg.h
user/markj/netdump/sys/arm/mv/mvvar.h
user/markj/netdump/sys/arm/mv/mvwin.h
user/markj/netdump/sys/arm/mv/std-pj4b.mv
user/markj/netdump/sys/arm/mv/timer.c
user/markj/netdump/sys/arm/nvidia/as3722_gpio.c
user/markj/netdump/sys/arm/nvidia/as3722_regulators.c
user/markj/netdump/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c
user/markj/netdump/sys/arm/nvidia/tegra_pinmux.c
user/markj/netdump/sys/arm/nvidia/tegra_usbphy.c
user/markj/netdump/sys/arm/ti/cpsw/if_cpsw.c
user/markj/netdump/sys/arm/ti/ti_hwmods.c
user/markj/netdump/sys/arm/ti/usb/omap_host.c
user/markj/netdump/sys/arm64/arm64/machdep.c
user/markj/netdump/sys/arm64/arm64/trap.c
user/markj/netdump/sys/cam/scsi/scsi_cd.c
user/markj/netdump/sys/cam/scsi/scsi_da.c
user/markj/netdump/sys/cam/scsi/scsi_enc.c
user/markj/netdump/sys/cam/scsi/scsi_pass.c
user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c
user/markj/netdump/sys/compat/freebsd32/freebsd32_ioctl.c
user/markj/netdump/sys/compat/freebsd32/freebsd32_misc.c
user/markj/netdump/sys/compat/freebsd32/freebsd32_sysent.c
user/markj/netdump/sys/compat/ia32/ia32_genassym.c
user/markj/netdump/sys/compat/ia32/ia32_sysvec.c
user/markj/netdump/sys/compat/linux/linux_emul.c
user/markj/netdump/sys/compat/linux/linux_emul.h
user/markj/netdump/sys/compat/linux/linux_ioctl.c
user/markj/netdump/sys/compat/linux/linux_util.c
user/markj/netdump/sys/compat/linuxkpi/common/include/asm/smp.h
user/markj/netdump/sys/compat/linuxkpi/common/src/linux_schedule.c
user/markj/netdump/sys/conf/NOTES
user/markj/netdump/sys/conf/files
user/markj/netdump/sys/conf/files.arm64
user/markj/netdump/sys/conf/options
user/markj/netdump/sys/conf/options.amd64
user/markj/netdump/sys/conf/options.arm64
user/markj/netdump/sys/conf/options.mips
user/markj/netdump/sys/conf/options.powerpc
user/markj/netdump/sys/dev/aac/aac.c
user/markj/netdump/sys/dev/aacraid/aacraid.c
user/markj/netdump/sys/dev/acpica/acpi_hpet.c
user/markj/netdump/sys/dev/ahci/ahci_mv_fdt.c
user/markj/netdump/sys/dev/altera/avgen/altera_avgen_fdt.c
user/markj/netdump/sys/dev/atkbdc/atkbd.c
user/markj/netdump/sys/dev/atkbdc/atkbdc_ebus.c
user/markj/netdump/sys/dev/cxgbe/t4_main.c
user/markj/netdump/sys/dev/cy/cy.c
user/markj/netdump/sys/dev/drm2/drmP.h
user/markj/netdump/sys/dev/drm2/drm_ioc32.c
user/markj/netdump/sys/dev/drm2/i915/i915_ioc32.c
user/markj/netdump/sys/dev/drm2/radeon/radeon_ioc32.c
user/markj/netdump/sys/dev/etherswitch/e6000sw/e6000sw.c
user/markj/netdump/sys/dev/extres/regulator/regulator.c
user/markj/netdump/sys/dev/fdt/fdt_common.c
user/markj/netdump/sys/dev/fdt/fdt_common.h
user/markj/netdump/sys/dev/fdt/fdt_pinctrl.c
user/markj/netdump/sys/dev/fdt/fdt_slicer.c
user/markj/netdump/sys/dev/filemon/filemon.c
user/markj/netdump/sys/dev/filemon/filemon_wrapper.c
user/markj/netdump/sys/dev/gpio/gpiokeys.c
user/markj/netdump/sys/dev/gpio/gpioled_fdt.c
user/markj/netdump/sys/dev/iicbus/adt746x.c
user/markj/netdump/sys/dev/ipmi/ipmi_kcs.c
user/markj/netdump/sys/dev/kbdmux/kbdmux.c
user/markj/netdump/sys/dev/le/lebuffer_sbus.c
user/markj/netdump/sys/dev/md/md.c
user/markj/netdump/sys/dev/mfi/mfi.c
user/markj/netdump/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
user/markj/netdump/sys/dev/mpr/mpr_user.c
user/markj/netdump/sys/dev/mps/mps_user.c
user/markj/netdump/sys/dev/mrsas/mrsas_linux.c
user/markj/netdump/sys/dev/neta/if_mvneta_fdt.c
user/markj/netdump/sys/dev/netmap/if_em_netmap.h
user/markj/netdump/sys/dev/netmap/if_igb_netmap.h
user/markj/netdump/sys/dev/netmap/if_ixl_netmap.h
user/markj/netdump/sys/dev/netmap/if_lem_netmap.h
user/markj/netdump/sys/dev/netmap/if_ptnet.c
user/markj/netdump/sys/dev/netmap/if_re_netmap.h
user/markj/netdump/sys/dev/netmap/if_vtnet_netmap.h
user/markj/netdump/sys/dev/netmap/ixgbe_netmap.h
user/markj/netdump/sys/dev/netmap/netmap.c
user/markj/netdump/sys/dev/netmap/netmap_freebsd.c
user/markj/netdump/sys/dev/netmap/netmap_generic.c
user/markj/netdump/sys/dev/netmap/netmap_kern.h
user/markj/netdump/sys/dev/netmap/netmap_mem2.c
user/markj/netdump/sys/dev/netmap/netmap_mem2.h
user/markj/netdump/sys/dev/netmap/netmap_monitor.c
user/markj/netdump/sys/dev/netmap/netmap_offloadings.c
user/markj/netdump/sys/dev/netmap/netmap_pipe.c
user/markj/netdump/sys/dev/netmap/netmap_pt.c
user/markj/netdump/sys/dev/netmap/netmap_vale.c
user/markj/netdump/sys/dev/null/null.c
user/markj/netdump/sys/dev/ofw/ofw_bus_subr.c
user/markj/netdump/sys/dev/ofw/ofw_bus_subr.h
user/markj/netdump/sys/dev/ofw/openfirm.c
user/markj/netdump/sys/dev/ofw/openfirm.h
user/markj/netdump/sys/dev/pci/pci_user.c
user/markj/netdump/sys/dev/rp/rp.c
user/markj/netdump/sys/dev/sio/sio.c
user/markj/netdump/sys/dev/spibus/ofw_spibus.c
user/markj/netdump/sys/dev/spibus/spibus.c
user/markj/netdump/sys/dev/spibus/spibusvar.h
user/markj/netdump/sys/dev/spibus/spigen.c
user/markj/netdump/sys/dev/syscons/scvidctl.c
user/markj/netdump/sys/dev/syscons/syscons.c
user/markj/netdump/sys/dev/uart/uart_kbd_sun.c
user/markj/netdump/sys/dev/usb/controller/ehci_fsl.c
user/markj/netdump/sys/dev/usb/input/ukbd.c
user/markj/netdump/sys/dev/vkbd/vkbd.c
user/markj/netdump/sys/dev/vmware/vmci/vmci.c
user/markj/netdump/sys/dev/vmware/vmci/vmci.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_call_defs.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_datagram.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_datagram.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_defs.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_doorbell.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_doorbell.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_driver.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_driver.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_event.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_event.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_hashtable.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_hashtable.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_kernel_api.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_kernel_api_1.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_kernel_api_2.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_kernel_defs.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_kernel_if.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_kernel_if.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_qpair.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_queue.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_queue_pair.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_queue_pair.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_resource.c
user/markj/netdump/sys/dev/vmware/vmci/vmci_resource.h
user/markj/netdump/sys/dev/vmware/vmci/vmci_utils.h
user/markj/netdump/sys/dev/vnic/thunder_bgx_fdt.c
user/markj/netdump/sys/dev/vt/vt_core.c
user/markj/netdump/sys/dev/vt/vt_font.c
user/markj/netdump/sys/dts/arm/armada-380.dtsi
user/markj/netdump/sys/dts/arm/armada-385.dtsi
user/markj/netdump/sys/dts/arm/db78460.dts
user/markj/netdump/sys/dts/arm/rpi.dts
user/markj/netdump/sys/dts/arm/rpi2.dts
user/markj/netdump/sys/fs/cd9660/iso.h
user/markj/netdump/sys/fs/cuse/cuse.c
user/markj/netdump/sys/fs/devfs/devfs_devs.c
user/markj/netdump/sys/fs/procfs/procfs_dbregs.c
user/markj/netdump/sys/fs/procfs/procfs_fpregs.c
user/markj/netdump/sys/fs/procfs/procfs_ioctl.c
user/markj/netdump/sys/fs/procfs/procfs_map.c
user/markj/netdump/sys/fs/procfs/procfs_regs.c
user/markj/netdump/sys/geom/geom_dev.c
user/markj/netdump/sys/geom/geom_subr.c
user/markj/netdump/sys/geom/label/g_label_disk_ident.c
user/markj/netdump/sys/geom/raid/md_ddf.c
user/markj/netdump/sys/geom/raid/md_intel.c
user/markj/netdump/sys/i386/i386/genassym.c
user/markj/netdump/sys/i386/i386/locore.s
user/markj/netdump/sys/i386/i386/machdep.c
user/markj/netdump/sys/i386/i386/mp_machdep.c
user/markj/netdump/sys/i386/i386/sigtramp.s
user/markj/netdump/sys/i386/i386/vm_machdep.c
user/markj/netdump/sys/i386/include/smp.h
user/markj/netdump/sys/i386/linux/linux_dummy.c
user/markj/netdump/sys/i386/linux/linux_sysvec.c
user/markj/netdump/sys/kern/imgact_elf.c
user/markj/netdump/sys/kern/init_sysent.c
user/markj/netdump/sys/kern/kern_descrip.c
user/markj/netdump/sys/kern/kern_event.c
user/markj/netdump/sys/kern/kern_exec.c
user/markj/netdump/sys/kern/kern_exit.c
user/markj/netdump/sys/kern/kern_jail.c
user/markj/netdump/sys/kern/kern_mib.c
user/markj/netdump/sys/kern/kern_module.c
user/markj/netdump/sys/kern/kern_proc.c
user/markj/netdump/sys/kern/kern_prot.c
user/markj/netdump/sys/kern/kern_resource.c
user/markj/netdump/sys/kern/kern_sendfile.c
user/markj/netdump/sys/kern/kern_sharedpage.c
user/markj/netdump/sys/kern/kern_sig.c
user/markj/netdump/sys/kern/kern_sysctl.c
user/markj/netdump/sys/kern/kern_tc.c
user/markj/netdump/sys/kern/kern_thr.c
user/markj/netdump/sys/kern/kern_umtx.c
user/markj/netdump/sys/kern/kern_xxx.c
user/markj/netdump/sys/kern/makesyscalls.sh
user/markj/netdump/sys/kern/subr_dummy_vdso_tc.c
user/markj/netdump/sys/kern/subr_lock.c
user/markj/netdump/sys/kern/sys_generic.c
user/markj/netdump/sys/kern/sys_getrandom.c
user/markj/netdump/sys/kern/sys_pipe.c
user/markj/netdump/sys/kern/sys_process.c
user/markj/netdump/sys/kern/syscalls.master
user/markj/netdump/sys/kern/sysv_ipc.c
user/markj/netdump/sys/kern/sysv_msg.c
user/markj/netdump/sys/kern/sysv_sem.c
user/markj/netdump/sys/kern/sysv_shm.c
user/markj/netdump/sys/kern/tty.c
user/markj/netdump/sys/kern/tty_compat.c
user/markj/netdump/sys/kern/uipc_mqueue.c
user/markj/netdump/sys/kern/uipc_sem.c
user/markj/netdump/sys/kern/uipc_socket.c
user/markj/netdump/sys/kern/uipc_syscalls.c
user/markj/netdump/sys/kern/vfs_aio.c
user/markj/netdump/sys/kern/vfs_bio.c
user/markj/netdump/sys/kern/vfs_subr.c
user/markj/netdump/sys/kern/vfs_syscalls.c
user/markj/netdump/sys/mips/include/reg.h
user/markj/netdump/sys/mips/include/sigframe.h
user/markj/netdump/sys/mips/include/tls.h
user/markj/netdump/sys/mips/include/ucontext.h
user/markj/netdump/sys/mips/mediatek/mtk_pinctrl.c
user/markj/netdump/sys/mips/mips/freebsd32_machdep.c
user/markj/netdump/sys/mips/mips/pm_machdep.c
user/markj/netdump/sys/mips/mips/swtch.S
user/markj/netdump/sys/mips/mips/trap.c
user/markj/netdump/sys/mips/mips/vm_machdep.c
user/markj/netdump/sys/modules/aac/Makefile
user/markj/netdump/sys/modules/aacraid/Makefile
user/markj/netdump/sys/modules/cam/Makefile
user/markj/netdump/sys/modules/cryptodev/Makefile
user/markj/netdump/sys/modules/cuse/Makefile
user/markj/netdump/sys/modules/drm2/drm2/Makefile
user/markj/netdump/sys/modules/drm2/i915kms/Makefile
user/markj/netdump/sys/modules/drm2/radeonkms/Makefile
user/markj/netdump/sys/modules/dtrace/dtrace/Makefile
user/markj/netdump/sys/modules/dtrace/dtraceall/Makefile
user/markj/netdump/sys/modules/dtrace/dtraceall/dtraceall.c
user/markj/netdump/sys/modules/dtrace/fasttrap/Makefile
user/markj/netdump/sys/modules/filemon/Makefile
user/markj/netdump/sys/modules/hyperv/vmbus/Makefile
user/markj/netdump/sys/modules/if_tap/Makefile
user/markj/netdump/sys/modules/isp/Makefile
user/markj/netdump/sys/modules/kbdmux/Makefile
user/markj/netdump/sys/modules/linux/Makefile
user/markj/netdump/sys/modules/linux64/Makefile
user/markj/netdump/sys/modules/linux_common/Makefile
user/markj/netdump/sys/modules/mfi/Makefile
user/markj/netdump/sys/modules/mpr/Makefile
user/markj/netdump/sys/modules/mps/Makefile
user/markj/netdump/sys/modules/mqueue/Makefile
user/markj/netdump/sys/modules/procfs/Makefile
user/markj/netdump/sys/modules/rp/Makefile
user/markj/netdump/sys/modules/sem/Makefile
user/markj/netdump/sys/modules/sgx/Makefile
user/markj/netdump/sys/modules/sio/Makefile
user/markj/netdump/sys/modules/spigen/Makefile
user/markj/netdump/sys/modules/sysvipc/sysvmsg/Makefile
user/markj/netdump/sys/modules/sysvipc/sysvsem/Makefile
user/markj/netdump/sys/modules/sysvipc/sysvshm/Makefile
user/markj/netdump/sys/modules/usb/ukbd/Makefile
user/markj/netdump/sys/modules/vkbd/Makefile
user/markj/netdump/sys/modules/vmware/vmci/Makefile
user/markj/netdump/sys/net/bpf.c
user/markj/netdump/sys/net/if.c
user/markj/netdump/sys/net/if.h
user/markj/netdump/sys/net/if_tap.c
user/markj/netdump/sys/net/netmap.h
user/markj/netdump/sys/net/netmap_user.h
user/markj/netdump/sys/net/netmap_virt.h
user/markj/netdump/sys/net/pfvar.h
user/markj/netdump/sys/net/rtsock.c
user/markj/netdump/sys/netinet/in_jail.c
user/markj/netdump/sys/netinet/in_pcb.c
user/markj/netdump/sys/netinet/in_prot.c
user/markj/netdump/sys/netinet/sctp_input.c
user/markj/netdump/sys/netinet/sctp_os_bsd.h
user/markj/netdump/sys/netinet/sctp_syscalls.c
user/markj/netdump/sys/netinet/sctp_usrreq.c
user/markj/netdump/sys/netinet/tcp_subr.c
user/markj/netdump/sys/netinet/tcp_usrreq.c
user/markj/netdump/sys/netinet6/in6.c
user/markj/netdump/sys/netinet6/in6_jail.c
user/markj/netdump/sys/netinet6/sctp6_usrreq.c
user/markj/netdump/sys/netpfil/pf/pf_ioctl.c
user/markj/netdump/sys/netpfil/pf/pf_table.c
user/markj/netdump/sys/opencrypto/cryptodev.c
user/markj/netdump/sys/opencrypto/cryptosoft.c
user/markj/netdump/sys/powerpc/aim/aim_machdep.c
user/markj/netdump/sys/powerpc/aim/mmu_oea64.c
user/markj/netdump/sys/powerpc/booke/booke_machdep.c
user/markj/netdump/sys/powerpc/booke/pmap.c
user/markj/netdump/sys/powerpc/include/reg.h
user/markj/netdump/sys/powerpc/include/spr.h
user/markj/netdump/sys/powerpc/mpc85xx/fsl_diu.c
user/markj/netdump/sys/powerpc/ofw/ofw_real.c
user/markj/netdump/sys/powerpc/powermac/macio.c
user/markj/netdump/sys/powerpc/powermac/uninorth.c
user/markj/netdump/sys/powerpc/powerpc/altivec.c
user/markj/netdump/sys/powerpc/powerpc/cpu.c
user/markj/netdump/sys/powerpc/powerpc/exec_machdep.c
user/markj/netdump/sys/powerpc/powerpc/fpu.c
user/markj/netdump/sys/powerpc/powerpc/machdep.c
user/markj/netdump/sys/powerpc/powerpc/ptrace_machdep.c
user/markj/netdump/sys/powerpc/powerpc/sys_machdep.c
user/markj/netdump/sys/powerpc/powerpc/trap.c
user/markj/netdump/sys/powerpc/psim/iobus.c
user/markj/netdump/sys/sparc64/central/central.c
user/markj/netdump/sys/sparc64/ebus/ebus.c
user/markj/netdump/sys/sparc64/fhc/fhc.c
user/markj/netdump/sys/sparc64/isa/isa.c
user/markj/netdump/sys/sparc64/pci/ofw_pci.c
user/markj/netdump/sys/sparc64/sbus/dma_sbus.c
user/markj/netdump/sys/sparc64/sbus/sbus.c
user/markj/netdump/sys/sparc64/sparc64/exception.S
user/markj/netdump/sys/sparc64/sparc64/machdep.c
user/markj/netdump/sys/sparc64/sparc64/nexus.c
user/markj/netdump/sys/sparc64/sparc64/upa.c
user/markj/netdump/sys/sys/module.h
user/markj/netdump/sys/sys/param.h
user/markj/netdump/sys/sys/spigenio.h
user/markj/netdump/sys/teken/libteken/teken.3
user/markj/netdump/sys/teken/teken.c
user/markj/netdump/sys/teken/teken.h
user/markj/netdump/sys/teken/teken_scs.h
user/markj/netdump/sys/teken/teken_subr.h
user/markj/netdump/sys/teken/teken_subr_compat.h
user/markj/netdump/sys/teken/teken_wcwidth.h
user/markj/netdump/sys/ufs/ffs/ffs_softdep.c
user/markj/netdump/sys/ufs/ffs/softdep.h
user/markj/netdump/sys/vm/swap_pager.c
user/markj/netdump/sys/vm/vm_meter.c
user/markj/netdump/sys/vm/vm_mmap.c
user/markj/netdump/sys/vm/vm_page.c
user/markj/netdump/sys/vm/vm_page.h
user/markj/netdump/sys/vm/vm_unix.c
user/markj/netdump/sys/x86/include/init.h
user/markj/netdump/sys/x86/include/x86_smp.h
user/markj/netdump/sys/x86/x86/cpu_machdep.c
user/markj/netdump/sys/x86/x86/mp_x86.c
user/markj/netdump/sys/x86/x86/tsc.c
user/markj/netdump/tests/sys/netpfil/pf/Makefile
user/markj/netdump/tools/diag/prtblknos/Makefile
user/markj/netdump/tools/diag/prtblknos/prtblknos.c
user/markj/netdump/usr.bin/Makefile
user/markj/netdump/usr.bin/vtfontcvt/vtfontcvt.c
user/markj/netdump/usr.sbin/bhyve/bhyve.8
user/markj/netdump/usr.sbin/bhyve/bhyverun.c
user/markj/netdump/usr.sbin/bhyvectl/bhyvectl.c
user/markj/netdump/usr.sbin/syslogd/Makefile
user/markj/netdump/usr.sbin/syslogd/syslogd.c
Directory Properties:
user/markj/netdump/ (props changed)
user/markj/netdump/sys/cddl/contrib/opensolaris/ (props changed)
Modified: user/markj/netdump/Makefile.inc1
==============================================================================
--- user/markj/netdump/Makefile.inc1 Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/Makefile.inc1 Mon Apr 9 21:38:45 2018 (r332339)
@@ -802,11 +802,13 @@ _sanity_check: .PHONY .MAKE
# tree changes, particularly with respect to removing source files and
# replacing generated files. Handle these cases here in an ad-hoc fashion.
_cleanobj_fast_depend_hack: .PHONY
-# Syscall stubs rewritten in C
+# Syscall stubs rewritten in C and obsolete MD assembly implementations
# Date SVN Rev Syscalls
-# 20160829 r305012 ptrace
# 20170624 r320278 fstat fstatat fstatfs getdirentries getfsstat statfs
-.for f in fstat fstatat fstatfs getdirentries getfsstat ptrace statfs
+# 20180404 r332048 sigreturn
+# 20180405 r332080 shmat
+# 20180406 r332119 setlogin
+.for f in fstat fstatat fstatfs getdirentries getfsstat setlogin shmat sigreturn statfs
.if exists(${OBJTOP}/lib/libc/.depend.${f}.o)
@if egrep -qw '${f}\.[sS]' \
${OBJTOP}/lib/libc/.depend.${f}.o; then \
Modified: user/markj/netdump/UPDATING
==============================================================================
--- user/markj/netdump/UPDATING Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/UPDATING Mon Apr 9 21:38:45 2018 (r332339)
@@ -51,6 +51,45 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
****************************** SPECIAL WARNING: ******************************
+20180406:
+ In addition to supporting RFC 3164 formatted messages, the
+ syslogd(8) service is now capable of parsing RFC 5424 formatted
+ log messages. The main benefit of using RFC 5424 is that clients
+ may now send log messages with timestamps containing year numbers,
+ microseconds and time zone offsets.
+
+ Similarly, the syslog(3) C library function has been altered to
+ send RFC 5424 formatted messages to the local system logging
+ daemon. On systems using syslogd(8), this change should have no
+ negative impact, as long as syslogd(8) and the C library are
+ updated at the same time. On systems using a different system
+ logging daemon, it may be necessary to make configuration
+ adjustments, depending on the software used.
+
+ When using syslog-ng, add the 'syslog-protocol' flag to local
+ input sources to enable parsing of RFC 5424 formatted messages:
+
+ source src {
+ unix-dgram("/var/run/log" flags(syslog-protocol));
+ }
+
+ When using rsyslog, disable the 'SysSock.UseSpecialParser' option
+ of the 'imuxsock' module to let messages be processed by the
+ regular RFC 3164/5424 parsing pipeline:
+
+ module(load="imuxsock" SysSock.UseSpecialParser="off")
+
+ Do note that these changes only affect communication between local
+ applications and syslogd(8). The format that syslogd(8) uses to
+ store messages on disk or forward messages to other systems
+ remains unchanged. syslogd(8) still uses RFC 3164 for these
+ purposes. Options to customize this behaviour will be added in the
+ future. Utilities that process log files stored in /var/log are
+ thus expected to continue to function as before.
+
+ __FreeBSD_version has been incremented to 1200061 to denote this
+ change.
+
20180328:
Support for token ring networks has been removed. If you
have "device token" in your kernel config you should remove
Modified: user/markj/netdump/etc/mtree/BSD.include.dist
==============================================================================
--- user/markj/netdump/etc/mtree/BSD.include.dist Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/etc/mtree/BSD.include.dist Mon Apr 9 21:38:45 2018 (r332339)
@@ -319,6 +319,18 @@
..
nfsserver
..
+ opencsd
+ c_api
+ ..
+ etmv3
+ ..
+ etmv4
+ ..
+ ptm
+ ..
+ stm
+ ..
+ ..
openssl
..
pcap
Modified: user/markj/netdump/etc/mtree/BSD.tests.dist
==============================================================================
--- user/markj/netdump/etc/mtree/BSD.tests.dist Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/etc/mtree/BSD.tests.dist Mon Apr 9 21:38:45 2018 (r332339)
@@ -742,6 +742,8 @@
..
netpfil
pf
+ ioctl
+ ..
..
..
opencrypto
Modified: user/markj/netdump/include/pthread.h
==============================================================================
--- user/markj/netdump/include/pthread.h Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/include/pthread.h Mon Apr 9 21:38:45 2018 (r332339)
@@ -48,8 +48,6 @@
#include <sched.h>
#include <time.h>
-__NULLABILITY_PRAGMA_PUSH
-
/*
* Run-time invariant values:
*/
@@ -151,35 +149,33 @@ struct _pthread_cleanup_info {
*/
__BEGIN_DECLS
int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
-int pthread_attr_destroy(pthread_attr_t * _Nonnull);
+int pthread_attr_destroy(pthread_attr_t *);
int pthread_attr_getstack(
- const pthread_attr_t * _Nonnull __restrict,
- void ** _Nonnull __restrict,
- size_t * _Nonnull __restrict);
-int pthread_attr_getstacksize(const pthread_attr_t * _Nonnull,
- size_t * _Nonnull);
-int pthread_attr_getguardsize(const pthread_attr_t * _Nonnull,
- size_t * _Nonnull);
+ const pthread_attr_t * __restrict, void ** __restrict,
+ size_t * __restrict);
+int pthread_attr_getstacksize(const pthread_attr_t *,
+ size_t *);
+int pthread_attr_getguardsize(const pthread_attr_t *,
+ size_t *);
int pthread_attr_getstackaddr(const pthread_attr_t *, void **);
-int pthread_attr_getdetachstate(const pthread_attr_t * _Nonnull,
- int * _Nonnull);
-int pthread_attr_init(pthread_attr_t * _Nonnull);
-int pthread_attr_setstacksize(pthread_attr_t * _Nonnull, size_t);
-int pthread_attr_setguardsize(pthread_attr_t * _Nonnull, size_t);
-int pthread_attr_setstack(pthread_attr_t * _Nonnull, void *,
+int pthread_attr_getdetachstate(const pthread_attr_t *,
+ int *);
+int pthread_attr_init(pthread_attr_t *);
+int pthread_attr_setstacksize(pthread_attr_t *, size_t);
+int pthread_attr_setguardsize(pthread_attr_t *, size_t);
+int pthread_attr_setstack(pthread_attr_t *, void *,
size_t);
int pthread_attr_setstackaddr(pthread_attr_t *, void *);
-int pthread_attr_setdetachstate(pthread_attr_t * _Nonnull, int);
-int pthread_barrier_destroy(pthread_barrier_t * _Nonnull);
-int pthread_barrier_init(pthread_barrier_t * _Nonnull,
+int pthread_attr_setdetachstate(pthread_attr_t *, int);
+int pthread_barrier_destroy(pthread_barrier_t *);
+int pthread_barrier_init(pthread_barrier_t *,
const pthread_barrierattr_t *, unsigned);
-int pthread_barrier_wait(pthread_barrier_t * _Nonnull);
-int pthread_barrierattr_destroy(pthread_barrierattr_t * _Nonnull);
+int pthread_barrier_wait(pthread_barrier_t *);
+int pthread_barrierattr_destroy(pthread_barrierattr_t *);
int pthread_barrierattr_getpshared(
- const pthread_barrierattr_t * _Nonnull, int * _Nonnull);
-int pthread_barrierattr_init(pthread_barrierattr_t * _Nonnull);
-int pthread_barrierattr_setpshared(pthread_barrierattr_t * _Nonnull,
- int);
+ const pthread_barrierattr_t *, int *);
+int pthread_barrierattr_init(pthread_barrierattr_t *);
+int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
#define pthread_cleanup_push(cleanup_routine, cleanup_arg) \
{ \
@@ -194,108 +190,99 @@ int pthread_barrierattr_setpshared(pthread_barrieratt
__pthread_cleanup_pop_imp(execute); \
}
-int pthread_condattr_destroy(pthread_condattr_t * _Nonnull);
-int pthread_condattr_getclock(const pthread_condattr_t * _Nonnull,
- clockid_t * _Nonnull);
-int pthread_condattr_getpshared(const pthread_condattr_t * _Nonnull,
- int * _Nonnull);
-int pthread_condattr_init(pthread_condattr_t * _Nonnull);
-int pthread_condattr_setclock(pthread_condattr_t * _Nonnull,
- clockid_t);
-int pthread_condattr_setpshared(pthread_condattr_t * _Nonnull, int);
-int pthread_cond_broadcast(pthread_cond_t * _Nonnull);
-int pthread_cond_destroy(pthread_cond_t * _Nonnull);
-int pthread_cond_init(pthread_cond_t * _Nonnull,
- const pthread_condattr_t *);
-int pthread_cond_signal(pthread_cond_t * _Nonnull);
-int pthread_cond_timedwait(pthread_cond_t * _Nonnull,
- pthread_mutex_t * _Nonnull __mutex,
- const struct timespec * _Nonnull)
+int pthread_condattr_destroy(pthread_condattr_t *);
+int pthread_condattr_getclock(const pthread_condattr_t *,
+ clockid_t *);
+int pthread_condattr_getpshared(const pthread_condattr_t *, int *);
+int pthread_condattr_init(pthread_condattr_t *);
+int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
+int pthread_condattr_setpshared(pthread_condattr_t *, int);
+int pthread_cond_broadcast(pthread_cond_t *);
+int pthread_cond_destroy(pthread_cond_t *);
+int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *);
+int pthread_cond_signal(pthread_cond_t *);
+int pthread_cond_timedwait(pthread_cond_t *,
+ pthread_mutex_t * __mutex,
+ const struct timespec *)
__requires_exclusive(*__mutex);
-int pthread_cond_wait(pthread_cond_t * _Nonnull,
- pthread_mutex_t * _Nonnull __mutex)
+int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t * __mutex)
__requires_exclusive(*__mutex);
-int pthread_create(pthread_t * _Nonnull, const pthread_attr_t *,
- void *(* _Nonnull) (void *), void *);
+int pthread_create(pthread_t *, const pthread_attr_t *,
+ void *(*) (void *), void *);
int pthread_detach(pthread_t);
int pthread_equal(pthread_t, pthread_t);
void pthread_exit(void *) __dead2;
void *pthread_getspecific(pthread_key_t);
-int pthread_getcpuclockid(pthread_t, clockid_t * _Nonnull);
+int pthread_getcpuclockid(pthread_t, clockid_t *);
int pthread_join(pthread_t, void **);
-int pthread_key_create(pthread_key_t * _Nonnull,
- void (*) (void *));
+int pthread_key_create(pthread_key_t *, void (*) (void *));
int pthread_key_delete(pthread_key_t);
-int pthread_mutexattr_init(pthread_mutexattr_t * _Nonnull);
-int pthread_mutexattr_destroy(pthread_mutexattr_t * _Nonnull);
-int pthread_mutexattr_getpshared(
- const pthread_mutexattr_t * _Nonnull, int * _Nonnull);
-int pthread_mutexattr_gettype(pthread_mutexattr_t * _Nonnull,
- int * _Nonnull);
-int pthread_mutexattr_settype(pthread_mutexattr_t * _Nonnull, int);
-int pthread_mutexattr_setpshared(pthread_mutexattr_t * _Nonnull,
- int);
-int pthread_mutex_consistent(pthread_mutex_t * _Nonnull __mutex)
+int pthread_mutexattr_init(pthread_mutexattr_t *);
+int pthread_mutexattr_destroy(pthread_mutexattr_t *);
+int pthread_mutexattr_getpshared(const pthread_mutexattr_t *,
+ int *);
+int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *);
+int pthread_mutexattr_settype(pthread_mutexattr_t *, int);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
+int pthread_mutex_consistent(pthread_mutex_t * __mutex)
__requires_exclusive(*__mutex);
-int pthread_mutex_destroy(pthread_mutex_t * _Nonnull __mutex)
+int pthread_mutex_destroy(pthread_mutex_t * __mutex)
__requires_unlocked(*__mutex);
-int pthread_mutex_init(pthread_mutex_t * _Nonnull __mutex,
+int pthread_mutex_init(pthread_mutex_t * __mutex,
const pthread_mutexattr_t *)
__requires_unlocked(*__mutex);
-int pthread_mutex_lock(pthread_mutex_t * _Nonnull __mutex)
+int pthread_mutex_lock(pthread_mutex_t * __mutex)
__locks_exclusive(*__mutex);
-int pthread_mutex_trylock(pthread_mutex_t * _Nonnull __mutex)
+int pthread_mutex_trylock(pthread_mutex_t * __mutex)
__trylocks_exclusive(0, *__mutex);
-int pthread_mutex_timedlock(pthread_mutex_t * _Nonnull __mutex,
- const struct timespec * _Nonnull)
+int pthread_mutex_timedlock(pthread_mutex_t * __mutex,
+ const struct timespec *)
__trylocks_exclusive(0, *__mutex);
-int pthread_mutex_unlock(pthread_mutex_t * _Nonnull __mutex)
+int pthread_mutex_unlock(pthread_mutex_t * __mutex)
__unlocks(*__mutex);
-int pthread_once(pthread_once_t * _Nonnull,
- void (* _Nonnull) (void));
-int pthread_rwlock_destroy(pthread_rwlock_t * _Nonnull __rwlock)
+int pthread_once(pthread_once_t *, void (*) (void));
+int pthread_rwlock_destroy(pthread_rwlock_t * __rwlock)
__requires_unlocked(*__rwlock);
-int pthread_rwlock_init(pthread_rwlock_t * _Nonnull __rwlock,
+int pthread_rwlock_init(pthread_rwlock_t * __rwlock,
const pthread_rwlockattr_t *)
__requires_unlocked(*__rwlock);
-int pthread_rwlock_rdlock(pthread_rwlock_t * _Nonnull __rwlock)
+int pthread_rwlock_rdlock(pthread_rwlock_t * __rwlock)
__locks_shared(*__rwlock);
-int pthread_rwlock_timedrdlock(pthread_rwlock_t * _Nonnull __rwlock,
- const struct timespec * _Nonnull)
+int pthread_rwlock_timedrdlock(pthread_rwlock_t * __rwlock,
+ const struct timespec *)
__trylocks_shared(0, *__rwlock);
-int pthread_rwlock_timedwrlock(pthread_rwlock_t * _Nonnull __rwlock,
- const struct timespec * _Nonnull)
+int pthread_rwlock_timedwrlock(pthread_rwlock_t * __rwlock,
+ const struct timespec *)
__trylocks_exclusive(0, *__rwlock);
-int pthread_rwlock_tryrdlock(pthread_rwlock_t * _Nonnull __rwlock)
+int pthread_rwlock_tryrdlock(pthread_rwlock_t * __rwlock)
__trylocks_shared(0, *__rwlock);
-int pthread_rwlock_trywrlock(pthread_rwlock_t * _Nonnull __rwlock)
+int pthread_rwlock_trywrlock(pthread_rwlock_t * __rwlock)
__trylocks_exclusive(0, *__rwlock);
-int pthread_rwlock_unlock(pthread_rwlock_t * _Nonnull __rwlock)
+int pthread_rwlock_unlock(pthread_rwlock_t * __rwlock)
__unlocks(*__rwlock);
-int pthread_rwlock_wrlock(pthread_rwlock_t * _Nonnull __rwlock)
+int pthread_rwlock_wrlock(pthread_rwlock_t * __rwlock)
__locks_exclusive(*__rwlock);
-int pthread_rwlockattr_destroy(pthread_rwlockattr_t * _Nonnull);
-int pthread_rwlockattr_getkind_np(
- const pthread_rwlockattr_t * _Nonnull, int *);
-int pthread_rwlockattr_getpshared(
- const pthread_rwlockattr_t * _Nonnull, int * _Nonnull);
-int pthread_rwlockattr_init(pthread_rwlockattr_t * _Nonnull);
-int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t * _Nonnull,
+int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
+int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *,
+ int *);
+int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *,
+ int *);
+int pthread_rwlockattr_init(pthread_rwlockattr_t *);
+int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *,
int);
-int pthread_rwlockattr_setpshared(pthread_rwlockattr_t * _Nonnull,
- int);
+int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
pthread_t pthread_self(void);
int pthread_setspecific(pthread_key_t, const void *);
-int pthread_spin_init(pthread_spinlock_t * _Nonnull __spin, int)
+int pthread_spin_init(pthread_spinlock_t * __spin, int)
__requires_unlocked(*__spin);
-int pthread_spin_destroy(pthread_spinlock_t * _Nonnull __spin)
+int pthread_spin_destroy(pthread_spinlock_t * __spin)
__requires_unlocked(*__spin);
-int pthread_spin_lock(pthread_spinlock_t * _Nonnull __spin)
+int pthread_spin_lock(pthread_spinlock_t * __spin)
__locks_exclusive(*__spin);
-int pthread_spin_trylock(pthread_spinlock_t * _Nonnull __spin)
+int pthread_spin_trylock(pthread_spinlock_t * __spin)
__trylocks_exclusive(0, *__spin);
-int pthread_spin_unlock(pthread_spinlock_t * _Nonnull __spin)
+int pthread_spin_unlock(pthread_spinlock_t * __spin)
__unlocks(*__spin);
int pthread_cancel(pthread_t);
int pthread_setcancelstate(int, int *);
@@ -317,27 +304,23 @@ int pthread_mutexattr_getprotocol(pthread_mutexattr_t
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
int pthread_mutexattr_getrobust(
- pthread_mutexattr_t * _Nonnull __restrict,
- int * _Nonnull __restrict);
-int pthread_mutexattr_setrobust(pthread_mutexattr_t * _Nonnull,
- int);
+ pthread_mutexattr_t * __restrict, int * __restrict);
+int pthread_mutexattr_setrobust(pthread_mutexattr_t *, int);
int pthread_attr_getinheritsched(const pthread_attr_t *, int *);
-int pthread_attr_getschedparam(const pthread_attr_t * _Nonnull,
- struct sched_param * _Nonnull);
-int pthread_attr_getschedpolicy(const pthread_attr_t * _Nonnull,
- int * _Nonnull);
-int pthread_attr_getscope(const pthread_attr_t * _Nonnull,
- int * _Nonnull);
+int pthread_attr_getschedparam(const pthread_attr_t *,
+ struct sched_param *);
+int pthread_attr_getschedpolicy(const pthread_attr_t *, int *);
+int pthread_attr_getscope(const pthread_attr_t *, int *);
int pthread_attr_setinheritsched(pthread_attr_t *, int);
-int pthread_attr_setschedparam(pthread_attr_t * _Nonnull,
- const struct sched_param * _Nonnull);
-int pthread_attr_setschedpolicy(pthread_attr_t * _Nonnull, int);
-int pthread_attr_setscope(pthread_attr_t * _Nonnull, int);
-int pthread_getschedparam(pthread_t pthread, int * _Nonnull,
- struct sched_param * _Nonnull);
+int pthread_attr_setschedparam(pthread_attr_t *,
+ const struct sched_param *);
+int pthread_attr_setschedpolicy(pthread_attr_t *, int);
+int pthread_attr_setscope(pthread_attr_t *, int);
+int pthread_getschedparam(pthread_t pthread, int *,
+ struct sched_param *);
int pthread_setschedparam(pthread_t, int,
- const struct sched_param * _Nonnull);
+ const struct sched_param *);
#if __XSI_VISIBLE
int pthread_getconcurrency(void);
int pthread_setconcurrency(int);
@@ -347,6 +330,5 @@ void __pthread_cleanup_push_imp(void (*)(void *), voi
struct _pthread_cleanup_info *);
void __pthread_cleanup_pop_imp(int);
__END_DECLS
-__NULLABILITY_PRAGMA_POP
#endif /* !_PTHREAD_H_ */
Modified: user/markj/netdump/include/stdio.h
==============================================================================
--- user/markj/netdump/include/stdio.h Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/include/stdio.h Mon Apr 9 21:38:45 2018 (r332339)
@@ -51,6 +51,11 @@ typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
+#ifndef _RSIZE_T_DEFINED
+#define _RSIZE_T_DEFINED
+typedef size_t rsize_t;
+#endif
+
#if __POSIX_VISIBLE >= 200809
#ifndef _OFF_T_DECLARED
#define _OFF_T_DECLARED
@@ -265,6 +270,9 @@ size_t fwrite(const void * __restrict, size_t, size_t
int getc(FILE *);
int getchar(void);
char *gets(char *);
+#if __EXT1_VISIBLE
+char *gets_s(char *, rsize_t);
+#endif
void perror(const char *);
int printf(const char * __restrict, ...);
int putc(int, FILE *);
Modified: user/markj/netdump/lib/Makefile
==============================================================================
--- user/markj/netdump/lib/Makefile Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/Makefile Mon Apr 9 21:38:45 2018 (r332339)
@@ -175,6 +175,10 @@ SUBDIR.${MK_NIS}+= libypclnt
_libvgl= libvgl
.endif
+.if ${MACHINE_CPUARCH} == "aarch64"
+SUBDIR.${MK_PMC}+= libopencsd
+.endif
+
.if ${MACHINE_CPUARCH} == "amd64"
SUBDIR.${MK_PMC}+= libipt
SUBDIR.${MK_BHYVE}+= libvmmapi
Modified: user/markj/netdump/lib/libc/aarch64/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/aarch64/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/aarch64/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -5,8 +5,6 @@ MIASM:= ${MIASM:Nfreebsd[467]_*}
SRCS+= __vdso_gettc.c
MDASM= cerror.S \
- shmat.S \
- sigreturn.S \
syscall.S \
vfork.S
Modified: user/markj/netdump/lib/libc/amd64/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/amd64/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/amd64/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -9,7 +9,7 @@ SRCS+= \
amd64_set_gsbase.c
MDASM= vfork.S brk.S cerror.S exect.S getcontext.S \
- sbrk.S setlogin.S sigreturn.S
+ sbrk.S
# Don't generate default code for these syscalls:
NOASM+= vfork.o
Modified: user/markj/netdump/lib/libc/arm/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/arm/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/arm/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -2,7 +2,7 @@
SRCS+= __vdso_gettc.c
-MDASM= Ovfork.S brk.S cerror.S sbrk.S shmat.S sigreturn.S syscall.S
+MDASM= Ovfork.S brk.S cerror.S sbrk.S syscall.S
# Don't generate default code for these syscalls:
NOASM+= vfork.o
Modified: user/markj/netdump/lib/libc/gen/getlogin.c
==============================================================================
--- user/markj/netdump/lib/libc/gen/getlogin.c Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/gen/getlogin.c Mon Apr 9 21:38:45 2018 (r332339)
@@ -47,62 +47,33 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
-#define THREAD_LOCK() if (__isthreaded) _pthread_mutex_lock(&logname_mutex)
-#define THREAD_UNLOCK() if (__isthreaded) _pthread_mutex_unlock(&logname_mutex)
-
extern int _getlogin(char *, int);
-int _logname_valid __hidden; /* known to setlogin() */
-static pthread_mutex_t logname_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-static char *
-getlogin_basic(int *status)
-{
- static char logname[MAXLOGNAME];
-
- if (_logname_valid == 0) {
- if (_getlogin(logname, sizeof(logname)) < 0) {
- *status = errno;
- return (NULL);
- }
- _logname_valid = 1;
- }
- *status = 0;
- return (*logname ? logname : NULL);
-}
-
char *
getlogin(void)
{
- char *result;
- int status;
+ static char logname[MAXLOGNAME];
- THREAD_LOCK();
- result = getlogin_basic(&status);
- THREAD_UNLOCK();
- return (result);
+ if (_getlogin(logname, sizeof(logname)) < 0)
+ return (NULL);
+ return (logname[0] != '\0' ? logname : NULL);
}
int
getlogin_r(char *logname, int namelen)
{
- char *result;
+ char tmpname[MAXLOGNAME];
int len;
- int status;
if (namelen < 1)
return (ERANGE);
logname[0] = '\0';
- THREAD_LOCK();
- result = getlogin_basic(&status);
- if (status == 0 && result != NULL) {
- len = strlen(result) + 1;
- if (len > namelen)
- status = ERANGE;
- else
- strncpy(logname, result, len);
- }
- THREAD_UNLOCK();
- return (status);
+ if (_getlogin(tmpname, sizeof(tmpname)) < 0)
+ return (errno);
+ len = strlen(tmpname) + 1;
+ if (len > namelen)
+ return (ERANGE);
+ strlcpy(logname, tmpname, len);
+ return (0);
}
Modified: user/markj/netdump/lib/libc/gen/syslog.3
==============================================================================
--- user/markj/netdump/lib/libc/gen/syslog.3 Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/gen/syslog.3 Mon Apr 9 21:38:45 2018 (r332339)
@@ -28,7 +28,7 @@
.\" @(#)syslog.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd November 5, 2017
+.Dd April 6, 2018
.Dt SYSLOG 3
.Os
.Sh NAME
@@ -156,6 +156,9 @@ Write the message to standard error output as well to
.It Dv LOG_PID
Log the process id with each message: useful for identifying
instantiations of daemons.
+On
+.Fx ,
+this option is enabled by default.
.El
.Pp
The
Modified: user/markj/netdump/lib/libc/gen/syslog.c
==============================================================================
--- user/markj/netdump/lib/libc/gen/syslog.c Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/gen/syslog.c Mon Apr 9 21:38:45 2018 (r332339)
@@ -36,9 +36,10 @@ static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/
__FBSDID("$FreeBSD$");
#include "namespace.h"
-#include <sys/types.h>
+#include <sys/param.h>
#include <sys/socket.h>
#include <sys/syslog.h>
+#include <sys/time.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <netdb.h>
@@ -134,11 +135,13 @@ syslog(int pri, const char *fmt, ...)
static void
vsyslog1(int pri, const char *fmt, va_list ap)
{
- int cnt;
+ struct timeval now;
+ struct tm tm;
char ch, *p;
- time_t now;
- int fd, saved_errno;
- char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26], errstr[64];
+ long tz_offset;
+ int cnt, fd, saved_errno;
+ char hostname[MAXHOSTNAMELEN], *stdp, tbuf[2048], fmt_cpy[1024],
+ errstr[64], tz_sign;
FILE *fp, *fmt_fp;
struct bufcookie tbuf_cookie;
struct bufcookie fmt_cookie;
@@ -168,24 +171,46 @@ vsyslog1(int pri, const char *fmt, va_list ap)
if (fp == NULL)
return;
- /* Build the message. */
- (void)time(&now);
- (void)fprintf(fp, "<%d>", pri);
- (void)fprintf(fp, "%.15s ", ctime_r(&now, timbuf) + 4);
+ /* Build the message according to RFC 5424. Tag and version. */
+ (void)fprintf(fp, "<%d>1 ", pri);
+ /* Timestamp similar to RFC 3339. */
+ if (gettimeofday(&now, NULL) == 0 &&
+ localtime_r(&now.tv_sec, &tm) != NULL) {
+ if (tm.tm_gmtoff < 0) {
+ tz_sign = '-';
+ tz_offset = -tm.tm_gmtoff;
+ } else {
+ tz_sign = '+';
+ tz_offset = tm.tm_gmtoff;
+ }
+
+ (void)fprintf(fp,
+ "%04d-%02d-%02d" /* Date. */
+ "T%02d:%02d:%02d.%06ld" /* Time. */
+ "%c%02ld:%02ld ", /* Time zone offset. */
+ tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec, now.tv_usec,
+ tz_sign, tz_offset / 3600, (tz_offset % 3600) / 60);
+ } else
+ (void)fprintf(fp, "- ");
+ /* Hostname. */
+ (void)gethostname(hostname, sizeof(hostname));
+ (void)fprintf(fp, "%s ", hostname);
if (LogStat & LOG_PERROR) {
/* Transfer to string buffer */
(void)fflush(fp);
stdp = tbuf + (sizeof(tbuf) - tbuf_cookie.left);
}
+ /*
+ * Application name, process ID, message ID and structured data.
+ * Provide the process ID regardless of whether LOG_PID has been
+ * specified, as it provides valuable information. Many
+ * applications tend not to use this, even though they should.
+ */
if (LogTag == NULL)
LogTag = _getprogname();
- if (LogTag != NULL)
- (void)fprintf(fp, "%s", LogTag);
- if (LogStat & LOG_PID)
- (void)fprintf(fp, "[%d]", getpid());
- if (LogTag != NULL) {
- (void)fprintf(fp, ": ");
- }
+ (void)fprintf(fp, "%s %d - - ",
+ LogTag == NULL ? "-" : LogTag, getpid());
/* Check to see if we can skip expanding the %m */
if (strstr(fmt, "%m")) {
@@ -313,7 +338,7 @@ vsyslog1(int pri, const char *fmt, va_list ap)
struct iovec iov[2];
struct iovec *v = iov;
- p = strchr(tbuf, '>') + 1;
+ p = strchr(tbuf, '>') + 3;
v->iov_base = p;
v->iov_len = cnt - (p - tbuf);
++v;
Modified: user/markj/netdump/lib/libc/i386/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/i386/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/i386/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -8,7 +8,7 @@ SRCS+= i386_get_fsbase.c i386_get_gsbase.c i386_get_io
i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c
MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S \
- sbrk.S setlogin.S sigreturn.S syscall.S
+ sbrk.S syscall.S
NOASM+= vfork.o
Modified: user/markj/netdump/lib/libc/powerpc/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/powerpc/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/powerpc/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -1,3 +1,3 @@
# $FreeBSD$
-MDASM+= brk.S cerror.S exect.S sbrk.S setlogin.S
+MDASM+= brk.S cerror.S exect.S sbrk.S
Modified: user/markj/netdump/lib/libc/powerpc64/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/powerpc64/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/powerpc64/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -1,3 +1,3 @@
# $FreeBSD$
-MDASM+= brk.S cerror.S exect.S sbrk.S setlogin.S
+MDASM+= brk.S cerror.S exect.S sbrk.S
Modified: user/markj/netdump/lib/libc/riscv/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/riscv/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/riscv/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -2,10 +2,7 @@
SRCS+= trivial-vdso_tc.c
-#MDASM= ptrace.S
MDASM= cerror.S \
- shmat.S \
- sigreturn.S \
syscall.S \
vfork.S
Modified: user/markj/netdump/lib/libc/sparc64/sys/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/sparc64/sys/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/sparc64/sys/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -12,4 +12,4 @@ SRCS+= __sparc_sigtramp_setup.c \
CFLAGS+= -I${LIBC_SRCTOP}/sparc64/fpu
-MDASM+= brk.S cerror.S exect.S sbrk.S setlogin.S sigaction1.S
+MDASM+= brk.S cerror.S exect.S sbrk.S sigaction1.S
Modified: user/markj/netdump/lib/libc/stdio/Makefile.inc
==============================================================================
--- user/markj/netdump/lib/libc/stdio/Makefile.inc Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/stdio/Makefile.inc Mon Apr 9 21:38:45 2018 (r332339)
@@ -14,7 +14,7 @@ SRCS+= _flock_stub.c asprintf.c clrerr.c dprintf.c \
fputwc.c fputws.c fread.c freopen.c fscanf.c fseek.c fsetpos.c \
ftell.c funopen.c fvwrite.c fwalk.c fwide.c fwprintf.c fwscanf.c \
fwrite.c getc.c getchar.c getdelim.c getline.c \
- gets.c getw.c getwc.c getwchar.c makebuf.c mktemp.c \
+ gets.c gets_s.c getw.c getwc.c getwchar.c makebuf.c mktemp.c \
open_memstream.c open_wmemstream.c \
perror.c printf.c printf-pos.c putc.c putchar.c \
puts.c putw.c putwc.c putwchar.c \
@@ -50,6 +50,7 @@ MLINKS+=ferror.3 ferror_unlocked.3 \
ferror.3 fileno.3 ferror.3 fileno_unlocked.3
MLINKS+=fflush.3 fpurge.3
MLINKS+=fgets.3 gets.3
+MLINKS+=fgets.3 gets_s.3
MLINKS+=flockfile.3 ftrylockfile.3 flockfile.3 funlockfile.3
MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 fopen.3 fmemopen.3
MLINKS+=fputs.3 puts.3
Modified: user/markj/netdump/lib/libc/stdio/Symbol.map
==============================================================================
--- user/markj/netdump/lib/libc/stdio/Symbol.map Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/stdio/Symbol.map Mon Apr 9 21:38:45 2018 (r332339)
@@ -167,6 +167,10 @@ FBSD_1.4 {
fopencookie;
};
+FBSD_1.5 {
+ gets_s;
+};
+
FBSDprivate_1.0 {
_flockfile;
_flockfile_debug_stub;
Modified: user/markj/netdump/lib/libc/stdio/fgets.3
==============================================================================
--- user/markj/netdump/lib/libc/stdio/fgets.3 Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/stdio/fgets.3 Mon Apr 9 21:38:45 2018 (r332339)
@@ -32,12 +32,13 @@
.\" @(#)fgets.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd May 5, 2012
+.Dd April 3, 2018
.Dt FGETS 3
.Os
.Sh NAME
.Nm fgets ,
-.Nm gets
+.Nm gets ,
+.Nm gets_s
.Nd get a line from a stream
.Sh LIBRARY
.Lb libc
@@ -46,6 +47,8 @@
.Ft char *
.Fn fgets "char * restrict str" "int size" "FILE * restrict stream"
.Ft char *
+.Fn gets_s "char *str" "rsize_t size"
+.Ft char *
.Fn gets "char *str"
.Sh DESCRIPTION
The
@@ -65,6 +68,17 @@ If any characters are read and there is no error, a
character is appended to end the string.
.Pp
The
+.Fn gets_s
+function
+is equivalent to
+.Fn fgets
+with a
+.Fa stream
+of
+.Dv stdin ,
+except that the newline character (if any) is not stored in the string.
+.Pp
+The
.Fn gets
function
is equivalent to
@@ -80,7 +94,8 @@ It is the caller's responsibility to ensure that the i
if any, is sufficiently short to fit in the string.
.Sh RETURN VALUES
Upon successful completion,
-.Fn fgets
+.Fn fgets ,
+.Fn gets_s ,
and
.Fn gets
return
@@ -94,7 +109,8 @@ they return
.Dv NULL
and the buffer contents are indeterminate.
The
-.Fn fgets
+.Fn fgets ,
+.Fn gets_s ,
and
.Fn gets
functions
@@ -141,6 +157,13 @@ and
.Fn gets
conform to
.St -isoC-99 .
+.Fn gets_s
+conforms to
+.St -isoC-2011
+K.3.7.4.1.
+.Fn gets
+has been removed from
+.St -isoC-2011 .
.Sh SECURITY CONSIDERATIONS
The
.Fn gets
Copied: user/markj/netdump/lib/libc/stdio/gets_s.c (from r332338, head/lib/libc/stdio/gets_s.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/markj/netdump/lib/libc/stdio/gets_s.c Mon Apr 9 21:38:45 2018 (r332339, copy of r332338, head/lib/libc/stdio/gets_s.c)
@@ -0,0 +1,102 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ * Copyright (c) 2017, 2018
+ * Cyril S. E. Schubert. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * 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.
+ * 3. 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include "namespace.h"
+#include <errno.h>
+#include <unistd.h>
+#include <stdint.h>
+#include <stdio.h>
+#include "un-namespace.h"
+#include "libc_private.h"
+#include "local.h"
+
+static inline char *
+_gets_s(char *buf, rsize_t n)
+{
+ int c;
+ char *s;
+
+ ORIENT(stdin, -1);
+ for (s = buf, n--; (c = __sgetc(stdin)) != '\n' && n > 0 ; n--) {
+ if (c == EOF) {
+ if (s == buf) {
+ return (NULL);
+ } else
+ break;
+ } else
+ *s++ = c;
+ }
+
+ /*
+ * If end of buffer reached, discard until \n or eof.
+ * Then throw an error.
+ */
+ if (n == 0) {
+ /* discard */
+ while ((c = __sgetc(stdin)) != '\n' && c != EOF);
+ /* throw the error after lock released prior to exit */
+ __throw_constraint_handler_s("gets_s : end of buffer", E2BIG);
+ return (NULL);
+ }
+ *s = 0;
+ return (buf);
+}
+
+/* ISO/IEC 9899:2011 K.3.7.4.1 */
+char *
+gets_s(char *buf, rsize_t n)
+{
+ char *ret;
+ if (buf == NULL) {
+ __throw_constraint_handler_s("gets_s : str is NULL", EINVAL);
+ return(NULL);
+ } else if (n > RSIZE_MAX) {
+ __throw_constraint_handler_s("gets_s : n > RSIZE_MAX",
+ EINVAL);
+ return(NULL);
+ } else if (n == 0) {
+ __throw_constraint_handler_s("gets_s : n == 0", EINVAL);
+ return(NULL);
+ }
+
+ FLOCKFILE_CANCELSAFE(stdin);
+ ret = _gets_s(buf, n);
+ FUNLOCKFILE_CANCELSAFE();
+ return (ret);
+}
Modified: user/markj/netdump/lib/libc/tests/stdio/Makefile
==============================================================================
--- user/markj/netdump/lib/libc/tests/stdio/Makefile Mon Apr 9 21:37:39 2018 (r332338)
+++ user/markj/netdump/lib/libc/tests/stdio/Makefile Mon Apr 9 21:38:45 2018 (r332339)
@@ -7,6 +7,7 @@ ATF_TESTS_C+= fmemopen2_test
ATF_TESTS_C+= fopen2_test
ATF_TESTS_C+= freopen_test
ATF_TESTS_C+= getdelim_test
+ATF_TESTS_C+= gets_s_test
ATF_TESTS_C+= mkostemp_test
ATF_TESTS_C+= open_memstream2_test
ATF_TESTS_C+= open_wmemstream_test
Copied: user/markj/netdump/lib/libc/tests/stdio/gets_s_test.c (from r332338, head/lib/libc/tests/stdio/gets_s_test.c)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/markj/netdump/lib/libc/tests/stdio/gets_s_test.c Mon Apr 9 21:38:45 2018 (r332339, copy of r332338, head/lib/libc/tests/stdio/gets_s_test.c)
@@ -0,0 +1,145 @@
+/*-
+ * Copyright (c) 2017 Cyril S. E. Schubert. 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 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.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <assert.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/wait.h>
+
+#include <atf-c.h>
+
+static errno_t error_code;
+static const char * message;
+
+void
+h(const char * msg, void * ptr __unused, errno_t error)
+{
+ error_code = error;
+ message = msg;
+}
+
+/* null ptr */
+ATF_TC_WITHOUT_HEAD(null_ptr);
+ATF_TC_BODY(null_ptr, tc)
+{
+ ATF_CHECK_MSG(gets_s(NULL, 1) == NULL,
+ "gets_s() failed to handle NULL pointer");
+}
+
+/* normal */
+ATF_TC_WITHOUT_HEAD(normal);
+ATF_TC_BODY(normal, tc)
+{
+ pid_t kidpid;
+ int fd[2];
+ int nfd;
+
+ // close(STDIN_FILENO);
+ // close(STDOUT_FILENO);
+ pipe(fd);
+
+ if ((kidpid = fork()) == 0) {
+ char b[10];
+
+ close(fd[1]);
+ nfd = dup2(fd[0], 0);
+ close(fd[0]);
+ stdin = fdopen(nfd, "r");
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-user
mailing list