Преглед на файлове

mycocci.sh: make sure the coccinelle scripts are only used if they explicitely use the given mode.

Cyril Roelandt преди 13 години
родител
ревизия
bb287e96ee
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      tools/dev/mycocci.sh

+ 3 - 0
tools/dev/mycocci.sh

@@ -51,6 +51,9 @@ run_script()
 	script=$1
 	mode=$2
 
+	# Make sure the script explicitely defines this virtual rule.
+	grep "^virtual ${mode}" $script > /dev/null || return;
+
 	output_file=`basename ${script}`
 	output_file=${results}/${mode}/${output_file%cocci}${mode}
 	error_file=${output_file%${mode}}err