slist: mangle the line number of merged states
[smatch.git] / smatch_scripts / add_gfp_to_allocations.sh
blob4d713e35d70934d208ce82c3cd292636ae1b74f9
1 #!/bin/bash
3 if ! test -e kernel.allocation_funcs || ! test -e kernel.gfp_flags ; then
4 echo "We need the kernel.allocation_funcs and the kernel.gfp_flags files"
5 echo "The scripts to generate them are in smatch_data/"
6 exit 1
7 fi
9 echo "// Automatically generated by add_gfp_to_allocations.sh" > kernel.allocation_funcs_gfp
10 for i in $(grep -v "//" kernel.allocation_funcs) ; do
11 if ! grep -w $i kernel.gfp_flags ; then
12 echo $i X
14 done >> kernel.allocation_funcs_gfp
16 echo "Done. Created kernel.allocation_funcs_gfp"