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

[Xen-changelog] [xen master] libxc: rump kernels: Use standard xc_osdep_get_info



commit 79b4ef15ee1088161c4d4e7471abd22527c4108c
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Wed May 28 17:06:21 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Jul 14 16:07:50 2014 +0100

    libxc: rump kernels: Use standard xc_osdep_get_info
    
    Do not try to support the dlopen-based xc indirection.
    
    Introduce a local #define DO_DYNAMIC_OSDEP to centralise the condition.
    
    Add comments to the #endifs.
    
    Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
    
    ---
    v2: Remove duplication by introducing DO_DYNAMIC_OSDEP.
        Add comments to the #endifs.
---
 tools/libxc/xc_private.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index a3da614..1c214dd 100644
--- a/tools/libxc/xc_private.c
+++ b/tools/libxc/xc_private.c
@@ -33,6 +33,10 @@
 
 #define XENCTRL_OSDEP "XENCTRL_OSDEP"
 
+#if !defined (__MINIOS__) && !defined(__RUMPUSER_XEN__)
+#define DO_DYNAMIC_OSDEP
+#endif
+
 /*
  * Returns a (shallow) copy of the xc_osdep_info_t for the
  * active OS interface.
@@ -50,7 +54,7 @@
 static int xc_osdep_get_info(xc_interface *xch, xc_osdep_info_t *info)
 {
     int rc = -1;
-#ifndef __MINIOS__
+#ifdef DO_DYNAMIC_OSDEP
     const char *lib = getenv(XENCTRL_OSDEP);
     xc_osdep_info_t *pinfo;
     void *dl_handle = NULL;
@@ -86,7 +90,7 @@ static int xc_osdep_get_info(xc_interface *xch, 
xc_osdep_info_t *info)
         info->dl_handle = dl_handle;
     }
     else
-#endif
+#endif /*DO_DYNAMIC_OSDEP*/
     {
         *info = xc_osdep_info;
         info->dl_handle = NULL;
@@ -94,21 +98,21 @@ static int xc_osdep_get_info(xc_interface *xch, 
xc_osdep_info_t *info)
 
     rc = 0;
 
-#ifndef __MINIOS__
+#ifdef DO_DYNAMIC_OSDEP
 out:
     if ( dl_handle && rc == -1 )
         dlclose(dl_handle);
-#endif
+#endif /*DO_DYNAMIC_OSDEP*/
 
     return rc;
 }
 
 static void xc_osdep_put(xc_osdep_info_t *info)
 {
-#ifndef __MINIOS__
+#ifdef DO_DYNAMIC_OSDEP
     if ( info->dl_handle )
         dlclose(info->dl_handle);
-#endif
+#endif /*DO_DYNAMIC_OSDEP*/
 }
 
 static const char *xc_osdep_type_name(enum xc_osdep_type type)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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