Changeset 13985 in vbox
- Timestamp:
- Nov 9, 2008 2:28:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r13908 r13985 6862 6862 hrc = hda->COMGETTER(Channel)(&lChannel); H(); 6863 6863 6864 int iLUN; 6864 int iLUN; 6865 const char *pcszDevice = NULL; 6866 6865 6867 switch (enmBus) 6866 6868 { … … 6880 6882 6881 6883 iLUN = 2*lChannel + lDev; 6884 pcszDevice = "piix3ide"; 6882 6885 break; 6883 6886 } … … 6885 6888 { 6886 6889 iLUN = lChannel; 6890 pcszDevice = "ahci"; 6887 6891 break; 6888 6892 } … … 6899 6903 */ 6900 6904 PCFGMNODE pCfg; 6901 PCFGMNODE pLunL1 = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/piix3ide/0/LUN#%d/AttachedDriver/", iLUN); 6905 PCFGMNODE pLunL1; 6906 6907 pLunL1 = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/%s/0/LUN#%d/AttachedDriver/", pcszDevice, iLUN); 6908 6902 6909 if (!pLunL1) 6903 6910 { 6904 PCFGMNODE pInst = CFGMR3GetChild (CFGMR3GetRoot(pVM), "Devices/piix3ide/0/");6911 PCFGMNODE pInst = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/%s/0/", pcszDevice); 6905 6912 AssertReturn(pInst, VERR_INTERNAL_ERROR); 6906 6913 … … 6998 7005 * Detach the driver and replace the config node. 6999 7006 */ 7000 rc = PDMR3DeviceDetach(pVM, "piix3ide", 0, iLUN);RC_CHECK();7007 rc = PDMR3DeviceDetach(pVM, pcszDevice, 0, iLUN); RC_CHECK(); 7001 7008 CFGMR3RemoveNode(pCfg); 7002 7009 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); … … 7036 7043 * Attach the new driver. 7037 7044 */ 7038 rc = PDMR3DeviceAttach(pVM, "piix3ide", 0, iLUN, NULL);RC_CHECK();7045 rc = PDMR3DeviceAttach(pVM, pcszDevice, 0, iLUN, NULL); RC_CHECK(); 7039 7046 7040 7047 LogFlowFunc (("Returns success\n"));
Note:
See TracChangeset
for help on using the changeset viewer.