Changeset 40107 in vbox for trunk/src/VBox/Storage
- Timestamp:
- Feb 13, 2012 7:36:26 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 76248
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VHD.cpp
r40034 r40107 3129 3129 } 3130 3130 else 3131 vdIfErrorMessage(pIfError, "Missing footer structure, using backup ");3131 vdIfErrorMessage(pIfError, "Missing footer structure, using backup\n"); 3132 3132 3133 3133 /* Remember to fix the footer structure. */ … … 3146 3146 if (u32ChkSumOld != u32ChkSum) 3147 3147 { 3148 vdIfErrorMessage(pIfError, "Checksum is invalid (should be %u got %u), repairing ",3148 vdIfErrorMessage(pIfError, "Checksum is invalid (should be %u got %u), repairing\n", 3149 3149 u32ChkSum, u32ChkSumOld); 3150 3150 fRepairFooter = true; … … 3204 3204 if (u32ChkSumOld != u32ChkSum) 3205 3205 { 3206 vdIfErrorMessage(pIfError, "Checksum of dynamic disk header is invalid (should be %u got %u), repairing ",3206 vdIfErrorMessage(pIfError, "Checksum of dynamic disk header is invalid (should be %u got %u), repairing\n", 3207 3207 u32ChkSum, u32ChkSumOld); 3208 3208 fRepairDynHeader = true; … … 3258 3258 } 3259 3259 3260 vdIfErrorMessage(pIfError, "First data block at sector %u ", idxMinBlock);3260 vdIfErrorMessage(pIfError, "First data block at sector %u\n", idxMinBlock); 3261 3261 3262 3262 for (uint32_t i = 0; i < cBatEntries; i++) … … 3272 3272 if (offBlock + cbBlock > cbFile) 3273 3273 { 3274 vdIfErrorMessage(pIfError, "Entry %u points to invalid offset %llu, clearing ",3274 vdIfErrorMessage(pIfError, "Entry %u points to invalid offset %llu, clearing\n", 3275 3275 i, offBlock); 3276 3276 paBat[i] = 0; … … 3279 3279 else if (offBlock + cbBlock > offFooter) 3280 3280 { 3281 vdIfErrorMessage(pIfError, "Entry %u intersects with footer, aligning footer ",3281 vdIfErrorMessage(pIfError, "Entry %u intersects with footer, aligning footer\n", 3282 3282 i); 3283 3283 offFooter = offBlock + cbBlock; … … 3287 3287 if (ASMBitTestAndSet(pu32BlockBitmap, (paBat[i] - idxMinBlock) / (cbBlock / VHD_SECTOR_SIZE))) 3288 3288 { 3289 vdIfErrorMessage(pIfError, "Entry %u points to an already referenced data block, clearing ",3289 vdIfErrorMessage(pIfError, "Entry %u points to an already referenced data block, clearing\n", 3290 3290 i); 3291 3291 paBat[i] = 0; … … 3298 3298 /* Write repaired structures now. */ 3299 3299 if (!(fRepairBat || fRepairDynHeader || fRepairFooter)) 3300 vdIfErrorMessage(pIfError, "VHD image is in a consistent state, no repair required ");3300 vdIfErrorMessage(pIfError, "VHD image is in a consistent state, no repair required\n"); 3301 3301 else if (!(fFlags & VD_REPAIR_DRY_RUN)) 3302 3302 { … … 3306 3306 paBat[i] = RT_H2BE_U32(paBat[i]); 3307 3307 3308 vdIfErrorMessage(pIfError, "Writing repaired block allocation table... ");3308 vdIfErrorMessage(pIfError, "Writing repaired block allocation table...\n"); 3309 3309 3310 3310 rc = vdIfIoIntFileWriteSync(pIfIo, pStorage, offBat, paBat, … … 3323 3323 Assert(fDynamic); 3324 3324 3325 vdIfErrorMessage(pIfError, "Writing repaired dynamic disk header... ");3325 vdIfErrorMessage(pIfError, "Writing repaired dynamic disk header...\n"); 3326 3326 rc = vdIfIoIntFileWriteSync(pIfIo, pStorage, offDynamicDiskHeader, &dynamicDiskHeader, 3327 3327 sizeof(VHDDynamicDiskHeader), NULL); … … 3337 3337 if (fRepairFooter) 3338 3338 { 3339 vdIfErrorMessage(pIfError, "Writing repaired Footer... ");3339 vdIfErrorMessage(pIfError, "Writing repaired Footer...\n"); 3340 3340 3341 3341 if (fDynamic) … … 3364 3364 } 3365 3365 3366 vdIfErrorMessage(pIfError, "Corrupted VHD image repaired successfully ");3366 vdIfErrorMessage(pIfError, "Corrupted VHD image repaired successfully\n"); 3367 3367 } 3368 3368 } while(0);
Note:
See TracChangeset
for help on using the changeset viewer.