VirtualBox

Changeset 83042 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Feb 10, 2020 5:28:23 PM (5 years ago)
Author:
vboxsync
Message:

Devices/Storage/DrvDiskIntegrity: Implement some additional interface callbacks to make the driver work again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvDiskIntegrity.cpp

    r82968 r83042  
    10631063}
    10641064
     1065/** @interface_method_impl{PDMIMEDIA,pfnGetRegionCount} */
     1066static DECLCALLBACK(uint32_t) drvdiskintGetRegionCount(PPDMIMEDIA pInterface)
     1067{
     1068    PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface);
     1069    return pThis->pDrvMedia->pfnGetRegionCount(pThis->pDrvMedia);
     1070}
     1071
     1072/** @interface_method_impl{PDMIMEDIA,pfnQueryRegionProperties} */
     1073static DECLCALLBACK(int) drvdiskintQueryRegionProperties(PPDMIMEDIA pInterface, uint32_t uRegion, uint64_t *pu64LbaStart,
     1074                                                         uint64_t *pcBlocks, uint64_t *pcbBlock,
     1075                                                         PVDREGIONDATAFORM penmDataForm)
     1076{
     1077    PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface);
     1078    return pThis->pDrvMedia->pfnQueryRegionProperties(pThis->pDrvMedia, uRegion, pu64LbaStart, pcBlocks, pcbBlock, penmDataForm);
     1079}
     1080
     1081/** @interface_method_impl{PDMIMEDIA,pfnQueryRegionPropertiesForLba} */
     1082static DECLCALLBACK(int) drvdiskintQueryRegionPropertiesForLba(PPDMIMEDIA pInterface, uint64_t u64LbaStart,
     1083                                                               uint32_t *puRegion, uint64_t *pcBlocks,
     1084                                                               uint64_t *pcbBlock, PVDREGIONDATAFORM penmDataForm)
     1085{
     1086    PDRVDISKINTEGRITY pThis = PDMIMEDIA_2_DRVDISKINTEGRITY(pInterface);
     1087    return pThis->pDrvMedia->pfnQueryRegionPropertiesForLba(pThis->pDrvMedia, u64LbaStart, puRegion, pcBlocks, pcbBlock, penmDataForm);
     1088}
     1089
    10651090/* -=-=-=-=- IMediaPort -=-=-=-=- */
    10661091
     
    13091334    PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMediaEx);
    13101335    return pThis->pDrvMediaEx->pfnQueryFeatures(pThis->pDrvMediaEx, pfFeatures);
     1336}
     1337
     1338/**
     1339 * @interface_method_impl{PDMIMEDIAEX,pfnNotifySuspend}
     1340 */
     1341static DECLCALLBACK(void) drvdiskintNotifySuspend(PPDMIMEDIAEX pInterface)
     1342{
     1343    PDRVDISKINTEGRITY pThis = RT_FROM_MEMBER(pInterface, DRVDISKINTEGRITY, IMediaEx);
     1344    return pThis->pDrvMediaEx->pfnNotifySuspend(pThis->pDrvMediaEx);
    13111345}
    13121346
     
    18651899
    18661900    /* IMedia */
    1867     pThis->IMedia.pfnRead                = drvdiskintRead;
    1868     pThis->IMedia.pfnWrite               = drvdiskintWrite;
    1869     pThis->IMedia.pfnFlush               = drvdiskintFlush;
    1870     pThis->IMedia.pfnGetSize             = drvdiskintGetSize;
    1871     pThis->IMedia.pfnIsReadOnly          = drvdiskintIsReadOnly;
    1872     pThis->IMedia.pfnBiosIsVisible       = drvdiskintBiosIsVisible;
    1873     pThis->IMedia.pfnBiosGetPCHSGeometry = drvdiskintBiosGetPCHSGeometry;
    1874     pThis->IMedia.pfnBiosSetPCHSGeometry = drvdiskintBiosSetPCHSGeometry;
    1875     pThis->IMedia.pfnBiosGetLCHSGeometry = drvdiskintBiosGetLCHSGeometry;
    1876     pThis->IMedia.pfnBiosSetLCHSGeometry = drvdiskintBiosSetLCHSGeometry;
    1877     pThis->IMedia.pfnGetUuid             = drvdiskintGetUuid;
    1878     pThis->IMedia.pfnGetSectorSize       = drvdiskintGetSectorSize;
    1879     pThis->IMedia.pfnGetType             = drvdiskintGetType;
    1880     pThis->IMedia.pfnReadPcBios          = drvdiskintReadPcBios;
    1881     pThis->IMedia.pfnIsNonRotational     = drvdiskintIsNonRotational;
     1901    pThis->IMedia.pfnRead                        = drvdiskintRead;
     1902    pThis->IMedia.pfnWrite                       = drvdiskintWrite;
     1903    pThis->IMedia.pfnFlush                       = drvdiskintFlush;
     1904    pThis->IMedia.pfnGetSize                     = drvdiskintGetSize;
     1905    pThis->IMedia.pfnIsReadOnly                  = drvdiskintIsReadOnly;
     1906    pThis->IMedia.pfnBiosIsVisible               = drvdiskintBiosIsVisible;
     1907    pThis->IMedia.pfnBiosGetPCHSGeometry         = drvdiskintBiosGetPCHSGeometry;
     1908    pThis->IMedia.pfnBiosSetPCHSGeometry         = drvdiskintBiosSetPCHSGeometry;
     1909    pThis->IMedia.pfnBiosGetLCHSGeometry         = drvdiskintBiosGetLCHSGeometry;
     1910    pThis->IMedia.pfnBiosSetLCHSGeometry         = drvdiskintBiosSetLCHSGeometry;
     1911    pThis->IMedia.pfnGetUuid                     = drvdiskintGetUuid;
     1912    pThis->IMedia.pfnGetSectorSize               = drvdiskintGetSectorSize;
     1913    pThis->IMedia.pfnGetType                     = drvdiskintGetType;
     1914    pThis->IMedia.pfnReadPcBios                  = drvdiskintReadPcBios;
     1915    pThis->IMedia.pfnIsNonRotational             = drvdiskintIsNonRotational;
     1916    pThis->IMedia.pfnSendCmd                     = NULL;
     1917    pThis->IMedia.pfnGetRegionCount              = drvdiskintGetRegionCount;
     1918    pThis->IMedia.pfnQueryRegionProperties       = drvdiskintQueryRegionProperties;
     1919    pThis->IMedia.pfnQueryRegionPropertiesForLba = drvdiskintQueryRegionPropertiesForLba;
     1920
    18821921
    18831922    /* IMediaEx. */
    18841923    pThis->IMediaEx.pfnQueryFeatures            = drvdiskintQueryFeatures;
     1924    pThis->IMediaEx.pfnNotifySuspend            = drvdiskintNotifySuspend;
    18851925    pThis->IMediaEx.pfnIoReqAllocSizeSet        = drvdiskintIoReqAllocSizeSet;
    18861926    pThis->IMediaEx.pfnIoReqAlloc               = drvdiskintIoReqAlloc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette