VirtualBox

Ignore:
Timestamp:
Jun 22, 2011 7:30:06 PM (13 years ago)
Author:
vboxsync
Message:

*: RTFILE becomes a pointer, RTFileOpen++ expands it's flags paramter from uint32_t to uint64_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/freebsd/USBProxyDevice-freebsd.cpp

    r36797 r37596  
    9494{
    9595    /** The open file. */
    96     RTFILE                 File;
     96    RTFILE                 hFile;
    9797    /** Software endpoint structures */
    9898    USBENDPOINTFBSD        aSwEndpoint[USBFBSD_MAXENDPOINTS];
     
    133133    do
    134134    {
    135         rc = ioctl(pDevFBSD->File, iCmd, pvArg);
     135        rc = ioctl(RTFileToNative(pDevFBSD->hFile), iCmd, pvArg);
    136136        if (rc >= 0)
    137137            return VINF_SUCCESS;
     
    369369     * Try open the device node.
    370370     */
    371     RTFILE File;
    372 
    373     rc = RTFileOpen(&File, pszAddress, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
     371    RTFILE hFile;
     372    rc = RTFileOpen(&hFile, pszAddress, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
    374373    if (RT_SUCCESS(rc))
    375374    {
    376375        /*
    377              * Allocate and initialize the linux backend data.
    378              */
    379         PUSBPROXYDEVFBSD pDevFBSD = (PUSBPROXYDEVFBSD)
    380         RTMemAllocZ(sizeof(USBPROXYDEVFBSD));
    381 
     376         * Allocate and initialize the linux backend data.
     377         */
     378        PUSBPROXYDEVFBSD pDevFBSD = (PUSBPROXYDEVFBSD)RTMemAllocZ(sizeof(USBPROXYDEVFBSD));
    382379        if (pDevFBSD)
    383380        {
    384             pDevFBSD->File = File;
     381            pDevFBSD->hFile = hFile;
    385382            pProxyDev->Backend.pv = pDevFBSD;
    386383
     
    388385            if (RT_SUCCESS(rc))
    389386            {
    390                 LogFlow(("usbProxyFreeBSDOpen(%p, %s): returns "
    391                          "successfully File=%d iActiveCfg=%d\n",
    392                          pProxyDev, pszAddress,
    393                          pDevFBSD->File, pProxyDev->iActiveCfg));
     387                LogFlow(("usbProxyFreeBSDOpen(%p, %s): returns successfully hFile=%RTfile iActiveCfg=%d\n",
     388                         pProxyDev, pszAddress, pDevFBSD->hFile, pProxyDev->iActiveCfg));
    394389
    395390                return VINF_SUCCESS;
     
    401396            rc = VERR_NO_MEMORY;
    402397
    403         RTFileClose(File);
     398        RTFileClose(hFile);
    404399    }
    405400    else if (rc == VERR_ACCESS_DENIED)
     
    455450static void usbProxyFreeBSDClose(PUSBPROXYDEV pProxyDev)
    456451{
    457     PUSBPROXYDEVFBSD pDevFBSD = (PUSBPROXYDEVFBSD) pProxyDev->Backend.pv;
     452    PUSBPROXYDEVFBSD pDevFBSD = (PUSBPROXYDEVFBSD)pProxyDev->Backend.pv;
    458453
    459454    LogFlow(("usbProxyFreeBSDClose: pProxyDev=%s\n", pProxyDev->pUsbIns->pszName));
     
    464459    usbProxyFreeBSDFsUnInit(pProxyDev);
    465460
    466     RTFileClose(pDevFBSD->File);
    467 
    468     pDevFBSD->File = NIL_RTFILE;
     461    RTFileClose(pDevFBSD->hFile);
     462    pDevFBSD->hFile = NIL_RTFILE;
    469463
    470464    RTMemFree(pDevFBSD);
    471 
    472465    pProxyDev->Backend.pv = NULL;
    473466
     
    991984    {
    992985        /* Poll for finished transfers */
    993         PollFd.fd = (int)pDevFBSD->File;
     986        PollFd.fd = RTFileToNative(pDevFBSD->hFile);
    994987        PollFd.events = POLLIN | POLLRDNORM;
    995988        PollFd.revents = 0;
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