[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7/8] xl: generate a new random VM generation ID if requested
On Thu, 2014-06-12 at 16:04 +0100, David Vrabel wrote: > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 64a1c77..ad50e21 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -1021,6 +1021,15 @@ static void parse_config_data(const char > *config_source, > &b_info->u.hvm.smbios_firmware, 0); > xlu_cfg_replace_string(config, "acpi_firmware", > &b_info->u.hvm.acpi_firmware, 0); > + > + /* Generate and set a new random VM Generation ID? */ > + if (!xlu_cfg_get_long(config, "generation_id", &l, 0)) { xlu_cfg_* returns present/notpresent not the value. You need to check the actual value of l here. Otherwise generation_id=0 in the cfg will cause it to be unexpectedly generated. Did you want to rename this key to ms_vm_genid for consistency? I suppose there is no call for actually specifying a genid? If there were then I'd suggest ms_vm_genid = "generate" as the syntax leaving the way open for a future extension of giving a number here. > + e = libxl_ms_vm_genid_generate(ctx, &b_info->u.hvm.ms_vm_genid); > + if (e) { > + fprintf(stderr, "ERROR: no random numbers available for > \"generation_id\"\n"); That's very specific. How about "unable to generate ..."? _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |