VirtualBox

Ignore:
Timestamp:
Dec 19, 2012 6:12:31 PM (12 years ago)
Author:
vboxsync
Message:

SUPDrv,SUPLib: Introducing /dev/vboxdrvu on darwin (other platforms soon to follow).

File:
1 edited

Legend:

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

    r37596 r44173  
    5757/** The support service name. */
    5858#define SERVICE_NAME    "VBoxDrv"
    59 /** Win32 Device name. */
    60 #define DEVICE_NAME     "\\\\.\\VBoxDrv"
     59/** Win32 Device name - system. */
     60#define DEVICE_NAME_SYS "\\\\.\\VBoxDrv"
     61/** Win32 Device name - user. */
     62#define DEVICE_NAME_USR "\\\\.\\VBoxDrvU"
    6163/** NT Device name. */
    6264#define DEVICE_NAME_NT   L"\\Device\\VBoxDrv"
     
    7880
    7981
    80 int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited)
     82int suplibOsInit(PSUPLIBDATA pThis, bool fPreInited, bool fUnrestricted)
    8183{
    8284    /*
     
    8991     * Try open the device.
    9092     */
    91     HANDLE hDevice = CreateFile(DEVICE_NAME,
     93    HANDLE hDevice = CreateFile(fUnrestricted ? DEVICE_NAME_SYS : DEVICE_NAME_USR,
    9294                                GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
    9395                                NULL,
     
    103105        suplibOsStartService();
    104106
    105         hDevice = CreateFile(DEVICE_NAME,
     107        hDevice = CreateFile(fUnrestricted ? DEVICE_NAME_SYS : DEVICE_NAME_USR,
    106108                             GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
    107109                             NULL,
     
    139141     * We're done.
    140142     */
    141     pThis->hDevice = hDevice;
     143    pThis->hDevice       = hDevice;
     144    pThis->fUnrestricted = fUnrestricted;
    142145    return VINF_SUCCESS;
    143146}
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