]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - scripts/coccicheck
ipv6: AF_INET6 link address family
[net-next-2.6.git] / scripts / coccicheck
index c7beb63de2e86dae06ff131f92a1cc95a9b8673b..1bb1a1bd2daa832b234edbec3765861d4f41010d 100755 (executable)
@@ -31,6 +31,8 @@ if [ "$MODE" = "" ] ; then
        echo 'You can specify the mode with "make coccicheck MODE=<mode>"'
     fi
     MODE="chain"
+elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
+    FLAGS="$FLAGS -no_show_diff"
 fi
 
 if [ "$ONLINE" = "0" ] ; then
@@ -45,7 +47,7 @@ coccinelle () {
 
     OPT=`grep "Option" $COCCI | cut -d':' -f2`
 
-#   The option '-parse_cocci' can be used to syntaxically check the SmPL files.
+#   The option '-parse_cocci' can be used to syntactically check the SmPL files.
 #
 #    $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null
 
@@ -60,7 +62,17 @@ coccinelle () {
 
        sed -ne 's|^///||p' $COCCI
 
-       echo ' The semantic patch that makes this change is available'
+       if [ "$MODE" = "patch" ] ; then
+           echo ' The semantic patch that makes this change is available'
+       elif [ "$MODE" = "report" ] ; then
+           echo ' The semantic patch that makes this report is available'
+       elif [ "$MODE" = "context" ] ; then
+           echo ' The semantic patch that spots this code is available'
+       elif [ "$MODE" = "org" ] ; then
+           echo ' The semantic patch that makes this Org report is available'
+       else
+           echo ' The semantic patch that makes this output is available'
+       fi
        echo " in $FILE."
        echo ''
        echo ' More information about semantic patching is available at'
@@ -75,10 +87,10 @@ coccinelle () {
     fi
 
     if [ "$MODE" = "chain" ] ; then
-       $SPATCH -D patch   $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
-       $SPATCH -D report  $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
-       $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
-       $SPATCH -D org     $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
+       $SPATCH -D patch   $FLAGS -sp_file $COCCI $OPT $OPTIONS               || \
+       $SPATCH -D report  $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \
+       $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS               || \
+       $SPATCH -D org     $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1
     else
        $SPATCH -D $MODE   $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
     fi