]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commitdiff
Suppress warning (28159)
authorOwen Smith <owen.smith@citrix.com>
Fri, 3 Nov 2017 17:40:53 +0000 (17:40 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 3 Nov 2017 17:40:53 +0000 (17:40 +0000)
Setting "control/shutdown" to "poweroff" or "reboot" is intended
to trigger a shutdown/reboot!

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/xenagent/service.cpp

index e2a6c0301187bec8084aec8976df6670f7743134..46250e8ce0a9a06ba31f178ac2c54bcdc6ff0131 100644 (file)
@@ -194,6 +194,7 @@ bool CXenIfaceCreator::CheckShutdown()
 
         m_device->StoreWrite("control/shutdown", "");
         AcquireShutdownPrivilege();
+#pragma warning(suppress:28159) /* Consider using a design alternative... Rearchitect to avoid Reboot */
         if (!InitiateSystemShutdownEx(NULL, NULL, 0, TRUE, FALSE,
                                       SHTDN_REASON_MAJOR_OTHER |
                                       SHTDN_REASON_MINOR_ENVIRONMENT |
@@ -206,6 +207,7 @@ bool CXenIfaceCreator::CheckShutdown()
 
         m_device->StoreWrite("control/shutdown", "");
         AcquireShutdownPrivilege();
+#pragma warning(suppress:28159) /* Consider using a design alternative... Rearchitect to avoid Reboot */
         if (!InitiateSystemShutdownEx(NULL, NULL, 0, TRUE, TRUE,
                                       SHTDN_REASON_MAJOR_OTHER |
                                       SHTDN_REASON_MINOR_ENVIRONMENT |