[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: make userdata_path libxl internal function
commit 34714e3222eab8cfc0b3a9d5b46b2dfe6dcc7f7f Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Sep 4 23:43:07 2014 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Sep 9 12:45:10 2014 +0100 libxl: make userdata_path libxl internal function Later patch will make use of it to generate file path and name. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl_dom.c | 14 +++++++------- tools/libxl/libxl_internal.h | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index c944804..5e0cb80 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -1807,9 +1807,9 @@ char *libxl__uuid2string(libxl__gc *gc, const libxl_uuid uuid) return GCSPRINTF(LIBXL_UUID_FMT, LIBXL_UUID_BYTES(uuid)); } -static const char *userdata_path(libxl__gc *gc, uint32_t domid, - const char *userdata_userid, - const char *wh) +const char *libxl__userdata_path(libxl__gc *gc, uint32_t domid, + const char *userdata_userid, + const char *wh) { libxl_ctx *ctx = libxl__gc_owner(gc); char *uuid_string; @@ -1844,7 +1844,7 @@ void libxl__userdata_destroyall(libxl__gc *gc, uint32_t domid) glob_t gl; int r, i; - pattern = userdata_path(gc, domid, "*", "?"); + pattern = libxl__userdata_path(gc, domid, "*", "?"); if (!pattern) goto out; @@ -1875,7 +1875,7 @@ int libxl_userdata_store(libxl_ctx *ctx, uint32_t domid, int e, rc; int fd = -1; - filename = userdata_path(gc, domid, userdata_userid, "d"); + filename = libxl__userdata_path(gc, domid, userdata_userid, "d"); if (!filename) { rc = ERROR_NOMEM; goto out; @@ -1886,7 +1886,7 @@ int libxl_userdata_store(libxl_ctx *ctx, uint32_t domid, goto out; } - newfilename = userdata_path(gc, domid, userdata_userid, "n"); + newfilename = libxl__userdata_path(gc, domid, userdata_userid, "n"); if (!newfilename) { rc = ERROR_NOMEM; goto out; @@ -1937,7 +1937,7 @@ int libxl_userdata_retrieve(libxl_ctx *ctx, uint32_t domid, int datalen = 0; void *data = 0; - filename = userdata_path(gc, domid, userdata_userid, "d"); + filename = libxl__userdata_path(gc, domid, userdata_userid, "d"); if (!filename) { rc = ERROR_NOMEM; goto out; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 04c9378..7244473 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -992,6 +992,9 @@ _hidden int libxl__toolstack_restore(uint32_t domid, const uint8_t *buf, uint32_t size, void *data); _hidden int libxl__domain_resume_device_model(libxl__gc *gc, uint32_t domid); +_hidden const char *libxl__userdata_path(libxl__gc *gc, uint32_t domid, + const char *userdata_userid, + const char *wh); _hidden void libxl__userdata_destroyall(libxl__gc *gc, uint32_t domid); _hidden int libxl__domain_resume(libxl__gc *gc, uint32_t domid, -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |