From owner-svn-src-projects@freebsd.org Tue Sep 3 14:06:20 2019 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EF2FDC77A for ; Tue, 3 Sep 2019 14:06:20 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N7zJ0JRVz4PRL; Tue, 3 Sep 2019 14:06:20 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id 111531A50E; Tue, 3 Sep 2019 14:06:06 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 537101B054; Sat, 6 Apr 2019 03:59:27 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D28D8C14F; Sat, 6 Apr 2019 03:59:26 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 0EABE1AFEB; Sat, 6 Apr 2019 03:59:26 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id DB15A1AFE9 for ; Sat, 6 Apr 2019 03:59:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B70F18C14A; Sat, 6 Apr 2019 03:59:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 788401F0CA; Sat, 6 Apr 2019 03:59:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x363xMe5062192; Sat, 6 Apr 2019 03:59:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x363xLdg062187; Sat, 6 Apr 2019 03:59:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201904060359.x363xLdg062187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r345978 - in projects/kyua-use-googletest-test-interface: . contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmpd contrib/elftoolchain/strings contrib... X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in projects/kyua-use-googletest-test-interface: . contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmpd contrib/elftoolchain/strings contrib/libxo contrib/libxo/doc ... X-SVN-Commit-Revision: 345978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 2D28D8C14F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Status: O X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:06:21 -0000 X-Original-Date: Sat, 6 Apr 2019 03:59:21 +0000 (UTC) X-List-Received-Date: Tue, 03 Sep 2019 14:06:21 -0000 Author: ngie Date: Sat Apr 6 03:59:21 2019 New Revision: 345978 URL: https://svnweb.freebsd.org/changeset/base/345978 Log: MFhead@r345977 Added: projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/trans_inet.c - copied unchanged from r345977, head/contrib/bsnmp/snmpd/trans_inet.c projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/trans_inet.h - copied unchanged from r345977, head/contrib/bsnmp/snmpd/trans_inet.h projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_explicit.h - copied unchanged from r345977, head/contrib/libxo/libxo/xo_explicit.h projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.H.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.H.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.H.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.H.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.HIPx.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.HIPx.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.HIPx.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.HIPx.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.HP.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.HP.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.HP.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.HP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.J.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.J.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.J.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.JP.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.JP.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.JP.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.JP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.T.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.T.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.T.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.T.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.X.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.X.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.X.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.X.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.XP.err - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.XP.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_02.XP.out - copied unchanged from r345977, head/contrib/libxo/tests/xo/saved/xo_02.XP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/xo_02.sh - copied unchanged from r345977, head/contrib/libxo/tests/xo/xo_02.sh projects/kyua-use-googletest-test-interface/lib/libsecureboot/pass_manifest.c - copied unchanged from r345977, head/lib/libsecureboot/pass_manifest.c projects/kyua-use-googletest-test-interface/sys/security/mac_veriexec_parser/ - copied from r345977, head/sys/security/mac_veriexec_parser/ projects/kyua-use-googletest-test-interface/tests/sys/geom/class/eli/online_resize_test.sh - copied unchanged from r345977, head/tests/sys/geom/class/eli/online_resize_test.sh projects/kyua-use-googletest-test-interface/tools/build/options/WITH_LOADER_VERIEXEC_PASS_MANFIEST - copied unchanged from r345977, head/tools/build/options/WITH_LOADER_VERIEXEC_PASS_MANFIEST Modified: projects/kyua-use-googletest-test-interface/UPDATING projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.1 projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.c projects/kyua-use-googletest-test-interface/contrib/bsnmp/lib/snmpclient.c projects/kyua-use-googletest-test-interface/contrib/bsnmp/lib/snmpclient.h projects/kyua-use-googletest-test-interface/contrib/bsnmp/lib/tc.def projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmp_mibII/mibII_interfaces.c projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/BEGEMOT-SNMPD.txt projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/main.c projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/snmpd.config projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/snmpd.h projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/snmpmod.h projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/trans_lsock.c projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/trans_udp.c projects/kyua-use-googletest-test-interface/contrib/bsnmp/snmpd/tree.def projects/kyua-use-googletest-test-interface/contrib/elftoolchain/strings/strings.c projects/kyua-use-googletest-test-interface/contrib/libxo/configure.ac projects/kyua-use-googletest-test-interface/contrib/libxo/doc/api.rst projects/kyua-use-googletest-test-interface/contrib/libxo/doc/libxo-manual.html projects/kyua-use-googletest-test-interface/contrib/libxo/doc/xo.rst projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/Makefile.am projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/libxo.c projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo.h projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_attr.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_buf.h projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_emit.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_emit_f.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_finish.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_flush.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_open_container.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_open_list.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_open_marker.3 projects/kyua-use-googletest-test-interface/contrib/libxo/libxo/xo_set_writer.3 projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_01.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_02.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_03.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_04.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_05.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_05.JP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_06.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_07.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_08.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_09.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_10.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_11.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.E.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.E.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.H.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.H.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.HIPx.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.HIPx.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.HP.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.HP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.J.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.JP.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.JP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.T.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.T.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.X.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.X.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.XP.err projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/saved/test_12.XP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/core/test_12.c projects/kyua-use-googletest-test-interface/contrib/libxo/tests/gettext/po/pig_latin/strerror.po projects/kyua-use-googletest-test-interface/contrib/libxo/tests/gettext/saved/gt_01.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/Makefile.am projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_01.H.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_01.HIPx.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_01.HP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_01.J.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_01.JP.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/saved/xo_01.T.out projects/kyua-use-googletest-test-interface/contrib/libxo/tests/xo/xo_01.sh projects/kyua-use-googletest-test-interface/contrib/libxo/xo/xo.1 projects/kyua-use-googletest-test-interface/contrib/libxo/xo/xo.c projects/kyua-use-googletest-test-interface/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp projects/kyua-use-googletest-test-interface/lib/atf/libatf-c++/tests/Makefile projects/kyua-use-googletest-test-interface/lib/atf/libatf-c/tests/Makefile projects/kyua-use-googletest-test-interface/lib/geom/eli/geli.8 projects/kyua-use-googletest-test-interface/lib/geom/eli/geom_eli.c projects/kyua-use-googletest-test-interface/lib/libbe/be.c projects/kyua-use-googletest-test-interface/lib/libbsnmp/libbsnmp/Makefile projects/kyua-use-googletest-test-interface/lib/libc/net/getnameinfo.c projects/kyua-use-googletest-test-interface/lib/libcam/Makefile projects/kyua-use-googletest-test-interface/lib/libdevctl/devctl.3 projects/kyua-use-googletest-test-interface/lib/libdevctl/devctl.c projects/kyua-use-googletest-test-interface/lib/libdevctl/devctl.h projects/kyua-use-googletest-test-interface/lib/libsecureboot/Makefile.libsa.inc projects/kyua-use-googletest-test-interface/lib/libsecureboot/h/verify_file.h projects/kyua-use-googletest-test-interface/lib/libsecureboot/libsecureboot-priv.h projects/kyua-use-googletest-test-interface/lib/libsecureboot/verify_file.c projects/kyua-use-googletest-test-interface/lib/libxo/xo_config.h projects/kyua-use-googletest-test-interface/libexec/rc/network.subr projects/kyua-use-googletest-test-interface/release/Makefile.vm projects/kyua-use-googletest-test-interface/release/tools/ec2.conf projects/kyua-use-googletest-test-interface/release/tools/vmimage.subr projects/kyua-use-googletest-test-interface/sbin/bectl/bectl.8 projects/kyua-use-googletest-test-interface/sbin/fsck_msdosfs/dir.c projects/kyua-use-googletest-test-interface/sbin/fsck_msdosfs/fat.c projects/kyua-use-googletest-test-interface/share/man/man4/asmc.4 projects/kyua-use-googletest-test-interface/share/man/man4/intro.4 projects/kyua-use-googletest-test-interface/share/mk/src.opts.mk projects/kyua-use-googletest-test-interface/stand/common/boot.c projects/kyua-use-googletest-test-interface/stand/common/module.c projects/kyua-use-googletest-test-interface/stand/loader.mk projects/kyua-use-googletest-test-interface/sys/amd64/conf/NOTES projects/kyua-use-googletest-test-interface/sys/amd64/vmm/io/ppt.c projects/kyua-use-googletest-test-interface/sys/arm/ti/cpsw/if_cpsw.c projects/kyua-use-googletest-test-interface/sys/cam/ata/ata_all.c projects/kyua-use-googletest-test-interface/sys/cam/cam.c projects/kyua-use-googletest-test-interface/sys/cam/cam_periph.c projects/kyua-use-googletest-test-interface/sys/cam/nvme/nvme_all.c projects/kyua-use-googletest-test-interface/sys/cam/nvme/nvme_all.h projects/kyua-use-googletest-test-interface/sys/cam/nvme/nvme_da.c projects/kyua-use-googletest-test-interface/sys/cam/nvme/nvme_xpt.c projects/kyua-use-googletest-test-interface/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c projects/kyua-use-googletest-test-interface/sys/compat/linuxkpi/common/include/linux/etherdevice.h projects/kyua-use-googletest-test-interface/sys/compat/linuxkpi/common/include/linux/random.h projects/kyua-use-googletest-test-interface/sys/conf/files projects/kyua-use-googletest-test-interface/sys/conf/newvers.sh projects/kyua-use-googletest-test-interface/sys/dev/cxgbe/common/t4_hw.c projects/kyua-use-googletest-test-interface/sys/dev/fdt/fdt_common.c projects/kyua-use-googletest-test-interface/sys/dev/iicbus/twsi/a10_twsi.c projects/kyua-use-googletest-test-interface/sys/dev/iicbus/twsi/twsi.c projects/kyua-use-googletest-test-interface/sys/dev/iicbus/twsi/twsi.h projects/kyua-use-googletest-test-interface/sys/dev/ioat/ioat.c projects/kyua-use-googletest-test-interface/sys/dev/ioat/ioat_internal.h projects/kyua-use-googletest-test-interface/sys/dev/ioat/ioat_test.c projects/kyua-use-googletest-test-interface/sys/dev/ioat/ioat_test.h projects/kyua-use-googletest-test-interface/sys/dev/ipmi/ipmi_opal.c projects/kyua-use-googletest-test-interface/sys/dev/pci/pci.c projects/kyua-use-googletest-test-interface/sys/dev/pci/pci_pci.c projects/kyua-use-googletest-test-interface/sys/dev/pci/pcivar.h projects/kyua-use-googletest-test-interface/sys/dev/smartpqi/smartpqi_cam.c projects/kyua-use-googletest-test-interface/sys/dev/smartpqi/smartpqi_defines.h projects/kyua-use-googletest-test-interface/sys/dev/tpm/tpm20.c projects/kyua-use-googletest-test-interface/sys/dev/usb/net/if_muge.c projects/kyua-use-googletest-test-interface/sys/fs/msdosfs/msdosfs_denode.c projects/kyua-use-googletest-test-interface/sys/fs/nfs/nfs_commonkrpc.c projects/kyua-use-googletest-test-interface/sys/fs/nfs/nfs_commonport.c projects/kyua-use-googletest-test-interface/sys/fs/nfs/nfs_commonsubs.c projects/kyua-use-googletest-test-interface/sys/fs/nfs/nfs_var.h projects/kyua-use-googletest-test-interface/sys/fs/nfsclient/nfs_clport.c projects/kyua-use-googletest-test-interface/sys/fs/tmpfs/tmpfs.h projects/kyua-use-googletest-test-interface/sys/fs/tmpfs/tmpfs_fifoops.c projects/kyua-use-googletest-test-interface/sys/fs/tmpfs/tmpfs_subr.c projects/kyua-use-googletest-test-interface/sys/fs/tmpfs/tmpfs_vfsops.c projects/kyua-use-googletest-test-interface/sys/fs/tmpfs/tmpfs_vnops.c projects/kyua-use-googletest-test-interface/sys/geom/eli/g_eli.c projects/kyua-use-googletest-test-interface/sys/geom/eli/g_eli.h projects/kyua-use-googletest-test-interface/sys/geom/eli/g_eli_ctl.c projects/kyua-use-googletest-test-interface/sys/geom/eli/g_eli_key_cache.c projects/kyua-use-googletest-test-interface/sys/i386/conf/NOTES projects/kyua-use-googletest-test-interface/sys/kern/bus_if.m projects/kyua-use-googletest-test-interface/sys/kern/subr_bus.c projects/kyua-use-googletest-test-interface/sys/kern/vfs_vnops.c projects/kyua-use-googletest-test-interface/sys/net/if_spppsubr.c projects/kyua-use-googletest-test-interface/sys/netinet/in.c projects/kyua-use-googletest-test-interface/sys/netinet/ip_input.c projects/kyua-use-googletest-test-interface/sys/netinet/ip_output.c projects/kyua-use-googletest-test-interface/sys/netinet/netdump/netdump_client.c projects/kyua-use-googletest-test-interface/sys/netinet/tcp_output.c projects/kyua-use-googletest-test-interface/sys/netipsec/key.c projects/kyua-use-googletest-test-interface/sys/netipsec/key.h projects/kyua-use-googletest-test-interface/sys/netipsec/xform_esp.c projects/kyua-use-googletest-test-interface/sys/netpfil/ipfw/nat64/nat64_translate.h projects/kyua-use-googletest-test-interface/sys/netpfil/pf/pf.c projects/kyua-use-googletest-test-interface/sys/powerpc/fpu/fpu_sqrt.c projects/kyua-use-googletest-test-interface/sys/powerpc/include/trap.h projects/kyua-use-googletest-test-interface/sys/powerpc/powernv/opal.h projects/kyua-use-googletest-test-interface/sys/powerpc/powernv/opal_async.c projects/kyua-use-googletest-test-interface/sys/powerpc/powernv/opal_dev.c projects/kyua-use-googletest-test-interface/sys/powerpc/powernv/opal_flash.c projects/kyua-use-googletest-test-interface/sys/powerpc/powerpc/exec_machdep.c projects/kyua-use-googletest-test-interface/sys/powerpc/powerpc/trap.c projects/kyua-use-googletest-test-interface/sys/riscv/riscv/plic.c projects/kyua-use-googletest-test-interface/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c projects/kyua-use-googletest-test-interface/sys/sparc64/conf/NOTES projects/kyua-use-googletest-test-interface/sys/sys/ata.h projects/kyua-use-googletest-test-interface/sys/sys/bus.h projects/kyua-use-googletest-test-interface/sys/vm/vm_map.c projects/kyua-use-googletest-test-interface/sys/x86/iommu/busdma_dmar.c projects/kyua-use-googletest-test-interface/tests/sys/geom/class/eli/Makefile projects/kyua-use-googletest-test-interface/tests/sys/geom/class/eli/configure_test.sh projects/kyua-use-googletest-test-interface/tools/build/Makefile projects/kyua-use-googletest-test-interface/tools/tools/ioat/ioatcontrol.8 projects/kyua-use-googletest-test-interface/tools/tools/ioat/ioatcontrol.c projects/kyua-use-googletest-test-interface/usr.bin/rctl/rctl.c projects/kyua-use-googletest-test-interface/usr.bin/sort/coll.c projects/kyua-use-googletest-test-interface/usr.bin/strings/Makefile projects/kyua-use-googletest-test-interface/usr.bin/systat/devs.c projects/kyua-use-googletest-test-interface/usr.bin/systat/devs.h projects/kyua-use-googletest-test-interface/usr.bin/systat/iostat.c projects/kyua-use-googletest-test-interface/usr.bin/systat/swap.c projects/kyua-use-googletest-test-interface/usr.bin/systat/systat.h projects/kyua-use-googletest-test-interface/usr.bin/systat/vmstat.c projects/kyua-use-googletest-test-interface/usr.bin/systat/zarc.c projects/kyua-use-googletest-test-interface/usr.bin/top/display.c projects/kyua-use-googletest-test-interface/usr.bin/xohtml/xohtml.sh projects/kyua-use-googletest-test-interface/usr.sbin/bhyve/pci_nvme.c projects/kyua-use-googletest-test-interface/usr.sbin/bsnmpd/bsnmpd/Makefile projects/kyua-use-googletest-test-interface/usr.sbin/bsnmpd/bsnmpd/snmpd.config projects/kyua-use-googletest-test-interface/usr.sbin/devctl/devctl.8 projects/kyua-use-googletest-test-interface/usr.sbin/devctl/devctl.c Directory Properties: projects/kyua-use-googletest-test-interface/ (props changed) projects/kyua-use-googletest-test-interface/contrib/elftoolchain/ (props changed) projects/kyua-use-googletest-test-interface/contrib/libxo/ (props changed) projects/kyua-use-googletest-test-interface/contrib/llvm/ (props changed) projects/kyua-use-googletest-test-interface/contrib/llvm/tools/clang/ (props changed) projects/kyua-use-googletest-test-interface/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/kyua-use-googletest-test-interface/UPDATING ============================================================================== --- projects/kyua-use-googletest-test-interface/UPDATING Sat Apr 6 03:55:17 2019 (r345977) +++ projects/kyua-use-googletest-test-interface/UPDATING Sat Apr 6 03:59:21 2019 (r345978) @@ -31,6 +31,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20190404: + r345895 reverts r320698. This implies that an nfsuserd(8) daemon + built from head sources between r320757 (July 6, 2017) and + r338192 (Aug. 22, 2018) will not work unless the "-use-udpsock" + is added to the command line. + nfsuserd daemons built from head sources that are post-r338192 are + not affected and should continue to work. + 20190320: The fuse(4) module has been renamed to fusefs(4) for consistency with other filesystems. You should update any kld_load="fuse" entries in Modified: projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.1 ============================================================================== --- projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.1 Sat Apr 6 03:55:17 2019 (r345977) +++ projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.1 Sat Apr 6 03:59:21 2019 (r345978) @@ -31,7 +31,7 @@ .\" .\" $Begemot: gensnmptree.1 383 2006-05-30 07:40:49Z brandt_h $ .\" -.Dd June 29, 2018 +.Dd April 2, 2019 .Dt GENSNMPTREE 1 .Os .Sh NAME @@ -100,25 +100,11 @@ is the length of the OID. is the last component of the OID. .El .It Fl F -Together with -.Fl E -causes -.Nm -instead of the generation of enum definitions the generation of -functions for checking a value to be one of the enumeration variants and -for conversion between strings and the enum. The file is sent to standard -output and is meant to be included into a C-file for compilation. +emit definitions for C-functions includeable in a C-file that do some basic +stuff on enums like value checking and conversion between value and strings. .It Fl f -This flag can be used together with -.Fl E -or when generating the tree files. It causes -.Nm -to emit static inline functions for checking a value to be one of the -enumeration values and for conversion between strings and the enum. -If used when generating the tree files, the preprocessor symbol -.Ar SNMPTREE_TYPES -must be defined when including the tree header file for these definitions -to become visible. +emit definitions for inline C-functions that do some basic +stuff on enums like value checking and conversion between value and strings. .It Fl h Print a short help page. .It Fl I Ar directory @@ -136,36 +122,6 @@ Instead of normal output print the resulting tree. Prefix the file names and the table name with .Ar prefix . .El -.Pp -The following functions are generated by -.Fl f -or -.Fl F : -.Pp -.Ft static inline int -.Fn isok_EnumName "enum EnumName" ; -.Pp -.Ft static inline const char * -.Fn tostr_EnumName "enum EnumName" ; -.Pp -.Ft static inline int -.Fn fromstr_EnumName "const char *" "enum EnumName *" ; -.Pp -The -.Fa EnumName -is replaced with the enumeration name. -.Fn isok_EnumName -returns 1 if the argument is one of the valid enum values and 0 otherwise. -.Fn tostr_EnumName -returns a string representation of the enumeration value. -If the values is not one of the legal values -.Ar EnumName??? -is returned. -.Fn fromstr_EnumName -returns 1 if the string represents one of the legal enumeration values and -0 otherwise. -If 1 is return the variable pointed to by the second argument is set to -the enumeration value. .Sh MIBS The syntax of the MIB description file can formally be specified as follows: .Bd -unfilled -offset indent Modified: projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.c ============================================================================== --- projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.c Sat Apr 6 03:55:17 2019 (r345977) +++ projects/kyua-use-googletest-test-interface/contrib/bsnmp/gensnmptree/gensnmptree.c Sat Apr 6 03:59:21 2019 (r345978) @@ -110,7 +110,6 @@ static int debug; static const char usgtxt[] = "\ Generate SNMP tables.\n\ -$Id$\n\ usage: gensnmptree [-dEeFfhlt] [-I directory] [-i infile] [-p prefix]\n\ [name]...\n\ options:\n\ @@ -127,6 +126,37 @@ options:\n\ -t generate a .def file\n\ "; +/** + * Program operation. + */ +enum op { + /** generate the tree */ + OP_GEN, + + /** extract OIDs */ + OP_EXTRACT, + + /** print the parsed tree */ + OP_TREE, + + /** extract enums */ + OP_ENUMS, +}; + +/** + * Which functions to create. + */ +enum gen_funcs { + /** none */ + GEN_FUNCS_NONE, + + /** functions for header files */ + GEN_FUNCS_H, + + /** functions for C files */ + GEN_FUNCS_C, +}; + /* * A node in the OID tree */ @@ -162,15 +192,18 @@ struct node { uint32_t index; /* index for table entry */ char *func; /* function for tables */ struct node_list subs; + char *subtypes[SNMP_INDEXES_MAX]; } entry; struct leaf { enum snmp_syntax syntax; /* syntax for this leaf */ char *func; /* function name */ + char *subtype; /* subtype */ } leaf; struct column { enum snmp_syntax syntax; /* syntax for this column */ + char *subtype; /* subtype */ } column; } u; }; @@ -214,7 +247,7 @@ xalloc(size_t size) { void *ptr; - if ((ptr = malloc(size)) == NULL) + if ((ptr = calloc(1, size)) == NULL) err(1, "allocing %zu bytes", size); return (ptr); @@ -710,12 +743,14 @@ make_type(const char *s) * token. */ static u_int -parse_type(enum tok *tok, struct type *t, const char *vname) +parse_type(enum tok *tok, struct type *t, const char *vname, char **subtype) { u_int syntax; struct enums *e; syntax = val; + if (subtype != NULL) + *subtype = NULL; if (*tok == TOK_ENUM || *tok == TOK_BITS) { if (t == NULL && vname != NULL) { @@ -759,6 +794,8 @@ parse_type(enum tok *tok, struct type *t, const char * if ((*tok = gettoken()) == '|') { if (gettoken() != TOK_STR) report("subtype expected after '|'"); + if (subtype != NULL) + *subtype = savetok(); *tok = gettoken(); } } @@ -794,18 +831,21 @@ parse(enum tok tok) if ((tok = gettoken()) == TOK_TYPE || tok == TOK_DEFTYPE || tok == TOK_ENUM || tok == TOK_BITS) { /* LEAF or COLUM */ - u_int syntax = parse_type(&tok, NULL, node->name); + char *subtype; + u_int syntax = parse_type(&tok, NULL, node->name, &subtype); if (tok == TOK_STR) { /* LEAF */ node->type = NODE_LEAF; node->u.leaf.func = savetok(); node->u.leaf.syntax = syntax; + node->u.leaf.subtype = subtype; tok = gettoken(); } else { /* COLUMN */ node->type = NODE_COLUMN; node->u.column.syntax = syntax; + node->u.column.subtype = subtype; } while (tok != ')') { @@ -825,9 +865,12 @@ parse(enum tok tok) tok = gettoken(); while (tok == TOK_TYPE || tok == TOK_DEFTYPE || tok == TOK_ENUM || tok == TOK_BITS) { - u_int syntax = parse_type(&tok, NULL, node->name); - if (index_count++ == SNMP_INDEXES_MAX) + char *subtype; + u_int syntax = parse_type(&tok, NULL, node->name, + &subtype); + if (index_count == SNMP_INDEXES_MAX) report("too many table indexes"); + node->u.entry.subtypes[index_count++] = subtype; node->u.entry.index |= syntax << (SNMP_INDEX_SHIFT * index_count); } @@ -882,7 +925,8 @@ parse_top(enum tok tok) tok = gettoken(); t->is_enum = (tok == TOK_ENUM); t->is_bits = (tok == TOK_BITS); - t->syntax = parse_type(&tok, t, NULL); + + t->syntax = parse_type(&tok, t, NULL, NULL); pushback(tok); return (NULL); @@ -903,7 +947,7 @@ parse_top(enum tok tok) * Generate the C-code table part for one node. */ static void -gen_node(FILE *fp, struct node *np, struct asn_oid *oid, u_int idx, +gen_node(FILE *fp, const struct node *np, struct asn_oid *oid, u_int idx, const char *func) { u_int n; @@ -1008,7 +1052,7 @@ gen_node(FILE *fp, struct node *np, struct asn_oid *oi * Generate the header file with the function declarations. */ static void -gen_header(FILE *fp, struct node *np, u_int oidlen, const char *func) +gen_header(FILE *fp, const struct node *np, u_int oidlen, const char *func) { char f[MAXSTR + 4]; struct node *sub; @@ -1058,7 +1102,7 @@ gen_header(FILE *fp, struct node *np, u_int oidlen, co * Generate the OID table. */ static void -gen_table(FILE *fp, struct node *node) +gen_table(FILE *fp, const struct node *node) { struct asn_oid oid; @@ -1067,7 +1111,6 @@ gen_table(FILE *fp, struct node *node) #ifdef HAVE_STDINT_H fprintf(fp, "#include \n"); #endif - fprintf(fp, "#include \n"); if (localincs) { fprintf(fp, "#include \"asn1.h\"\n"); fprintf(fp, "#include \"snmp.h\"\n"); @@ -1118,6 +1161,8 @@ gen_tree(const struct node *np, int level) case NODE_LEAF: print_syntax(np->u.leaf.syntax); + if (np->u.leaf.subtype != NULL) + printf(" | %s", np->u.leaf.subtype); printf(" %s%s%s)\n", np->u.leaf.func, (np->flags & FL_GET) ? " GET" : "", (np->flags & FL_SET) ? " SET" : ""); @@ -1137,8 +1182,11 @@ gen_tree(const struct node *np, int level) case NODE_ENTRY: printf(" :"); - for (i = 0; i < SNMP_INDEX_COUNT(np->u.entry.index); i++) + for (i = 0; i < SNMP_INDEX_COUNT(np->u.entry.index); i++) { print_syntax(SNMP_INDEX(np->u.entry.index, i)); + if (np->u.entry.subtypes[i] != NULL) + printf(" | %s", np->u.entry.subtypes[i]); + } printf(" %s\n", np->u.entry.func); TAILQ_FOREACH(sp, &np->u.entry.subs, link) gen_tree(sp, level + 1); @@ -1147,6 +1195,8 @@ gen_tree(const struct node *np, int level) case NODE_COLUMN: print_syntax(np->u.column.syntax); + if (np->u.column.subtype != NULL) + printf(" | %s", np->u.column.subtype); printf("%s%s)\n", (np->flags & FL_GET) ? " GET" : "", (np->flags & FL_SET) ? " SET" : ""); break; @@ -1194,15 +1244,6 @@ extract(FILE *fp, const struct node *np, struct asn_oi return (1); } -/** - * Extract the named OID. - * - * \param fp file to extract to - * \param root root of the tree - * \param object name of the object to extract - * - * \return 0 on success, -1 if the object was not found - */ static int gen_extract(FILE *fp, const struct node *root, char *object) { @@ -1391,45 +1432,6 @@ unminus(FILE *fp, const char *s) } /** - * Generate a definition for the enum packed into a guard against multiple - * definitions. - * - * \param fp file to write definition to - * \param t type - */ -static void -gen_enum(FILE *fp, const struct type *t) -{ - const struct enums *e; - long min = LONG_MAX; - - fprintf(fp, "\n"); - fprintf(fp, "#ifndef %s_defined__\n", t->name); - fprintf(fp, "#define %s_defined__\n", t->name); - fprintf(fp, "/*\n"); - fprintf(fp, " * From %s:%u\n", t->from_fname, t->from_lno); - fprintf(fp, " */\n"); - fprintf(fp, "enum %s {\n", t->name); - TAILQ_FOREACH(e, &t->enums, link) { - fprintf(fp, "\t%s_", t->name); - unminus(fp, e->name); - fprintf(fp, " = %ld,\n", e->value); - if (e->value < min) - min = e->value; - } - fprintf(fp, "};\n"); - fprintf(fp, "#define STROFF_%s %ld\n", t->name, min); - fprintf(fp, "#define STRING_%s \\\n", t->name); - TAILQ_FOREACH(e, &t->enums, link) { - fprintf(fp, "\t[%ld] = \"%s_", e->value - min, t->name); - unminus(fp, e->name); - fprintf(fp, "\",\\\n"); - } - fprintf(fp, "\n"); - fprintf(fp, "#endif /* %s_defined__ */\n", t->name); -} - -/** * Generate helper functions for an enum. * * We always generate a switch statement for the isok function. The compiler @@ -1494,6 +1496,54 @@ gen_enum_funcs(FILE *fp, const struct type *t, int cco } /** + * Generate a definition for the enum packed into a guard against multiple + * definitions. + * + * \param fp file to write definition to + * \param t type + * \param dof generate functions too + */ +static void +gen_enum(FILE *fp, const struct type *t, int dof) +{ + const struct enums *e; + long min = LONG_MAX; + + fprintf(fp, "\n"); + fprintf(fp, "#ifndef %s_defined__\n", t->name); + fprintf(fp, "#define %s_defined__\n", t->name); + fprintf(fp, "/*\n"); + fprintf(fp, " * From %s:%u\n", t->from_fname, t->from_lno); + fprintf(fp, " */\n"); + fprintf(fp, "enum %s {\n", t->name); + TAILQ_FOREACH(e, &t->enums, link) { + fprintf(fp, "\t%s_", t->name); + unminus(fp, e->name); + fprintf(fp, " = %ld,\n", e->value); + if (e->value < min) + min = e->value; + } + fprintf(fp, "};\n"); + fprintf(fp, "#define STROFF_%s %ld\n", t->name, min); + fprintf(fp, "#define STRING_%s \\\n", t->name); + TAILQ_FOREACH(e, &t->enums, link) { + fprintf(fp, "\t[%ld] = \"%s_", e->value - min, t->name); + unminus(fp, e->name); + fprintf(fp, "\",\\\n"); + } + fprintf(fp, "\n"); + if (dof) { + fprintf(fp, "#ifdef SNMPENUM_FUNCS\n"); + fprintf(fp, "\n"); + gen_enum_funcs(fp, t, 0); + fprintf(fp, "\n"); + fprintf(fp, "#endif\n"); + fprintf(fp, "\n"); + } + fprintf(fp, "#endif /* %s_defined__ */\n", t->name); +} + +/** * Generate helper functions for an enum. This generates code for a c file. * * \param fp file to write to @@ -1529,6 +1579,16 @@ gen_all_enum_funcs(FILE *fp, int ccode) gen_enum_funcs(fp, t, ccode); } +static void +gen_enums(FILE *fp, int dof) +{ + const struct type *t; + + LIST_FOREACH(t, &types, link) + if (t->is_enum || t->is_bits) + gen_enum(fp, t, dof); +} + /** * Extract a given enum to the specified file and optionally generate static * inline helper functions for them. @@ -1546,9 +1606,7 @@ extract_enum(FILE *fp, const char *name, int gen_funcs LIST_FOREACH(t, &types, link) if ((t->is_enum || t->is_bits) && strcmp(t->name, name) == 0) { - gen_enum(fp, t); - if (gen_funcs) - gen_enum_funcs(fp, t, 0); + gen_enum(fp, t, gen_funcs); return (0); } return (-1); @@ -1567,11 +1625,8 @@ extract_all_enums(FILE *fp, int gen_funcs) const struct type *t; LIST_FOREACH(t, &types, link) - if (t->is_enum || t->is_bits) { - gen_enum(fp, t); - if (gen_funcs) - gen_enum_funcs(fp, t, 0); - } + if (t->is_enum || t->is_bits) + gen_enum(fp, t, gen_funcs); } /** @@ -1579,13 +1634,12 @@ extract_all_enums(FILE *fp, int gen_funcs) * * \param argc number of arguments * \param argv arguments (enum names) - * \param gen_funcs_h generate functions into the header file - * \param gen_funcs_c generate a .c file with functions + * \param gen_funcs which functions to generate */ static void -make_enums(int argc, char *argv[], int gen_funcs_h, int gen_funcs_c) +make_enums(int argc, char *argv[], enum gen_funcs gen_funcs) { - if (gen_funcs_c) { + if (gen_funcs == GEN_FUNCS_C) { if (argc == 0) gen_all_enum_funcs(stdout, 1); else { @@ -1595,30 +1649,58 @@ make_enums(int argc, char *argv[], int gen_funcs_h, in } } else { if (argc == 0) - extract_all_enums(stdout, gen_funcs_h); + extract_all_enums(stdout, gen_funcs == GEN_FUNCS_H); else { for (int i = 0; i < argc; i++) - if (extract_enum(stdout, argv[i], gen_funcs_h)) + if (extract_enum(stdout, argv[i], + gen_funcs == GEN_FUNCS_H)) errx(1, "enum not found: %s", argv[i]); } } } +/** + * Produce the operation tables for the daemon or a module. + * + * \param root tree root + * \param gen_funcs generate enum funcs + */ +static void +make_table(const struct node *root, int gen_funcs) +{ + FILE *fp; + + char fname[MAXPATHLEN + 1]; + sprintf(fname, "%stree.h", file_prefix); + if ((fp = fopen(fname, "w")) == NULL) + err(1, "%s: ", fname); + gen_header(fp, root, PREFIX_LEN, NULL); + + fprintf(fp, "\n#ifdef SNMPTREE_TYPES\n"); + gen_enums(fp, gen_funcs); + fprintf(fp, "\n#endif /* SNMPTREE_TYPES */\n\n"); + + fprintf(fp, "#define %sCTREE_SIZE %u\n", file_prefix, tree_size); + fprintf(fp, "extern const struct snmp_node %sctree[];\n", file_prefix); + + fclose(fp); + + sprintf(fname, "%stree.c", file_prefix); + if ((fp = fopen(fname, "w")) == NULL) + err(1, "%s: ", fname); + gen_table(fp, root); + fclose(fp); +} + int main(int argc, char *argv[]) { - int do_extract = 0; - int do_tree = 0; - int do_enums = 0; - int gen_funcs_h = 0; - int gen_funcs_c = 0; - int opt; - struct node *root; - char fname[MAXPATHLEN + 1]; - int tok; - FILE *fp; + enum op op = OP_GEN; + enum gen_funcs gen_funcs = GEN_FUNCS_NONE; + char *infile = NULL; + int opt; while ((opt = getopt(argc, argv, "dEeFfhI:i:lp:t")) != EOF) switch (opt) { @@ -1627,19 +1709,29 @@ main(int argc, char *argv[]) break; case 'E': - do_enums = 1; + if (op != OP_GEN && op != OP_ENUMS) + errx(1, "-E conflicts with earlier options"); + op = OP_ENUMS; break; case 'e': - do_extract = 1; + if (op != OP_GEN && op != OP_EXTRACT) + errx(1, "-e conflicts with earlier options"); + op = OP_EXTRACT; break; case 'F': - gen_funcs_c = 1; + if (gen_funcs != GEN_FUNCS_NONE && + gen_funcs != GEN_FUNCS_C) + errx(1, "-F conflicts with -f"); + gen_funcs = GEN_FUNCS_C; break; case 'f': - gen_funcs_h = 1; + if (gen_funcs != GEN_FUNCS_NONE && + gen_funcs != GEN_FUNCS_H) + errx(1, "-f conflicts with -F"); + gen_funcs = GEN_FUNCS_H; break; case 'h': @@ -1666,75 +1758,61 @@ main(int argc, char *argv[]) break; case 't': - do_tree = 1; + if (op != OP_GEN && op != OP_TREE) + errx(1, "-t conflicts with earlier options"); + op = OP_TREE; break; } - if (do_extract + do_tree + do_enums > 1) - errx(1, "conflicting options -e/-t/-E"); - if (!do_extract && !do_enums && argc != optind) - errx(1, "no arguments allowed"); - if (do_extract && argc == optind) - errx(1, "no objects specified"); + argc -= optind; + argv += optind; - if ((gen_funcs_h || gen_funcs_c) && (do_extract || do_tree)) - errx(1, "-f and -F not allowed with -e or -t"); - if (gen_funcs_c && !do_enums) - errx(1, "-F requires -E"); - if (gen_funcs_h && gen_funcs_c) - errx(1, "-f and -F are mutually exclusive"); - + /* open input */ if (infile == NULL) { input_new(stdin, NULL, ""); } else { + FILE *fp; if ((fp = fopen(infile, "r")) == NULL) err(1, "%s", infile); input_new(fp, NULL, infile); } - root = parse_top(gettoken()); + /* parse and check input */ + struct node *root = parse_top(gettoken()); + + int tok; while ((tok = gettoken()) != TOK_EOF) merge(&root, parse_top(tok)); if (root) check_tree(root); - if (do_extract) { - while (optind < argc) { - if (gen_extract(stdout, root, argv[optind])) - errx(1, "object not found: %s", argv[optind]); - optind++; - } + /* do what the user has requested */ + switch (op) { + + case OP_EXTRACT: + if (argc == 0) + errx(1, "-e requires arguments"); + + for (int i = 0; i < argc; i++) + if (gen_extract(stdout, root, argv[i])) + errx(1, "object not found: %s", argv[i]); return (0); - } - if (do_enums) { - make_enums(argc - optind, argv + optind, - gen_funcs_h, gen_funcs_c); + + case OP_ENUMS: + make_enums(argc, argv, gen_funcs); return (0); - } - if (do_tree) { + + case OP_TREE: + if (argc != 0) + errx(1, "-t allows no arguments"); gen_tree(root, 0); return (0); - } - sprintf(fname, "%stree.h", file_prefix); - if ((fp = fopen(fname, "w")) == NULL) - err(1, "%s: ", fname); - gen_header(fp, root, PREFIX_LEN, NULL); - fprintf(fp, "\n#ifdef SNMPTREE_TYPES\n"); - extract_all_enums(fp, gen_funcs_h); - fprintf(fp, "\n#endif /* SNMPTREE_TYPES */\n\n"); - - fprintf(fp, "#define %sCTREE_SIZE %u\n", file_prefix, tree_size); - fprintf(fp, "extern const struct snmp_node %sctree[];\n", file_prefix); - - fclose(fp); - - sprintf(fname, "%stree.c", file_prefix); - if ((fp = fopen(fname, "w")) == NULL) - err(1, "%s: ", fname); - gen_table(fp, root); - fclose(fp); - - return (0); + case OP_GEN: + if (argc != 0) + errx(1, "tree generation allows no arguments"); + make_table(root, gen_funcs == GEN_FUNCS_H); + return (0); + } } Modified: projects/kyua-use-googletest-test-interface/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- projects/kyua-use-googletest-test-interface/contrib/bsnmp/lib/snmpclient.c Sat Apr 6 03:55:17 2019 (r345977) +++ projects/kyua-use-googletest-test-interface/contrib/bsnmp/lib/snmpclient.c Sat Apr 6 03:59:21 2019 (r345978) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2005 + * Copyright (c) 2004-2005,2018 * Hartmut Brandt. * All rights reserved. * Copyright (c) 2001-2003 @@ -34,11 +34,13 @@ * * Support functions for SNMP clients. */ -#include +#include #include #include #include #include +#include +#include #include #include #include @@ -58,12 +60,16 @@ #include #endif +#include + #include "support.h" #include "asn1.h" #include "snmp.h" #include "snmpclient.h" #include "snmppriv.h" +#define DEBUG_PARSE 0 + /* global context */ struct snmp_client snmp_client; @@ -924,7 +930,8 @@ open_client_udp(const char *host, const char *port) /* open connection */ memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_INET; + hints.ai_family = snmp_client.trans == SNMP_TRANS_UDP ? AF_INET: + AF_INET6; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = 0; error = getaddrinfo(snmp_client.chost, snmp_client.cport, &hints, &res0); @@ -1068,6 +1075,7 @@ snmp_open(const char *host, const char *port, const ch switch (snmp_client.trans) { case SNMP_TRANS_UDP: + case SNMP_TRANS_UDP6: if (open_client_udp(host, port) != 0) return (-1); break; @@ -1866,99 +1874,412 @@ snmp_client_set_port(struct snmp_client *cl, const cha return (0); } -/* - * parse a server specification +static const char *const trans_list[] = { + [SNMP_TRANS_UDP] = "udp::", + [SNMP_TRANS_LOC_DGRAM] = "dgram::", + [SNMP_TRANS_LOC_STREAM] = "stream::", + [SNMP_TRANS_UDP6] = "udp6::", +}; + +/** + * Try to get a transport identifier which is a leading alphanumeric string + * terminated by a double colon. The string may not be empty. The transport + * identifier is optional. * - * [trans::][community@][server][:port] + * \param sc client struct to set errors + * \param strp possible start of transport; updated to point to + * the next character to parse + * + * \return transport identifier */ -int -snmp_parse_server(struct snmp_client *sc, const char *str) +static inline int +get_transp(struct snmp_client *sc, const char **strp) { - const char *p, *s = str; + const char *p; + size_t i; - /* look for a double colon */ - for (p = s; *p != '\0'; p++) { - if (*p == '\\' && p[1] != '\0') { - p++; + for (i = 0; i < nitems(trans_list); i++) { + if (trans_list[i] == NULL || *trans_list[i] == '\0') continue; + p = strstr(*strp, trans_list[i]); + if (p == *strp) { + *strp += strlen(trans_list[i]); + return ((int)i); } - if (*p == ':' && p[1] == ':') - break; } - if (*p != '\0') { - if (p > s) { - if (p - s == 3 && strncmp(s, "udp", 3) == 0) - sc->trans = SNMP_TRANS_UDP; - else if (p - s == 6 && strncmp(s, "stream", 6) == 0) - sc->trans = SNMP_TRANS_LOC_STREAM; - else if (p - s == 5 && strncmp(s, "dgram", 5) == 0) - sc->trans = SNMP_TRANS_LOC_DGRAM; - else { - seterr(sc, "unknown SNMP transport '%.*s'", - (int)(p - s), s); - return (-1); - } - } - s = p + 2; + + p = *strp; + if (p[0] == ':' && p[1] == ':') { + seterr(sc, "empty transport specifier"); + return (-1); } + /* by default assume UDP */ + return (SNMP_TRANS_UDP); +} - /* look for a @ */ - for (p = s; *p != '\0'; p++) { - if (*p == '\\' && p[1] != '\0') { - p++; - continue; - } - if (*p == '@') - break; +/** + * Try to get community string. Eat everything up to the last @ (if there is + * any) but only if it is not longer than SNMP_COMMUNITY_MAXLEN. Empty + * community strings are legal. + * + * \param sc client struct to set errors + * \param strp possible start of community; updated to the point to + * the next character to parse + * + * \return end of community; equals *strp if there is none; NULL if there + * was an error + */ +static inline const char * +get_comm(struct snmp_client *sc, const char **strp) +{ + const char *p = strrchr(*strp, '@'); + + if (p == NULL) + /* no community string */ + return (*strp); + + if (p - *strp > SNMP_COMMUNITY_MAXLEN) { + seterr(sc, "community string too long '%.*s'", + p - *strp, *strp); + return (NULL); } - if (*p != '\0') { - if (p - s > SNMP_COMMUNITY_MAXLEN) { - seterr(sc, "community string too long"); - return (-1); + *strp = p + 1; + return (p); +} + +/** + * Try to get an IPv6 address. This starts with an [ and should end with an ] + * and everything between should be not longer than INET6_ADDRSTRLEN and + * parseable by inet_pton(). + * + * \param sc client struct to set errors + * \param strp possible start of IPv6 address (the '['); updated to point to + * the next character to parse (the one after the closing ']') + * + * \return end of address (equals *strp + 1 if there is none) or NULL + * on errors + */ +static inline const char * +get_ipv6(struct snmp_client *sc, const char **strp) +{ + char str[INET6_ADDRSTRLEN + IF_NAMESIZE]; + struct addrinfo hints, *res; + int error; + + if (**strp != '[') + return (*strp + 1); + + const char *p = *strp + 1; + while (*p != ']' ) { + if (*p == '\0') { + seterr(sc, "unterminated IPv6 address '%.*s'", + p - *strp, *strp); + return (NULL); } - strncpy(sc->read_community, s, p - s); - sc->read_community[p - s] = '\0'; - strncpy(sc->write_community, s, p - s); - sc->write_community[p - s] = '\0'; - s = p + 1; + p++; } - /* look for a colon */ - for (p = s; *p != '\0'; p++) { - if (*p == '\\' && p[1] != '\0') { - p++; - continue; - } - if (*p == ':') - break; + if (p - *strp > INET6_ADDRSTRLEN + IF_NAMESIZE) { + seterr(sc, "IPv6 address too long '%.*s'", p - *strp, *strp); + return (NULL); } - if (*p == ':') { - if (p > s) { - /* host:port */ - free(sc->chost); - if ((sc->chost = malloc(p - s + 1)) == NULL) { - seterr(sc, "%s", strerror(errno)); - return (-1); - } - strncpy(sc->chost, s, p - s); - sc->chost[p - s] = '\0'; - } - /* port */ - free(sc->cport); - if ((sc->cport = strdup(p + 1)) == NULL) { - seterr(sc, "%s", strerror(errno)); - return (-1); - } + strncpy(str, *strp + 1, p - (*strp + 1)); + str[p - (*strp + 1)] = '\0'; - } else if (p > s) { - /* host */ - free(sc->chost); - if ((sc->chost = strdup(s)) == NULL) { - seterr(sc, "%s", strerror(errno)); + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_CANONNAME | AI_NUMERICHOST; + hints.ai_family = AF_INET6; + hints.ai_socktype = SOCK_DGRAM; + hints.ai_protocol = IPPROTO_UDP; + error = getaddrinfo(str, NULL, &hints, &res); + if (error != 0) { + seterr(sc, "%s: %s", str, gai_strerror(error)); + return (NULL); + } + freeaddrinfo(res); + *strp = p + 1; + return (p); +} + +/** + * Try to get an IPv4 address. This starts with a digit and consists of digits + * and dots, is not longer INET_ADDRSTRLEN and must be parseable by + * inet_aton(). + * + * \param sc client struct to set errors + * \param strp possible start of IPv4 address; updated to point to the + * next character to parse + * + * \return end of address (equals *strp if there is none) or NULL + * on errors + */ +static inline const char * +get_ipv4(struct snmp_client *sc, const char **strp) +{ + const char *p = *strp; + + while (isascii(*p) && (isdigit(*p) || *p == '.')) + p++; + + if (p - *strp > INET_ADDRSTRLEN) { + seterr(sc, "IPv4 address too long '%.*s'", p - *strp, *strp); + return (NULL); + } + if (*strp == p) + return *strp; + + char str[INET_ADDRSTRLEN + 1]; + strncpy(str, *strp, p - *strp); + str[p - *strp] = '\0'; + + struct in_addr addr; + if (inet_aton(str, &addr) != 1) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***