~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VBoxBFE/KeyboardImpl.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:
207
207
/**
208
208
 * Construct a keyboard driver instance.
209
209
 *
210
 
 * @returns VBox status.
211
 
 * @param   pDrvIns     The driver instance data.
212
 
 *                      If the registration structure is needed, pDrvIns->pDrvReg points to it.
213
 
 * @param   pCfgHandle  Configuration node handle for the driver. Use this to obtain the configuration
214
 
 *                      of the driver instance. It's also found in pDrvIns->pCfgHandle, but like
215
 
 *                      iInstance it's expected to be used a bit in this function.
 
210
 * @copydoc FNPDMDRVCONSTRUCT
216
211
 */
217
 
DECLCALLBACK(int) Keyboard::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle)
 
212
DECLCALLBACK(int) Keyboard::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
218
213
{
219
214
    PDRVMAINKEYBOARD pData = PDMINS_2_DATA(pDrvIns, PDRVMAINKEYBOARD);
220
215
    LogFlow(("Keyboard::drvConstruct: iInstance=%d\n", pDrvIns->iInstance));
224
219
     */
225
220
    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0"))
226
221
        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
227
 
    PPDMIBASE pBaseIgnore;
228
 
    int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore);
229
 
    if (rc != VERR_PDM_NO_ATTACHED_DRIVER)
230
 
    {
231
 
        AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n"));
232
 
        return VERR_PDM_DRVINS_NO_ATTACH;
233
 
    }
 
222
    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 
 
223
                    ("Configuration error: Not possible to attach anything to this driver!\n"),
 
224
                    VERR_PDM_DRVINS_NO_ATTACH);
234
225
 
235
226
    /*
236
227
     * IBase.
253
244
     * Get the Keyboard object pointer and update the mpDrv member.
254
245
     */
255
246
    void *pv;
256
 
    rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
 
247
    int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);
257
248
    if (RT_FAILURE(rc))
258
249
    {
259
250
        AssertMsgFailed(("Configuration error: No/bad \"Object\" value! rc=%Rrc\n", rc));
299
290
    NULL,
300
291
    /* pfnResume */
301
292
    NULL,
 
293
    /* pfnAttach */
 
294
    NULL,
302
295
    /* pfnDetach */
303
 
    NULL
 
296
    NULL, 
 
297
    /* pfnPowerOff */
 
298
    NULL, 
 
299
    /* pfnSoftReset */
 
300
    NULL,
 
301
    /* u32EndVersion */
 
302
    PDM_DRVREG_VERSION
304
303
};