Changeset 58340 in vbox for trunk/src/VBox/HostDrivers/Support/freebsd
- Timestamp:
- Oct 20, 2015 1:58:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
r57358 r58340 75 75 static d_open_t VBoxDrvFreeBSDOpenUsr; 76 76 static d_open_t VBoxDrvFreeBSDOpenSys; 77 static void VBoxDrvFreeBSDDtr(void *p Data);77 static void VBoxDrvFreeBSDDtr(void *pvData); 78 78 static d_ioctl_t VBoxDrvFreeBSDIOCtl; 79 79 static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSession, u_long ulCmd, caddr_t pvData, struct thread *pTd); … … 225 225 * @returns 0 on success, errno on failure. 226 226 * EBUSY if the device is used by someone else. 227 * @param pDev The device node. 228 * @param fOpen The open flags. 229 * @param pTd The thread. 230 * @param iDevType ??? 231 */ 232 static int vboxdrvFreeBSDOpenCommon(struct cdev *pDev, int fOpen, int iDevtype, struct thread *pTd, bool fUnrestricted) 227 * @param pDev The device node. 228 * @param fOpen The open flags. 229 * @param iDevType Some device type thing we don't use. 230 * @param pTd The thread. 231 * @param fUnrestricted Set if opening /dev/vboxdrv, clear if /dev/vboxdrvu. 232 */ 233 static int vboxdrvFreeBSDOpenCommon(struct cdev *pDev, int fOpen, int iDevType, struct thread *pTd, bool fUnrestricted) 233 234 { 234 235 PSUPDRVSESSION pSession; … … 253 254 pSession->Uid = stuff; 254 255 pSession->Gid = stuff; */ 255 devfs_set_cdevpriv(pSession, VBoxDrvFreeBSDDtr);256 rc = devfs_set_cdevpriv(pSession, vboxdrvFreeBSDDtr); Assert(rc == 0); 256 257 Log(("VBoxDrvFreeBSDOpen: pSession=%p\n", pSession)); 257 258 ASMAtomicIncU32(&g_cUsers); … … 264 265 265 266 /** For vboxdrv. */ 266 static int VBoxDrvFreeBSDOpenSys(struct cdev *pDev, int fOpen, int iDev type, struct thread *pTd)267 { 268 return vboxdrvFreeBSDOpenCommon(pDev, fOpen, iDev type, pTd, true);267 static int VBoxDrvFreeBSDOpenSys(struct cdev *pDev, int fOpen, int iDevType, struct thread *pTd) 268 { 269 return vboxdrvFreeBSDOpenCommon(pDev, fOpen, iDevType, pTd, true); 269 270 } 270 271 271 272 272 273 /** For vboxdrvu. */ 273 static int VBoxDrvFreeBSDOpenUsr(struct cdev *pDev, int fOpen, int iDev type, struct thread *pTd)274 { 275 return vboxdrvFreeBSDOpenCommon(pDev, fOpen, iDev type, pTd, false);276 } 277 278 279 /** 280 * Close a file device previously opened by VBoxDrvFreeBSDOpen 274 static int VBoxDrvFreeBSDOpenUsr(struct cdev *pDev, int fOpen, int iDevType, struct thread *pTd) 275 { 276 return vboxdrvFreeBSDOpenCommon(pDev, fOpen, iDevType, pTd, false); 277 } 278 279 280 /** 281 * Close a file device previously opened by VBoxDrvFreeBSDOpen. 281 282 * 282 283 * @returns 0 on success. 283 * @param pDev The device. 284 * @param fFile The file descriptor flags. 285 * @param DevType The device type (CHR. 286 * @param pTd The calling thread. 287 */ 288 static void VBoxDrvFreeBSDDtr(void *pData) 289 { 290 PSUPDRVSESSION pSession = pData; 291 Log(("VBoxDrvFreeBSDDtr: pSession=%p\n", pSession)); 284 * @param pvData The session being closed. 285 */ 286 static void vboxdrvFreeBSDDtr(void *pvData) 287 { 288 PSUPDRVSESSION pSession = pvData; 289 Log(("vboxdrvFreeBSDDtr: pSession=%p\n", pSession)); 292 290 293 291 /* … … 469 467 * 470 468 * @returns VBox status code, see supdrvIDC. 471 * @param iReq The request code.469 * @param uReq The request code. 472 470 * @param pReq The request. 473 471 */
Note:
See TracChangeset
for help on using the changeset viewer.