Re: [Xen-devel] [PATCH v2 02/12] libxl: make some functions global to prepare splitting up libxl.c
On 09/02/17 16:44, Wei Liu wrote: > On Thu, Feb 09, 2017 at 12:42:41PM +0100, Juergen Gross wrote: >> On 09/02/17 12:36, Ian Jackson wrote: >>> Juergen Gross writes ("[PATCH v2 02/12] 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. >>> >>> Thanks. However, >>> -static void xcinfo2xlinfo(libxl_ctx *ctx, - const xc_domaininfo_t *xcinfo, - libxl_dominfo *xlinfo) +void xcinfo2xlinfo(libxl_ctx *ctx, + const xc_domaininfo_t *xcinfo, + libxl_dominfo *xlinfo) >>> >>> This function needs a libxl__ prefix adding to its name. >> >> Aah, of course! >> >> Will send V3 after waiting for more comments for a while... >> > > If there are no more significant comments, you can just fold in > everything and provide a branch. No need to repost. Okay. Please pull from https://github.com/jgross1/xen.git libxl-split-v3 Thanks, Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v2 02/12] libxl: make some functions global to prepare splitting up libxl.c
On Thu, Feb 09, 2017 at 12:42:41PM +0100, Juergen Gross wrote: > On 09/02/17 12:36, Ian Jackson wrote: > > Juergen Gross writes ("[PATCH v2 02/12] 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. > > > > Thanks. However, > > > >> -static void xcinfo2xlinfo(libxl_ctx *ctx, > >> - const xc_domaininfo_t *xcinfo, > >> - libxl_dominfo *xlinfo) > >> +void xcinfo2xlinfo(libxl_ctx *ctx, > >> + const xc_domaininfo_t *xcinfo, > >> + libxl_dominfo *xlinfo) > > > > This function needs a libxl__ prefix adding to its name. > > Aah, of course! > > Will send V3 after waiting for more comments for a while... > If there are no more significant comments, you can just fold in everything and provide a branch. No need to repost. > > Juergen > ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v2 02/12] libxl: make some functions global to prepare splitting up libxl.c
On 09/02/17 12:36, Ian Jackson wrote: > Juergen Gross writes ("[PATCH v2 02/12] 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. > > Thanks. However, > >> -static void xcinfo2xlinfo(libxl_ctx *ctx, >> - const xc_domaininfo_t *xcinfo, >> - libxl_dominfo *xlinfo) >> +void xcinfo2xlinfo(libxl_ctx *ctx, >> + const xc_domaininfo_t *xcinfo, >> + libxl_dominfo *xlinfo) > > This function needs a libxl__ prefix adding to its name. Aah, of course! Will send V3 after waiting for more comments for a while... Juergen ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v2 02/12] libxl: make some functions global to prepare splitting up libxl.c
Juergen Gross writes ("[PATCH v2 02/12] 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. Thanks. However, > -static void xcinfo2xlinfo(libxl_ctx *ctx, > - const xc_domaininfo_t *xcinfo, > - libxl_dominfo *xlinfo) > +void xcinfo2xlinfo(libxl_ctx *ctx, > + const xc_domaininfo_t *xcinfo, > + libxl_dominfo *xlinfo) This function needs a libxl__ prefix adding to its name. Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
[Xen-devel] [PATCH v2 02/12] 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--- tools/libxl/libxl.c | 12 ++-- tools/libxl/libxl_internal.h | 7 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 0641a8a..ea66149 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -594,9 +594,9 @@ int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, return 0; } -static void xcinfo2xlinfo(libxl_ctx *ctx, - const xc_domaininfo_t *xcinfo, - libxl_dominfo *xlinfo) +void xcinfo2xlinfo(libxl_ctx *ctx, + const xc_domaininfo_t *xcinfo, + libxl_dominfo *xlinfo) { size_t size; @@ -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..b880801 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 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) -- 2.10.2 ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel