VirtualBox

vbox的更動 62744 路徑 trunk/src/VBox/Storage/QCOW.cpp


忽略:
時間撮記:
2016-7-30 下午03:54:02 (8 年 以前)
作者:
vboxsync
訊息:

Storage: warnings.

檔案:
修改 1 筆資料

圖例:

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

    r62482 r62744  
    577577{
    578578    PQCOWL2CACHEENTRY pL2Entry = NULL;
    579     int rc = VINF_SUCCESS;
    580579
    581580    if (pImage->cbL2Cache + pImage->cbL2Table <= QCOW_L2_CACHE_MEMORY_MAX)
     
    12181217                           unsigned uPercentStart, unsigned uPercentSpan)
    12191218{
     1219    RT_NOREF1(pszComment);
    12201220    int rc;
    12211221    int32_t fOpen;
     
    13041304static int qcowAsyncClusterAllocRollback(PQCOWIMAGE pImage, PVDIOCTX pIoCtx, PQCOWCLUSTERASYNCALLOC pClusterAlloc)
    13051305{
     1306    RT_NOREF1(pIoCtx);
    13061307    int rc = VINF_SUCCESS;
    13071308
     
    14431444                                          PVDINTERFACE pVDIfsImage, VDTYPE *penmType)
    14441445{
     1446    RT_NOREF1(pVDIfsDisk);
    14451447    LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage));
    14461448    PVDIOSTORAGE pStorage = NULL;
     
    14671469                           &pStorage);
    14681470    if (RT_SUCCESS(rc))
     1471    {
    14691472        rc = vdIfIoIntFileGetSize(pIfIo, pStorage, &cbFile);
    1470 
    1471     if (   RT_SUCCESS(rc)
    1472         && cbFile > sizeof(QCowHeader))
    1473     {
    1474         QCowHeader Header;
    1475 
    1476         rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
    14771473        if (   RT_SUCCESS(rc)
    1478             && qcowHdrConvertToHostEndianess(&Header))
    1479         {
    1480             *penmType = VDTYPE_HDD;
    1481             rc = VINF_SUCCESS;
     1474            && cbFile > sizeof(QCowHeader))
     1475        {
     1476            QCowHeader Header;
     1477
     1478            rc = vdIfIoIntFileReadSync(pIfIo, pStorage, 0, &Header, sizeof(Header));
     1479            if (   RT_SUCCESS(rc)
     1480                && qcowHdrConvertToHostEndianess(&Header))
     1481            {
     1482                *penmType = VDTYPE_HDD;
     1483                rc = VINF_SUCCESS;
     1484            }
     1485            else
     1486                rc = VERR_VD_GEN_INVALID_HEADER;
    14821487        }
    14831488        else
    14841489            rc = VERR_VD_GEN_INVALID_HEADER;
    14851490    }
    1486     else
    1487         rc = VERR_VD_GEN_INVALID_HEADER;
    14881491
    14891492    if (pStorage)
     
    15541557                                    void **ppBackendData)
    15551558{
     1559    RT_NOREF1(pUuid);
    15561560    LogFlowFunc(("pszFilename=\"%s\" cbSize=%llu uImageFlags=%#x pszComment=\"%s\" pPCHSGeometry=%#p pLCHSGeometry=%#p Uuid=%RTuuid uOpenFlags=%#x uPercentStart=%u uPercentSpan=%u pVDIfsDisk=%#p pVDIfsImage=%#p pVDIfsOperation=%#p enmType=%u ppBackendData=%#p",
    15571561                 pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData));
     
    18021806            do
    18031807            {
    1804                 uint64_t idxUpdateLe = 0;
    1805 
    18061808                /* Check if we have to allocate a new cluster for L2 tables. */
    18071809                if (!pImage->paL1Table[idxL1])
     
    21852187
    21862188/** @copydoc VBOXHDDBACKEND::pfnGetComment */
    2187 static DECLCALLBACK(int) qcowGetComment(void *pBackendData, char *pszComment,
    2188                           size_t cbComment)
    2189 {
     2189static DECLCALLBACK(int) qcowGetComment(void *pBackendData, char *pszComment, size_t cbComment)
     2190{
     2191    RT_NOREF2(pszComment, cbComment);
    21902192    LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment));
    21912193    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    22062208static DECLCALLBACK(int) qcowSetComment(void *pBackendData, const char *pszComment)
    22072209{
     2210    RT_NOREF1(pszComment);
    22082211    LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment));
    22092212    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    22292232static DECLCALLBACK(int) qcowGetUuid(void *pBackendData, PRTUUID pUuid)
    22302233{
     2234    RT_NOREF1(pUuid);
    22312235    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    22322236    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    22472251static DECLCALLBACK(int) qcowSetUuid(void *pBackendData, PCRTUUID pUuid)
    22482252{
     2253    RT_NOREF1(pUuid);
    22492254    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    22502255    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    22712276static DECLCALLBACK(int) qcowGetModificationUuid(void *pBackendData, PRTUUID pUuid)
    22722277{
     2278    RT_NOREF1(pUuid);
    22732279    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    22742280    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    22892295static DECLCALLBACK(int) qcowSetModificationUuid(void *pBackendData, PCRTUUID pUuid)
    22902296{
     2297    RT_NOREF1(pUuid);
    22912298    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    22922299    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    23122319static DECLCALLBACK(int) qcowGetParentUuid(void *pBackendData, PRTUUID pUuid)
    23132320{
     2321    RT_NOREF1(pUuid);
    23142322    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    23152323    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    23302338static DECLCALLBACK(int) qcowSetParentUuid(void *pBackendData, PCRTUUID pUuid)
    23312339{
     2340    RT_NOREF1(pUuid);
    23322341    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    23332342    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    23532362static DECLCALLBACK(int) qcowGetParentModificationUuid(void *pBackendData, PRTUUID pUuid)
    23542363{
     2364    RT_NOREF1(pUuid);
    23552365    LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid));
    23562366    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
     
    23712381static DECLCALLBACK(int) qcowSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid)
    23722382{
     2383    RT_NOREF1(pUuid);
    23732384    LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid));
    23742385    PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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