[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 2/2] Log if Windows Update requires a reboot
Output log line if Windows Update requires a reboot, as soon as a shutdown or reboot has been requested, in addition to when the service shuts down. The service shutdown will output its log line *after* the "Installing Windows Updates" screen has completed during shutdown. Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- src/xenagent/xenifacedevice.cpp | 2 ++ src/xenagent/xenifacedevice.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenagent/xenifacedevice.cpp b/src/xenagent/xenifacedevice.cpp index eea63e4..46b4b6f 100644 --- a/src/xenagent/xenifacedevice.cpp +++ b/src/xenagent/xenifacedevice.cpp @@ -291,6 +291,7 @@ bool CXenIfaceDeviceList::CheckShutdown() if (type == "poweroff") { device->StoreWrite("control/shutdown", ""); m_agent->EventLog(EVENT_XENUSER_POWEROFF); + LogIfRebootPending(); AcquireShutdownPrivilege(); #pragma warning(suppress:28159) /* Consider using a design alternative... Rearchitect to avoid Reboot */ @@ -304,6 +305,7 @@ bool CXenIfaceDeviceList::CheckShutdown() } else if (type == "reboot") { device->StoreWrite("control/shutdown", ""); m_agent->EventLog(EVENT_XENUSER_REBOOT); + LogIfRebootPending(); AcquireShutdownPrivilege(); #pragma warning(suppress:28159) /* Consider using a design alternative... Rearchitect to avoid Reboot */ diff --git a/src/xenagent/xenifacedevice.h b/src/xenagent/xenifacedevice.h index dcac685..3b5e473 100644 --- a/src/xenagent/xenifacedevice.h +++ b/src/xenagent/xenifacedevice.h @@ -86,9 +86,9 @@ public: void CheckXenTime(); void CheckSuspend(); bool CheckSlateMode(std::string& mode); + void LogIfRebootPending(); private: - void LogIfRebootPending(); void StartShutdownWatch(CXenIfaceDevice* device); void StopShutdownWatch(CXenIfaceDevice* device); void StartSlateModeWatch(CXenIfaceDevice* device); -- 2.31.1.windows.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |