VirtualBox

Changeset 11176 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Aug 6, 2008 11:07:08 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34192
Message:

VBoxHDD-new: VDGetInterface* has a pointer to the interface descriptor now instead of the opaque pointer to the callback table - better type checking during compilation which reduces mistakes

Location:
trunk/src/VBox/Devices/Storage
Files:
4 edited

Legend:

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

    r11175 r11176  
    343343    pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR);
    344344    if (pImage->pInterfaceError)
    345         pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError->pCallbacks);
     345        pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError);
    346346
    347347    rc = rawOpenImage(pImage, uOpenFlags);
     
    398398    pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR);
    399399    if (pImage->pInterfaceError)
    400         pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError->pCallbacks);
     400        pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError);
    401401
    402402
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r10715 r11176  
    817817            pDisk->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR);
    818818            if (pDisk->pInterfaceError)
    819                 pDisk->pInterfaceErrorCallbacks = VDGetInterfaceError(pDisk->pInterfaceError->pCallbacks);
     819                pDisk->pInterfaceErrorCallbacks = VDGetInterfaceError(pDisk->pInterfaceError);
    820820            *ppDisk = pDisk;
    821821        }
  • trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp

    r10781 r11176  
    784784    pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR);
    785785    if (pImage->pInterfaceError)
    786         pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError->pCallbacks);
     786        pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError);
    787787
    788788    rc = vdiOpenImage(pImage, uOpenFlags);
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r11175 r11176  
    37243724    pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR);
    37253725    if (pImage->pInterfaceError)
    3726         pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError->pCallbacks);
     3726        pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError);
    37273727
    37283728    /* Try to get async I/O interface. */
    37293729    pImage->pInterfaceAsyncIO = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ASYNCIO);
    37303730    if (pImage->pInterfaceAsyncIO)
    3731         pImage->pInterfaceAsyncIOCallbacks = VDGetInterfaceAsyncIO(pImage->pInterfaceAsyncIO->pCallbacks);
     3731        pImage->pInterfaceAsyncIOCallbacks = VDGetInterfaceAsyncIO(pImage->pInterfaceAsyncIO);
    37323732
    37333733
     
    38043804    pImage->pInterfaceError = VDGetInterfaceFromList(pInterfaces, VDINTERFACETYPE_ERROR);
    38053805    if (pImage->pInterfaceError)
    3806         pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError->pCallbacks);
     3806        pImage->pInterfaceErrorCallbacks = VDGetInterfaceError(pImage->pInterfaceError);
    38073807
    38083808    rc = vmdkCreateImage(pImage, enmType, cbSize, uImageFlags, pszComment,
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