Changeset 84585 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- May 28, 2020 12:14:17 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138315
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r84576 r84585 681 681 || !strcmp(a->argv[1], "shutdown")) /* With shutdown we mean gracefully powering off the VM by letting the guest OS do its thing. */ 682 682 { 683 ComPtr<IGuest> guest; 684 CHECK_ERROR_BREAK(console, COMGETTER(Guest)(guest.asOutParam())); 683 ComPtr<IGuest> pGuest; 684 CHECK_ERROR_BREAK(console, COMGETTER(Guest)(pGuest.asOutParam())); 685 if (!pGuest) 686 { 687 RTMsgError("Guest not running"); 688 rc = E_FAIL; 689 break; 690 } 685 691 686 692 const bool fReboot = !strcmp(a->argv[1], "reboot"); 687 693 688 694 com::SafeArray<GuestShutdownFlag_T> aShutdownFlags; 695 aShutdownFlags.resize(1); 696 689 697 if (fReboot) 690 698 aShutdownFlags.push_back(GuestShutdownFlag_Reboot); 691 699 else 692 700 aShutdownFlags.push_back(GuestShutdownFlag_PowerOff); 693 CHECK_ERROR( guest, Shutdown(ComSafeArrayAsInParam(aShutdownFlags)));701 CHECK_ERROR(pGuest, Shutdown(ComSafeArrayAsInParam(aShutdownFlags))); 694 702 if (FAILED(rc)) 695 703 {
Note:
See TracChangeset
for help on using the changeset viewer.