[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] Log if Windows Update requires a reboot


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Mon, 5 Jul 2021 13:59:51 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Mon, 05 Jul 2021 13:00:04 +0000
  • Ironport-hdrordr: A9a23:6hzZ6azqSYO8oMmeEs9rKrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA==
  • Ironport-sdr: G3OH1l16Lkrp9NMT6HEGD0jM3VHK7OdOaRyfbFoukWR7uqU+ct7WvUta0uijG3fhwq9IF8HDLx VPeHmfE/6H9rL1U7aJsvtVlNV05QLhlhM0CEUZxeGJ27uzsyo09+gMKaDDgmwkqKvHCgPk+DZp FgQU7RzbB5+RCtV3ATK3l/soXlhz3QLVIKyDpm7mW5QYPw2/EGtAL8rSUIanHXvVJwZlkrvmuH BAb/p4scYe+JQLD0dzQ1t8JjThQvhDBKBZMle9UmgoUckDecvZKja65bkPPFd4/aqfDKYCkOGB t9Q=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.