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/linux/SUPDrv-linux.c

    r10254 r10263  
    3434*   Header Files                                                               *
    3535*******************************************************************************/
    36 #include "SUPDrvInternal.h"
     36#include "../SUPDrvInternal.h"
    3737#include "the-linux-kernel.h"
    3838#include "version-generated.h"
     
    846846
    847847/**
     848 * The SUPDRV IDC entry point.
     849 *
     850 * @returns VBox status code, see supdrvIDC.
     851 * @param   iReq        The request code.
     852 * @param   pReq        The request.
     853 */
     854int VBOXCALL SUPDrvLinuxIDC(uint32_t uReq, PSUPDRVIDCREQHDR pReq)
     855{
     856    PSUPDRVSESSION  pSession;
     857
     858    /*
     859     * Some quick validations.
     860     */
     861    if (RT_UNLIKELY(!VALID_PTR(pReq)))
     862        return VERR_INVALID_POINTER;
     863
     864    pSession = pReq->pSession;
     865    if (pSession)
     866    {
     867        if (RT_UNLIKELY(!VALID_PTR(pSession)))
     868            return VERR_INVALID_PARAMETER;
     869        if (RT_UNLIKELY(pSession->pDevExt != &g_DevExt))
     870            return VERR_INVALID_PARAMETER;
     871    }
     872    else if (RT_UNLIKELY(uReq != SUPDRV_IDC_REQ_CONNECT))
     873        return VERR_INVALID_PARAMETER;
     874
     875    /*
     876     * Do the job.
     877     */
     878    return supdrvIDC(uReq, &g_DevExt, pSession, pReq);
     879}
     880
     881EXPORT_SYMBOL(SUPDrvLinuxIDC);
     882
     883
     884/**
    848885 * Initializes any OS specific object creator fields.
    849886 */
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