From: Wei Liu Subject: Re: [PATCH 1/2] libxl: replace libxl__sprintf(gc, ...) with GCSPRINTF Date: Tue, 17 Nov 2015 15:24:03 +0000 Message-ID: <20151117152403.GE1495@citrix.com> References: <1447772928-12652-1-git-send-email-wei.liu2@citrix.com> <1447772928-12652-2-git-send-email-wei.liu2@citrix.com> <20151117151618.GD1495@citrix.com> <1447773699.301.45.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zyi7U-00006l-Av for xen-devel@lists.xenproject.org; Tue, 17 Nov 2015 15:24:32 +0000 Content-Disposition: inline In-Reply-To: <1447773699.301.45.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Xen-devel , Wei Liu , Ian Jackson List-Id: xen-devel@lists.xenproject.org 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 > > > = > > > =A0 sed -i 's/libxl__sprintf(gc,\s*\(".*",.*\)/GCSPRINTF(\1/g' libxl*= .c > > > = > > = > > Hmm... It looks like this rune alone doesn't cover all situations. > > = > > =A0$ ack-grep 'libxl__sprintf\(gc' | wc -l = > > =A043 > > = > > 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. Wei. > Ian.