Changeset 107276 in vbox for trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp
- Timestamp:
- Dec 10, 2024 12:40:08 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note:
See TracChangeset
for help on using the changeset viewer.