[Cocci] minus: parse error:
Greg McGary
greg at mcgary.org
Fri Sep 24 17:10:47 CEST 2010
Any clues about this?
Consider this:
@ ioctl_ref @
identifier fops_id;
identifier ioctl_id;
@@
struct file_operations fops_id = {
...
(
.unlocked_ioctl
|
.compat_ioctl
)
= ioctl_id,
...
};
spatch barfs like so:
init_defs_builtins: /usr/share/coccinelle/standard.h
Fatal error: exception Failure("minus: parse error:
= File "/home/gnu/linux-2.6/ioctl-5.cocci", line 10, column 1, charpos = 112
around = '.', whole content = .unlocked_ioctl
")
OK, so it doesn't understand named-member struct initializers. Maybe I could drop the "." it doesn't like:
@ ioctl_ref @
identifier fops_id;
identifier ioctl_id;
@@
struct file_operations fops_id = {
...
(
unlocked_ioctl
|
compat_ioctl
)
ioctl_id,
...
};
no such luck:
init_defs_builtins: /usr/share/coccinelle/standard.h
Fatal error: exception Failure("minus: parse error:
= File "/home/gnu/linux-2.6/ioctl-5.cocci", line 14, column 1, charpos = 146
around = 'ioctl_id', whole content = ioctl_id,
")
More information about the Cocci
mailing list