VirtualBox

Changeset 32209 in vbox for trunk/src/VBox/Devices/VMMDev


Ignore:
Timestamp:
Sep 2, 2010 2:27:00 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65516
Message:

VMMDev.cpp: Implemented VMMDevPowerState_SaveState - untested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r31524 r32209  
    412412        Log(("VMMDev request header size too small! size = %d\n", requestHeader.size));
    413413        rcRet = VINF_SUCCESS;
    414         goto end; /** @todo shouldn't (/ no need to) write back.*/
     414        goto l_end; /** @todo shouldn't (/ no need to) write back.*/
    415415    }
    416416
     
    420420        Log(("VMMDev: guest header version (0x%08X) differs from ours (0x%08X)\n", requestHeader.version, VMMDEV_REQUEST_HEADER_VERSION));
    421421        rcRet = VINF_SUCCESS;
    422         goto end; /** @todo shouldn't (/ no need to) write back.*/
     422        goto l_end; /** @todo shouldn't (/ no need to) write back.*/
    423423    }
    424424
     
    434434        requestHeader.rc = VERR_NOT_SUPPORTED;
    435435        rcRet = VINF_SUCCESS;
    436         goto end;
     436        goto l_end;
    437437    }
    438438
     
    443443        requestHeader.rc = VERR_NOT_SUPPORTED;
    444444        rcRet = VINF_SUCCESS;
    445         goto end;
     445        goto l_end;
    446446    }
    447447
     
    453453        rcRet = VINF_SUCCESS;
    454454        requestHeader.rc = VERR_NO_MEMORY;
    455         goto end;
     455        goto l_end;
    456456    }
    457457    PDMDevHlpPhysRead(pDevIns, (RTGCPHYS)u32, pRequestHeader, requestHeader.size);
     
    880880                    case VMMDevPowerState_SaveState:
    881881                    {
    882                         /** @todo no API for that yet */
    883                         pRequestHeader->rc = VERR_NOT_IMPLEMENTED;
     882                        if (true /*pThis->fAllowGuestToSaveState*/)
     883                        {
     884                            LogRel(("Guest requests the VM to be saved and powered off\n"));
     885                            pRequestHeader->rc = rcRet = PDMDevHlpVMSuspendSaveAndPowerOff(pDevIns);
     886                        }
     887                        else
     888                        {
     889                            LogRel(("Guest requests the VM to be saved and powered off, declined\n"));
     890                            pRequestHeader->rc = VERR_ACCESS_DENIED;
     891                        }
    884892                        break;
    885893                    }
     
    19341942    }
    19351943
    1936 end:
     1944l_end:
    19371945    /* Write the result back to guest memory */
    19381946    if (pRequestHeader)
Note: See TracChangeset for help on using the changeset viewer.

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