Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2017 17:30:25 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r321687 - stable/11/lib/libsysdecode
Message-ID:  <201707291730.v6THUP1C068696@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Sat Jul 29 17:30:25 2017
New Revision: 321687
URL: https://svnweb.freebsd.org/changeset/base/321687

Log:
  MFC r321370
  
  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:
  stable/11/lib/libsysdecode/Makefile
  stable/11/lib/libsysdecode/mkioctls
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libsysdecode/Makefile
==============================================================================
--- stable/11/lib/libsysdecode/Makefile	Sat Jul 29 17:00:23 2017	(r321686)
+++ stable/11/lib/libsysdecode/Makefile	Sat Jul 29 17:30:25 2017	(r321687)
@@ -121,7 +121,7 @@ tables.h: mktables
 ioctl.c: .PHONY
 .endif
 ioctl.c: mkioctls .META
-	env MACHINE=${MACHINE} CPP="${CPP}" \
+	env MACHINE=${MACHINE} CPP="${CPP}" MK_PF="${MK_PF}" \
 		/bin/sh ${.CURDIR}/mkioctls ${DESTDIR}${INCLUDEDIR} > ${.TARGET}
 
 beforedepend: ioctl.c tables.h

Modified: stable/11/lib/libsysdecode/mkioctls
==============================================================================
--- stable/11/lib/libsysdecode/mkioctls	Sat Jul 29 17:00:23 2017	(r321686)
+++ stable/11/lib/libsysdecode/mkioctls	Sat Jul 29 17:30:25 2017	(r321687)
@@ -17,8 +17,14 @@ LC_ALL=C; export LC_ALL
 # XXX should we use an ANSI cpp?
 ioctl_includes=$(
 	cd $includedir
+
+	filter='(.*disk.*)\.h'
+	if [ "${MK_PF}" == "no" ]; then
+		filter="(${filter})|((net/pfvar|net/if_pfsync)\.h)"
+	fi
+
 	find -H -s * -name '*.h' | \
-	egrep -v '(.*disk.*|net/pfvar|net/if_pfsync)\.h' | \
+		egrep -v ${filter} | \
 		xargs egrep -l \
 '^#[ 	]*define[ 	]+[A-Za-z_][A-Za-z0-9_]*[ 	]+_IO[^a-z0-9_]' |
 		awk '{printf("#include <%s>\\n", $1)}'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707291730.v6THUP1C068696>