- Timestamp:
- Jun 12, 2020 12:43:02 PM (4 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
-
Additions/common/VBoxService/VBoxServiceControlSession.cpp (modified) (1 diff)
-
Frontends/VBoxManage/VBoxManageControlVM.cpp (modified) (1 diff)
-
Frontends/VBoxManage/VBoxManageHelp.cpp (modified) (1 diff)
-
Main/idl/VirtualBox.xidl (modified) (2 diffs)
-
Main/src-client/GuestCtrlImpl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r84731 r84814 1019 1019 else 1020 1020 { 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"); 1024 1033 if (RT_FAILURE(rc)) 1025 1034 VGSvcError("%s system failed with %Rrc\n", -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r84585 r84814 693 693 694 694 com::SafeArray<GuestShutdownFlag_T> aShutdownFlags; 695 aShutdownFlags.resize(1);696 697 695 if (fReboot) 698 696 aShutdownFlags.push_back(GuestShutdownFlag_Reboot); 699 697 else 700 698 aShutdownFlags.push_back(GuestShutdownFlag_PowerOff); 699 700 if ( a->argc >= 3 701 && !strcmp(a->argv[2], "--force")) 702 aShutdownFlags.push_back(GuestShutdownFlag_Force); 703 701 704 CHECK_ERROR(pGuest, Shutdown(ComSafeArrayAsInParam(aShutdownFlags))); 702 705 if (FAILED(rc)) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r84576 r84814 834 834 " pause|resume|reset|poweroff|savestate|\n" 835 835 #ifdef VBOX_WITH_GUEST_CONTROL 836 " reboot|shutdown |\n"836 " reboot|shutdown [--force]|\n" 837 837 #endif 838 838 " acpipowerbutton|acpisleepbutton|\n" -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r84740 r84814 11791 11791 <enum 11792 11792 name="GuestShutdownFlag" 11793 uuid=" 587309CD-DDDA-4619-82B0-4B764D9D3BC1"11793 uuid="28D19C9C-5862-4930-B29A-F117712B4864" 11794 11794 > 11795 11795 <desc> … … 11805 11805 <const name="Reboot" value="2"> 11806 11806 <desc>Performs a reboot after shutdown.</desc> 11807 </const> 11808 <const name="Force" value="4"> 11809 <desc>Force the system to shutdown/reboot regardless of objecting 11810 application or other stuff. This flag might not be realized on 11811 all systems.</desc> 11807 11812 </const> 11808 11813 </enum> -
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r84585 r84814 505 505 fFlags |= aFlags[i]; 506 506 507 const uint32_t fValidFlags = GuestShutdownFlag_None | GuestShutdownFlag_PowerOff | GuestShutdownFlag_Reboot; 507 const uint32_t fValidFlags = GuestShutdownFlag_None 508 | GuestShutdownFlag_PowerOff | GuestShutdownFlag_Reboot | GuestShutdownFlag_Force; 508 509 if (fFlags & ~fValidFlags) 509 510 return setError(E_INVALIDARG,tr("Unknown flags: flags value %#x, invalid: %#x"), fFlags, fFlags & ~fValidFlags);
Note:
See TracChangeset
for help on using the changeset viewer.

