From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH RFC V2 5/5] domcreate: support pvusb in configuration file Date: Tue, 3 Mar 2015 11:44:38 +0000 Message-ID: <1425383078.24959.117.camel@citrix.com> References: <1421656131-19366-1-git-send-email-cyliu@suse.com> <1421656131-19366-6-git-send-email-cyliu@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1421656131-19366-6-git-send-email-cyliu@suse.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: Chunyan Liu Cc: lars.kurth@citrix.com, george.dunlap@eu.citrix.com, xen-devel@lists.xen.org, ian.jackson@citrix.com, caobosimon@gmail.com List-Id: xen-devel@lists.xenproject.org On Mon, 2015-01-19 at 16:28 +0800, Chunyan Liu wrote: > Add code to support pvusb from domain create. One could specify > usb in domain's configuration file and create domain, then usb > device would be attached to guest automatically. > > One could specify usb device in config file like this: > usb=['2-1.1'] > > Signed-off-by: Chunyan Liu > Signed-off-by: Simon Cao > --- > tools/libxl/libxl_create.c | 41 ++++++++++++++++++++++++++++++++++++++--- > tools/libxl/xl_cmdimpl.c | 40 +++++++++++++++++++++++++++++++++++++++- This should be touching the docs too. > +static void domcreate_attach_usbs(libxl__egc *egc, libxl__multidev *multidev, > + int ret) > +{ > [...] > + for (i = 0; i < d_config->num_usbs; i++) { > + ret = libxl__device_usb_add(gc, domid, &d_config->usbs[i]); > + if (ret < 0) { > + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, > + "libxl__device_usb_add failed: %d", ret); Use the LOG*( macros please. Otherwise the code looks fine, only the lack of docs stops me acking. Ian.