~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

Viewing changes to src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-03-11 17:16:37 UTC
  • mfrom: (0.3.4 upstream) (0.4.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100311171637-43z64ia3ccpj8vqn
Tags: 3.1.4-dfsg-2ubuntu1
* Merge from Debian unstable (LP: #528561), remaining changes:
  - 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
  - Replace *-source packages with transitional packages for *-dkms
* Fix crash in vboxvideo_drm with kernel 2.6.33 / backported drm code
  (LP: #535297)
* Add a list of linux-headers packages to the apport hook
* Update debian/patches/u02-lp-integration.dpatch with a
  DEP-3 compliant header
* Add ${misc:Depends} to virtualbox-ose-source and virtualbox-ose-guest-source
  Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
            if (RT_SUCCESS(rc))
156
156
            {
157
157
                pDevExt->hGuestMappings = hFictive != NIL_RTR0MEMOBJ ? hFictive : hObj;
158
 
                LogRel(("VBoxGuest: %p LB %#x; uAlignment=%#x iTry=%u hGuestMappings=%p (%s)\n",
 
158
                Log(("VBoxGuest: %p LB %#x; uAlignment=%#x iTry=%u hGuestMappings=%p (%s)\n",
159
159
                        RTR0MemObjAddress(pDevExt->hGuestMappings),
160
160
                        RTR0MemObjSize(pDevExt->hGuestMappings),
161
161
                        uAlignment, iTry, pDevExt->hGuestMappings, hFictive != NIL_RTR0PTR ? "fictive" : "reservation"));
1307
1307
     */
1308
1308
    if (pInfo->cParms > 4096) /* (Just make sure it doesn't overflow the next check.) */
1309
1309
    {
1310
 
        Log(("VBoxGuestCommonIOCtl: HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms));
 
1310
        LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms));
1311
1311
        return VERR_INVALID_PARAMETER;
1312
1312
    }
1313
1313
    size_t cbActual = cbExtra + sizeof(*pInfo);
1319
1319
        cbActual += pInfo->cParms * sizeof(HGCMFunctionParameter);
1320
1320
    if (cbData < cbActual)
1321
1321
    {
1322
 
        Log(("VBoxGuestCommonIOCtl: HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n",
 
1322
        LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n",
1323
1323
             cbData, cbActual));
1324
1324
        return VERR_INVALID_PARAMETER;
1325
1325
    }
1375
1375
            *pcbDataReturned = cbActual;
1376
1376
    }
1377
1377
    else
1378
 
        Log(("VBoxGuestCommonIOCtl: HGCM_CALL: Failed. rc=%Rrc.\n", rc));
 
1378
    {
 
1379
        if (rc != VERR_INTERRUPTED)
 
1380
            LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
 
1381
        else
 
1382
            Log(("VBoxGuestCommonIOCtl: HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));
 
1383
    }
1379
1384
    return rc;
1380
1385
}
1381
1386
 
1497
1502
    do { \
1498
1503
        if (pSession->R0Process != NIL_RTR0PROCESS) \
1499
1504
        { \
1500
 
            Log(("VBoxGuestCommonIOCtl: " mnemonic ": Ring-0 only, caller is %RTproc/%p\n", \
 
1505
            LogRel(("VBoxGuestCommonIOCtl: " mnemonic ": Ring-0 only, caller is %RTproc/%p\n", \
1501
1506
                 pSession->Process, (uintptr_t)pSession->R0Process)); \
1502
1507
            return VERR_PERMISSION_DENIED; \
1503
1508
        } \
1506
1511
    do { \
1507
1512
        if (cbData < (cbMin)) \
1508
1513
        { \
1509
 
            Log(("VBoxGuestCommonIOCtl: " mnemonic ": cbData=%#zx (%zu) min is %#zx (%zu)\n", \
 
1514
            LogRel(("VBoxGuestCommonIOCtl: " mnemonic ": cbData=%#zx (%zu) min is %#zx (%zu)\n", \
1510
1515
                 cbData, cbData, (size_t)(cbMin), (size_t)(cbMin))); \
1511
1516
            return VERR_BUFFER_OVERFLOW; \
1512
1517
        } \
1513
1518
        if ((cbMin) != 0 && !VALID_PTR(pvData)) \
1514
1519
        { \
1515
 
            Log(("VBoxGuestCommonIOCtl: " mnemonic ": Invalid pointer %p\n", pvData)); \
 
1520
            LogRel(("VBoxGuestCommonIOCtl: " mnemonic ": Invalid pointer %p\n", pvData)); \
1516
1521
            return VERR_INVALID_POINTER; \
1517
1522
        } \
1518
1523
    } while (0)
1625
1630
 
1626
1631
            default:
1627
1632
            {
1628
 
                Log(("VBoxGuestCommonIOCtl: Unknown request iFunction=%#x Stripped size=%#x\n", iFunction,
 
1633
                LogRel(("VBoxGuestCommonIOCtl: Unknown request iFunction=%#x Stripped size=%#x\n", iFunction,
1629
1634
                                VBOXGUEST_IOCTL_STRIP_SIZE(iFunction)));
1630
1635
                rc = VERR_NOT_SUPPORTED;
1631
1636
                break;