- Timestamp:
- Apr 17, 2007 7:42:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r1192 r2141 219 219 if (g_iMajorDeviceNo >= 0) 220 220 { 221 /** @todo the UID, GID and mode mask should be configurable! This isn't very secure... */ 221 222 g_hDevFsDevice = devfs_make_node(makedev(g_iMajorDeviceNo, 0), DEVFS_CHAR, 222 UID_ROOT, GID_WHEEL, 066 0, DEVICE_NAME); /** @todo the UID and GID should be configurable! */223 UID_ROOT, GID_WHEEL, 0666, DEVICE_NAME); 223 224 if (g_hDevFsDevice) 224 225 { … … 299 300 int rc; 300 301 PSUPDRVSESSION pSession; 301 dprintf(("VBoxSupDrvOpen:\n")); 302 #ifdef DEBUG 303 char szName[128]; 304 szName[0] = '\0'; 305 proc_name(proc_pid(pProcess), szName, sizeof(szName)); 306 dprintf(("VBoxSupDrvOpen: pid=%d '%s'\n", proc_pid(pProcess), szName)); 307 #endif 302 308 303 309 /* … … 328 334 } 329 335 336 #if 1 330 337 dprintf(("VBoxSupDrvOpen: g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, proc_pid(pProcess))); 331 338 #else 339 OSDBGPRINT(("VBoxSupDrvOpen: pid=%d '%s' pSession=%p rc=%d\n", proc_pid(pProcess), szName, pSession, rc)); 340 #endif 332 341 return VBoxSupDrvErr2DarwinErr(rc); 333 342 } … … 380 389 if (!pSession) 381 390 { 382 OSDBGPRINT(("VBoxSupDrvIoctl: WHUT?!? pSession == NULL! This must be a mistake... pid=%d\n", (int)Process)); 391 OSDBGPRINT(("VBoxSupDrvClose: WHAT?!? pSession == NULL! This must be a mistake... pid=%d (close)\n", 392 (int)Process)); 383 393 return EINVAL; 384 394 } … … 422 432 if (!pSession) 423 433 { 424 OSDBGPRINT(("VBoxSupDrvIoctl: WHUT?!? pSession == NULL! This must be a mistake... pid=%d\n", (int)Process)); 434 OSDBGPRINT(("VBoxSupDrvIOCtl: WHAT?!? pSession == NULL! This must be a mistake... pid=%d iCmd=%#x\n", 435 (int)Process, iCmd)); 425 436 return EINVAL; 426 437 } … … 456 467 unsigned cbOut = 0; 457 468 PSUPDRVIOCTLDATA pArgs = (PSUPDRVIOCTLDATA)pData; 458 dprintf(("VBoxSupDrvIOCtl : pSession=%p iCmd=%p pData=%p pProcess=%p\n", pSession, iCmd, pData, pProcess));469 dprintf(("VBoxSupDrvIOCtlSlow: pSession=%p iCmd=%p pData=%p pProcess=%p\n", pSession, iCmd, pData, pProcess)); 459 470 460 471 /* … … 463 474 if (IOCPARM_LEN(iCmd) != sizeof(SUPDRVIOCTLDATA)) 464 475 { 465 dprintf(("VBoxSupDrvIOCtl : incorrect input length! cbArgs=%d\n", IOCPARM_LEN(iCmd)));476 dprintf(("VBoxSupDrvIOCtlSlow: incorrect input length! cbArgs=%d\n", IOCPARM_LEN(iCmd))); 466 477 return EINVAL; 467 478 } … … 478 489 if (pvBuf == NULL) 479 490 { 480 dprintf(("VBoxSupDrvIOCtl : failed to allocate buffer of %d bytes.\n", cbBuf));491 dprintf(("VBoxSupDrvIOCtlSlow: failed to allocate buffer of %d bytes.\n", cbBuf)); 481 492 return ENOMEM; 482 493 } … … 484 495 if (rc) 485 496 { 486 dprintf(("VBoxSupDrvIOCtl : copyin(%p,,%d) failed.\n", pArgs->pvIn, cbBuf));497 dprintf(("VBoxSupDrvIOCtlSlow: copyin(%p,,%d) failed.\n", pArgs->pvIn, cbBuf)); 487 498 if (pvPageBuf) 488 499 IOFreeAligned(pvPageBuf, cbBuf); … … 504 515 if (rc) 505 516 { 506 dprintf(("VBoxSupDrvIOCtl : pid=%d iCmd=%x pData=%p failed, rc=%d (darwin rc=%d)\n",517 dprintf(("VBoxSupDrvIOCtlSlow: pid=%d iCmd=%x pData=%p failed, rc=%d (darwin rc=%d)\n", 507 518 proc_pid(pProcess), iCmd, (void *)pData, rc, VBoxSupDrvErr2DarwinErr(rc))); 508 519 rc = VBoxSupDrvErr2DarwinErr(rc); … … 515 526 if (rc2) 516 527 { 517 dprintf(("VBoxSupDrvIOCtl : copyout(,%p,%d) failed.\n", pArgs->pvOut, cbBuf));528 dprintf(("VBoxSupDrvIOCtlSlow: copyout(,%p,%d) failed.\n", pArgs->pvOut, cbBuf)); 518 529 rc = rc2; 519 530 } … … 531 542 RTMemTmpFree(pvBuf); 532 543 533 dprintf2(("VBoxSupDrvIOCtl : returns %d\n", rc));544 dprintf2(("VBoxSupDrvIOCtlSlow: returns %d\n", rc)); 534 545 return rc; 535 546 }
Note:
See TracChangeset
for help on using the changeset viewer.