From c131f122778c62f920a99bbf854ced4a37ee8b03 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 3 Dec 2023 19:23:35 +0100 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- devtools/find-type-definition | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 devtools/find-type-definition (limited to 'devtools/find-type-definition') diff --git a/devtools/find-type-definition b/devtools/find-type-definition new file mode 100755 index 0000000..26e19f2 --- /dev/null +++ b/devtools/find-type-definition @@ -0,0 +1,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' -- cgit v1.2.3-70-g09d2