4 project
=$
(echo "$2" | cut
-d = -f 2)
6 if [[ "$file" = "" ]] ; then
7 echo "Usage: $0 <file with smatch messages> -p=<project>"
11 if [[ "$project" != "kernel" ]] ; then
16 remove
=$
(echo ${bin_dir}/..
/smatch_data
/kernel.puts_argument.remove
)
17 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
19 echo "// list of functions and the argument they decrement the ref of." > kernel.puts_argument
20 echo '// generated by `gen_puts_list.sh`' >> kernel.puts_argument
21 grep -w puts_arg
$file | cut
-d ' ' -f 5- >> $tmp
22 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u >> kernel.puts_argument
24 echo "Done. List saved as 'kernel.puts_argument'"