From: Wei Liu Subject: Re: [PATCH RFC 4/4] libxl: spawn a qemu to implement channels Date: Thu, 12 Jun 2014 13:11:09 +0100 Message-ID: <20140612121109.GA11959@zion.uk.xensource.com> References: <1402518269-23164-1-git-send-email-dave.scott@citrix.com> <1402518269-23164-5-git-send-email-dave.scott@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Wv3qw-0000sm-Dk for xen-devel@lists.xenproject.org; Thu, 12 Jun 2014 12:11:34 +0000 Content-Disposition: inline In-Reply-To: <1402518269-23164-5-git-send-email-dave.scott@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: David Scott Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com, Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, Jun 11, 2014 at 09:24:29PM +0100, David Scott wrote: [...] > + for (i = 0; i < guest_config->num_channels; i++) { > + flexarray_append(dm_args, "-chardev"); > + type = guest_config->channels[i].type; > + path = guest_config->channels[i].path; > + switch (type) { > + case LIBXL_CHANNEL_TYPE_NONE: > + flexarray_append(dm_args, > + libxl__sprintf(gc, "null,id=libxl-channel%d", > + i)); Wouldn't it be more appropriate to use channels[i].devid? And the indentation here seems wrong. There's also a macro called GCSPRINTF that you can use. Wei.