Changeset 37596 in vbox for trunk/src/VBox/Devices/USB/solaris
- Timestamp:
- Jun 22, 2011 7:30:06 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72442
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/solaris/USBProxyDevice-solaris.cpp
r35346 r37596 80 80 char *pszDevicePath; 81 81 /** The connection to the client driver. */ 82 RTFILE File;82 RTFILE hFile; 83 83 /** Pointer to the proxy device instance. */ 84 84 PUSBPROXYDEV pProxyDev; … … 196 196 static void usbProxySolarisCloseFile(PUSBPROXYDEVSOL pDevSol) 197 197 { 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; 203 200 } 204 201 … … 215 212 static int usbProxySolarisIOCtl(PUSBPROXYDEVSOL pDevSol, unsigned Function, void *pvData, size_t cbData) 216 213 { 217 if (RT_UNLIKELY(pDevSol-> File == NIL_RTFILE))214 if (RT_UNLIKELY(pDevSol->hFile == NIL_RTFILE)) 218 215 { 219 216 LogFlow((USBPROXY ":usbProxySolarisIOCtl connection to driver gone!\n")); … … 228 225 229 226 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); 231 228 if (RT_SUCCESS(rc)) 232 229 { … … 327 324 * Open the client driver. 328 325 */ 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); 331 328 if (RT_SUCCESS(rc)) 332 329 { 333 pDevSol-> File =File;330 pDevSol->hFile = hFile; 334 331 pDevSol->pProxyDev = pProxyDev; 335 332 … … 363 360 } 364 361 365 RTFileClose(pDevSol-> File);366 pDevSol-> File = NIL_RTFILE;362 RTFileClose(pDevSol->hFile); 363 pDevSol->hFile = NIL_RTFILE; 367 364 pDevSol->pProxyDev = NULL; 368 365 } … … 721 718 { 722 719 struct pollfd pfd; 723 int rc; 724 725 pfd.fd = pDevSol->File; 720 pfd.fd = RTFileToNative(pDevSol->hFile); 726 721 pfd.events = POLLIN; 727 722 pfd.revents = 0; 728 rc = poll(&pfd, 1, cMillies); 729 723 int rc = poll(&pfd, 1, cMillies); 730 724 if (rc > 0) 731 725 {
Note:
See TracChangeset
for help on using the changeset viewer.