From: Jann Horn Date: Sun, 19 May 2013 18:29:01 +0000 (+0200) Subject: fix get_ioctl_names.sh X-Git-Url: http://git.thejh.net/?a=commitdiff_plain;h=c5475c04c00783d8b55ce5d5b4a3dc55eb16dac6;p=moctel.git fix get_ioctl_names.sh --- diff --git a/get_ioctl_names.sh b/get_ioctl_names.sh index 7fe9fff..2b4c39a 100755 --- a/get_ioctl_names.sh +++ b/get_ioctl_names.sh @@ -27,7 +27,7 @@ if [ "$(echo "$symbol_file"|wc -l)" -gt 1 ]; then exit 1 fi cd "$kernel_src" -grep_res="$(grep -R -n "\(^\| \)$method_symbol *\($\|(\)" "$symbol_file")" +grep_res="$(grep -R -n "^\(\|\S.* \)$method_symbol *\($\|(\)" "$symbol_file")" if [ -z "$grep_res" ]; then echo "error: can't find method in source" exit 1 @@ -35,6 +35,7 @@ fi echo "$grep_res" if [ "$(echo "$grep_res"|wc -l)" -gt 1 ]; then echo "error: too many results" + exit 1 fi symbol_line="$(echo "$grep_res" | cut -d':' -f1)" echo "symbol is in $symbol_file, line $symbol_line"