# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1193909806 0
# Node ID 76f30b65854fc69cab1f99182d7a4cf8eb20c9b8
# Parent 931e4b987257c40914a81c24d984a676085ef5e6
xend: Fix missing boolean xend config options
If a boolean option was missing in the SCF database, we weren't
processing the default value correctly.
Signed-off-by: John Levon <john.levon@xxxxxxx>
---
tools/python/xen/xend/XendOptions.py | 4 ++++
1 files changed, 4 insertions(+)
diff -r 931e4b987257 -r 76f30b65854f tools/python/xen/xend/XendOptions.py
--- a/tools/python/xen/xend/XendOptions.py Thu Nov 01 09:33:56 2007 +0000
+++ b/tools/python/xen/xend/XendOptions.py Thu Nov 01 09:36:46 2007 +0000
@@ -386,6 +386,10 @@ if os.uname()[0] == 'SunOS':
return scf.get_bool(name)
except scf.error, e:
if e[0] == scf.SCF_ERROR_NOT_FOUND:
+ if val in ['yes', 'y', '1', 'on', 'true', 't']:
+ return True
+ if val in ['no', 'n', '0', 'off', 'false', 'f']:
+ return False
return val
else:
raise XendError("option %s: %s:%s" % (name, e[1], e[2]))
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|