I have a use for coccinelle that I have not seen described. I need to "filter" out a set of functions from a linux driver, so as to create a standalone driver to be run from user mode. I'd like to be able to point spatch at a driver directory and, to start, create output that consists of only a single C function (as a test) and then, over time, I want to extract more and more functions from the driver and apply transformations to them to create the standalone code.
Here's an example, from drivers/gpu/drm/i915/intel_bios.c: I'd like to run a coccinelle spatch that would 'extract' the function intel_setup_bios and apply a transformation to the dev_priv assignment to have it set up from a function. I don't want anything else out of that file (to start) and the includes need to be deleted as well. Any hints welcome :-) ron _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
