Changeset 43740 in vbox
- Timestamp:
- Oct 25, 2012 1:57:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r43689 r43740 2501 2501 ComObjPtr<Medium> pSource_local = it_md->mpSource; 2502 2502 ComObjPtr<Medium> pTarget_local = it_md->mpTarget; 2503 2504 int vrc = RTFsQuerySerial(pTarget_local->getLocationFull().c_str(), &pu32Serial); 2505 if (RT_FAILURE(vrc)) 2503 ComPtr<IMediumFormat> pTargetFormat; 2504 2505 rc = pTarget_local->COMGETTER(MediumFormat)(pTargetFormat.asOutParam()); 2506 if (FAILED(rc)) 2507 throw rc; 2508 ULONG uTargetCaps = 0; 2509 rc = pTargetFormat->COMGETTER(Capabilities)(&uTargetCaps); 2510 if (FAILED(rc)) 2511 throw rc; 2512 2513 if (uTargetCaps & MediumFormatCapabilities_File) 2506 2514 { 2507 rc = setError(E_FAIL, 2508 tr(" Impossible merging with '%s'. Can't get storage UID."), 2515 int vrc = RTFsQuerySerial(pTarget_local->getLocationFull().c_str(), &pu32Serial); 2516 if (RT_FAILURE(vrc)) 2517 { 2518 rc = setError(E_FAIL, 2519 tr("Impossible merging with '%s'. Can't get storage UID"), 2509 2520 pTarget_local->getLocationFull().c_str()); 2510 throw rc; 2521 throw rc; 2522 } 2523 2524 pSource_local->COMGETTER(Size)((LONG64*)&diskSize); 2525 2526 /* store needed free space in multimap */ 2527 neededStorageFreeSpace.insert(std::make_pair(pu32Serial,diskSize)); 2528 /* linking storage UID with snapshot path, it is a helper container (just for easy finding needed path) */ 2529 serialMapToStoragePath.insert(std::make_pair(pu32Serial,pTarget_local->getLocationFull().c_str())); 2511 2530 } 2512 2531 2513 pSource_local->COMGETTER(Size)((LONG64*)&diskSize);2514 2515 /* store needed free space in multimap */2516 neededStorageFreeSpace.insert(std::make_pair(pu32Serial,diskSize));2517 /* linking storage UID with snapshot path, it is a helper container (just for easy finding needed path) */2518 serialMapToStoragePath.insert(std::make_pair(pu32Serial,pTarget_local->getLocationFull().c_str()));2519 2532 ++it_md; 2520 2533 }
Note:
See TracChangeset
for help on using the changeset viewer.