VirtualBox

Changeset 13079 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Oct 8, 2008 1:40:19 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37564
Message:

added getGuestEnteredACPIMode()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r12978 r13079  
    899899}
    900900
     901/**
     902 * Check if the ACPI power button event was handled.
     903 *
     904 * @returns VBox status code
     905 * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     906 * @param   pfHandled       Return true if the power button event was handled by the guest.
     907 */
    901908static DECLCALLBACK(int) acpiGetPowerButtonHandled(PPDMIACPIPORT pInterface, bool *pfHandled)
    902909{
    903910    ACPIState *s = IACPIPORT_2_ACPISTATE(pInterface);
    904911    *pfHandled = s->fPowerButtonHandled;
     912    return VINF_SUCCESS;
     913}
     914
     915/**
     916 * Check if the Guest entered into G0 (working) or G1 (sleeping).
     917 *
     918 * @returns VBox status code
     919 * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     920 * @param   pfEntered       Return true if the guest entered the ACPI mode.
     921 */
     922static DECLCALLBACK(int) acpiGetGuestEnteredACPIMode(PPDMIACPIPORT pInterface, bool *pfEntered)
     923{
     924    ACPIState *s = IACPIPORT_2_ACPISTATE(pInterface);
     925    *pfEntered = (s->pm1a_ctl & SCI_EN) != 0;
    905926    return VINF_SUCCESS;
    906927}
     
    18861907     */
    18871908    /* IBase */
    1888     s->IBase.pfnQueryInterface            = acpiQueryInterface;
     1909    s->IBase.pfnQueryInterface              = acpiQueryInterface;
    18891910    /* IACPIPort */
    1890     s->IACPIPort.pfnSleepButtonPress      = acpiSleepButtonPress;
    1891     s->IACPIPort.pfnPowerButtonPress      = acpiPowerButtonPress;
    1892     s->IACPIPort.pfnGetPowerButtonHandled = acpiGetPowerButtonHandled;
     1911    s->IACPIPort.pfnSleepButtonPress        = acpiSleepButtonPress;
     1912    s->IACPIPort.pfnPowerButtonPress        = acpiPowerButtonPress;
     1913    s->IACPIPort.pfnGetPowerButtonHandled   = acpiGetPowerButtonHandled;
     1914    s->IACPIPort.pfnGetGuestEnteredACPIMode = acpiGetGuestEnteredACPIMode;
    18931915
    18941916   /*
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