From: Ian Campbell Subject: Re: [PATCH] Add device_model_pvdevice parameter for HVM guests Date: Thu, 18 Jul 2013 12:23:13 +0100 Message-ID: <1374146593.26728.61.camel@kazak.uk.xensource.com> References: <1372935006-32464-1-git-send-email-paul.durrant@citrix.com> <9AAE0902D5BC7E449B7C8E4E778ABCD0066ABE@LONPEX01CL01.citrite.net> <1374145137.26728.58.camel@kazak.uk.xensource.com> <9AAE0902D5BC7E449B7C8E4E778ABCD0066B80@LONPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD0066B80@LONPEX01CL01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Stefano Stabellini , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2013-07-18 at 12:16 +0100, Paul Durrant wrote: > > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > > > index 8a478ba..cfaa54e 100644 > > > > --- a/tools/libxl/xl_cmdimpl.c > > > > +++ b/tools/libxl/xl_cmdimpl.c > > > > @@ -1526,6 +1526,20 @@ skip_vfb: > > > > exit (1); > > > > > > > > } > > > > + > > > > + if (!xlu_cfg_get_string (config, "device_model_pvdevice", &buf, 0)) > > { > > > > + libxl_device_model_pvdevice d; > > > > + > > > > + e = libxl_device_model_pvdevice_from_string(buf, &d); > > > > + if (e) { > > > > + fprintf(stderr, > > > > + "xl: unknown device_model_pvdevice '%s'\n", > > > > + buf); > > > > + exit(-ERROR_FAIL); > > > > + } > > > > + > > > > + b_info->u.hvm.device_model_pvdevice = d; > > > > You could do away with d and just pass the real thing to from_string. > > > > Yeah, I did this for formatting reasons. > libxl_device_model_pvdevice_from_string is a very long function name > already to adding a lengthy argument name on the end just didn't look > nice. That's OK. FWIW I'd have done e = libxl_device_model_pvdevice_from_string(buf, &b_info->xxx); Up to you though. Ian.