* [Patch] Relax the sanity check on guest configuration with XSM-ACM addlabel
@ 2008-11-28 0:58 INAKOSHI Hiroya
0 siblings, 0 replies; only message in thread
From: INAKOSHI Hiroya @ 2008-11-28 0:58 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 542 bytes --]
The attached patch relaxes the sanity check on guest configuration when
you assign 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.
The relaxed way of sanity cheking is not exact in terms of ignoring the
case where kernel and bootloader parameter coincide. That is apparantly
incorrect, but an exact way requires double loops and it was a bit
boring to me.
Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
[-- Attachment #2: addlabel.patch --]
[-- Type: text/plain, Size: 717 bytes --]
diff -r 5fd51e1e9c79 tools/python/xen/xm/addlabel.py
--- a/tools/python/xen/xm/addlabel.py Wed Nov 05 10:57:21 2008 +0000
+++ b/tools/python/xen/xm/addlabel.py Tue Nov 11 16:24:34 2008 +0900
@@ -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:
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-28 0:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-28 0:58 [Patch] Relax the sanity check on guest configuration with XSM-ACM addlabel INAKOSHI Hiroya
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.