Changeset 2696 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-mountlist.c
- Timestamp:
- Jan 25, 2011, 10:34:40 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-mountlist.c
r2517 r2696 331 331 /* OK, continue with main loop */ 332 332 amount_allocated += mountlist->el[pos].size / 1024L; 333 334 /* This should only happen at the end but not tested now */ 335 if (amount_allocated > physical_drive_size) { 336 // Used to be +1, but what if you're 1 MB too high? 337 mr_asprintf(tmp, " %ld MB over-allocated on %s.",amount_allocated - physical_drive_size, drive); 338 log_it(tmp); 339 340 /* Do we have more than 1 MB per partition ? */ 341 if (amount_allocated - physical_drive_size <= curr_part_no) { 342 /* Probably a rouding error, just passing over 343 * by reducing the last partition if possible */ 344 amount_allocated -= mountlist->el[pos].size / 1024L; 345 mountlist->el[pos].size = (mountlist->el[pos].size - curr_part_no*1024L); 346 amount_allocated += mountlist->el[pos].size / 1024L; 347 } else { 348 mr_strcat(flaws_str, "%s", tmp); 349 res++; 350 } 351 mr_free(tmp); 352 } 333 353 prev_part_no = curr_part_no; 334 354 }
Note:
See TracChangeset
for help on using the changeset viewer.