Hi,
I'm trying to fetch all declarations of a variable of a given
type and patch one of its field assignment.
In this particular case, I want to do this:
struct file_operations foo = {
.....
- .ioctl = blah,
+ .unlocked_ioctl = blah,
.....
};
I tried to do this with this cocci script:
@@
identifier I;
expression E;
@@
struct file_operations I = {
- .ioctl = E,
+ .unlocked_ioctl = E,
};
But it never matches.
I think it's because I have to handle the other fields
in the definition, like open, close, things I have materialized
with "...." in the above example. I'm not sure how to do this.
Thanks.
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)