ia64/xen-unstable
changeset 16295:76f30b65854f
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@sun.com>
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@sun.com>
author | Keir Fraser <keir@xensource.com> |
---|---|
date | Thu Nov 01 09:36:46 2007 +0000 (2007-11-01) |
parents | 931e4b987257 |
children | ba1b6f9d33f5 |
files | tools/python/xen/xend/XendOptions.py |
line diff
1.1 --- a/tools/python/xen/xend/XendOptions.py Thu Nov 01 09:33:56 2007 +0000 1.2 +++ b/tools/python/xen/xend/XendOptions.py Thu Nov 01 09:36:46 2007 +0000 1.3 @@ -386,6 +386,10 @@ if os.uname()[0] == 'SunOS': 1.4 return scf.get_bool(name) 1.5 except scf.error, e: 1.6 if e[0] == scf.SCF_ERROR_NOT_FOUND: 1.7 + if val in ['yes', 'y', '1', 'on', 'true', 't']: 1.8 + return True 1.9 + if val in ['no', 'n', '0', 'off', 'false', 'f']: 1.10 + return False 1.11 return val 1.12 else: 1.13 raise XendError("option %s: %s:%s" % (name, e[1], e[2]))