]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: Check cpupool parameter during domain creation.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 10 May 2010 08:25:11 +0000 (09:25 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 10 May 2010 08:25:11 +0000 (09:25 +0100)
Signed-off-by: Jergen Gross <juergen.gross@ts.fujitsu.com>
tools/libxl/xl_cmdimpl.c

index e71d0ceb07754e6ba799577095e08cb747b84b75..525d1cfe1acbf87e1c4cb64f319de14df58dfc64 100644 (file)
@@ -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);