Changeset 2125 in MondoRescue
- Timestamp:
- Jan 14, 2009, 3:50:19 PM (16 years ago)
- Location:
- branches/2.2.8/mondo/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/common/libmondo-mountlist.c
r2052 r2125 151 151 res++; 152 152 } 153 amount_allocated += mountlist->el[pos].size / 1024 ;153 amount_allocated += mountlist->el[pos].size / 1024L; 154 154 prev_sp_no = cur_sp_no; 155 155 } … … 304 304 res++; 305 305 } 306 amount_allocated += mountlist->el[pos].size / 1024 ;306 amount_allocated += mountlist->el[pos].size / 1024L; 307 307 prev_sp_no = cur_sp_no; 308 308 } … … 310 310 311 311 /* OK, continue with main loop */ 312 amount_allocated += mountlist->el[pos].size / 1024 ;312 amount_allocated += mountlist->el[pos].size / 1024L; 313 313 prev_part_no = curr_part_no; 314 314 } … … 459 459 } 460 460 /* OK, continue with main loop */ 461 amount_allocated += mountlist->el[pos].size / 1024 ;461 amount_allocated += mountlist->el[pos].size / 1024L; 462 462 prev_part_no = curr_part_no; 463 463 } -
branches/2.2.8/mondo/src/common/libmondo-string.c
r2105 r2125 401 401 sprintf(output, "%-24s %-24s %-10s %8lld", mountlist->el[lino].device, 402 402 mountlist->el[lino].mountpoint, mountlist->el[lino].format, 403 mountlist->el[lino].size / 1024 );403 mountlist->el[lino].size / 1024L); 404 404 return (output); 405 405 } -
branches/2.2.8/mondo/src/mondorestore/mondo-prep.c
r2087 r2125 2457 2457 2458 2458 /** long *************************************************************/ 2459 long newsizL ;2459 long newsizL = 0L; 2460 2460 long current_size_of_drive = 0L; 2461 2461 long original_size_of_drive = 0L; 2462 long final_size ; /* all in Megabytes */2462 long final_size = 0L; /* all in Megabytes */ 2463 2463 struct mountlist_reference *drivemntlist; 2464 2464 … … 2479 2479 } 2480 2480 2481 /*2482 sprintf (tmp, "cp -f %s %s.pre-resize", g_mountlist_fname, g_mountlist_fname);2483 run_program_and_log_output (tmp, FALSE);2484 */2485 2486 2481 current_size_of_drive = get_phys_size_of_drive(drive_name); 2487 2482 … … 2505 2500 2506 2501 for (partno = 0; partno < drivemntlist->entries; partno++) { 2507 original_size_of_drive += drivemntlist->el[partno]->size; 2508 } 2509 original_size_of_drive = original_size_of_drive / 1024; 2502 if (drivemntlist->el[partno]->size > 0) { 2503 original_size_of_drive += (drivemntlist->el[partno]->size / 1024L); 2504 } 2505 } 2510 2506 2511 2507 if (original_size_of_drive <= 0) { … … 2540 2536 newsizL = (long) new_size; 2541 2537 } 2538 2539 /* Do not apply the factor if partition was of negative size */ 2540 if (newsizL < 0) { 2541 newsizL = drivemntlist->el[partno]->size; 2542 } 2543 2542 2544 sprintf(tmp, "Changing %s from %lld KB to %ld KB", 2543 2545 drivemntlist->el[partno]->device, … … 2548 2550 final_size = get_phys_size_of_drive(drive_name); 2549 2551 sprintf(tmp, "final_size = %ld MB", final_size); 2552 log_to_screen(tmp); 2550 2553 paranoid_free(tmp); 2551 log_to_screen(tmp);2552 2554 } 2553 2555 -
branches/2.2.8/mondo/src/mondorestore/mondo-rstr-newt.c
r2094 r2125 241 241 strcpy(mountlist->el[currline].mountpoint, mountpoint_str); 242 242 strcpy(mountlist->el[currline].format, format_str); 243 mountlist->el[currline].size = atol(size_str) * 1024 ;243 mountlist->el[currline].size = atol(size_str) * 1024L; 244 244 mountlist->entries++; 245 245 if (strstr(mountlist->el[currline].device, RAID_DEVICE_STUB)) { … … 1194 1194 strcpy(mountpt_used_to_be, mountlist->el[currline].mountpoint); 1195 1195 strcpy(format_str, mountlist->el[currline].format); 1196 sprintf(size_str, "%lld", mountlist->el[currline].size / 1024 );1196 sprintf(size_str, "%lld", mountlist->el[currline].size / 1024L); 1197 1197 newtOpenWindow(20, 5, 48, 10, "Edit entry"); 1198 1198 label0 = newtLabel(2, 1, "Device:"); … … 1297 1297 mountlist->el[currline].device); 1298 1298 } else { 1299 mountlist->el[currline].size = atol(size_str) * 1024 ;1299 mountlist->el[currline].size = atol(size_str) * 1024L; 1300 1300 } 1301 1301 } … … 2506 2506 sprintf(tmp, "%-22s %8lld", 2507 2507 unallocated_raid_partitions->el[i].device, 2508 unallocated_raid_partitions->el[i].size / 1024 );2508 unallocated_raid_partitions->el[i].size / 1024L); 2509 2509 newtListboxAppendEntry(listbox, tmp, keylist[i]); 2510 2510 }
Note:
See TracChangeset
for help on using the changeset viewer.