VirtualBox

Changeset 62666 in vbox


Ignore:
Timestamp:
Jul 28, 2016 11:45:51 PM (8 years ago)
Author:
vboxsync
Message:

SUPDrv-win.cpp: Fixed supdrvOSMsrProberWrite to do writing instead of reading, duh. Fixed a bunch of warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r62490 r62666  
    313313*********************************************************************************************************************************/
    314314RT_C_DECLS_BEGIN
    315 ULONG _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath);
     315NTSTATUS _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath);
    316316RT_C_DECLS_END
    317317
     
    484484                g_pDevObjUsr = NULL;
    485485            }
    486 #endif
    487486            IoDeleteDevice(g_pDevObjUsr);
    488487            g_pDevObjUsr = NULL;
     488#endif
    489489        }
    490490        IoDeleteDevice(g_pDevObjSys);
     
    537537 * @param   pRegPath    Registry base path.
    538538 */
    539 ULONG _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
    540 {
     539NTSTATUS _stdcall DriverEntry(PDRIVER_OBJECT pDrvObj, PUNICODE_STRING pRegPath)
     540{
     541    RT_NOREF1(pRegPath);
     542
    541543    /*
    542544     * Sanity checks.
     
    10131015                                                     PIO_STATUS_BLOCK pIoStatus, PDEVICE_OBJECT pDevObj)
    10141016{
     1017    RT_NOREF1(fWait);
     1018
    10151019    /*
    10161020     * Only the normal devices, not the stub or error info ones.
     
    10971101                {
    10981102                    rcNt = GetExceptionCode();
     1103                    Hdr.cbIn = Hdr.cbOut = 0; /* shut up MSC */
    10991104                }
    11001105            }
    11011106            else
     1107            {
     1108                Hdr.cbIn = Hdr.cbOut = 0; /* shut up MSC */
    11021109                rcNt = STATUS_INVALID_PARAMETER;
     1110            }
    11031111            if (NT_SUCCESS(rcNt))
    11041112            {
     
    14501458{
    14511459    Log(("VBoxDrvNtRead\n"));
     1460    RT_NOREF1(pDevObj);
    14521461
    14531462    NTSTATUS rcNt;
     
    15791588 *
    15801589 * @param   pCallbackContext    User supplied parameter (pDevObj)
    1581  * @param   pArgument1          First argument
    1582  * @param   pArgument2          Second argument
    1583  */
    1584 VOID _stdcall VBoxPowerDispatchCallback(PVOID pCallbackContext, PVOID pArgument1, PVOID pArgument2)
    1585 {
    1586     PDEVICE_OBJECT pDevObj = (PDEVICE_OBJECT)pCallbackContext;
    1587 
    1588     Log(("VBoxPowerDispatchCallback: %x %x\n", pArgument1, pArgument2));
     1590 * @param   pvArgument1         First argument
     1591 * @param   pvArgument2         Second argument
     1592 */
     1593VOID _stdcall VBoxPowerDispatchCallback(PVOID pCallbackContext, PVOID pvArgument1, PVOID pvArgument2)
     1594{
     1595    /*PDEVICE_OBJECT pDevObj = (PDEVICE_OBJECT)pCallbackContext;*/ RT_NOREF1(pCallbackContext);
     1596    Log(("VBoxPowerDispatchCallback: %x %x\n", pvArgument1, pvArgument2));
    15891597
    15901598    /* Power change imminent? */
    1591     if ((unsigned)pArgument1 == PO_CB_SYSTEM_STATE_LOCK)
    1592     {
    1593         if ((unsigned)pArgument2 == 0)
     1599    if ((uintptr_t)pvArgument1 == PO_CB_SYSTEM_STATE_LOCK)
     1600    {
     1601        if (pvArgument2 == NULL)
    15941602            Log(("VBoxPowerDispatchCallback: about to go into suspend mode!\n"));
    15951603        else
     
    15971605
    15981606        /* Inform any clients that have registered themselves with IPRT. */
    1599         RTPowerSignalEvent(((unsigned)pArgument2 == 0) ? RTPOWEREVENT_SUSPEND : RTPOWEREVENT_RESUME);
     1607        RTPowerSignalEvent(pvArgument2 == NULL ? RTPOWEREVENT_SUSPEND : RTPOWEREVENT_RESUME);
    16001608    }
    16011609}
     
    16161624        pSession->pNtProtect = NULL;
    16171625    }
     1626#else
     1627    RT_NOREF2(pDevExt, pSession);
    16181628#endif
    16191629}
     
    16681678bool VBOXCALL  supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt)
    16691679{
     1680    RT_NOREF1(pDevExt);
    16701681    return false;
    16711682}
     
    21312142
    21322143    if (idCpu == NIL_RTCPUID)
    2133         supdrvNtMsProberReadOnCpu(idCpu, &Args, NULL);
     2144        supdrvNtMsProberWriteOnCpu(idCpu, &Args, NULL);
    21342145    else
    21352146    {
    2136         int rc = RTMpOnSpecific(idCpu, supdrvNtMsProberReadOnCpu, &Args, NULL);
     2147        int rc = RTMpOnSpecific(idCpu, supdrvNtMsProberWriteOnCpu, &Args, NULL);
    21372148        if (RT_FAILURE(rc))
    21382149            return rc;
     
    21582169    bool                fRestoreGp  = true;
    21592170    RTCCUINTREG         fOldFlags;
     2171    RT_NOREF2(idCpu, pvUser2);
    21602172
    21612173    /*
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