[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: remove libxl_domain_create_info.poolname
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1328020797 0 # Node ID e712efb526da5fc5ebf83b859ce8cb3bf849490b # Parent 84b896135fd1b51cc4605129f1200786c795f453 libxl: remove libxl_domain_create_info.poolname It is redundant with poolid and allowing the user to specify both opens up the possibility of a disconnect. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: juergen.gross@xxxxxxxxxxxxxx [since v2 - correct default is 0 not -1] Committed-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- diff -r 84b896135fd1 -r e712efb526da tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Wed Feb 01 16:45:54 2012 +0100 +++ b/tools/libxl/libxl_create.c Tue Jan 31 14:39:57 2012 +0000 @@ -441,8 +441,9 @@ xs_write(ctx->xsh, t, libxl__sprintf(gc, "%s/uuid", vm_path), uuid_string, strlen(uuid_string)); xs_write(ctx->xsh, t, libxl__sprintf(gc, "%s/name", vm_path), info->name, strlen(info->name)); - if (info->poolname) - xs_write(ctx->xsh, t, libxl__sprintf(gc, "%s/pool_name", vm_path), info->poolname, strlen(info->poolname)); + if (info->poolid != -1) + libxl__xs_write(gc, t, libxl__sprintf(gc, "%s/pool_name", vm_path), + "%s", libxl__cpupoolid_to_name(gc, info->poolid)); libxl__xs_writev(gc, t, dom_path, info->xsdata); libxl__xs_writev(gc, t, libxl__sprintf(gc, "%s/platform", dom_path), info->platformdata); diff -r 84b896135fd1 -r e712efb526da tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Wed Feb 01 16:45:54 2012 +0100 +++ b/tools/libxl/libxl_types.idl Tue Jan 31 14:39:57 2012 +0000 @@ -151,7 +151,6 @@ ("xsdata", libxl_key_value_list), ("platformdata", libxl_key_value_list), ("poolid", uint32), - ("poolname", string), ]) libxl_domain_build_info = Struct("domain_build_info",[ diff -r 84b896135fd1 -r e712efb526da tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Wed Feb 01 16:45:54 2012 +0100 +++ b/tools/libxl/xl_cmdimpl.c Tue Jan 31 14:39:57 2012 +0000 @@ -316,7 +316,7 @@ printf("\t(uuid <unknown>)\n"); } - printf("\t(cpupool %s)\n", c_info->poolname); + printf("\t(cpupool %s)\n", libxl_cpupoolid_to_name(ctx, c_info->poolid)); if (c_info->xsdata) printf("\t(xsdata contains data)\n"); else @@ -703,8 +703,7 @@ c_info->poolid = -1; cpupool_qualifier_to_cpupoolid(buf, &c_info->poolid, NULL); } - c_info->poolname = libxl_cpupoolid_to_name(ctx, c_info->poolid); - if (!c_info->poolname) { + if (!libxl_cpupoolid_to_name(ctx, c_info->poolid)) { fprintf(stderr, "Illegal pool specified\n"); exit(1); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |