Changeset 40504 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/solaris
- Timestamp:
- Mar 16, 2012 4:38:06 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76890
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp
r39374 r40504 57 57 static uint32_t volatile g_cUsers = 0; 58 58 /** VBoxUSB Device handle. */ 59 static RTFILE g_ File = NIL_RTFILE;59 static RTFILE g_hFile = NIL_RTFILE; 60 60 /** List of tasks handled by the USB helper. */ 61 61 typedef enum USBHELPER_OP … … 93 93 return rc; 94 94 } 95 g_ File = File;95 g_hFile = File; 96 96 97 97 ASMAtomicIncU32(&g_cUsers); … … 112 112 113 113 RTFileClose(File); 114 g_ File = NIL_RTFILE;114 g_hFile = NIL_RTFILE; 115 115 ASMAtomicDecU32(&g_cUsers); 116 116 return rc; … … 121 121 LogRel((USBLIBR3 ":USBMonitor driver version query failed. rc=%Rrc\n", rc)); 122 122 RTFileClose(File); 123 g_ File = NIL_RTFILE;123 g_hFile = NIL_RTFILE; 124 124 ASMAtomicDecU32(&g_cUsers); 125 125 return rc; … … 142 142 * We're the last guy, close down the connection. 143 143 */ 144 RTFILE File = g_ File;145 g_ File = NIL_RTFILE;144 RTFILE File = g_hFile; 145 g_hFile = NIL_RTFILE; 146 146 if (File == NIL_RTFILE) 147 147 return VERR_INTERNAL_ERROR; … … 238 238 static int usblibDoIOCtl(unsigned iFunction, void *pvData, size_t cbData) 239 239 { 240 if (g_ File == NIL_RTFILE)240 if (g_hFile == NIL_RTFILE) 241 241 { 242 242 LogRel((USBLIBR3 ":IOCtl failed, device not open.\n")); … … 249 249 Hdr.pvDataR3 = pvData; 250 250 251 int rc = ioctl( (int)g_File, iFunction, &Hdr);251 int rc = ioctl(RTFileToNative(g_hFile), iFunction, &Hdr); 252 252 if (rc < 0) 253 253 { 254 254 rc = errno; 255 LogRel((USBLIBR3 ":IOCtl failed iFunction=%x errno=%d g_file=%d\n", iFunction, rc, (int)g_File));255 LogRel((USBLIBR3 ":IOCtl failed iFunction=%x errno=%d g_file=%d\n", iFunction, rc, RTFileToNative(g_hFile))); 256 256 return RTErrConvertFromErrno(rc); 257 257 }
Note:
See TracChangeset
for help on using the changeset viewer.