]> git.baikalelectronics.ru Git - kernel.git/commit
xen/manage: don't complain about an empty value in control/sysrq node
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 6 Sep 2018 11:26:08 +0000 (13:26 +0200)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 14 Sep 2018 12:51:10 +0000 (08:51 -0400)
commit237cac5eed98bfcc5ab072d6ac45582e6948840e
treeee0ab909b1280f621dad908ac4a65f2765ca9371
parentd9cd171e36a0a756e2d44073ffb1adf94fb7ed60
xen/manage: don't complain about an empty value in control/sysrq node

When guest receives a sysrq request from the host it acknowledges it by
writing '\0' to control/sysrq xenstore node. This, however, make xenstore
watch fire again but xenbus_scanf() fails to parse empty value with "%c"
format string:

 sysrq: SysRq : Emergency Sync
 Emergency Sync complete
 xen:manage: Error -34 reading sysrq code in control/sysrq

Ignore -ERANGE the same way we already ignore -ENOENT, empty value in
control/sysrq is totally legal.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/manage.c