aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_create.c
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@Intel.com>2012-06-28 17:47:13 +0100
committerYang Zhang <yang.z.zhang@Intel.com>2012-06-28 17:47:13 +0100
commit928c75ce59fc11c707b8bfd0b99ce0c07ab89926 (patch)
treeac46f583868400516b25bba67a19915c7888df1c /tools/libxl/libxl_create.c
parent8f7e8f7b56f62eb7fe7d459424b9f56466faaefb (diff)
downloadxen-928c75ce59fc11c707b8bfd0b99ce0c07ab89926.tar.gz
xen-928c75ce59fc11c707b8bfd0b99ce0c07ab89926.tar.bz2
xen-928c75ce59fc11c707b8bfd0b99ce0c07ab89926.zip
libxl: allow to allocate cpumap with specific size
Currently, libxl_cpumap_alloc()allocate the cpumap with size of number of physical cpus. In some place, we may want to allocate specific size of cpumap. This patch allow to pass a argument to specific the size that you want to allocate. If pass 0, it means the size is equal to number of physical cpus. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_create.c')
-rw-r--r--tools/libxl/libxl_create.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 67cd207379..08e5536c0c 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -205,8 +205,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
b_info->cur_vcpus = 1;
if (!b_info->cpumap.size) {
- if (libxl_cpumap_alloc(CTX, &b_info->cpumap))
- return ERROR_NOMEM;
+ if (libxl_cpumap_alloc(CTX, &b_info->cpumap, 0))
+ return ERROR_FAIL;
libxl_cpumap_set_any(&b_info->cpumap);
}