Matching against struct_group()
Hi all,
say I would like to replace an instance of the struct_group macro in the Linux kernel:
struct_group(algs, char verify_alg[SHARED_SECRET_MAX]; char csums_alg[SHARED_SECRET_MAX]; );
I'm guessing this is not supported by coccinelle because of the "unusual" syntax? I tried specifying struct_group as a "declarer", but that did not work (which does not surprise me because it's not really a declarer anyway).
Is there any way I can still make this match?
Thanks.
Signature · 3 lines
Christoph Böhmwalder LINBIT | Keeping the Digital World Running DRBD HA — Disaster Recovery — Software defined Storage
Quoted 9 lines · Christoph Böhmwalder
Hi all,
say I would like to replace an instance of the
struct_groupmacro in the Linux kernel:struct_group(algs, char verify_alg[SHARED_SECRET_MAX]; char csums_alg[SHARED_SECRET_MAX]; );
The corresponding C code is not parsed. I will check whether this can be integrated without introducing parse conflicts.
julia
Quoted 15 lines
I'm guessing this is not supported by coccinelle because of the "unusual" syntax? I tried specifying
struct_groupas a "declarer", but that did not work (which does not surprise me because it's not really a declarer anyway).Is there any way I can still make this match?
Thanks.
--
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running DRBD HA — Disaster Recovery — Software defined Storage
Quoted 10 lines
say I would like to replace an instance of the
struct_groupmacro in the Linux kernel:struct_group(algs, char verify_alg[SHARED_SECRET_MAX]; char csums_alg[SHARED_SECRET_MAX]; );I'm guessing this is not supported by coccinelle because of the "unusual" syntax?
…
Quoted 1 line
Is there any way I can still make this match?
Probably, yes.
Corresponding solution approaches depend on the detail how many software development resources can be invested for the support of the desired source code transformation.
I imagine that it will be needed to achieve also support for the proper distinction of macro calls from function calls by the means of the semantic patch language. Would you like to influence evolution for affected software components any further?
Regards,
Markus
Quoted 10 lines · Christoph Böhmwalder
Hi all,
say I would like to replace an instance of the
struct_groupmacro in the Linux kernel:struct_group(algs, char verify_alg[SHARED_SECRET_MAX]; char csums_alg[SHARED_SECRET_MAX]; );
Quoted 6 lines
I'm guessing this is not supported by coccinelle because of the "unusual" syntax? I tried specifying
struct_groupas a "declarer", but that did not work (which does not surprise me because it's not really a declarer anyway).Is there any way I can still make this match?
What is it about this struct_group that makes you want to match it? That is, would your semantic patch involve something about the second argument, with the declarations?
julia