VirtualBox

儲存庫 vbox 的更動 40843


忽略:
時間撮記:
2012-4-10 上午08:53:19 (13 年 以前)
作者:
vboxsync
訊息:

Storage: Miscellaneous bug fixes to make the library work on big endian machines

位置:
trunk/src/VBox/Storage
檔案:
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Storage/QED.cpp

    r39519 r40843  
    9494 */
    9595/** Image uses a backing file to provide data for unallocated clusters. */
    96 #define QED_FEATURE_BACKING_FILE             RT_BIT(0)
     96#define QED_FEATURE_BACKING_FILE             RT_BIT_64(0)
    9797/** Image needs checking before use. */
    98 #define QED_FEATURE_NEED_CHECK               RT_BIT(1)
     98#define QED_FEATURE_NEED_CHECK               RT_BIT_64(1)
    9999/** Don't probe for format of the backing file, treat as raw image. */
    100 #define QED_FEATURE_BACKING_FILE_NO_PROBE    RT_BIT(2)
     100#define QED_FEATURE_BACKING_FILE_NO_PROBE    RT_BIT_64(2)
    101101/** Mask of valid features. */
    102102#define QED_FEATURE_MASK (QED_FEATURE_BACKING_FILE | QED_FEATURE_NEED_CHECK | QED_FEATURE_BACKING_FILE_NO_PROBE)
     
    313313    pHeader->u32TableSize             = RT_H2LE_U32(pImage->cbTable / pImage->cbCluster);
    314314    pHeader->u32HeaderSize            = RT_H2LE_U32(1);
    315     pHeader->u64FeatureFlags          = RT_H2LE_U64(pImage->pszBackingFilename ? QED_FEATURE_BACKING_FILE : 0);
    316     pHeader->u64CompatFeatureFlags    = RT_H2LE_U64(0);
    317     pHeader->u64AutoresetFeatureFlags = RT_H2LE_U64(0);
     315    pHeader->u64FeatureFlags          = RT_H2LE_U64(pImage->pszBackingFilename ? QED_FEATURE_BACKING_FILE : UINT64_C(0));
     316    pHeader->u64CompatFeatureFlags    = RT_H2LE_U64(UINT64_C(0));
     317    pHeader->u64AutoresetFeatureFlags = RT_H2LE_U64(UINT64_C(0));
    318318    pHeader->u64OffL1Table            = RT_H2LE_U64(pImage->offL1Table);
    319319    pHeader->u64Size                  = RT_H2LE_U64(pImage->cbSize);
  • trunk/src/VBox/Storage/VCICache.cpp

    r38469 r40843  
    12421242    Hdr.offTreeRoot  = RT_LE2H_U64(Hdr.offTreeRoot);
    12431243    Hdr.offBlkMap    = RT_LE2H_U64(Hdr.offBlkMap);
    1244     Hdr.cBlkMap      = RT_LE2H_U64(Hdr.cBlkMap);
     1244    Hdr.cBlkMap      = RT_LE2H_U32(Hdr.cBlkMap);
    12451245
    12461246    if (   Hdr.u32Signature == VCI_HDR_SIGNATURE
     
    13911391        Hdr.offTreeRoot      = RT_H2LE_U64(offTreeRoot);
    13921392        Hdr.offBlkMap        = RT_H2LE_U64(offBlkMap);
    1393         Hdr.cBlkMap          = RT_H2LE_U64(cBlkMap);
     1393        Hdr.cBlkMap          = RT_H2LE_U32(cBlkMap);
    13941394
    13951395        rc = vdIfIoIntFileWriteSync(pCache->pIfIo, pCache->pStorage, offHdr, &Hdr,
     
    14801480    Hdr.offTreeRoot  = RT_LE2H_U64(Hdr.offTreeRoot);
    14811481    Hdr.offBlkMap    = RT_LE2H_U64(Hdr.offBlkMap);
    1482     Hdr.cBlkMap      = RT_LE2H_U64(Hdr.cBlkMap);
     1482    Hdr.cBlkMap      = RT_LE2H_U32(Hdr.cBlkMap);
    14831483
    14841484    if (   Hdr.u32Signature == VCI_HDR_SIGNATURE
  • trunk/src/VBox/Storage/VHD.cpp

    r40240 r40843  
    21442144    if (pImage)
    21452145    {
    2146         vdIfErrorMessage(pImage->pIfError, "Header: Geometry PCHS=%u/%u/%u LCHS=%u/%u/%u cbSector=%llu\n",
     2146        vdIfErrorMessage(pImage->pIfError, "Header: Geometry PCHS=%u/%u/%u LCHS=%u/%u/%u cbSector=%u\n",
    21472147                         pImage->PCHSGeometry.cCylinders, pImage->PCHSGeometry.cHeads, pImage->PCHSGeometry.cSectors,
    21482148                         pImage->LCHSGeometry.cCylinders, pImage->LCHSGeometry.cHeads, pImage->LCHSGeometry.cSectors,
  • trunk/src/VBox/Storage/VMDK.cpp

    r40739 r40843  
    25252525        goto out;
    25262526
    2527     if (    RT_LE2H_U32(Header.flags & RT_BIT(17))
     2527    if (    (RT_LE2H_U32(Header.flags) & RT_BIT(17))
    25282528        &&  RT_LE2H_U64(Header.gdOffset) == VMDK_GD_AT_END)
    25292529        pExtent->fFooter = true;
     
    42334233    PVMDKMARKER pMarker = (PVMDKMARKER)&aMarker[0];
    42344234    memset(pMarker, '\0', sizeof(aMarker));
    4235     pMarker->uSector = RT_H2LE_U64(VMDK_BYTE2SECTOR(pExtent->cGTEntries * sizeof(uint32_t)));
     4235    pMarker->uSector = RT_H2LE_U64(VMDK_BYTE2SECTOR((uint64_t)pExtent->cGTEntries * sizeof(uint32_t)));
    42364236    pMarker->uType = RT_H2LE_U32(VMDK_MARKER_GT);
    42374237    rc = vdIfIoIntFileWriteSync(pImage->pIfIo, pExtent->pFile->pStorage, uFileOffset,
     
    43414341                PVMDKMARKER pMarker = (PVMDKMARKER)&aMarker[0];
    43424342                memset(pMarker, '\0', sizeof(aMarker));
    4343                 pMarker->uSector = VMDK_BYTE2SECTOR(RT_ALIGN_64(RT_H2LE_U64(pExtent->cGDEntries * sizeof(uint32_t)), 512));
     4343                pMarker->uSector = VMDK_BYTE2SECTOR(RT_ALIGN_64(RT_H2LE_U64((uint64_t)pExtent->cGDEntries * sizeof(uint32_t)), 512));
    43444344                pMarker->uType = RT_H2LE_U32(VMDK_MARKER_GD);
    43454345                rc = vdIfIoIntFileWriteSync(pImage->pIfIo, pExtent->pFile->pStorage, uFileOffset,
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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