[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: make some functions global to prepare splitting up libxl.c
commit fb2f935bcf810654a64fe5b5d757580ad037b92d Author: Juergen Gross <jgross@xxxxxxxx> AuthorDate: Thu Feb 9 09:02:33 2017 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Mon Feb 13 10:59:15 2017 +0000 libxl: make some functions global to prepare splitting up libxl.c Splitting up libxl.c will require two functions to be globally visible. Add their prototypes to libxl_internal.h. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl.c | 14 +++++++------- tools/libxl/libxl_internal.h | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 0641a8a..a61df60 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -594,7 +594,7 @@ int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, return 0; } -static void xcinfo2xlinfo(libxl_ctx *ctx, +void libxl__xcinfo2xlinfo(libxl_ctx *ctx, const xc_domaininfo_t *xcinfo, libxl_dominfo *xlinfo) { @@ -644,7 +644,7 @@ libxl_dominfo * libxl_list_domain(libxl_ctx *ctx, int *nb_domain_out) while ((ret = xc_domain_getinfolist(ctx->xch, domid, 1024, info)) > 0) { ptr = libxl__realloc(NOGC, ptr, (size + ret) * sizeof(libxl_dominfo)); for (i = 0; i < ret; i++) { - xcinfo2xlinfo(ctx, &info[i], &ptr[size + i]); + libxl__xcinfo2xlinfo(ctx, &info[i], &ptr[size + i]); } domid = info[ret - 1].domain + 1; size += ret; @@ -680,7 +680,7 @@ int libxl_domain_info(libxl_ctx *ctx, libxl_dominfo *info_r, } if (info_r) - xcinfo2xlinfo(ctx, &xcinfo, info_r); + libxl__xcinfo2xlinfo(ctx, &xcinfo, info_r); GC_FREE; return 0; } @@ -4320,7 +4320,7 @@ retry_transaction: } libxl_dominfo_init(&ptr); - xcinfo2xlinfo(ctx, &info, &ptr); + libxl__xcinfo2xlinfo(ctx, &info, &ptr); uuid = libxl__uuid2string(gc, ptr.uuid); libxl__xs_printf(gc, t, GCSPRINTF("/vm/%s/memory", uuid), "%"PRIu64, new_target_memkb / 1024); @@ -4342,9 +4342,9 @@ out_no_transaction: } /* out_target_memkb and out_max_memkb can be NULL */ -static int libxl__get_memory_target(libxl__gc *gc, uint32_t domid, - uint64_t *out_target_memkb, - uint64_t *out_max_memkb) +int libxl__get_memory_target(libxl__gc *gc, uint32_t domid, + uint64_t *out_target_memkb, + uint64_t *out_max_memkb) { int rc; char *target = NULL, *static_max = NULL, *endptr = NULL; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index a093bc6..ee279d2 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -4246,6 +4246,13 @@ uint64_t libxl__get_targetmem_fudge(libxl__gc *gc, return info->video_memkb + mem_target_fudge; } +int libxl__get_memory_target(libxl__gc *gc, uint32_t domid, + uint64_t *out_target_memkb, + uint64_t *out_max_memkb); +void libxl__xcinfo2xlinfo(libxl_ctx *ctx, + const xc_domaininfo_t *xcinfo, + libxl_dominfo *xlinfo); + /* Macros used to compare device identifier. Returns true if the two * devices have same identifier. */ #define COMPARE_DEVID(a, b) ((a)->devid == (b)->devid) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |