mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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@citrix.com> Acked-by: juergen.gross@ts.fujitsu.com [since v2 - correct default is 0 not -1] Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
This commit is contained in:
1 parent
e2b1084603
commit
f9b8dbdcb5
3 files changed
+5
-6
No files matched your search
@@ -441,8 +441,9 @@ retry_transaction:
|
||||
|
||||
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);
|
||||
|
||||
@@ -151,7 +151,6 @@ libxl_domain_create_info = Struct("domain_create_info",[
|
||||
("xsdata", libxl_key_value_list),
|
||||
("platformdata", libxl_key_value_list),
|
||||
("poolid", uint32),
|
||||
("poolname", string),
|
||||
])
|
||||
|
||||
libxl_domain_build_info = Struct("domain_build_info",[
|
||||
|
||||
@@ -316,7 +316,7 @@ static void printf_info(int domid,
|
||||
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 @@ static void parse_config_data(const char *configfile_filename_report,
|
||||
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);
|
||||
}
|
||||
|
||||