- Timestamp:
- Nov 2, 2009 2:04:08 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r24250 r24255 2655 2655 default: 2656 2656 return NULL; 2657 }2658 }2659 2660 void Console::controllerDevToBool(const char *pszCtrlDev, bool *afBool)2661 {2662 if (!strcmp("lsilogicscsi", pszCtrlDev))2663 {2664 afBool[StorageControllerType_LsiLogic] = true;2665 }2666 else if (!strcmp("buslogic", pszCtrlDev))2667 {2668 afBool[StorageControllerType_BusLogic] = true;2669 }2670 else if (!strcmp("ahci", pszCtrlDev))2671 {2672 afBool[StorageControllerType_IntelAhci] = true;2673 }2674 else if (!strcmp("piix3ide", pszCtrlDev))2675 {2676 afBool[StorageControllerType_PIIX3] = true;2677 afBool[StorageControllerType_PIIX4] = true;2678 afBool[StorageControllerType_ICH6] = true;2679 }2680 else if (!strcmp("i82078", pszCtrlDev))2681 {2682 afBool[StorageControllerType_I82078] = true;2683 2657 } 2684 2658 } -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r24250 r24255 766 766 */ 767 767 com::SafeIfaceArray<IStorageController> ctrls; 768 bool afNodePresent[StorageControllerType_I82078 + 1] = {};768 PCFGMNODE aCtrlNodes[StorageControllerType_I82078 + 1] = {}; 769 769 hrc = pMachine->COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(ctrls)); H(); 770 770 … … 785 785 const char *pszCtrlDev = pConsole->controllerTypeToDev(enmCtrlType); 786 786 787 if (!afNodePresent[enmCtrlType]) 787 if (aCtrlNodes[enmCtrlType]) 788 pDev = aCtrlNodes[enmCtrlType]; 789 else 788 790 { 789 791 rc = CFGMR3InsertNode(pDevices, pszCtrlDev, &pDev); RC_CHECK(); 790 pConsole->controllerDevToBool(pszCtrlDev, afNodePresent); 791 } 792 else 793 { 794 pDev = CFGMR3GetChildF(pDevices, pszCtrlDev); 795 if (!pDev) 796 rc = VERR_CFGM_CHILD_NOT_FOUND; RC_CHECK(); 797 } 792 793 if ( (enmCtrlType == StorageControllerType_PIIX3) 794 || (enmCtrlType == StorageControllerType_PIIX4) 795 || (enmCtrlType == StorageControllerType_ICH6)) 796 { 797 aCtrlNodes[StorageControllerType_PIIX3] = pDev; 798 aCtrlNodes[StorageControllerType_PIIX4] = pDev; 799 aCtrlNodes[StorageControllerType_ICH6] = pDev; 800 } 801 else 802 aCtrlNodes[enmCtrlType] = pDev; 803 } 804 798 805 rc = CFGMR3InsertNodeF(pDev, &pCtlInst, "%u", ulInstance); RC_CHECK(); 799 806 -
trunk/src/VBox/Main/include/ConsoleImpl.h
r24250 r24255 443 443 const char *pszFormat, bool fPassthrough); 444 444 const char *controllerTypeToDev(StorageControllerType_T enmCtrlType); 445 void controllerDevToBool(const char *pszCtrlDev, bool *afBool);446 445 HRESULT convertBusPortDeviceToLun(StorageBus_T enmBus, LONG port, LONG device, unsigned &uLun); 447 446 HRESULT doMediumChange(IMediumAttachment *aMediumAttachment);
Note:
See TracChangeset
for help on using the changeset viewer.