[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/6] xl: Implement XENMEM_claim_pages support via 'claim_mode' global config



Konrad Rzeszutek Wilk writes ("[PATCH 2/6] xl: Implement XENMEM_claim_pages 
support via 'claim_mode' global config"):
> diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c
> index 16cd3f3..3c141bf 100644
> --- a/tools/libxl/xl.c
> +++ b/tools/libxl/xl.c
> @@ -46,6 +46,7 @@ char *default_vifscript = NULL;
>  char *default_bridge = NULL;
>  char *default_gatewaydev = NULL;
>  enum output_format default_output_format = OUTPUT_FORMAT_JSON;
> +libxl_defbool claim_mode;
>  
>  static xentoollog_level minmsglevel = XTL_PROGRESS;
>  
> @@ -168,6 +169,10 @@ static void parse_global_config(const char *configfile,
>      }
>      if (!xlu_cfg_get_string (config, "blkdev_start", &buf, 0))
>          blkdev_start = strdup(buf);
> +
> +    libxl_defbool_setdefault(&claim_mode, false);
> +    (void)xlu_cfg_get_defbool (config, "claim_mode", &claim_mode, 0);

Sorry, I just spotted this.  I think the libxl_defbool_setdefault
shouldn't be there.  The defbool should be initialised to "default",
which can be done by setting it to 0, as per:

  * To allow users of the library to naively select all defaults this
  * state is represented as 0. False is < 0 and True is > 0.

in libxl.h.  And since it's a variable of static duration the C
implementation will initialise it to 0.  So just deleting the
setdefault is right.

The result is that the default is set in libxl, only.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.