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

Re: [Xen-devel] [PATCH v3 05/22] xl: introduce a domain type option



Roger Pau Monne writes ("[PATCH v3 05/22] xl: introduce a domain type option"):
> Introduce a new type option to xl configuration files in order to
> specify the domain type. This supersedes the current builder option.
> 
> The new option is documented in the xl.cfg man page, and the previous
> builder option is marked as deprecated.

Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Although,

> +#define CHECK_AND_SET_TYPE(type, new)                                  \
> +({                                                                     \

personally I would prefer the ({ on the previous line, and anyway, I
think you could probably avoid this macro by using a temporary here:

> +    /* Deprecated since Xen 4.10. */
> +    if (!xlu_cfg_get_string(config, "builder", &buf, 0)) {
> +        if (c_info->type == LIBXL_DOMAIN_TYPE_INVALID)
> +            fprintf(stderr,
> +"The \"builder\" option is being deprecated, please use \"type\" 
> instead.\n");
> +        if (!strncmp(buf, "hvm", strlen(buf)))
> +            CHECK_AND_SET_TYPE(c_info->type, LIBXL_DOMAIN_TYPE_HVM);

  +            type_from_builder = LIBXL_DOMAIN_TYPE_HVM;

> +        else if (!strncmp(buf, "generic", strlen(buf)))
> +            CHECK_AND_SET_TYPE(c_info->type, LIBXL_DOMAIN_TYPE_PV);
> +        else {
> +            fprintf(stderr, "Invalid domain type %s.\n", buf);
> +            exit(1);
> +        }

  +       if (c_info->type != LIBXL_DOMAIN_TYPE_INVALID &&
  +           c_info->type != type_from_builder) {

Up to you, though.  I won't insist on this change.  Hence my ack.

Ian.

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

 


Rackspace

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