Changeset 10898 in vbox for trunk/src/VBox/Main/ConsoleImpl2.cpp
- Timestamp:
- Jul 26, 2008 2:11:55 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33724
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r10797 r10898 855 855 rc = CFGMR3InsertString(pCfg, "Format", "VMDK"); RC_CHECK(); 856 856 857 /* 857 /* 858 858 * Create cfgm nodes for async transport driver because VMDK is currently the only 859 859 * one which may support async I/O. This has to be made generic based on the capabiliy flags … … 1188 1188 # endif 1189 1189 } 1190 1191 #elif defined(RT_OS_DARWIN) 1192 if (fSniffer) 1193 { 1194 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL0); RC_CHECK(); 1195 } 1196 else 1197 { 1198 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1199 } 1200 /* The name is on the form 'ifX: long name', chop it off at the colon. */ 1201 Bstr hostInterfaceName; 1202 hrc = networkAdapter->COMGETTER(HostInterface)(hostInterfaceName.asOutParam()); H(); 1203 char szTrunkName[8]; 1204 strncpy(szTrunkName, Utf8Str(hostInterfaceName).raw(), sizeof(szTrunkName)); 1205 char *pszColon = (char *)memchr(szTrunkName, ':', sizeof(szTrunkName)); 1206 if (!pszColon) 1207 { 1208 hrc = networkAdapter->Detach(); H(); 1209 return VMSetError(pVM, VERR_INTERNAL_ERROR, RT_SRC_POS, 1210 N_("Malformed host interface networking name '%ls'"), 1211 hostInterfaceName.raw()); 1212 } 1213 *pszColon = '\0'; 1214 1215 rc = CFGMR3InsertString(pLunL0, "Driver", "IntNet"); RC_CHECK(); 1216 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1217 rc = CFGMR3InsertString(pCfg, "TrunkName", szTrunkName); RC_CHECK(); 1218 char szNetwork[80]; 1219 RTStrPrintf(szNetwork, sizeof(szNetwork), "HostInterfaceNetworking-%s\n", szTrunkName); 1220 rc = CFGMR3InsertString(pCfg, "Network", szNetwork); RC_CHECK(); 1221 1190 1222 #elif defined(RT_OS_WINDOWS) 1191 1223 if (fSniffer) … … 1687 1719 Bstr strNextExtraDataKey; 1688 1720 Bstr strExtraDataValue; 1689 1721 1690 1722 /* get the next key */ 1691 1723 hrc = pMachine->GetNextExtraDataKey(strExtraDataKey, strNextExtraDataKey.asOutParam(), 1692 1724 strExtraDataValue.asOutParam()); 1693 1725 1694 1726 /* stop if for some reason there's nothing more to request */ 1695 1727 if (FAILED(hrc) || !strNextExtraDataKey) 1696 1728 break; 1697 1729 1698 1730 strExtraDataKey = strNextExtraDataKey; 1699 1731 Utf8Str strExtraDataKeyUtf8 = Utf8Str(strExtraDataKey); 1700 1732 1701 1733 /* we only care about keys starting with VBOX_SHARED_INFO_KEY_PREFIX */ 1702 1734 if (strncmp(strExtraDataKeyUtf8.raw(), VBOX_SHARED_INFO_KEY_PREFIX, VBOX_SHARED_INFO_PREFIX_LEN) != 0) 1703 1735 continue; 1704 1736 char *pszCFGMValueName = (char*)strExtraDataKeyUtf8.raw() + VBOX_SHARED_INFO_PREFIX_LEN; 1705 1737 1706 1738 /* now let's have a look at the value */ 1707 1739 Utf8Str strCFGMValueUtf8 = Utf8Str(strExtraDataValue);
Note:
See TracChangeset
for help on using the changeset viewer.