[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/5] libxc: minios: Introduce abstraction for files[]



On Thu, Feb 26, 2015 at 01:47:47PM +0100, Jürgen Groß wrote:
> On 02/26/2015 12:56 PM, Wei Liu wrote:
> >From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> >
> >We are going to want to reuse this code for NetBSD rump kernels, where
> >there is no gntmap device and we just want to call the MiniOS gntmap
> >code directly.
> >
> >As part of this we want to abstract away the use of files[] inside the
> >actual functions.  Do this with a #define whose definition we are
> >going to make conditional in just a moment.
> >
> >No functional change in this patch.
> >
> >Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> >---
> >  tools/libxc/xc_minios_privcmd.c | 15 +++++++--------
> >  1 file changed, 7 insertions(+), 8 deletions(-)
> >
> >diff --git a/tools/libxc/xc_minios_privcmd.c 
> >b/tools/libxc/xc_minios_privcmd.c
> >index 7766b86..27d9076 100644
> >--- a/tools/libxc/xc_minios_privcmd.c
> >+++ b/tools/libxc/xc_minios_privcmd.c
> >@@ -208,12 +208,14 @@ struct xc_osdep_ops xc_privcmd_ops = {
> >      },
> >  };
> >
> >+#define GNTMAP(h) (files[(int)(h)].gntmap)
> >+
> >  static xc_osdep_handle minios_gnttab_open(xc_gnttab *xcg)
> >  {
> >      int fd = alloc_fd(FTYPE_GNTMAP);
> >      if ( fd == -1 )
> >          return XC_OSDEP_OPEN_ERROR;
> >-    gntmap_init(&files[fd].gntmap);
> >+    gntmap_init(&GNTMAP(h));
> 
> GNTMAP(fd)?
> 
> Same multiple times below.
> 

Good catch. I will fix this, thanks.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.