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

[Xen-devel] [PATCH v2 1/3] libxl: add libxl__xs_get_permissions helper



Signed-off-by: Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
 tools/libxl/libxl_internal.h |  2 ++
 tools/libxl/libxl_xshelp.c   | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 573e3d1..2e9d9b5 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -533,6 +533,8 @@ _hidden char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t 
domid);
 
 _hidden char *libxl__xs_read(libxl__gc *gc, xs_transaction_t t,
                              const char *path);
+_hidden struct xs_permissions * libxl__xs_get_permissions(libxl__gc *gc,
+                xs_transaction_t t, const char *path, unsigned int *num);
 _hidden char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t,
                                    const char *path, unsigned int *nb);
    /* On error: returns NULL, sets errno (no logging) */
diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c
index 52af484..48960de 100644
--- a/tools/libxl/libxl_xshelp.c
+++ b/tools/libxl/libxl_xshelp.c
@@ -115,6 +115,17 @@ char * libxl__xs_read(libxl__gc *gc, xs_transaction_t t, 
const char *path)
     return ptr;
 }
 
+struct xs_permissions * libxl__xs_get_permissions(libxl__gc *gc,
+        xs_transaction_t t, const char *path, unsigned int *num)
+{
+    libxl_ctx *ctx = libxl__gc_owner(gc);
+    struct xs_permissions *ptr;
+
+    ptr = xs_get_permissions(ctx->xsh, t, path, num);
+    libxl__ptr_add(gc, ptr);
+    return ptr;
+}
+
 char *libxl__xs_get_dompath(libxl__gc *gc, uint32_t domid)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
-- 
1.8.1.4



_______________________________________________
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®.