diff options
author | Paul Durrant <paul.durrant@citrix.com> | 2011-12-16 14:54:13 +0000 |
---|---|---|
committer | Paul Durrant <paul.durrant@citrix.com> | 2011-12-16 14:54:13 +0000 |
commit | e77389f81686ebdea2d65206148c18b8da90c3f0 (patch) | |
tree | b0f64166c002c4574cc137b6708562b7d0c2064f /tools/libxl/libxl_xshelp.c | |
parent | 2b82a7ad971a4293eea97d74d09bbc86ae4ec534 (diff) | |
download | xen-e77389f81686ebdea2d65206148c18b8da90c3f0.tar.gz xen-e77389f81686ebdea2d65206148c18b8da90c3f0.tar.bz2 xen-e77389f81686ebdea2d65206148c18b8da90c3f0.zip |
libxl: Open code rw and ro node creation.
Use a new libxl__xs_mkdir() to do this and also clean up extraneous
node creation while in the neighbourhood. Checking 'xenstore-ls -fp'
output before and after shows that, as well as the disappearance of
error, drivers, messages and domid, the following perms change is also
present:
-device/suspend = "" (ndomU)
+device/suspend = "" (n0,rdomU)
I believe the new perms are more desirable than the old ones.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_xshelp.c')
-rw-r--r-- | tools/libxl/libxl_xshelp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/libxl/libxl_xshelp.c b/tools/libxl/libxl_xshelp.c index ea835e26a8..f3d4c8e60a 100644 --- a/tools/libxl/libxl_xshelp.c +++ b/tools/libxl/libxl_xshelp.c @@ -122,6 +122,16 @@ char **libxl__xs_directory(libxl__gc *gc, xs_transaction_t t, return ret; } +bool libxl__xs_mkdir(libxl__gc *gc, xs_transaction_t t, + const char *path, struct xs_permissions *perms, + unsigned int num_perms) +{ + libxl_ctx *ctx = libxl__gc_owner(gc); + if (!xs_mkdir(ctx->xsh, t, path)) + return false; + return xs_set_permissions(ctx->xsh, t, path, perms, num_perms); +} + char *libxl__xs_libxl_path(libxl__gc *gc, uint32_t domid) { libxl_ctx *ctx = libxl__gc_owner(gc); |