Changeset 26313 in vbox
- Timestamp:
- Feb 5, 2010 11:20:10 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 57384
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r26300 r26313 288 288 LogFlowThisFunc(("\n")); 289 289 290 memset(mapFDLeds, 0, sizeof(mapFDLeds)); 291 memset(mapIDELeds, 0, sizeof(mapIDELeds)); 292 memset(mapSATALeds, 0, sizeof(mapSATALeds)); 293 memset(mapSCSILeds, 0, sizeof(mapSCSILeds)); 290 memset(mapStorageLeds, 0, sizeof(mapStorageLeds)); 294 291 memset(mapNetworkLeds, 0, sizeof(mapNetworkLeds)); 295 292 memset(&mapUSBLed, 0, sizeof(mapUSBLed)); 296 293 memset(&mapSharedFolderLed, 0, sizeof(mapSharedFolderLed)); 294 295 for (unsigned i = 0; i < RT_ELEMENTS(maStorageDevType); ++ i) 296 maStorageDevType[i] = DeviceType_Null; 297 297 298 298 return S_OK; … … 2435 2435 { 2436 2436 case DeviceType_Floppy: 2437 {2438 for (unsigned i = 0; i < RT_ELEMENTS(mapFDLeds); ++i)2439 SumLed.u32 |= readAndClearLed(mapFDLeds[i]);2440 break;2441 }2442 2443 2437 case DeviceType_DVD: 2444 {2445 SumLed.u32 |= readAndClearLed(mapIDELeds[2]);2446 break;2447 }2448 2449 2438 case DeviceType_HardDisk: 2450 2439 { 2451 SumLed.u32 |= readAndClearLed(mapIDELeds[0]); 2452 SumLed.u32 |= readAndClearLed(mapIDELeds[1]); 2453 SumLed.u32 |= readAndClearLed(mapIDELeds[3]); 2454 for (unsigned i = 0; i < RT_ELEMENTS(mapSATALeds); ++i) 2455 SumLed.u32 |= readAndClearLed(mapSATALeds[i]); 2456 for (unsigned i = 0; i < RT_ELEMENTS(mapSCSILeds); ++i) 2457 SumLed.u32 |= readAndClearLed(mapSCSILeds[i]); 2440 for (unsigned i = 0; i < RT_ELEMENTS(mapStorageLeds); ++i) 2441 if (maStorageDevType[i] == aDeviceType) 2442 SumLed.u32 |= readAndClearLed(mapStorageLeds[i]); 2458 2443 break; 2459 2444 } -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r26207 r26313 853 853 for (size_t i = 0; i < ctrls.size(); ++ i) 854 854 { 855 DeviceType_T *paLedDevType = NULL; 856 855 857 StorageControllerType_T enmCtrlType; 856 858 rc = ctrls[i]->COMGETTER(ControllerType)(&enmCtrlType); H(); … … 896 898 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 897 899 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 898 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapS CSILeds[0]); RC_CHECK();900 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedScsi]); RC_CHECK(); 899 901 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 902 Assert(cLedScsi >= 16); 900 903 rc = CFGMR3InsertInteger(pCfg, "Last", 15); RC_CHECK(); 904 paLedDevType = &pConsole->maStorageDevType[iLedScsi]; 901 905 break; 902 906 } … … 913 917 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 914 918 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 915 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapS CSILeds[0]); RC_CHECK();919 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedScsi]); RC_CHECK(); 916 920 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 921 Assert(cLedScsi >= 16); 917 922 rc = CFGMR3InsertInteger(pCfg, "Last", 15); RC_CHECK(); 923 paLedDevType = &pConsole->maStorageDevType[iLedScsi]; 918 924 break; 919 925 } … … 956 962 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 957 963 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 958 AssertRelease(cPorts <= RT_ELEMENTS(pConsole->mapSATALeds));959 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapS ATALeds[0]); RC_CHECK();964 AssertRelease(cPorts <= cLedSata); 965 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedSata]); RC_CHECK(); 960 966 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 961 967 rc = CFGMR3InsertInteger(pCfg, "Last", cPorts - 1); RC_CHECK(); 968 paLedDevType = &pConsole->maStorageDevType[iLedSata]; 962 969 break; 963 970 } … … 980 987 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 981 988 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 982 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->map IDELeds[0]);RC_CHECK();989 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedIde]); RC_CHECK(); 983 990 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 991 Assert(cLedIde >= 4); 984 992 rc = CFGMR3InsertInteger(pCfg, "Last", 3); RC_CHECK(); 993 paLedDevType = &pConsole->maStorageDevType[iLedIde]; 985 994 986 995 /* IDE flavors */ … … 1006 1015 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 1007 1016 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1008 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->map FDLeds[0]); RC_CHECK();1017 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedFloppy]); RC_CHECK(); 1009 1018 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 1019 Assert(cLedFloppy >= 1); 1010 1020 rc = CFGMR3InsertInteger(pCfg, "Last", 0); RC_CHECK(); 1021 paLedDevType = &pConsole->maStorageDevType[iLedFloppy]; 1011 1022 break; 1012 1023 } … … 1025 1036 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 1026 1037 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1027 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapS CSILeds[0]); RC_CHECK();1038 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedScsi]); RC_CHECK(); 1028 1039 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 1029 rc = CFGMR3InsertInteger(pCfg, "Last", 15); RC_CHECK(); 1040 Assert(cLedScsi >= 16); 1041 rc = CFGMR3InsertInteger(pCfg, "Last", 15) ; RC_CHECK(); 1042 paLedDevType = &pConsole->maStorageDevType[iLedScsi]; 1030 1043 break; 1031 1044 } … … 1231 1244 } 1232 1245 } 1246 1247 if (paLedDevType) 1248 paLedDevType[uLUN] = lType; 1233 1249 } 1234 1250 H(); -
trunk/src/VBox/Main/include/ConsoleImpl.h
r26186 r26313 579 579 AudioSniffer * const mAudioSniffer; 580 580 581 PPDMLED mapFDLeds[2]; 582 PPDMLED mapIDELeds[4]; 583 PPDMLED mapSATALeds[30]; 584 PPDMLED mapSCSILeds[16]; 585 PPDMLED mapNetworkLeds[SchemaDefs::NetworkAdapterCount]; 586 PPDMLED mapSharedFolderLed; 587 PPDMLED mapUSBLed[2]; 581 enum 582 { 583 iLedFloppy = 0, 584 cLedFloppy = 1, 585 iLedIde = iLedFloppy + cLedFloppy, 586 cLedIde = 4, 587 iLedSata = iLedIde + cLedIde, 588 cLedSata = 30, 589 iLedScsi = iLedSata + cLedSata, 590 cLedScsi = 16 591 }; 592 DeviceType_T maStorageDevType[cLedFloppy + cLedIde + cLedSata + cLedScsi]; 593 PPDMLED mapStorageLeds[RT_ELEMENTS(maStorageDevType)]; 594 PPDMLED mapNetworkLeds[SchemaDefs::NetworkAdapterCount]; 595 PPDMLED mapSharedFolderLed; 596 PPDMLED mapUSBLed[2]; 588 597 #if ((defined(RT_OS_LINUX) && !defined(VBOX_WITH_NETFLT)) || defined(RT_OS_FREEBSD)) 589 Utf8Str maTAPDeviceName[8];590 RTFILE maTapFD[8];598 Utf8Str maTAPDeviceName[8]; 599 RTFILE maTapFD[8]; 591 600 #endif 592 601
Note:
See TracChangeset
for help on using the changeset viewer.