summaryrefslogblamecommitdiffstats
path: root/devtools/find-type-definition
blob: 9523e7cc76257f8dfa8cfe95844fbd456e4f26d8 (plain) (tree)
1
2
3
4
5
6
7
8
9
         
                                                     






                                                                                                  
#!/bin/sh
# See LICENSE file for copyright and license details.

type="$1"
shift 1

grep -r '\(define\s\+\(__kernel_\)\?'"$type"'\s\|typedef\s.*\s\(__kernel_\)\?'"$type"'\b\)' "$@" \
| sed 's/^\([^:]*\):/\x1b[35m\1\x1b[m /' \
| sed 's/\(__kernel_\)\?'"$type"'/\x1b[1;31m&\x1b[m/g'