VirtualBox

Changeset 24778 in vbox for trunk


Ignore:
Timestamp:
Nov 19, 2009 9:25:29 AM (15 years ago)
Author:
vboxsync
Message:

Storage/VMDK: mostly cosmetic change to the code which writes VMDK extent descriptors. The spec explicitly says that only flat extents can have offsets. Neither our VMDK code nor any other had problems with our previous behavior, but that's no reason for subtly violating the specs.

File:
1 edited

Legend:

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

    r24678 r24778  
    16831683                    cNominalSectors, apszType[enmType]);
    16841684    }
     1685    else if (enmType == VMDKETYPE_FLAT)
     1686    {
     1687        RTStrPrintf(szExt, sizeof(szExt), "%s %llu %s \"%s\" %llu",
     1688                    apszAccess[enmAccess], cNominalSectors,
     1689                    apszType[enmType], pszBasename, uSectorOffset);
     1690    }
    16851691    else
    16861692    {
    1687         if (!uSectorOffset)
    1688             RTStrPrintf(szExt, sizeof(szExt), "%s %llu %s \"%s\"",
    1689                         apszAccess[enmAccess], cNominalSectors,
    1690                         apszType[enmType], pszBasename);
    1691         else
    1692             RTStrPrintf(szExt, sizeof(szExt), "%s %llu %s \"%s\" %llu",
    1693                         apszAccess[enmAccess], cNominalSectors,
    1694                         apszType[enmType], pszBasename, uSectorOffset);
     1693        RTStrPrintf(szExt, sizeof(szExt), "%s %llu %s \"%s\"",
     1694                    apszAccess[enmAccess], cNominalSectors,
     1695                    apszType[enmType], pszBasename);
    16951696    }
    16961697    cbDiff = strlen(szExt) + 1;
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