|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] xenagent: use new Start/StopShutdownWatch() functions in resume from suspend
The patch removes some code duplication by using the StopShutdownwatch()
and StartShutdownWatch() functions on resume from suspend rather than
duplicating their content.
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
src/xenagent/service.cpp | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/xenagent/service.cpp b/src/xenagent/service.cpp
index d105bc4..170c2dd 100644
--- a/src/xenagent/service.cpp
+++ b/src/xenagent/service.cpp
@@ -552,17 +552,8 @@ void CXenAgent::OnSuspend()
EventLog(EVENT_XENUSER_UNSUSPENDED);
// recreate shutdown watch, as suspending deactivated the watch
- if (m_ctxt_shutdown)
- m_device->StoreRemoveWatch(m_ctxt_shutdown);
- m_ctxt_shutdown = NULL;
-
- m_device->StoreAddWatch("control/shutdown", m_evt_shutdown,
&m_ctxt_shutdown);
- m_device->StoreWrite("control/feature-poweroff", "1");
- m_device->StoreWrite("control/feature-reboot", "1");
- m_device->StoreWrite("control/feature-s3", "1");
- m_device->StoreWrite("control/feature-s4", "1");
-
-
+ StopShutdownWatch();
+ StartShutdownWatch();
SetXenTime();
}
--
2.1.1
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |