Changeset 82132 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Nov 23, 2019 8:30:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r82080 r82132 2462 2462 #endif /* VBOX_WITH_VIRTIO */ 2463 2463 std::list<BootNic> llBootNics; 2464 for (ULONG u lInstance = 0; ulInstance < maxNetworkAdapters; ++ulInstance)2464 for (ULONG uInstance = 0; uInstance < maxNetworkAdapters; ++uInstance) 2465 2465 { 2466 2466 ComPtr<INetworkAdapter> networkAdapter; 2467 hrc = pMachine->GetNetworkAdapter(u lInstance, networkAdapter.asOutParam());H();2467 hrc = pMachine->GetNetworkAdapter(uInstance, networkAdapter.asOutParam()); H(); 2468 2468 BOOL fEnabledNetAdapter = FALSE; 2469 2469 hrc = networkAdapter->COMGETTER(Enabled)(&fEnabledNetAdapter); H(); … … 2499 2499 #endif /* VBOX_WITH_VIRTIO */ 2500 2500 default: 2501 AssertMsgFailed(("Invalid network adapter type '%d' for slot '%d'", 2502 adapterType, ulInstance)); 2501 AssertMsgFailed(("Invalid network adapter type '%d' for slot '%d'", adapterType, uInstance)); 2503 2502 return VMR3SetError(pUVM, VERR_INVALID_PARAMETER, RT_SRC_POS, 2504 N_("Invalid network adapter type '%d' for slot '%d'"), 2505 adapterType, ulInstance); 2506 } 2507 2508 InsertConfigNode(pDev, Utf8StrFmt("%u", ulInstance).c_str(), &pInst); 2503 N_("Invalid network adapter type '%d' for slot '%d'"), adapterType, uInstance); 2504 } 2505 2506 InsertConfigNode(pDev, Utf8StrFmt("%u", uInstance).c_str(), &pInst); 2509 2507 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 2510 2508 /* the first network card gets the PCI ID 3, the next 3 gets 8..10, 2511 2509 * next 4 get 16..19. */ 2512 2510 int iPCIDeviceNo; 2513 switch (u lInstance)2511 switch (uInstance) 2514 2512 { 2515 2513 case 0: … … 2517 2515 break; 2518 2516 case 1: case 2: case 3: 2519 iPCIDeviceNo = u lInstance - 1 + 8;2517 iPCIDeviceNo = uInstance - 1 + 8; 2520 2518 break; 2521 2519 case 4: case 5: case 6: case 7: 2522 iPCIDeviceNo = u lInstance - 4 + 16;2520 iPCIDeviceNo = uInstance - 4 + 16; 2523 2521 break; 2524 2522 default: … … 2546 2544 #ifdef VBOX_WITH_2X_4GB_ADDR_SPACE /* not safe here yet. */ /** @todo Make PCNet ring-0 safe on 32-bit mac kernels! */ 2547 2545 if (pDev == pDevPCNet) 2548 {2549 2546 InsertConfigInteger(pCfg, "R0Enabled", false); 2550 }2551 2547 #endif 2552 2548 /* … … 2555 2551 BootNic nic; 2556 2552 2557 nic.mInstance = u lInstance;2553 nic.mInstance = uInstance; 2558 2554 /* Could be updated by reference, if auto assigned */ 2559 2555 nic.mPCIAddress = PCIAddr; … … 2636 2632 * Attach the status driver. 2637 2633 */ 2638 i_attachStatusDriver(pInst, &mapNetworkLeds[u lInstance], 0, 0, NULL, NULL, 0);2634 i_attachStatusDriver(pInst, &mapNetworkLeds[uInstance], 0, 0, NULL, NULL, 0); 2639 2635 2640 2636 /* … … 2643 2639 bool fIgnoreConnectFailure = mMachineState == MachineState_Restoring; 2644 2640 rc = i_configNetwork(pszAdapterName, 2645 u lInstance,2641 uInstance, 2646 2642 0, 2647 2643 networkAdapter,
Note:
See TracChangeset
for help on using the changeset viewer.