Changeset 37596 in vbox for trunk/src/VBox/Devices/USB/freebsd/USBProxyDevice-freebsd.cpp
- Timestamp:
- Jun 22, 2011 7:30:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/freebsd/USBProxyDevice-freebsd.cpp
r36797 r37596 94 94 { 95 95 /** The open file. */ 96 RTFILE File;96 RTFILE hFile; 97 97 /** Software endpoint structures */ 98 98 USBENDPOINTFBSD aSwEndpoint[USBFBSD_MAXENDPOINTS]; … … 133 133 do 134 134 { 135 rc = ioctl( pDevFBSD->File, iCmd, pvArg);135 rc = ioctl(RTFileToNative(pDevFBSD->hFile), iCmd, pvArg); 136 136 if (rc >= 0) 137 137 return VINF_SUCCESS; … … 369 369 * Try open the device node. 370 370 */ 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); 374 373 if (RT_SUCCESS(rc)) 375 374 { 376 375 /* 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)); 382 379 if (pDevFBSD) 383 380 { 384 pDevFBSD-> File =File;381 pDevFBSD->hFile = hFile; 385 382 pProxyDev->Backend.pv = pDevFBSD; 386 383 … … 388 385 if (RT_SUCCESS(rc)) 389 386 { 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)); 394 389 395 390 return VINF_SUCCESS; … … 401 396 rc = VERR_NO_MEMORY; 402 397 403 RTFileClose( File);398 RTFileClose(hFile); 404 399 } 405 400 else if (rc == VERR_ACCESS_DENIED) … … 455 450 static void usbProxyFreeBSDClose(PUSBPROXYDEV pProxyDev) 456 451 { 457 PUSBPROXYDEVFBSD pDevFBSD = (PUSBPROXYDEVFBSD) 452 PUSBPROXYDEVFBSD pDevFBSD = (PUSBPROXYDEVFBSD)pProxyDev->Backend.pv; 458 453 459 454 LogFlow(("usbProxyFreeBSDClose: pProxyDev=%s\n", pProxyDev->pUsbIns->pszName)); … … 464 459 usbProxyFreeBSDFsUnInit(pProxyDev); 465 460 466 RTFileClose(pDevFBSD->File); 467 468 pDevFBSD->File = NIL_RTFILE; 461 RTFileClose(pDevFBSD->hFile); 462 pDevFBSD->hFile = NIL_RTFILE; 469 463 470 464 RTMemFree(pDevFBSD); 471 472 465 pProxyDev->Backend.pv = NULL; 473 466 … … 991 984 { 992 985 /* Poll for finished transfers */ 993 PollFd.fd = (int)pDevFBSD->File;986 PollFd.fd = RTFileToNative(pDevFBSD->hFile); 994 987 PollFd.events = POLLIN | POLLRDNORM; 995 988 PollFd.revents = 0;
Note:
See TracChangeset
for help on using the changeset viewer.