Changeset 6150 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Dec 19, 2007 10:55:09 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r6147 r6150 524 524 { 525 525 pState->pSession = pSession; 526 *pDev = makedevice(getmajor(*pDev), iOpenInstance); 526 527 Log((DEVICE_NAME "VBoxAddSolarisOpen: pSession=%p pState=%p\n", pSession, pState)); 527 528 return 0; … … 547 548 RTSpinlockReleaseNoInts(g_Spinlock, &Tmp); 548 549 550 int instance; 551 for (instance = 0; instance < 4096; instance++) 552 { 553 VBoxAddDevState *pState = ddi_get_soft_state(g_pVBoxAddSolarisState, instance); 554 if (pState) 555 break; 556 } 557 if (instance >= 4096) 558 { 559 Log((DEVICE_NAME ":VBoxAddSolarisOpen: All instances exhausted\n")); 560 return ENXIO; 561 } 562 *pDev = makedevice(getmajor(*pDev), instance); 549 563 Log((DEVICE_NAME "VBoxAddSolarisOpen: g_DevExt=%p pSession=%p rc=%d pid=%d\n", &g_DevExt, pSession, rc, (int)RTProcSelf())); 550 564 return 0; … … 601 615 { 602 616 Log((DEVICE_NAME ":VBoxGuestIoctl: WHUT?!? pSession == NULL! This must be a mistake... pid=%d", (int)Process)); 603 return VERR_INVALID_PARAMETER;617 return EFAULT; 604 618 } 605 619 #else … … 609 623 { 610 624 Log((DEVICE_NAME ":VBoxAddSolarisClose: failed to get pState.\n")); 611 return DDI_FAILURE;625 return EFAULT; 612 626 } 613 627 … … 618 632 { 619 633 Log((DEVICE_NAME ":VBoxAddSolarisClose: failed to get pSession.\n")); 620 return DDI_FAILURE;634 return EFAULT; 621 635 } 622 636 #endif … … 633 647 { 634 648 LogFlow((DEVICE_NAME ":VBoxAddSolarisRead\n")); 635 return DDI_SUCCESS;649 return 0; 636 650 } 637 651 … … 640 654 { 641 655 LogFlow((DEVICE_NAME ":VBoxAddSolarisWrite\n")); 642 return DDI_SUCCESS;656 return 0; 643 657 } 644 658 … … 705 719 { 706 720 Log((DEVICE_NAME ":VBoxAddSolarisIOCtl: no session data for %d\n", getminor(Dev))); 707 return DDI_SUCCESS;721 return EINVAL; 708 722 } 709 723 #endif
Note:
See TracChangeset
for help on using the changeset viewer.