direct-io.hg

changeset 15500:259bb15b2d1e

Better error message for 'xm sysrq' on inactive domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Mon Jul 09 09:38:35 2007 +0100 (2007-07-09)
parents 50c18666d660
children 107b9bde5e4d
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Sat Jul 07 11:21:34 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Jul 09 09:38:35 2007 +0100
     1.3 @@ -488,6 +488,9 @@ class XendDomainInfo:
     1.4  
     1.5      def send_sysrq(self, key):
     1.6          """ Send a Sysrq equivalent key via xenstored."""
     1.7 +        if self._stateGet() not in (DOM_STATE_RUNNING, DOM_STATE_PAUSED):
     1.8 +            raise XendError("Domain '%s' is not started" % self.info['name_label'])
     1.9 +
    1.10          asserts.isCharConvertible(key)
    1.11          self.storeDom("control/sysrq", '%c' % key)
    1.12