Changeset 106026 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Sep 12, 2024 11:21:40 AM (6 months ago)
- svn:sync-xref-src-repo-rev:
- 164775
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r106023 r106026 5328 5328 * @note The VM must not be running. 5329 5329 */ 5330 DECLCALLBACK(int) Console::i_changeNetworkAttachment(Console *pThis,5331 PUVM pUVM,5332 PCVMMR3VTABLE pVMM,5333 const char *pszDevice,5334 unsigned uInstance,5335 unsigned uLun,5336 INetworkAdapter *aNetworkAdapter)5330 /*static*/ DECLCALLBACK(int) Console::i_changeNetworkAttachment(Console *pThis, 5331 PUVM pUVM, 5332 PCVMMR3VTABLE pVMM, 5333 const char *pszDevice, 5334 unsigned uInstance, 5335 unsigned uLun, 5336 INetworkAdapter *aNetworkAdapter) 5337 5337 { 5338 5338 LogFlowFunc(("pThis=%p pszDevice=%p:{%s} uInstance=%u uLun=%u aNetworkAdapter=%p\n", … … 5344 5344 AssertComRCReturn(autoCaller.hrc(), VERR_ACCESS_DENIED); 5345 5345 5346 #ifdef VBOX_STRICT 5346 5347 ComPtr<IPlatform> pPlatform; 5347 5348 HRESULT hrc = pThis->mMachine->COMGETTER(Platform)(pPlatform.asOutParam()); … … 5366 5367 hrc = pPlatformProperties->GetMaxNetworkAdapters(chipsetType, &maxNetworkAdapters); 5367 5368 AssertComRC(hrc); 5368 AssertMsg( ( !strcmp(pszDevice, "pcnet") 5369 || !strcmp(pszDevice, "e1000") 5370 || !strcmp(pszDevice, "virtio-net")) 5371 && uLun == 0 5372 && uInstance < maxNetworkAdapters, 5369 AssertMsg(uLun == 0 && uInstance < maxNetworkAdapters, 5373 5370 ("pszDevice=%s uLun=%d uInstance=%d\n", pszDevice, uLun, uInstance)); 5371 #endif 5374 5372 Log(("pszDevice=%s uLun=%d uInstance=%d\n", pszDevice, uLun, uInstance)); 5375 5373 … … 5377 5375 * Check the VM for correct state. 5378 5376 */ 5379 PCFGMNODE pCfg = NULL;/* /Devices/Dev/.../Config/ */5377 PCFGMNODE pCfg = NULL; /* /Devices/Dev/.../Config/ */ 5380 5378 PCFGMNODE pLunL0 = NULL; /* /Devices/Dev/0/LUN#0/ */ 5381 PCFGMNODE pInst = pVMM->pfnCFGMR3GetChildF(pVMM->pfnCFGMR3GetRootU(pUVM), "Devices/%s/%d/", pszDevice, uInstance);5382 Assert Release(pInst);5379 PCFGMNODE pInst = pVMM->pfnCFGMR3GetChildF(pVMM->pfnCFGMR3GetRootU(pUVM), "Devices/%s/%d/", pszDevice, uInstance); 5380 AssertLogRelMsgReturn(pInst, ("pszDevices=%s uInstance=%u\n", pszDevice, uInstance), VERR_CFGM_CHILD_NOT_FOUND); 5383 5381 5384 5382 int vrc = pThis->i_configNetwork(pszDevice, uInstance, uLun, aNetworkAdapter, pCfg, pLunL0, pInst,
Note:
See TracChangeset
for help on using the changeset viewer.