儲存庫 vbox 的更動 62744
- 時間撮記:
- 2016-7-30 下午03:54:02 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Storage/QCOW.cpp
r62482 r62744 577 577 { 578 578 PQCOWL2CACHEENTRY pL2Entry = NULL; 579 int rc = VINF_SUCCESS;580 579 581 580 if (pImage->cbL2Cache + pImage->cbL2Table <= QCOW_L2_CACHE_MEMORY_MAX) … … 1218 1217 unsigned uPercentStart, unsigned uPercentSpan) 1219 1218 { 1219 RT_NOREF1(pszComment); 1220 1220 int rc; 1221 1221 int32_t fOpen; … … 1304 1304 static int qcowAsyncClusterAllocRollback(PQCOWIMAGE pImage, PVDIOCTX pIoCtx, PQCOWCLUSTERASYNCALLOC pClusterAlloc) 1305 1305 { 1306 RT_NOREF1(pIoCtx); 1306 1307 int rc = VINF_SUCCESS; 1307 1308 … … 1443 1444 PVDINTERFACE pVDIfsImage, VDTYPE *penmType) 1444 1445 { 1446 RT_NOREF1(pVDIfsDisk); 1445 1447 LogFlowFunc(("pszFilename=\"%s\" pVDIfsDisk=%#p pVDIfsImage=%#p\n", pszFilename, pVDIfsDisk, pVDIfsImage)); 1446 1448 PVDIOSTORAGE pStorage = NULL; … … 1467 1469 &pStorage); 1468 1470 if (RT_SUCCESS(rc)) 1471 { 1469 1472 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));1477 1473 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; 1482 1487 } 1483 1488 else 1484 1489 rc = VERR_VD_GEN_INVALID_HEADER; 1485 1490 } 1486 else1487 rc = VERR_VD_GEN_INVALID_HEADER;1488 1491 1489 1492 if (pStorage) … … 1554 1557 void **ppBackendData) 1555 1558 { 1559 RT_NOREF1(pUuid); 1556 1560 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", 1557 1561 pszFilename, cbSize, uImageFlags, pszComment, pPCHSGeometry, pLCHSGeometry, pUuid, uOpenFlags, uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation, enmType, ppBackendData)); … … 1802 1806 do 1803 1807 { 1804 uint64_t idxUpdateLe = 0;1805 1806 1808 /* Check if we have to allocate a new cluster for L2 tables. */ 1807 1809 if (!pImage->paL1Table[idxL1]) … … 2185 2187 2186 2188 /** @copydoc VBOXHDDBACKEND::pfnGetComment */ 2187 static DECLCALLBACK(int) qcowGetComment(void *pBackendData, char *pszComment, 2188 size_t cbComment) 2189 { 2189 static DECLCALLBACK(int) qcowGetComment(void *pBackendData, char *pszComment, size_t cbComment) 2190 { 2191 RT_NOREF2(pszComment, cbComment); 2190 2192 LogFlowFunc(("pBackendData=%#p pszComment=%#p cbComment=%zu\n", pBackendData, pszComment, cbComment)); 2191 2193 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2206 2208 static DECLCALLBACK(int) qcowSetComment(void *pBackendData, const char *pszComment) 2207 2209 { 2210 RT_NOREF1(pszComment); 2208 2211 LogFlowFunc(("pBackendData=%#p pszComment=\"%s\"\n", pBackendData, pszComment)); 2209 2212 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2229 2232 static DECLCALLBACK(int) qcowGetUuid(void *pBackendData, PRTUUID pUuid) 2230 2233 { 2234 RT_NOREF1(pUuid); 2231 2235 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2232 2236 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2247 2251 static DECLCALLBACK(int) qcowSetUuid(void *pBackendData, PCRTUUID pUuid) 2248 2252 { 2253 RT_NOREF1(pUuid); 2249 2254 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2250 2255 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2271 2276 static DECLCALLBACK(int) qcowGetModificationUuid(void *pBackendData, PRTUUID pUuid) 2272 2277 { 2278 RT_NOREF1(pUuid); 2273 2279 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2274 2280 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2289 2295 static DECLCALLBACK(int) qcowSetModificationUuid(void *pBackendData, PCRTUUID pUuid) 2290 2296 { 2297 RT_NOREF1(pUuid); 2291 2298 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2292 2299 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2312 2319 static DECLCALLBACK(int) qcowGetParentUuid(void *pBackendData, PRTUUID pUuid) 2313 2320 { 2321 RT_NOREF1(pUuid); 2314 2322 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2315 2323 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2330 2338 static DECLCALLBACK(int) qcowSetParentUuid(void *pBackendData, PCRTUUID pUuid) 2331 2339 { 2340 RT_NOREF1(pUuid); 2332 2341 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2333 2342 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2353 2362 static DECLCALLBACK(int) qcowGetParentModificationUuid(void *pBackendData, PRTUUID pUuid) 2354 2363 { 2364 RT_NOREF1(pUuid); 2355 2365 LogFlowFunc(("pBackendData=%#p pUuid=%#p\n", pBackendData, pUuid)); 2356 2366 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData; … … 2371 2381 static DECLCALLBACK(int) qcowSetParentModificationUuid(void *pBackendData, PCRTUUID pUuid) 2372 2382 { 2383 RT_NOREF1(pUuid); 2373 2384 LogFlowFunc(("pBackendData=%#p Uuid=%RTuuid\n", pBackendData, pUuid)); 2374 2385 PQCOWIMAGE pImage = (PQCOWIMAGE)pBackendData;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器