[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl: Check cpupool parameter during domain creation.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1273479911 -3600
# Node ID 064936eb48e0454d14accc98fe06e2712cfae067
# Parent  93c5beba9d04d3e8d2522241bad14107433c3121
libxl: Check cpupool parameter during domain creation.

Signed-off-by: Jergen Gross <juergen.gross@xxxxxxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r 93c5beba9d04 -r 064936eb48e0 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Mon May 10 09:22:52 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Mon May 10 09:25:11 2010 +0100
@@ -453,9 +453,15 @@ static void parse_config_data(const char
     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);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.