>> @r depends on !patch@ >> // It doesn't work. Is it normal? >> //position p: script:python() { matches.extend(p); relevant(p) }; > > "Doesn't work" means you get a parse error? The parser of the code inside > the {} is pretty fragile. Perhaps this could be improved somewhat, but it > is limited by the fact that Coccinelle doesn't know how to parse python > properly.
It prints "hd" and exits. > This seems entirely reasonable. You can collect the places that are > matched in a variable declared in the initialize, and then look at that > variable in the finalize. I need a list of all files spatch tries to process. A list of files in which spatch finds some matches is not enough. Otherwise the approach will incorrectly work when cocci script runs on a subset of kernel files, e.g., make coccicheck M=drivers/net Thanks, Denis _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci