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>

authored by Vitaly Kuznetsov and committed by Boris Ostrovsky 87dffe86 11da3a7f

+4 -2
+4 -2
drivers/xen/manage.c
··· 280 280 /* 281 281 * The Xenstore watch fires directly after registering it and 282 282 * after a suspend/resume cycle. So ENOENT is no error but 283 - * might happen in those cases. 283 + * might happen in those cases. ERANGE is observed when we get 284 + * an empty value (''), this happens when we acknowledge the 285 + * request by writing '\0' below. 284 286 */ 285 - if (err != -ENOENT) 287 + if (err != -ENOENT && err != -ERANGE) 286 288 pr_err("Error %d reading sysrq code in control/sysrq\n", 287 289 err); 288 290 xenbus_transaction_end(xbt, 1);