Changeset 34452 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Nov 29, 2010 11:20:09 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r34433 r34452 735 735 static DECLCALLBACK(int) drvscsiConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 736 736 { 737 int rc = VINF_SUCCESS; 737 738 PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI); 738 739 LogFlowFunc(("pDrvIns=%#p pCfg=%#p\n", pDrvIns, pCfg)); … … 750 751 pThis->IPortAsync.pfnTransferCompleteNotify = drvscsiTransferCompleteNotify; 751 752 753 /* Query the SCSI port interface above. */ 754 pThis->pDevScsiPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMISCSIPORT); 755 AssertMsgReturn(pThis->pDevScsiPort, ("Missing SCSI port interface above\n"), VERR_PDM_MISSING_INTERFACE); 756 757 /* Query the optional LED interface above. */ 758 pThis->pLedPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 759 if (pThis->pLedPort != NULL) 760 { 761 /* Get The Led. */ 762 rc = pThis->pLedPort->pfnQueryStatusLed(pThis->pLedPort, 0, &pThis->pLed); 763 if (RT_FAILURE(rc)) 764 pThis->pLed = &pThis->Led; 765 } 766 else 767 pThis->pLed = &pThis->Led; 768 752 769 /* 753 770 * Try attach driver below and query it's block interface. 754 771 */ 755 intrc = PDMDrvHlpAttach(pDrvIns, fFlags, &pThis->pDrvBase);772 rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pThis->pDrvBase); 756 773 AssertMsgReturn(RT_SUCCESS(rc), ("Attaching driver below failed rc=%Rrc\n", rc), rc); 757 774 … … 772 789 } 773 790 774 /* Query the SCSI port interface above. */775 pThis->pDevScsiPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMISCSIPORT);776 AssertMsgReturn(pThis->pDevScsiPort, ("Missing SCSI port interface above\n"), VERR_PDM_MISSING_INTERFACE);777 778 791 pThis->pDrvMount = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMIMOUNT); 779 780 /* Query the optional LED interface above. */781 pThis->pLedPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS);782 if (pThis->pLedPort != NULL)783 {784 /* Get The Led. */785 rc = pThis->pLedPort->pfnQueryStatusLed(pThis->pLedPort, 0, &pThis->pLed);786 if (RT_FAILURE(rc))787 pThis->pLed = &pThis->Led;788 }789 else790 pThis->pLed = &pThis->Led;791 792 792 793 /* Try to get the optional async block interface. */
Note:
See TracChangeset
for help on using the changeset viewer.