From owner-svn-src-head@freebsd.org Sat Jul 22 12:51:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34158D7FEAF; Sat, 22 Jul 2017 12:51:21 +0000 (UTC) (envelope-from kp@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 mx1.freebsd.org (Postfix) with ESMTPS id F14CB7D1E7; Sat, 22 Jul 2017 12:51:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6MCpKfr014226; Sat, 22 Jul 2017 12:51:20 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6MCpKn4014224; Sat, 22 Jul 2017 12:51:20 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201707221251.v6MCpKn4014224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 22 Jul 2017 12:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321370 - head/lib/libsysdecode X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/lib/libsysdecode X-SVN-Commit-Revision: 321370 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jul 2017 12:51:21 -0000 Author: kp Date: Sat Jul 22 12:51:19 2017 New Revision: 321370 URL: https://svnweb.freebsd.org/changeset/base/321370 Log: Handle WITH/WITHOUT_PF in libsysdecode Only filter out the PF ioctls if we're building without pf support. Until now those were always filtered out, so truss did not show symbolic names for pf ioctls. Differential Revision: https://reviews.freebsd.org/D11629 Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/mkioctls Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Sat Jul 22 11:08:25 2017 (r321369) +++ head/lib/libsysdecode/Makefile Sat Jul 22 12:51:19 2017 (r321370) @@ -122,7 +122,7 @@ tables.h: mktables ioctl.c: .PHONY .endif ioctl.c: mkioctls .META - env CPP="${CPP}" \ + env CPP="${CPP}" MK_PF="${MK_PF}" \ /bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET} beforedepend: ioctl.c tables.h Modified: head/lib/libsysdecode/mkioctls ============================================================================== --- head/lib/libsysdecode/mkioctls Sat Jul 22 11:08:25 2017 (r321369) +++ head/lib/libsysdecode/mkioctls Sat Jul 22 12:51:19 2017 (r321370) @@ -17,8 +17,14 @@ LC_ALL=C; export LC_ALL # XXX should we use an ANSI cpp? ioctl_includes=$( cd $includedir + + filter='tee' + if [ "${MK_PF}" == "no" ]; then + filter='egrep -v (net/pfvar|net/if_pfsync)\.h' + fi + find -H -s * -name '*.h' | \ - egrep -v '(net/pfvar|net/if_pfsync)\.h' | \ + $filter | \ xargs egrep -l \ '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | awk '{printf("#include <%s>\\n", $1)}'