aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/manage.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2017-05-30 14:52:26 -0400
committerJuergen Gross <jgross@suse.com>2017-06-07 03:48:02 -0400
commit4e93b6481c87ea5afde944a32b4908357ec58992 (patch)
tree17863013d8ff01ae30710a19016f2124a1d4588d /drivers/xen/manage.c
parent84a0a967a44b9da6c5effff628aafa7698050574 (diff)
xen: don't print error message in case of missing Xenstore entry
When registering for the Xenstore watch of the node control/sysrq the handler will be called at once. Don't issue an error message if the Xenstore node isn't there, as it will be created only when an event is being triggered. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r--drivers/xen/manage.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index c1ec8ee80924..60cf71f1b256 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -277,8 +277,16 @@ static void sysrq_handler(struct xenbus_watch *watch, const char *path,
277 err = xenbus_transaction_start(&xbt); 277 err = xenbus_transaction_start(&xbt);
278 if (err) 278 if (err)
279 return; 279 return;
280 if (xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key) < 0) { 280 err = xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key);
281 pr_err("Unable to read sysrq code in control/sysrq\n"); 281 if (err < 0) {
282 /*
283 * The Xenstore watch fires directly after registering it and
284 * after a suspend/resume cycle. So ENOENT is no error but
285 * might happen in those cases.
286 */
287 if (err != -ENOENT)
288 pr_err("Error %d reading sysrq code in control/sysrq\n",
289 err);
282 xenbus_transaction_end(xbt, 1); 290 xenbus_transaction_end(xbt, 1);
283 return; 291 return;
284 } 292 }