- Timestamp:
- Aug 3, 2007 1:17:25 PM (18 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r3891 r4021 219 219 memset(mapIDELeds, 0, sizeof(mapIDELeds)); 220 220 memset(mapNetworkLeds, 0, sizeof(mapNetworkLeds)); 221 memset(&mapSharedFolderLed, 0, sizeof(mapSharedFolderLed)); 221 222 222 223 #ifdef VBOX_WITH_UNIXY_TAP_NETWORKING … … 1871 1872 /// @todo (r=dmik) 1872 1873 // USB_DEVICE_ACTIVITY 1874 break; 1875 } 1876 1877 case DeviceType_SharedFolderDevice: 1878 { 1879 SumLed.u32 |= readAndClearLed(mapSharedFolderLed); 1873 1880 break; 1874 1881 } … … 5644 5651 5645 5652 /* 5653 * Attach the status driver. 5654 */ 5655 rc = CFGMR3InsertNode(pInst, "LUN#999", &pLunL0); RC_CHECK(); 5656 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 5657 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 5658 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapSharedFolderLed); RC_CHECK(); 5659 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 5660 rc = CFGMR3InsertInteger(pCfg, "Last", 0); RC_CHECK(); 5661 5662 /* 5646 5663 * Audio Sniffer Device 5647 5664 */ -
trunk/src/VBox/Main/VMMDevInterface.cpp
r4015 r4021 60 60 /** Our VMM device connector interface. */ 61 61 PDMIVMMDEVCONNECTOR Connector; 62 62 63 #ifdef VBOX_HGCM 63 64 /** Pointer to the HGCM port interface of the driver/device above us. */ … … 65 66 /** Our HGCM connector interface. */ 66 67 PDMIHGCMCONNECTOR HGCMConnector; 68 69 struct 70 { 71 /** The LED. */ 72 PDMLED Led; 73 /** The LED ports. */ 74 PDMILEDPORTS ILeds; 75 /** Partner of ILeds. */ 76 HCPTRTYPE(PPDMILEDCONNECTORS) pLedsConnector; 77 } SharedFolders; 78 67 79 #endif 68 80 } DRVMAINVMMDEV, *PDRVMAINVMMDEV; … … 463 475 return &pDrv->HGCMConnector; 464 476 #endif 477 case PDMINTERFACE_LED_PORTS: 478 /* Currently only for shared folders */ 479 return &pDrv->SharedFolders.ILeds; 465 480 default: 466 481 return NULL; … … 468 483 } 469 484 485 /** 486 * Gets the pointer to the status LED of a unit. 487 * 488 * @returns VBox status code. 489 * @param pInterface Pointer to the interface structure containing the called function pointer. 490 * @param iLUN The unit which status LED we desire. 491 * @param ppLed Where to store the LED pointer. 492 */ 493 static DECLCALLBACK(int) vmmdevQueryStatusLed(PPDMILEDPORTS pInterface, unsigned iLUN, PPDMLED *ppLed) 494 { 495 PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface); 496 if (iLUN == 0) 497 { 498 *ppLed = &pDrv->SharedFolders.Led; 499 return VINF_SUCCESS; 500 } 501 return VERR_PDM_LUN_NOT_FOUND; 502 } 470 503 471 504 /** … … 547 580 pData->Connector.pfnQueryVisibleRegion = vmmdevQueryVisibleRegion; 548 581 582 pData->SharedFolders.Led.u32Magic = PDMLED_MAGIC; 583 /* ILeds */ 584 pData->SharedFolders.ILeds.pfnQueryStatusLed = vmmdevQueryStatusLed; 585 549 586 550 587 #ifdef VBOX_HGCM … … 592 629 if (VBOX_SUCCESS(rc)) 593 630 { 631 PPDMIBASE pBase; 632 594 633 LogRel(("Shared Folders service loaded.\n")); 634 #if 0 635 /* 636 * Attach status driver (optional). 637 */ 638 rc = PDMDrvHlpDriverAttach(pDrvIns, PDM_STATUS_LUN, &pDrvIns->IBase, &pBase, "Status Port"); 639 if (VBOX_SUCCESS(rc)) 640 pData->SharedFolders.pLedsConnector = (PPDMILEDCONNECTORS) 641 pBase->pfnQueryInterface(pBase, PDMINTERFACE_LED_CONNECTORS); 642 else if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 643 { 644 AssertMsgFailed(("Failed to attach to status driver. rc=%Vrc\n", rc)); 645 return rc; 646 } 647 #endif 595 648 } 596 649 else -
trunk/src/VBox/Main/include/ConsoleImpl.h
r4015 r4021 494 494 PPDMLED mapIDELeds[4]; 495 495 PPDMLED mapNetworkLeds[8]; 496 PPDMLED mapSharedFolderLed; 496 497 #ifdef VBOX_WITH_UNIXY_TAP_NETWORKING 497 498 Utf8Str maTAPDeviceName[8];
Note:
See TracChangeset
for help on using the changeset viewer.