ia64/xen-unstable

changeset 14142:0261e86db3b1

Fix xm vcpu-set command for when wrong number of VCPU is given

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Feb 26 15:41:35 2007 +0000 (2007-02-26)
parents 0b5da89e2b3d
children 45ddffd595a1
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Feb 26 15:39:34 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Feb 26 15:41:35 2007 +0000
     1.3 @@ -938,6 +938,9 @@ class XendDomainInfo:
     1.4          return self.info['vcpus_number']
     1.5  
     1.6      def setVCpuCount(self, vcpus):
     1.7 +        if vcpus <= 0:
     1.8 +            raise XendError('Invalid VCPUs')
     1.9 +        
    1.10          self.info['vcpu_avail'] = (1 << vcpus) - 1
    1.11          if self.domid >= 0:
    1.12              self.storeVm('vcpu_avail', self.info['vcpu_avail'])