VirtualBox

Changeset 2141 in vbox for trunk


Ignore:
Timestamp:
Apr 17, 2007 7:42:19 PM (18 years ago)
Author:
vboxsync
Message:

Made the device node 0666 for now. Fixed some logging.

File:
1 edited

Legend:

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

    r1192 r2141  
    219219                if (g_iMajorDeviceNo >= 0)
    220220                {
     221                    /** @todo the UID, GID and mode mask should be configurable! This isn't very secure... */
    221222                    g_hDevFsDevice = devfs_make_node(makedev(g_iMajorDeviceNo, 0), DEVFS_CHAR,
    222                                                      UID_ROOT, GID_WHEEL, 0660, DEVICE_NAME); /** @todo the UID and GID should be configurable! */
     223                                                     UID_ROOT, GID_WHEEL, 0666, DEVICE_NAME);
    223224                    if (g_hDevFsDevice)
    224225                    {
     
    299300    int                 rc;
    300301    PSUPDRVSESSION      pSession;
    301     dprintf(("VBoxSupDrvOpen:\n"));
     302#ifdef DEBUG
     303    char szName[128];
     304    szName[0] = '\0';
     305    proc_name(proc_pid(pProcess), szName, sizeof(szName));
     306    dprintf(("VBoxSupDrvOpen: pid=%d '%s'\n", proc_pid(pProcess), szName));
     307#endif
    302308
    303309    /*
     
    328334    }
    329335
     336#if 1
    330337    dprintf(("VBoxSupDrvOpen: g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, proc_pid(pProcess)));
    331 
     338#else
     339    OSDBGPRINT(("VBoxSupDrvOpen: pid=%d '%s' pSession=%p rc=%d\n", proc_pid(pProcess), szName, pSession, rc));
     340#endif
    332341    return VBoxSupDrvErr2DarwinErr(rc);
    333342}
     
    380389    if (!pSession)
    381390    {
    382         OSDBGPRINT(("VBoxSupDrvIoctl: WHUT?!? pSession == NULL! This must be a mistake... pid=%d\n", (int)Process));
     391        OSDBGPRINT(("VBoxSupDrvClose: WHAT?!? pSession == NULL! This must be a mistake... pid=%d (close)\n",
     392                    (int)Process));
    383393        return EINVAL;
    384394    }
     
    422432    if (!pSession)
    423433    {
    424         OSDBGPRINT(("VBoxSupDrvIoctl: WHUT?!? pSession == NULL! This must be a mistake... pid=%d\n", (int)Process));
     434        OSDBGPRINT(("VBoxSupDrvIOCtl: WHAT?!? pSession == NULL! This must be a mistake... pid=%d iCmd=%#x\n",
     435                    (int)Process, iCmd));
    425436        return EINVAL;
    426437    }
     
    456467    unsigned            cbOut = 0;
    457468    PSUPDRVIOCTLDATA    pArgs = (PSUPDRVIOCTLDATA)pData;
    458     dprintf(("VBoxSupDrvIOCtl: pSession=%p iCmd=%p pData=%p pProcess=%p\n", pSession, iCmd, pData, pProcess));
     469    dprintf(("VBoxSupDrvIOCtlSlow: pSession=%p iCmd=%p pData=%p pProcess=%p\n", pSession, iCmd, pData, pProcess));
    459470
    460471    /*
     
    463474    if (IOCPARM_LEN(iCmd) != sizeof(SUPDRVIOCTLDATA))
    464475    {
    465         dprintf(("VBoxSupDrvIOCtl: incorrect input length! cbArgs=%d\n", IOCPARM_LEN(iCmd)));
     476        dprintf(("VBoxSupDrvIOCtlSlow: incorrect input length! cbArgs=%d\n", IOCPARM_LEN(iCmd)));
    466477        return EINVAL;
    467478    }
     
    478489        if (pvBuf == NULL)
    479490        {
    480             dprintf(("VBoxSupDrvIOCtl: failed to allocate buffer of %d bytes.\n", cbBuf));
     491            dprintf(("VBoxSupDrvIOCtlSlow: failed to allocate buffer of %d bytes.\n", cbBuf));
    481492            return ENOMEM;
    482493        }
     
    484495        if (rc)
    485496        {
    486             dprintf(("VBoxSupDrvIOCtl: copyin(%p,,%d) failed.\n", pArgs->pvIn, cbBuf));
     497            dprintf(("VBoxSupDrvIOCtlSlow: copyin(%p,,%d) failed.\n", pArgs->pvIn, cbBuf));
    487498            if (pvPageBuf)
    488499                IOFreeAligned(pvPageBuf, cbBuf);
     
    504515    if (rc)
    505516    {
    506         dprintf(("VBoxSupDrvIOCtl: pid=%d iCmd=%x pData=%p failed, rc=%d (darwin rc=%d)\n",
     517        dprintf(("VBoxSupDrvIOCtlSlow: pid=%d iCmd=%x pData=%p failed, rc=%d (darwin rc=%d)\n",
    507518                 proc_pid(pProcess), iCmd, (void *)pData, rc, VBoxSupDrvErr2DarwinErr(rc)));
    508519        rc = VBoxSupDrvErr2DarwinErr(rc);
     
    515526            if (rc2)
    516527            {
    517                 dprintf(("VBoxSupDrvIOCtl: copyout(,%p,%d) failed.\n", pArgs->pvOut, cbBuf));
     528                dprintf(("VBoxSupDrvIOCtlSlow: copyout(,%p,%d) failed.\n", pArgs->pvOut, cbBuf));
    518529                rc = rc2;
    519530            }
     
    531542        RTMemTmpFree(pvBuf);
    532543
    533     dprintf2(("VBoxSupDrvIOCtl: returns %d\n", rc));
     544    dprintf2(("VBoxSupDrvIOCtlSlow: returns %d\n", rc));
    534545    return rc;
    535546}
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