VirtualBox

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


Ignore:
Timestamp:
Mar 13, 2009 5:21:14 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
44400
Message:

Storage/VMDK: write the compressed block size to the marker.

File:
1 edited

Legend:

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

    r17847 r17852  
    897897            uCompOffset = uOffset + 12;
    898898            cbDecomp = cbToWrite;
    899             rc = RTFileWriteAt(pVmdkFile->File, uOffset, &Marker, 12, NULL);
    900             if (RT_FAILURE(rc))
    901                 return rc;
    902899        }
    903900        else
     
    925922             * guarantees that data gets only appended. */
    926923            rc = RTFileSetSize(pVmdkFile->File, DeflateState.uFileOffset);
     924
     925            if (uMarker == VMDK_MARKER_IGNORE)
     926            {
     927                /* Compressed grain marker. */
     928                Marker.cbSize = RT_H2LE_U32(DeflateState.iOffset);
     929                rc = RTFileWriteAt(pVmdkFile->File, uOffset, &Marker, 12, NULL);
     930                if (RT_FAILURE(rc))
     931                    return rc;
     932            }
     933            else
     934            {
     935                /** @todo implement creating the other marker types */
     936                return VERR_NOT_IMPLEMENTED;
     937            }
    927938        }
    928939        return rc;
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