projects
/
moctel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73d712f
)
fix get_ioctl_names.sh
master
author
Jann Horn
<jann@thejh.net>
Sun, 19 May 2013 18:29:01 +0000
(20:29 +0200)
committer
Jann Horn
<jann@thejh.net>
Sun, 19 May 2013 18:29:01 +0000
(20:29 +0200)
get_ioctl_names.sh
patch
|
blob
|
history
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"