|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 02 of 23] libxl: provide _init and _setdefault for libxl_domain_create_info
Ian Campbell writes ("[Xen-devel] [PATCH 02 of 23] libxl: provide _init and
_setdefault for libxl_domain_create_info"):
> libxl: provide _init and _setdefault for libxl_domain_create_info.
>
> Some fields require further scaffolding before they can use the
> _init/_setdefault scheme and are handled in later patches.
...
> -int libxl_init_create_info(libxl_ctx *ctx, libxl_domain_create_info *c_info)
> +void libxl_domain_create_info_init(libxl_domain_create_info *c_info)
> {
> memset(c_info, '\0', sizeof(*c_info));
> - c_info->xsdata = NULL;
> - c_info->platformdata = NULL;
> c_info->hap = 1;
> - c_info->type = LIBXL_DOMAIN_TYPE_HVM;
> c_info->oos = 1;
> - c_info->ssidref = 0;
> - c_info->poolid = 0;
> +}
Is it really best to do it like this, rather than generate this
function automatically ? AFAICT the magic "use default" values are a
property of the member types so _init is entirely formulaic.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |