summaryrefslogtreecommitdiffstats
path: root/devtools/find-type-definition
blob: 26e19f2e86eb6c311a838243b0ab4c431ca1d498 (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh

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'