Changeset 107276 in vbox
- Timestamp:
- Dec 10, 2024 12:40:08 PM (5 weeks ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmusb.h
r106061 r107276 1492 1492 VMMR3DECL(int) PDMR3UsbQueryDriverOnLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, 1493 1493 const char *pszDriver, PPPDMIBASE ppBase); 1494 VMMR3DECL(int) PDMR3UsbQueryDeviceLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase); 1494 1495 1495 1496 /** @} */ -
trunk/include/VBox/vmm/vmmr3vtable-def.h
r106061 r107276 638 638 VTABLE_ENTRY(PDMR3UsbQueryLun) 639 639 VTABLE_ENTRY(PDMR3UsbQueryDriverOnLun) 640 VTABLE_ENTRY(PDMR3UsbQueryDeviceLun) 640 641 641 642 VTABLE_ENTRY(PDMR3DriverEnumInstances) -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r107268 r107276 1699 1699 return "3c501"; 1700 1700 case NetworkAdapterType_UsbNet: 1701 return " usbnet";1701 return "UsbNet"; 1702 1702 default: 1703 1703 AssertFailed(); … … 4357 4357 int vrc = VINF_SUCCESS; 4358 4358 if (adapterType == NetworkAdapterType_UsbNet) 4359 vrc = ptrVM.vtable()->pfnPDMR3UsbQuery Lun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase);4359 vrc = ptrVM.vtable()->pfnPDMR3UsbQueryDeviceLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase); 4360 4360 else 4361 4361 vrc = ptrVM.vtable()->pfnPDMR3QueryDeviceLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase); … … 4468 4468 const char *pszAdapterName = networkAdapterTypeToName(adapterType); 4469 4469 PPDMIBASE pBase; 4470 int vrc = ptrVM.vtable()->pfnPDMR3QueryLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase); 4470 int vrc; 4471 if (adapterType == NetworkAdapterType_UsbNet) 4472 vrc = ptrVM.vtable()->pfnPDMR3UsbQueryLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase); 4473 else 4474 vrc = ptrVM.vtable()->pfnPDMR3QueryLun(ptrVM.rawUVM(), pszAdapterName, ulInstance, 0, &pBase); 4471 4475 if (RT_FAILURE(vrc)) 4472 4476 { -
trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp
r106061 r107276 1544 1544 RTCritSectRwLeaveExcl(&pVM->pdm.s.CoreListCritSectRw); 1545 1545 LogFlow(("PDMR3UsbDriverDetach: returns %Rrc\n", rc)); 1546 return rc; 1547 } 1548 1549 1550 /** 1551 * Queries the base interface of a device LUN. 1552 * 1553 * This differs from PDMR3UsbQueryLun by that it returns the interface on the 1554 * device and not the top level driver. 1555 * 1556 * @returns VBox status code. 1557 * @param pUVM The user mode VM handle. 1558 * @param pszDevice Device name. 1559 * @param iInstance Device instance. 1560 * @param iLun The Logical Unit to obtain the interface of. 1561 * @param ppBase Where to store the base interface pointer. 1562 */ 1563 VMMR3DECL(int) PDMR3UsbQueryDeviceLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase) 1564 { 1565 LogFlow(("PDMR3UsbQueryDeviceLun: pszDevice=%p:{%s} iInstance=%u iLun=%u ppBase=%p\n", 1566 pszDevice, pszDevice, iInstance, iLun, ppBase)); 1567 *ppBase = NULL; 1568 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 1569 PVM pVM = pUVM->pVM; 1570 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 1571 1572 /* 1573 * Find the LUN. 1574 */ 1575 RTCritSectRwEnterShared(&pVM->pdm.s.CoreListCritSectRw); 1576 1577 PPDMLUN pLun; 1578 int rc = pdmR3UsbFindLun(pVM, pszDevice, iInstance, iLun, &pLun); 1579 if (RT_SUCCESS(rc)) 1580 { 1581 *ppBase = pLun->pBase; 1582 1583 RTCritSectRwLeaveShared(&pVM->pdm.s.CoreListCritSectRw); 1584 LogFlow(("PDMR3UsbQueryDeviceLun: return %Rrc and *ppBase=%p\n", VINF_SUCCESS, *ppBase)); 1585 return VINF_SUCCESS; 1586 } 1587 1588 RTCritSectRwLeaveShared(&pVM->pdm.s.CoreListCritSectRw); 1589 LogFlow(("PDMR3UsbQueryDeviceLun: returns %Rrc\n", rc)); 1546 1590 return rc; 1547 1591 } -
trunk/src/VBox/VMM/VMMR3/VMMR3.def
r106061 r107276 326 326 PDMR3UsbQueryLun 327 327 PDMR3UsbQueryDriverOnLun 328 PDMR3UsbQueryDeviceLun 328 329 329 330 PGMHandlerPhysicalPageTempOff
Note:
See TracChangeset
for help on using the changeset viewer.