VirtualBox

Ignore:
Timestamp:
Jan 9, 2008 10:57:05 AM (17 years ago)
Author:
vboxsync
Message:

Big virtual disk changeset containing several modifications

  • remove the always buggy translation setting and replace it with two sets of geometries, physical and logical
  • complete vmdk creation (fixed/dynamic variants, both split in 2G chunks and single file)
  • implemented VBoxHDD-new generic snapshot support, i.e. diff image creation and image merging (completely untested, I'm pretty sure there are bugs)
  • assorted changes which generalize the VBoxHDD-new interfaces (both externally and internally)
File:
1 edited

Legend:

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

    r6198 r6291  
    7676static DECLCALLBACK(uint64_t) drvRawImageGetSize(PPDMIMEDIA pInterface);
    7777static DECLCALLBACK(int) drvRawImageGetUuid(PPDMIMEDIA pInterface, PRTUUID pUuid);
    78 static DECLCALLBACK(int) drvRawImageBiosGetGeometry(PPDMIMEDIA pInterface, uint32_t *pcCylinders, uint32_t *pcHeads, uint32_t *pcSectors);
    79 static DECLCALLBACK(int) drvRawImageBiosSetGeometry(PPDMIMEDIA pInterface, uint32_t cCylinders, uint32_t cHeads, uint32_t cSectors);
    80 static DECLCALLBACK(int) drvRawImageBiosGetTranslation(PPDMIMEDIA pInterface, PPDMBIOSTRANSLATION penmTranslation);
    81 static DECLCALLBACK(int) drvRawImageBiosSetTranslation(PPDMIMEDIA pInterface, PDMBIOSTRANSLATION enmTranslation);
     78static DECLCALLBACK(int) drvRawImageBiosGetPCHSGeometry(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pPCHSGeometry);
     79static DECLCALLBACK(int) drvRawImageBiosSetPCHSGeometry(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pPCHSGeometry);
     80static DECLCALLBACK(int) drvRawImageBiosGetLCHSGeometry(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pLCHSGeometry);
     81static DECLCALLBACK(int) drvRawImageBiosSetLCHSGeometry(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pLCHSGeometry);
    8282
    8383static DECLCALLBACK(void *) drvRawImageQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);
     
    114114    pData->IMedia.pfnGetUuid            = drvRawImageGetUuid;
    115115    pData->IMedia.pfnIsReadOnly         = drvRawImageIsReadOnly;
    116     pData->IMedia.pfnBiosGetGeometry    = drvRawImageBiosGetGeometry;
    117     pData->IMedia.pfnBiosSetGeometry    = drvRawImageBiosSetGeometry;
    118     pData->IMedia.pfnBiosGetTranslation = drvRawImageBiosGetTranslation;
    119     pData->IMedia.pfnBiosSetTranslation = drvRawImageBiosSetTranslation;
     116    pData->IMedia.pfnBiosGetPCHSGeometry = drvRawImageBiosGetPCHSGeometry;
     117    pData->IMedia.pfnBiosSetPCHSGeometry = drvRawImageBiosSetPCHSGeometry;
     118    pData->IMedia.pfnBiosGetLCHSGeometry = drvRawImageBiosGetLCHSGeometry;
     119    pData->IMedia.pfnBiosSetLCHSGeometry = drvRawImageBiosSetLCHSGeometry;
    120120
    121121    /*
     
    207207
    208208
    209 /** @copydoc PDMIMEDIA::pfnBiosGetGeometry */
    210 static DECLCALLBACK(int) drvRawImageBiosGetGeometry(PPDMIMEDIA pInterface, uint32_t *pcCylinders, uint32_t *pcHeads, uint32_t *pcSectors)
     209/** @copydoc PDMIMEDIA::pfnBiosGetPCHSGeometry */
     210static DECLCALLBACK(int) drvRawImageBiosGetPCHSGeometry(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pPCHSGeometry)
    211211{
    212212    return VERR_NOT_IMPLEMENTED;
     
    214214
    215215
    216 /** @copydoc PDMIMEDIA::pfnBiosSetGeometry */
    217 static DECLCALLBACK(int) drvRawImageBiosSetGeometry(PPDMIMEDIA pInterface, uint32_t cCylinders, uint32_t cHeads, uint32_t cSectors)
     216/** @copydoc PDMIMEDIA::pfnBiosSetPCHSGeometry */
     217static DECLCALLBACK(int) drvRawImageBiosSetPCHSGeometry(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pPCHSGeometry)
     218{
     219    return VERR_NOT_IMPLEMENTED;
     220}
     221
     222
     223/** @copydoc PDMIMEDIA::pfnBiosGetLCHSGeometry */
     224static DECLCALLBACK(int) drvRawImageBiosGetLCHSGeometry(PPDMIMEDIA pInterface, PPDMMEDIAGEOMETRY pLCHSGeometry)
     225{
     226    return VERR_NOT_IMPLEMENTED;
     227}
     228
     229
     230/** @copydoc PDMIMEDIA::pfnBiosSetLCHSGeometry */
     231static DECLCALLBACK(int) drvRawImageBiosSetLCHSGeometry(PPDMIMEDIA pInterface, PCPDMMEDIAGEOMETRY pLCHSGeometry)
    218232{
    219233    return VERR_NOT_IMPLEMENTED;
     
    319333    PDRVRAWIMAGE pData = PDMIMEDIA_2_DRVRAWIMAGE(pInterface);
    320334    return pData->fReadOnly;
    321 }
    322 
    323 
    324 /**
    325  * Stub - operation not supported.
    326  *
    327  * @copydoc PDMIMEDIA::pfnBiosGetTranslation
    328  */
    329 static DECLCALLBACK(int) drvRawImageBiosGetTranslation(PPDMIMEDIA pInterface, PPDMBIOSTRANSLATION penmTranslation)
    330 {
    331     NOREF(pInterface); NOREF(penmTranslation);
    332     return VERR_NOT_IMPLEMENTED;
    333 }
    334 
    335 
    336 /**
    337  * Stub - operation not supported.
    338  *
    339  * @copydoc PDMIMEDIA::pfnBiosSetTranslation
    340  */
    341 static DECLCALLBACK(int) drvRawImageBiosSetTranslation(PPDMIMEDIA pInterface, PDMBIOSTRANSLATION enmTranslation)
    342 {
    343     NOREF(pInterface); NOREF(enmTranslation);
    344     return VERR_NOT_IMPLEMENTED;
    345335}
    346336
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