~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Devices/PC/DrvACPI.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
723
723
/**
724
724
 * Construct an ACPI driver instance.
725
725
 *
726
 
 * @returns VBox status.
727
 
 * @param   pDrvIns     The driver instance data.
728
 
 *                      If the registration structure is needed, pDrvIns->pDrvReg points to it.
729
 
 * @param   pCfgHandle  Configuration node handle for the driver. Use this to obtain the configuration
730
 
 *                      of the driver instance. It's also found in pDrvIns->pCfgHandle, but like
731
 
 *                      iInstance it's expected to be used a bit in this function.
 
726
 * @copydoc FNPDMDRVCONSTRUCT
732
727
 */
733
 
static DECLCALLBACK(int) drvACPIConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle)
 
728
static DECLCALLBACK(int) drvACPIConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
734
729
{
735
730
    PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI);
736
731
 
753
748
    /*
754
749
     * Check that no-one is attached to us.
755
750
     */
756
 
    int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, NULL);
757
 
    if (rc != VERR_PDM_NO_ATTACHED_DRIVER)
758
 
    {
759
 
        AssertMsgFailed(("Configuration error: Cannot attach drivers to the ACPI driver!\n"));
760
 
        return VERR_PDM_DRVINS_NO_ATTACH;
761
 
    }
 
751
    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 
 
752
                    ("Configuration error: Not possible to attach anything to this driver!\n"),
 
753
                    VERR_PDM_DRVINS_NO_ATTACH);
762
754
 
763
755
    /*
764
756
     * Query the ACPI port interface.
767
759
                                                                      PDMINTERFACE_ACPI_PORT);
768
760
    if (!pThis->pPort)
769
761
    {
770
 
        AssertMsgFailed(("Configuration error: "
771
 
                         "the above device/driver didn't export the ACPI port interface!\n"));
 
762
        AssertMsgFailed(("Configuration error: the above device/driver didn't export the ACPI port interface!\n"));
772
763
        return VERR_PDM_MISSING_INTERFACE_ABOVE;
773
764
    }
774
765
 
809
800
    NULL,
810
801
    /* pfnResume */
811
802
    NULL,
 
803
    /* pfnAttach */
 
804
    NULL,
812
805
    /* pfnDetach */
813
 
    NULL,
 
806
    NULL, 
814
807
    /* pfnPowerOff */
815
 
    NULL
 
808
    NULL, 
 
809
    /* pfnSoftReset */
 
810
    NULL,
 
811
    /* u32EndVersion */
 
812
    PDM_DRVREG_VERSION
816
813
};
817
814