projects
/
moctel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix get_ioctl_names.sh
[moctel.git]
/
get_ioctl_names.sh
diff --git
a/get_ioctl_names.sh
b/get_ioctl_names.sh
index
7fe9fff
..
2b4c39a
100755
(executable)
--- 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"
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
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"
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"
fi
symbol_line="$(echo "$grep_res" | cut -d':' -f1)"
echo "symbol is in $symbol_file, line $symbol_line"