|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] libxl: replace libxl__sprintf(gc, ...) with GCSPRINTF
On Tue, Nov 17, 2015 at 03:32:18PM +0000, Ian Campbell wrote:
> On Tue, 2015-11-17 at 15:24 +0000, Wei Liu wrote:
> > On Tue, Nov 17, 2015 at 03:21:39PM +0000, Ian Campbell wrote:
> > > On Tue, 2015-11-17 at 15:16 +0000, Wei Liu wrote:
> > > > On Tue, Nov 17, 2015 at 03:08:47PM +0000, Wei Liu wrote:
> > > > > The rune is
> > > > >
> > > > > sed -i 's/libxl__sprintf(gc,\s*\(".*",.*\)/GCSPRINTF(\1/g'
> > > > > libxl*.c
> > > > >
> > > >
> > > > Hmm... It looks like this rune alone doesn't cover all situations.
> > > >
> > > > $ ack-grep 'libxl__sprintf\(gc' | wc -l
> > > > 43
> > > >
> > > > Let me see if I can refine it a bit or use multiple runes to replace
> > > > all
> > > > libxl__sprintf.
> > >
> > > Coccinelle would probably work quite well for this particular case.
> > >
> >
> > Unfortunately no. Coccinelle doesn't support variable arguments,
> > otherwise I would have used it already.
>
> Ah yes, I remember struggling with that at one point.
>
> FWIW xen.git db82cd9251eb55a55242d6a713f710cd72d18fb0
This is me enumerating from 0 to 3 arguments, which at the time covered
90%+ cases.
Actually this time it is not too bad. One sed invocation plus two minor
fixups are enough to make libxl build.
Wei.
> and cb86677d2d1e061bf8d057bf1dd06cbb60210f33 seems to have gotten it to
> work some way or another.
>
> Ian.
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |