Changeset 98095 in vbox for trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
- Timestamp:
- Jan 16, 2023 3:17:49 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r98091 r98095 657 657 658 658 /** 659 * Updates the device type for a LED. 660 * 661 * @param penmSubTypeEntry The sub-type entry to update. 662 * @param enmNewType The new type. 663 */ 664 void Console::i_setLedType(DeviceType_T *penmSubTypeEntry, DeviceType_T enmNewType) 665 { 666 /* 667 * ASSUMES no race conditions here wrt concurrent type updating. 668 */ 669 if (*penmSubTypeEntry != enmNewType) 670 { 671 *penmSubTypeEntry = enmNewType; 672 ASMAtomicIncU32(&muLedGen); 673 } 674 } 675 676 677 /** 659 678 * Allocate a set of LEDs. 660 679 * … … 738 757 * @throws ConfigError and std::bad_alloc. 739 758 */ 740 void Console::i_attachStatusDriver(PCFGMNODE pCtlInst, DeviceType_T enmType )759 void Console::i_attachStatusDriver(PCFGMNODE pCtlInst, DeviceType_T enmType, uint32_t cLeds /*= 1*/) 741 760 { 742 761 Assert(enmType > DeviceType_Null && enmType < DeviceType_End); 743 i_attachStatusDriver(pCtlInst, RT_BIT_32(enmType), 1, NULL, NULL, NULL, 0);762 i_attachStatusDriver(pCtlInst, RT_BIT_32(enmType), cLeds, NULL, NULL, NULL, 0); 744 763 } 745 764 … … 2184 2203 * Attach the status driver. 2185 2204 */ 2186 i_attachStatusDriver(pInst, RT_BIT_32(DeviceType_USB), 2, NULL, NULL, NULL, 0);2205 i_attachStatusDriver(pInst, DeviceType_USB, 2); 2187 2206 } 2188 2207 } /* for every USB controller. */ … … 2485 2504 2486 2505 /* Attach the status driver */ 2487 i_attachStatusDriver(pCtlInst, DeviceType_Floppy, 2, NULL,2488 &mapMediumAttachments, pszCtrlDev, ulInstance);2506 i_attachStatusDriver(pCtlInst, RT_BIT_32(DeviceType_Floppy), 2507 2, NULL, &mapMediumAttachments, pszCtrlDev, ulInstance); 2489 2508 break; 2490 2509 } … … 5097 5116 5098 5117 if (paLedDevType) 5099 paLedDevType[uLUN] = enmType;5118 i_setLedType(&paLedDevType[uLUN], enmType); 5100 5119 5101 5120 /* Dump the changed LUN if possible, dump the complete device otherwise */
Note:
See TracChangeset
for help on using the changeset viewer.