Changeset 73094 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Jul 12, 2018 7:15:10 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp
r72338 r73094 139 139 * 140 140 * @implements PDMIMEDIA 141 * @implements PDMIMEDIAPORT 142 * @implements PDMIMEDIAEX 143 * @implements PDMIMEDIAEXPORT 144 * @implements PDMIMEDIAMOUNT 145 * @implements PDMIMEDIAMOUNTNOTIFY 141 146 */ 142 147 typedef struct DRVDISKINTEGRITY … … 164 169 /** Our extended media interface */ 165 170 PDMIMEDIAEX IMediaEx; 171 172 /** The mount interface below. */ 173 PPDMIMOUNT pDrvMount; 174 /** Our mount interface */ 175 PDMIMOUNT IMount; 176 177 /** The mount notify interface above. */ 178 PPDMIMOUNTNOTIFY pDrvMountNotify; 179 /** Our mount notify interface. */ 180 PDMIMOUNTNOTIFY IMountNotify; 166 181 167 182 /** Flag whether consistency checks are enabled. */ … … 1623 1638 } 1624 1639 1640 /* -=-=-=-=- IMount -=-=-=-=- */ 1641 1642 /** @interface_method_impl{PDMIMOUNT,pfnUnmount} */ 1643 static DECLCALLBACK(int) drvdiskintUnmount(PPDMIMOUNT pInterface, bool fForce, bool fEject) 1644 { 1645 PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMount); 1646 return pThis->pDrvMount->pfnUnmount(pThis->pDrvMount, fForce, fEject); 1647 } 1648 1649 /** @interface_method_impl{PDMIMOUNT,pfnIsMounted} */ 1650 static DECLCALLBACK(bool) drvdiskintIsMounted(PPDMIMOUNT pInterface) 1651 { 1652 PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMount); 1653 return pThis->pDrvMount->pfnIsMounted(pThis->pDrvMount); 1654 } 1655 1656 /** @interface_method_impl{PDMIMOUNT,pfnLock} */ 1657 static DECLCALLBACK(int) drvdiskintLock(PPDMIMOUNT pInterface) 1658 { 1659 PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMount); 1660 return pThis->pDrvMount->pfnLock(pThis->pDrvMount); 1661 } 1662 1663 /** @interface_method_impl{PDMIMOUNT,pfnUnlock} */ 1664 static DECLCALLBACK(int) drvdiskintUnlock(PPDMIMOUNT pInterface) 1665 { 1666 PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMount); 1667 return pThis->pDrvMount->pfnUnlock(pThis->pDrvMount); 1668 } 1669 1670 /** @interface_method_impl{PDMIMOUNT,pfnIsLocked} */ 1671 static DECLCALLBACK(bool) drvdiskintIsLocked(PPDMIMOUNT pInterface) 1672 { 1673 PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMount); 1674 return pThis->pDrvMount->pfnIsLocked(pThis->pDrvMount); 1675 } 1676 1677 /* -=-=-=-=- IMountNotify -=-=-=-=- */ 1678 1679 /** @interface_method_impl{PDMIMOUNTNOTIFY,pfnMountNotify} */ 1680 static DECLCALLBACK(void) drvdiskintMountNotify(PPDMIMOUNTNOTIFY pInterface) 1681 { 1682 PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMountNotify); 1683 pThis->pDrvMountNotify->pfnMountNotify(pThis->pDrvMountNotify); 1684 } 1685 1686 /** @interface_method_impl{PDMIMOUNTNOTIFY,pfnUnmountNotify} */ 1687 static DECLCALLBACK(void) drvdiskintUnmountNotify(PPDMIMOUNTNOTIFY pInterface) 1688 { 1689 PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMountNotify); 1690 pThis->pDrvMountNotify->pfnUnmountNotify(pThis->pDrvMountNotify); 1691 } 1692 1625 1693 /* -=-=-=-=- IBase -=-=-=-=- */ 1626 1694 … … 1638 1706 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIAEXPORT, &pThis->IMediaExPort); 1639 1707 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMEDIAEX, pThis->pDrvMediaEx ? &pThis->IMediaEx : NULL); 1708 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUNT, pThis->pDrvMount ? &pThis->IMount : NULL); 1709 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIMOUNTNOTIFY, &pThis->IMountNotify); 1640 1710 return NULL; 1641 1711 } … … 1841 1911 pThis->IMediaExPort.pfnIoReqStateChanged = drvdiskintIoReqStateChanged; 1842 1912 1913 /* IMount */ 1914 pThis->IMount.pfnUnmount = drvdiskintUnmount; 1915 pThis->IMount.pfnIsMounted = drvdiskintIsMounted; 1916 pThis->IMount.pfnLock = drvdiskintLock; 1917 pThis->IMount.pfnUnlock = drvdiskintUnlock; 1918 pThis->IMount.pfnIsLocked = drvdiskintIsLocked; 1919 1920 /* IMountNotify */ 1921 pThis->IMountNotify.pfnMountNotify = drvdiskintMountNotify; 1922 pThis->IMountNotify.pfnUnmountNotify = drvdiskintUnmountNotify; 1923 1843 1924 /* Query the media port interface above us. */ 1844 1925 pThis->pDrvMediaPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIMEDIAPORT); … … 1871 1952 1872 1953 pThis->pDrvMediaEx = PDMIBASE_QUERY_INTERFACE(pBase, PDMIMEDIAEX); 1954 pThis->pDrvMount = PDMIBASE_QUERY_INTERFACE(pBase, PDMIMOUNT); 1873 1955 1874 1956 if (pThis->pDrvMedia->pfnDiscard)
Note:
See TracChangeset
for help on using the changeset viewer.