VirtualBox

Changeset 84814 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jun 12, 2020 12:43:02 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138620
Message:

Guest Control: Also implemented a "force" flag for the reboot/shutdown command. bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r84731 r84814  
    10191019        else
    10201020        {
    1021             rc = RTSystemShutdown(0 /*cMsDelay*/,
    1022                                   fAction | RTSYSTEM_SHUTDOWN_PLANNED,
    1023                                   "VBoxService");
     1021            int fSystemShutdown = RTSYSTEM_SHUTDOWN_PLANNED;
     1022
     1023            /* Translate GuestShutdownFlag_XXX into RTSYSTEM_SHUTDOWN_ flags. */
     1024            if (fAction & GuestShutdownFlag_Reboot)
     1025                fSystemShutdown |= RTSYSTEM_SHUTDOWN_REBOOT;
     1026            else
     1027                fSystemShutdown |= RTSYSTEM_SHUTDOWN_POWER_OFF;
     1028
     1029            if (fAction & GuestShutdownFlag_Force)
     1030                fSystemShutdown |= RTSYSTEM_SHUTDOWN_FORCE;
     1031
     1032            rc = RTSystemShutdown(0 /*cMsDelay*/, fSystemShutdown, "VBoxService");
    10241033            if (RT_FAILURE(rc))
    10251034                VGSvcError("%s system failed with %Rrc\n",
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette