[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1 of 2] libxl: provide libxl_domain_config_init
On Tue, 2012-04-24 at 18:58 +0100, Ian Jackson wrote: > Ian Campbell writes ("[Xen-devel] [PATCH 1 of 2] libxl: provide > libxl_domain_config_init"): > > libxl: provide libxl_domain_config_init. > > Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Oops, I had an update which I'd forgotten to send out -- this is the delta, Sorry. 8<---------------------------------------------------- # HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1335344197 -3600 # Node ID bc54fd8d21b4bd50dc365905aff2f2eac7ac0807 # Parent b27dc6eecfe794fe1bed6d1188a71853818d77e9 libxl: use libxl_domain_config_init and not memset 0 I missed a couple of memsets in 25237:31489be80c51, we need to use libxl_domain_config_init everywhere and not memset since not all fields are initialised to zero now (the type field in particular). This fixes an abort with "xl list <dom>" for a specific domain due to assert(type == -1) in libxl_domain_build_info_init_type(). Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> diff -r b27dc6eecfe7 -r bc54fd8d21b4 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Wed Apr 25 09:54:39 2012 +0100 +++ b/tools/libxl/xl_cmdimpl.c Wed Apr 25 09:56:37 2012 +0100 @@ -2464,7 +2464,7 @@ static void list_domains_details(const l if (rc) continue; CHK_ERRNO(asprintf(&config_file, "<domid %d data>", info[i].domid)); - memset(&d_config, 0x00, sizeof(d_config)); + libxl_domain_config_init(&d_config); parse_config_data(config_file, (char *)data, len, &d_config); printf_info(default_output_format, info[i].domid, &d_config); libxl_domain_config_dispose(&d_config); @@ -3546,7 +3546,7 @@ int main_config_update(int argc, char ** exit(1); } - memset(&d_config, 0x00, sizeof(d_config)); + libxl_domain_config_init(&d_config); parse_config_data(filename, config_data, config_len, &d_config); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |