VirtualBox

Ignore:
Timestamp:
Jul 5, 2008 12:26:17 AM (16 years ago)
Author:
vboxsync
Message:

Inter-Driver Communication (IDC) interface for the support driver. The OS specific bits in SUPDrv.

File:
1 edited

Legend:

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

    r10254 r10263  
    4444#include <IOKit/IOLib.h> /* Assert as function */
    4545
    46 #include "SUPDrvInternal.h"
     46#include "../SUPDrvInternal.h"
    4747#include <VBox/version.h>
    4848#include <iprt/initterm.h>
     
    611611
    612612
     613/**
     614 * The SUPDRV IDC entry point.
     615 *
     616 * @returns VBox status code, see supdrvIDC.
     617 * @param   iReq        The request code.
     618 * @param   pReq        The request.
     619 */
     620int VBOXCALL SUPDrvDarwinIDC(uint32_t uReq, PSUPDRVIDCREQHDR pReq)
     621{
     622    PSUPDRVSESSION  pSession;
     623
     624    /*
     625     * Some quick validations.
     626     */
     627    if (RT_UNLIKELY(!VALID_PTR(pReq)))
     628        return VERR_INVALID_POINTER;
     629
     630    pSession = pReq->pSession;
     631    if (pSession)
     632    {
     633        if (RT_UNLIKELY(!VALID_PTR(pSession)))
     634            return VERR_INVALID_PARAMETER;
     635        if (RT_UNLIKELY(pSession->pDevExt != &g_DevExt))
     636            return VERR_INVALID_PARAMETER;
     637    }
     638    else if (RT_UNLIKELY(uReq != SUPDRV_IDC_REQ_CONNECT))
     639        return VERR_INVALID_PARAMETER;
     640
     641    /*
     642     * Do the job.
     643     */
     644    return supdrvIDC(uReq, &g_DevExt, pSession, pReq);
     645}
     646
    613647
    614648/**
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