Changeset 3351 in MondoRescue for branches/3.2/mondo/src/common/libmondo-archive.c
- Timestamp:
- Feb 27, 2015, 3:18:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-archive.c
r3347 r3351 402 402 assert(bkpinfo != NULL); 403 403 set_g_cdrom_and_g_dvd_to_bkpinfo_value(); 404 404 405 if (bkpinfo->backup_media_type == dvd) { 405 406 #ifdef DVDRWFORMAT … … 437 438 438 439 copy_mondo_and_mindi_stuff_to_scratchdir(); // payload, too, if it exists 439 #if __FreeBSD__ == 5440 strcpy(bkpinfo->kernel_path, "/boot/kernel/kernel");441 #elif __FreeBSD__ == 4442 strcpy(bkpinfo->kernel_path, "/kernel");443 #elif linux444 if (figure_out_kernel_path_interactively_if_necessary445 (bkpinfo->kernel_path)) {446 fatal_error447 ("Kernel not found. Please specify manually with the '-k' switch.");448 }449 #else450 #error "I don't know about this system!"451 #endif452 440 if ((res = call_mindi_to_supply_boot_disks())) { 453 441 fatal_error("Failed to generate boot+data disks"); … … 1967 1955 log_to_screen(tmp); 1968 1956 noof_biggie_files = count_lines_in_file(biggielist_fname); 1957 log_msg(1, "noof_biggie_files = %ld", noof_biggie_files); 1969 1958 open_progress_form("Backing up big files", tmp, "Please wait. This may take some time.", "", estimated_total_noof_slices); 1970 1959 mr_free(tmp); … … 2780 2769 long slice_num = 0L; 2781 2770 long i = 0L; 2782 int j = 0;2783 2771 bool should_I_compress_slices = TRUE; 2784 2772 char *suffix = NULL; // for compressed slices … … 2899 2887 return (1); 2900 2888 } 2901 if ((i == bkpinfo->optimal_set_size / 256L) && (totalread < 1.1 * totallength)) {2902 for ( j = 0; j < (int) (bkpinfo->optimal_set_size / 256); j++) {2889 if ((i == bkpinfo->optimal_set_size / 256L) && (totalread < (off_t)1.1 * totallength)) { 2890 for (i = 0L; i < (bkpinfo->optimal_set_size / 256L); i++) { 2903 2891 blksize = fread(tempblock, 1, 256 * 1024, fin); 2904 if (blksize > 0) {2905 totalread = totalread + blksize;2892 if (blksize > (size_t)0) { 2893 totalread = totalread + (off_t)blksize; 2906 2894 res = fwrite(tempblock, 1, blksize, fout); 2907 2895 } else { … … 2909 2897 } 2910 2898 } 2911 mr_free(tempblock);2912 2899 } else { 2913 2900 i = 0L; … … 2956 2943 g_current_progress++; 2957 2944 } else { /* if i==0 then ... */ 2958 2959 2945 finished = TRUE; 2960 2946 mr_asprintf(file_to_archive, "%s", curr_slice_fname_uncompressed); … … 2981 2967 } 2982 2968 } 2969 mr_free(tempblock); 2983 2970 mr_free(suffix); 2984 2971 paranoid_fclose(fin);
Note:
See TracChangeset
for help on using the changeset viewer.