VirtualBox

Ignore:
Timestamp:
Jun 22, 2011 7:30:06 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
72442
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/solaris/USBProxyDevice-solaris.cpp

    r35346 r37596  
    8080    char                          *pszDevicePath;
    8181    /** The connection to the client driver. */
    82     RTFILE                         File;
     82    RTFILE                         hFile;
    8383    /** Pointer to the proxy device instance. */
    8484    PUSBPROXYDEV                   pProxyDev;
     
    196196static void usbProxySolarisCloseFile(PUSBPROXYDEVSOL pDevSol)
    197197{
    198     if (pDevSol->File != NIL_RTFILE)
    199     {
    200         RTFileClose(pDevSol->File);
    201         pDevSol->File = NIL_RTFILE;
    202     }
     198    RTFileClose(pDevSol->hFile);
     199    pDevSol->hFile = NIL_RTFILE;
    203200}
    204201
     
    215212static int usbProxySolarisIOCtl(PUSBPROXYDEVSOL pDevSol, unsigned Function, void *pvData, size_t cbData)
    216213{
    217     if (RT_UNLIKELY(pDevSol->File == NIL_RTFILE))
     214    if (RT_UNLIKELY(pDevSol->hFile == NIL_RTFILE))
    218215    {
    219216        LogFlow((USBPROXY ":usbProxySolarisIOCtl connection to driver gone!\n"));
     
    228225
    229226    int Ret = -1;
    230     int rc = RTFileIoCtl(pDevSol->File, Function, &Req, sizeof(Req), &Ret);
     227    int rc = RTFileIoCtl(pDevSol->hFile, Function, &Req, sizeof(Req), &Ret);
    231228    if (RT_SUCCESS(rc))
    232229    {
     
    327324                         * Open the client driver.
    328325                         */
    329                         RTFILE File;
    330                         rc = RTFileOpen(&File, pDevSol->pszDevicePath, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
     326                        RTFILE hFile;
     327                        rc = RTFileOpen(&hFile, pDevSol->pszDevicePath, RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE);
    331328                        if (RT_SUCCESS(rc))
    332329                        {
    333                             pDevSol->File = File;
     330                            pDevSol->hFile = hFile;
    334331                            pDevSol->pProxyDev = pProxyDev;
    335332
     
    363360                            }
    364361
    365                             RTFileClose(pDevSol->File);
    366                             pDevSol->File = NIL_RTFILE;
     362                            RTFileClose(pDevSol->hFile);
     363                            pDevSol->hFile = NIL_RTFILE;
    367364                            pDevSol->pProxyDev = NULL;
    368365                        }
     
    721718        {
    722719            struct pollfd pfd;
    723             int rc;
    724 
    725             pfd.fd = pDevSol->File;
     720            pfd.fd = RTFileToNative(pDevSol->hFile);
    726721            pfd.events = POLLIN;
    727722            pfd.revents = 0;
    728             rc = poll(&pfd, 1, cMillies);
    729 
     723            int rc = poll(&pfd, 1, cMillies);
    730724            if (rc > 0)
    731725            {
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette