From: Wei Liu Subject: Re: [PATCH V3 1/6] libxl: export some functions for pvusb use Date: Mon, 18 May 2015 15:05:52 +0100 Message-ID: <20150518140552.GC9503@zion.uk.xensource.com> References: <1429415452-6161-1-git-send-email-cyliu@suse.com> <1429415452-6161-2-git-send-email-cyliu@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1429415452-6161-2-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, wei.liu2@citrix.com, ian.campbell@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 Sun, Apr 19, 2015 at 11:50:47AM +0800, Chunyan Liu wrote: > Signed-off-by: Chunyan Liu > Signed-off-by: Simon Cao On the basis that this can help reduce the length of libxl.c and improve maintainability by moving stuff out of libxl.c to dedicated files. Acked-by: Wei Liu > --- > tools/libxl/libxl.c | 6 +++--- > tools/libxl/libxl_internal.h | 5 +++++ > 2 files changed, 8 insertions(+), 3 deletions(-) > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > index 511eef1..b05d18b 100644 > --- a/tools/libxl/libxl.c > +++ b/tools/libxl/libxl.c > @@ -1963,7 +1963,7 @@ out: > /******************************************************************************/ > > /* generic callback for devices that only need to set ao_complete */ > -static void device_addrm_aocomplete(libxl__egc *egc, libxl__ao_device *aodev) > +void device_addrm_aocomplete(libxl__egc *egc, libxl__ao_device *aodev) > { > STATE_AO_GC(aodev->ao); > > @@ -1986,7 +1986,7 @@ out: > } > > /* common function to get next device id */ > -static int libxl__device_nextid(libxl__gc *gc, uint32_t domid, char *device) > +int libxl__device_nextid(libxl__gc *gc, uint32_t domid, char *device) > { > char *dompath, **l; > unsigned int nb; > @@ -2005,7 +2005,7 @@ static int libxl__device_nextid(libxl__gc *gc, uint32_t domid, char *device) > return nextid; > } > > -static int libxl__resolve_domid(libxl__gc *gc, const char *name, > +int libxl__resolve_domid(libxl__gc *gc, const char *name, > uint32_t *domid) > { > if (!name) > diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h > index 9c22309..42eb1b9 100644 > --- a/tools/libxl/libxl_internal.h > +++ b/tools/libxl/libxl_internal.h > @@ -1080,6 +1080,9 @@ _hidden int libxl__init_console_from_channel(libxl__gc *gc, > libxl__device_console *console, > int dev_num, > libxl_device_channel *channel); > +_hidden int libxl__device_nextid(libxl__gc *gc, uint32_t domid, char *device); > +_hidden int libxl__resolve_domid(libxl__gc *gc, const char *name, > + uint32_t *domid); > > /* > * For each aggregate type which can be used as an input we provide: > @@ -2208,6 +2211,8 @@ struct libxl__ao_device { > > /* Starts preparing to add/remove a bunch of devices. */ > _hidden void libxl__multidev_begin(libxl__ao *ao, libxl__multidev*); > +/* generic callback for devices that only need to set ao_complete */ > +_hidden void device_addrm_aocomplete(libxl__egc *egc, libxl__ao_device *aodev); > > /* Prepares to add/remove one of many devices. > * Calls libxl__prepare_ao_device on libxl__ao_device argument provided and > -- > 1.8.5.2