From 2582117ae876f4bf066bb06ccc8a85aa7950b80d Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 10 May 2010 09:25:11 +0100 Subject: [PATCH] libxl: Check cpupool parameter during domain creation. Signed-off-by: Jergen Gross --- tools/libxl/xl_cmdimpl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index e71d0ceb07..525d1cfe1a 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -453,9 +453,15 @@ static void parse_config_data(const char *configfile_filename_report, if (!xlu_cfg_get_long(config, "oos", &l)) c_info->oos = l; - if (!xlu_cfg_get_string (config, "pool", &buf)) + if (!xlu_cfg_get_string (config, "pool", &buf)) { + c_info->poolid = -1; pool_qualifier_to_poolid(buf, &c_info->poolid, NULL); + } c_info->poolname = libxl_poolid_to_name(&ctx, c_info->poolid); + if (!c_info->poolname) { + fprintf(stderr, "Illegal pool specified\n"); + exit(1); + } init_build_info(b_info, c_info); -- 2.39.5