diff options
| author | Roger Pau Monné <royger@FreeBSD.org> | 2019-10-01 08:21:41 +0000 |
|---|---|---|
| committer | Roger Pau Monné <royger@FreeBSD.org> | 2019-10-01 08:21:41 +0000 |
| commit | 06798cf5832716ec459faeda0dba49a865cc18f7 (patch) | |
| tree | d4366c157b9d55e8e154455ec0646ae544fbfb12 /sys/dev/xen/control | |
| parent | b52c534bffcc40e5be49f6d012c9d4005f0bbd81 (diff) | |
Notes
Diffstat (limited to 'sys/dev/xen/control')
| -rw-r--r-- | sys/dev/xen/control/control.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c index 45cabf43c44d..98ab5bf3a6b3 100644 --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -221,12 +221,6 @@ xctrl_suspend() KASSERT((PCPU_GET(cpuid) == 0), ("Not running on CPU#0")); /* - * Clear our XenStore node so the toolstack knows we are - * responding to the suspend request. - */ - xs_write(XST_NIL, "control", "shutdown", ""); - - /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE * drivers need this. */ @@ -369,6 +363,11 @@ xctrl_on_watch_event(struct xs_watch *watch, const char **vec, unsigned int len) if (error != 0) return; + /* Acknowledge the request by writing back an empty string. */ + error = xs_write(XST_NIL, "control", "shutdown", ""); + if (error != 0) + printf("unable to ack shutdown request, proceeding anyway\n"); + reason = xctrl_shutdown_reasons; last_reason = reason + nitems(xctrl_shutdown_reasons); while (reason < last_reason) { |
