aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-11-28 13:04:30 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-11-28 13:04:30 +0000
commit2fdd853ff51eff7c29255ad1fe64783cf262c26c (patch)
treee9e8acdf4df631cc9353c99c378cbd70f6da5951 /tools
parent1f80f21b474a470129b244ec675a44001e4d6630 (diff)
downloadxen-2fdd853ff51eff7c29255ad1fe64783cf262c26c.tar.gz
xen-2fdd853ff51eff7c29255ad1fe64783cf262c26c.tar.bz2
xen-2fdd853ff51eff7c29255ad1fe64783cf262c26c.zip
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@jp.fujitsu.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xm/addlabel.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/python/xen/xm/addlabel.py b/tools/python/xen/xm/addlabel.py
index 961787a76e..b4130cc2f2 100644
--- a/tools/python/xen/xm/addlabel.py
+++ b/tools/python/xen/xm/addlabel.py
@@ -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: