Changeset 7946 in vbox
- Timestamp:
- Apr 14, 2008 9:28:05 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r7939 r7946 605 605 if (enabled) 606 606 { 607 ULONG nrPorts = 0;608 609 607 rc = CFGMR3InsertNode(pDevices, "ahci", &pDev); RC_CHECK(); 610 608 rc = CFGMR3InsertNode(pDev, "0", &pSataInst); RC_CHECK(); … … 616 614 rc = CFGMR3InsertNode(pSataInst, "Config", &pCfg); RC_CHECK(); 617 615 618 hrc = sataController->COMGETTER(PortCount)(&nrPorts); H(); 619 rc = CFGMR3InsertInteger(pCfg, "PortCount", nrPorts); RC_CHECK(); 616 ULONG cPorts = 0; 617 hrc = sataController->COMGETTER(PortCount)(&cPorts); H(); 618 rc = CFGMR3InsertInteger(pCfg, "PortCount", cPorts); RC_CHECK(); 620 619 621 620 /* Needed configuration values for the bios. */ … … 624 623 for (uint32_t i = 0; i < 4; i++) 625 624 { 626 const char *g_apszConfig[] =627 628 const char *g_apszBiosConfig[] =629 630 LONG aPortNumber; 631 632 hrc = sataController->GetIDEEmulationPort(i, & aPortNumber); H();633 rc = CFGMR3InsertInteger(pCfg, g_apszConfig[i], aPortNumber); RC_CHECK();634 rc = CFGMR3InsertInteger(pBiosCfg, g_apszBiosConfig[i], aPortNumber); RC_CHECK();625 static const char *s_apszConfig[4] = 626 { "PrimaryMaster", "PrimarySlave", "SecondaryMaster", "SecondarySlave" }; 627 static const char *s_apszBiosConfig[4] = 628 { "SataPrimaryMasterLUN", "SataPrimarySlaveLUN", "SataSecondaryMasterLUN", "SataSecondarySlaveLUN" }; 629 630 LONG lPortNumber = -1; 631 hrc = sataController->GetIDEEmulationPort(i, &lPortNumber); H(); 632 rc = CFGMR3InsertInteger(pCfg, s_apszConfig[i], lPortNumber); RC_CHECK(); 633 rc = CFGMR3InsertInteger(pBiosCfg, s_apszBiosConfig[i], lPortNumber); RC_CHECK(); 635 634 } 636 635 … … 639 638 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 640 639 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 640 AssertRelease(cPorts <= RT_ELEMENTS(pConsole->mapSATALeds)); 641 641 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapSATALeds[0]); RC_CHECK(); 642 642 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 643 rc = CFGMR3InsertInteger(pCfg, "Last", nrPorts-1); RC_CHECK(); 644 643 rc = CFGMR3InsertInteger(pCfg, "Last", cPorts - 1); RC_CHECK(); 645 644 } 646 645 }
Note:
See TracChangeset
for help on using the changeset viewer.