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

[Xen-changelog] [xen-unstable] xm: Relax the sanity check on guest configuration with XSM-ACM addlabel



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1227877470 0
# Node ID abada55aec43c15c3589a4ff28cd2b8ccaaff0f8
# Parent  9be2fe3de5678320ff4718daaee11be6ddb67cf2
xm: Relax the sanity check on guest configuration with XSM-ACM addlabel

The attached patch relaxes the sanity check on guest configuration
when assigning a acm label to the guest. This patch makes a guest
configuration accept a bootloader parameter. This is common for
paravirtualized guests to boot them by using pygrub.

Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/addlabel.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 9be2fe3de567 -r abada55aec43 tools/python/xen/xm/addlabel.py
--- a/tools/python/xen/xm/addlabel.py   Fri Nov 28 12:02:43 2008 +0000
+++ b/tools/python/xen/xm/addlabel.py   Fri Nov 28 13:04:30 2008 +0000
@@ -64,12 +64,13 @@ def validate_config_file(configfile):
         return 0
 
     # sanity check on the data from the file
+    # requiring 'memory,' 'name,' and ether 'kernel' or 'bootloader'
     count = 0
-    required = ['kernel', 'memory', 'name']
+    required = ['kernel', 'bootloader', 'memory', 'name']
     for (k, v) in locs.items():
         if k in required:
             count += 1
-    if count != 3:
+    if count < len(required) - 1:
         print "Invalid configuration file."
         return 0
     else:

_______________________________________________
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®.