On Wed, 2016-06-15 at 10:31 +0100, Wei Liu wrote: > This function is used to return the memory needed for a guest. It's > not > in a position to modify the b_info passed in (note the _setdefault > function). > > Use a copy of b_info to do the calculation. Define a macro to mark > the > change in API. > > Signed-off-by: Wei Liu > --- > Cc: Ian Jackson > > v3: new > Any suggestion on the macro name? > Maybe LIBXL_HAVE_DOMAIN_NEED_MEMORY_BINFO_CONST (a bit long, I know...) > > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 2c0f868..905852d 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -67,6 +67,13 @@ >   * the same $(XEN_VERSION) (e.g. throughout a major release). >   */ >   > +/* LIBXL_HAVE_DOMAIN_NEED_MEMORY_V2 > + * > + * If this is defined, libxl_domain_need_memory no longer modifies > + * passed in b_info. > + */ > +#define LIBXL_HAVE_DOMAIN_NEED_MEMORY_V2 > + > So, out of curiosity (or I should say "ignorance" :-)) how is one supposed to use this macro? Regards, Dario -- <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)