Module Name:    src
Committed By:   christos
Date:           Fri Feb  6 20:08:23 UTC 2015

Modified Files:
        src/usr.bin/kdump: mkioctls

Log Message:
Extend the scripts to handle the X drm ioctls.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.bin/kdump/mkioctls

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/kdump/mkioctls
diff -u src/usr.bin/kdump/mkioctls:1.41 src/usr.bin/kdump/mkioctls:1.42
--- src/usr.bin/kdump/mkioctls:1.41	Thu Apr  4 18:32:12 2013
+++ src/usr.bin/kdump/mkioctls	Fri Feb  6 15:08:23 2015
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$NetBSD: mkioctls,v 1.41 2013/04/04 22:32:12 dsl Exp $
+#	$NetBSD: mkioctls,v 1.42 2015/02/06 20:08:23 christos Exp $
 #
 # Copyright (c) 1994
 #	The Regents of the University of California.  All rights reserved.
@@ -48,6 +48,7 @@ echo "struct crap { int _xxx; };" # XXX 
 echo "typedef struct crap videomemory_t;" # XXX arm video lossage
 echo "typedef struct crap RF_AccTotals_t;" # XXX Raidframe lossage
 echo "struct rf_test_acc { int _xxx; };" # XXX Raidframe lossage
+echo "struct map_info { int _xxx[22]; };" # XXX Xorg lossage
 echo "#include <stdio.h>"
 echo "#include <sys/types.h>"
 echo "#include <sys/param.h>"
@@ -82,7 +83,12 @@ do
 	echo "#include <$i>"
 done | ${SED} -e "s,${DESTDIR}/usr/include/,,g"
 
-${CC} -E -nostdinc -isystem ${DESTDIR}/usr/include -dM ${1+"$@"} | \
+${CC} -E -nostdinc -isystem ${DESTDIR}/usr/include \
+    -I${DESTDIR}/usr/X11R7/include \
+    -I${DESTDIR}/usr/X11R7/include/pixman-1 \
+    -I${DESTDIR}/usr/X11R7/include/libdrm \
+    -D_VIA_DRM_H_ \
+    -dM ${1+"$@"} | \
 ${AWK} '
 BEGIN {
 	keep["SLIOCGUNIT"] = 1;	# Same as PPPIOCGASYNCMAP
@@ -170,7 +176,7 @@ BEGIN {
 	print "\tswitch (val) {\n"
 }
 
-/^#[ 	]*define[ 	]*[A-Z0-9_]*[ 	]*_IO[W]*[R]*[ 	]*\(/ {
+/^#[ 	]*define[ 	]*[A-Z0-9_]*[ 	]*[D]*[R]*[M]*_IO[W]*[R]*[ 	]*\(/ {
 	
 	# find where the name starts
 	for (i = 1; i <= NF; i++)

Reply via email to