|
From: Mike W. <mik...@hp...> - 2004-12-09 17:45:45
|
Matthew Bloch wrote:
> Here's the promised patch against a recent 2.01 snapshot to allow you to
> send sysrqs to running Linux kernels. I went with Keir's suggestion of
> adding a sub-reason code to the shutdown message with a 1-byte payload
> specifying which key was pressed. Hope it's acceptable for the main
> tree; I will happily alter it to spec if any of the maintainers have
> suggestions for better structuring it.
There's a slight problem with the client/server python code.
On the client side you have
def xend_domain_shutdown(self, id, reason, key=None):
return self.xendPost(self.domainurl(id),
{'op' : 'shutdown',
'reason' : reason,
'key' : key })
while on the server side you have
fn = FormFn(self.xd.domain_shutdown,
[['dom', 'str'],
['reason', 'str'],
['key', 'int']])
which means 'key' has to be an int.
So passing 'None' is going to cause an error.
Mike
|