vbox的更動 4032 路徑 trunk/src/VBox/Devices/VMMDev
- 時間撮記:
- 2007-8-4 上午11:21:11 (17 年 以前)
- 位置:
- trunk/src/VBox/Devices/VMMDev
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r3871 r4032 1461 1461 return &pData->HGCMPort; 1462 1462 #endif 1463 case PDMINTERFACE_LED_PORTS: 1464 /* Currently only for shared folders */ 1465 return &pData->SharedFolders.ILeds; 1463 1466 default: 1464 1467 return NULL; … … 1661 1664 1662 1665 return; 1666 } 1667 1668 /** 1669 * Gets the pointer to the status LED of a unit. 1670 * 1671 * @returns VBox status code. 1672 * @param pInterface Pointer to the interface structure containing the called function pointer. 1673 * @param iLUN The unit which status LED we desire. 1674 * @param ppLed Where to store the LED pointer. 1675 */ 1676 static DECLCALLBACK(int) vmmdevQueryStatusLed(PPDMILEDPORTS pInterface, unsigned iLUN, PPDMLED *ppLed) 1677 { 1678 VMMDevState *pData = IVMMDEVPORT_2_VMMDEVSTATE(pInterface); 1679 if (iLUN == 0) /* LUN 0 is shared folders */ 1680 { 1681 *ppLed = &pData->SharedFolders.Led; 1682 return VINF_SUCCESS; 1683 } 1684 return VERR_PDM_LUN_NOT_FOUND; 1663 1685 } 1664 1686 … … 1896 1918 pData->Port.pfnRequestSeamlessChange = vmmdevRequestSeamlessChange; 1897 1919 1920 /* Shared folder LED */ 1921 pData->SharedFolders.Led.u32Magic = PDMLED_MAGIC; 1922 pData->SharedFolders.ILeds.pfnQueryStatusLed = vmmdevQueryStatusLed; 1898 1923 1899 1924 #ifdef VBOX_HGCM … … 1927 1952 else 1928 1953 AssertMsgFailedReturn(("Failed to attach LUN #0! rc=%Vrc\n", rc), rc); 1954 1955 /* 1956 * Attach status driver for shared folders (optional). 1957 */ 1958 PPDMIBASE pBase; 1959 rc = PDMDevHlpDriverAttach(pDevIns, PDM_STATUS_LUN, &pData->Base, &pBase, "Status Port"); 1960 if (VBOX_SUCCESS(rc)) 1961 pData->SharedFolders.pLedsConnector = (PPDMILEDCONNECTORS) 1962 pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS); 1963 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 1964 { 1965 AssertMsgFailed(("Failed to attach to status driver. rc=%Vrc\n", rc)); 1966 return rc; 1967 } 1929 1968 1930 1969 /* -
trunk/src/VBox/Devices/VMMDev/VMMDevState.h
r3793 r4032 159 159 #endif /* VBOX_HGCM */ 160 160 161 /* Shared folders LED */ 162 struct 163 { 164 /** The LED. */ 165 PDMLED Led; 166 /** The LED ports. */ 167 PDMILEDPORTS ILeds; 168 /** Partner of ILeds. */ 169 HCPTRTYPE(PPDMILEDCONNECTORS) pLedsConnector; 170 } SharedFolders; 171 161 172 } VMMDevState; 162 173
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器