[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    Re: [Cocci] Finding and replacing a struct inside another struct
From:       Julia Lawall <julia.lawall () lip6 ! fr>
Date:       2018-08-22 10:54:16
Message-ID: alpine.DEB.2.21.1808220653240.2365 () hadrien
[Download RAW message or body]



On Wed, 22 Aug 2018, Luca Coelho wrote:

> On Wed, 2018-08-22 at 12:38 +0300, Luca Coelho wrote:
> > On Wed, 2018-08-22 at 12:30 +0300, Luca Coelho wrote:
> > > Hi,
> > >
> > > I need some help again. :)
> > >
> > > I have a struct (cfg80211_crypto_settings) that contains a new
> > > element
> > > that I want to substitute for a function call
> > > (cfg_control_port_over_nl80211).  But this struct appears inside
> > > another struct.
> > >
> > > So I tried this:
> > >
> > > First I try to find a struct that contains the struct I want (with
> > > the
> > > @parent_child@ rule):
> > >
> > > @parent_child@
> > > identifier child;
> > > identifier parent_type;
> > > @@
> > > struct parent_type
> > > {
> > > ...
> > > struct cfg80211_crypto_settings child;
> > > ...
> > > }
>
> Unfortunately it seems that the parent struct doesn't really match with
> this.  I guess I'll have to hardcode the parent struct as well.

Is this a Coccinelle problem, or is the code just not organized as you
would like.  If it is a Coccinelle problem, please send the source code as
well.

thanks,
julia
--
To unsubscribe from this list: send the line "unsubscribe backports" in
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic