Changeset 1155 in MondoRescue


Ignore:
Timestamp:
Feb 13, 2007, 1:21:32 AM (17 years ago)
Author:
Bruno Cornec
Message:

Fix typo on a remaining TRACE
finish merge of trunk on libmondo-archive.c

Location:
branches/stable/mondo/src/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1154 r1155  
    31993199    assert(bkpinfo != NULL);
    32003200    assert_string_is_neither_NULL_nor_zerolength(biggie_filename);
    3201     malloc_string(tmp);
    3202     malloc_string(checksum_line);
    3203     malloc_string(curr_slice_fname_uncompressed);
    3204     malloc_string(curr_slice_fname_compressed);
    3205     malloc_string(file_to_archive);
    3206     command = mr_malloc(MAX_STR_LEN * 8);
    32073201
    32083202    biggiestruct.for_backward_compatibility = '\n';
    32093203    biggiestruct.use_ntfsprog = use_ntfsprog;
    3210     tempblock = (char *) mr_malloc(256 * 1024);
    32113204    optimal_set_size = bkpinfo->optimal_set_size;
    32123205    if (is_this_file_compressed(biggie_filename)
     
    32253218    if (ntfsprog_fifo) {
    32263219        file_to_openin = ntfsprog_fifo;
    3227         strcpy(checksum_line, "IGNORE");
     3220        mr_asprintf(&checksum_line, "IGNORE");
    32283221        mr_msg(2,
    32293222                "Not calculating checksum for %s: it would take too long",
     
    32323225            fatal_error("ntfsresize not found");
    32333226        }
    3234         sprintf(command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", biggie_filename);
     3227        mr_asprintf(&command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", biggie_filename);
    32353228        log_it("command = %s", command);
    3236         strcpy (tmp, call_program_and_get_last_line_of_output(command));
     3229        mr_asprintf(&tmp, call_program_and_get_last_line_of_output(command));
     3230        mr_free(command);
     3231
    32373232        log_it("res of it = %s", tmp);
    32383233        totallength = (off_t)atoll(tmp);
     3234        mr_free(tmp);
    32393235    } else {
    32403236        file_to_openin = biggie_filename;
    32413237        if (strchr(biggie_filename,'\'') != NULL) {
    3242             sprintf(command, "md5sum \"%s\"", biggie_filename);
     3238            mr_asprintf(&command, "md5sum \"%s\"", biggie_filename);
    32433239        } else {
    3244             sprintf(command, "md5sum '%s'", biggie_filename);
     3240            mr_asprintf(&command, "md5sum '%s'", biggie_filename);
    32453241        }
    32463242        if (!(fin = popen(command, "r"))) {
    32473243            log_OS_error("Unable to popen-in command");
     3244            mr_free(command);
     3245            mr_free(suffix);
    32483246            return (1);
    32493247        }
    3250         (void) fgets(checksum_line, MAX_STR_LEN, fin);
     3248        mr_free(command);
     3249        mr_getline(&checksum_line, &n, fin);
    32513250        pclose(fin);
    32523251        totallength = length_of_file (biggie_filename);
    32533252    }
    32543253    lstat(biggie_filename, &biggiestruct.properties);
    3255     strcpy(biggiestruct.filename, biggie_filename);
     3254    if (strlen(biggie_filename) <= MAX_STR_LEN) {
     3255        strcpy(biggiestruct.filename, biggie_filename);
     3256    } else {
     3257        fatal_error("biggie_filename too big");
     3258    }
    32563259    pB = strchr(checksum_line, ' ');
    32573260    if (!pB) {
     
    32613264        *pB = '\0';
    32623265    }
    3263     strcpy(biggiestruct.checksum, checksum_line);
    3264 
    3265     strcpy(tmp, slice_fname(biggie_file_number, 0, bkpinfo->tmpdir, ""));
     3266    if (strlen(checksum_line) <= 64) {
     3267        strcpy(biggiestruct.checksum, checksum_line);
     3268    } else {
     3269        fatal_error("checksum_line too big");
     3270    }
     3271    mr_free(checksum_line);
     3272
     3273    mr_asprintf(&tmp, slice_fname(biggie_file_number, 0, bkpinfo->tmpdir, ""));
    32663274    fout = fopen(tmp, "w");
     3275    mr_free(tmp);
     3276
    32673277    (void) fwrite((void *) &biggiestruct, 1, sizeof(biggiestruct), fout);
    32683278    paranoid_fclose(fout);
     
    32723282    if (!(fin = fopen(file_to_openin, "r"))) {
    32733283        log_OS_error("Unable to openin biggie_filename");
    3274         sprintf(tmp, "Cannot archive bigfile '%s': not found",
    3275                 biggie_filename);
     3284        mr_asprintf(&tmp, "Cannot archive bigfile '%s': not found",
     3285                 biggie_filename);
    32763286        log_to_screen(tmp);
    3277         mr_free(tempblock);
    32783287        mr_free(tmp);
    3279         mr_free(checksum_line);
    3280         mr_free(command);
     3288        mr_free(suffix);
    32813289        return (1);
    32823290    }
     
    32943302    i = bkpinfo->optimal_set_size / 256;
    32953303    for (slice_num = 1; !finished; slice_num++) {
    3296         strcpy(curr_slice_fname_uncompressed,
     3304        mr_asprintf(&curr_slice_fname_uncompressed,
    32973305               slice_fname(biggie_file_number, slice_num, bkpinfo->tmpdir,
    32983306                           ""));
    3299         strcpy(curr_slice_fname_compressed,
     3307        mr_asprintf(&curr_slice_fname_compressed,
    33003308               slice_fname(biggie_file_number, slice_num, bkpinfo->tmpdir,
    33013309                           suffix));
    33023310
    3303         strcpy(tmp, percent_media_full_comment(bkpinfo));
     3311        mr_asprintf(&tmp, percent_media_full_comment(bkpinfo));
    33043312        update_progress_form(tmp);
     3313        mr_free(tmp);
     3314
    33053315        if (!(fout = fopen(curr_slice_fname_uncompressed, "w"))) {
    33063316            log_OS_error(curr_slice_fname_uncompressed);
     3317            mr_free(curr_slice_fname_uncompressed);
     3318            mr_free(curr_slice_fname_compressed);
     3319            mr_free(suffix);
    33073320            return (1);
    33083321        }
     3322        tempblock = mr_malloc(256 * 1024);
    33093323        if ((i == bkpinfo->optimal_set_size / 256)
    33103324            && (totalread < 1.1 * totallength)) {
     
    33153329                    (void) fwrite(tempblock, 1, blksize, fout);
    33163330                } else {
     3331                    mr_free(tempblock);
     3332                    mr_free(curr_slice_fname_uncompressed);
     3333                    mr_free(curr_slice_fname_compressed);
    33173334                    break;
    33183335                }
     
    33213338            i = 0;
    33223339        }
     3340        mr_free(tempblock);
    33233341        paranoid_fclose(fout);
    33243342        if (i > 0)              // length_of_file (curr_slice_fname_uncompressed)
     
    33303348            }
    33313349            if (should_I_compress_slices && bkpinfo->compression_level > 0) {
    3332                 sprintf(command, "%s -%d %s", bkpinfo->zip_exe,
    3333                         bkpinfo->compression_level,
    3334                         curr_slice_fname_uncompressed);
     3350                mr_asprintf(&command, "%s -%d %s", bkpinfo->zip_exe,
     3351                         bkpinfo->compression_level,
     3352                         curr_slice_fname_uncompressed);
    33353353                mr_msg(2, command);
    33363354                if ((res = system(command))) {
    33373355                    log_OS_error(command);
    33383356                }
     3357                mr_free(command);
    33393358                //          did_I_compress_slice = TRUE;
    33403359            } else {
    3341                 sprintf(command, "mv %s %s 2>> %s",
    3342                         curr_slice_fname_uncompressed,
    3343                         curr_slice_fname_compressed, MONDO_LOGFILE);
     3360                /* BERLIOS: Useless
     3361                   mr_asprintf(&command, "mv %s %s 2>> %s",
     3362                   curr_slice_fname_uncompressed,
     3363                   curr_slice_fname_compressed, MONDO_LOGFILE);
     3364                 */
    33443365                res = 0;        // don't do it :)
    33453366                //          did_I_compress_slice = FALSE;
     
    33553376            }
    33563377            if (res) {
    3357                 sprintf(tmp, "Problem with slice # %ld", slice_num);
     3378                mr_asprintf(&tmp, "Problem with slice # %ld", slice_num);
    33583379            } else {
    3359                 sprintf(tmp,
    3360                         "%s - Bigfile #%ld, slice #%ld compressed OK          ",
    3361                         biggie_filename, biggie_file_number + 1,
    3362                         slice_num);
     3380                mr_asprintf(&tmp,
     3381                         "%s - Bigfile #%ld, slice #%ld compressed OK          ",
     3382                         biggie_filename, biggie_file_number + 1,
     3383                         slice_num);
    33633384            }
    33643385            if (!g_text_mode) {
     
    33683389                mr_msg(2, tmp);
    33693390            }
    3370             strcpy(file_to_archive, curr_slice_fname_compressed);
     3391            mr_free(tmp);
     3392            mr_asprintf(&file_to_archive, curr_slice_fname_compressed);
    33713393            g_current_progress++;
    33723394        } else {                /* if i==0 then ... */
    33733395
    33743396            finished = TRUE;
    3375             strcpy(file_to_archive, curr_slice_fname_uncompressed);
     3397            mr_asprintf(&file_to_archive, curr_slice_fname_uncompressed);
    33763398            if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    33773399                break;
     
    33883410            res = move_files_to_cd(bkpinfo, file_to_archive, NULL);
    33893411        }
     3412        mr_free(file_to_archive);
    33903413        retval += res;
    33913414        if (res) {
    3392             sprintf(tmp,
    3393                     "Failed to add slice %ld of bigfile %ld to scratchdir",
    3394                     slice_num, biggie_file_number + 1);
     3415            mr_asprintf(&tmp,
     3416                     "Failed to add slice %ld of bigfile %ld to scratchdir",
     3417                     slice_num, biggie_file_number + 1);
    33953418            log_to_screen(tmp);
     3419            mr_free(tmp);
    33963420            fatal_error
    33973421                ("Hard disk full. You should have bought a bigger one.");
    33983422        }
    3399     }
     3423        mr_free(curr_slice_fname_uncompressed);
     3424        mr_free(curr_slice_fname_compressed);
     3425    }
     3426    mr_free(suffix);
    34003427    paranoid_fclose(fin);
    3401     sprintf(tmp, "Sliced bigfile #%ld", biggie_file_number + 1);
    34023428    if (retval) {
    3403         strcat(tmp, "...FAILED");
    3404     } else {
    3405         strcat(tmp, "...OK!");
     3429        mr_asprintf(&tmp, "Sliced bigfile #%ld...FAILED",
     3430                 biggie_file_number + 1);
     3431    } else {
     3432        mr_asprintf(&tmp, "Sliced bigfile #%ld...OK!",
     3433                 biggie_file_number + 1);
    34063434    }
    34073435    mr_msg(1, tmp);
    3408     mr_free(tempblock);
    34093436    mr_free(tmp);
    3410     mr_free(checksum_line);
    3411     mr_free(command);
    3412     mr_free(curr_slice_fname_uncompressed);
    3413     mr_free(curr_slice_fname_compressed);
    3414     mr_free(file_to_archive);
    3415     mr_free(suffix);
    34163437    return (retval);
    34173438}
     
    34333454{
    34343455    /*@ buffers ********************************************* */
    3435     char *tmp;
    3436     char *dir;
    3437 
    3438     malloc_string(tmp);
    3439     malloc_string(dir);
     3456    char *tmp = NULL;
     3457    char *dir = NULL;
     3458
    34403459    assert_string_is_neither_NULL_nor_zerolength(d);
    34413460
    3442     sprintf(dir, "%s/archives", d);
    3443     sprintf(tmp, "find %s -name '*.afio*' -exec rm -f '{}' \\;", dir);
    3444     run_program_and_log_output(tmp, FALSE);
    3445     sprintf(tmp, "find %s -name '*list.[0-9]*' -exec rm -f '{}' \\;", dir);
    3446     run_program_and_log_output(tmp, FALSE);
    3447     sprintf(tmp, "find %s -name 'slice*' -exec rm -f '{}' \\;", dir);
    3448     run_program_and_log_output(tmp, FALSE);
    3449     sprintf(tmp, "rm -f %s/cklist*", dir);
    3450     run_program_and_log_output(tmp, FALSE);
    3451     sprintf(tmp, "rm -f %s/zero", dir);
    3452     run_program_and_log_output(tmp, FALSE);
    3453     mr_msg(1, "Wiped %s's archives", dir);
    3454     sprintf(tmp, "ls -l %s", dir);
     3461    mr_asprintf(&dir, "%s/archives", d);
     3462    mr_asprintf(&tmp, "find %s -name '*.afio*' -exec rm -f '{}' \\;", dir);
    34553463    run_program_and_log_output(tmp, FALSE);
    34563464    mr_free(tmp);
     3465    mr_asprintf(&tmp, "find %s -name '*list.[0-9]*' -exec rm -f '{}' \\;",
     3466             dir);
     3467    run_program_and_log_output(tmp, FALSE);
     3468    mr_free(tmp);
     3469
     3470    mr_asprintf(&tmp, "find %s -name 'slice*' -exec rm -f '{}' \\;", dir);
     3471    run_program_and_log_output(tmp, FALSE);
     3472    mr_free(tmp);
     3473
     3474    mr_asprintf(&tmp, "rm -f %s/cklist*", dir);
     3475    run_program_and_log_output(tmp, FALSE);
     3476    mr_free(tmp);
     3477
     3478    mr_asprintf(&tmp, "rm -f %s/zero", dir);
     3479    run_program_and_log_output(tmp, FALSE);
     3480    mr_free(tmp);
     3481
     3482    mr_msg(1, "Wiped %s's archives", dir);
     3483    mr_asprintf(&tmp, "ls -l %s", dir);
     3484    run_program_and_log_output(tmp, FALSE);
     3485    mr_free(tmp);
     3486
    34573487    mr_free(dir);
    34583488}
    3459 
    34603489
    34613490
     
    34803509
    34813510    /*@ buffers ************************************************** */
    3482     char *tmp;
    3483 
    3484     malloc_string(tmp);
     3511    char *tmp = NULL;
     3512
    34853513    assert(bkpinfo != NULL);
    34863514
    34873515// I should really check if there are any slices or tarballs to be copied to CD-R(W)'s; the odds are approx. 1 in a million that there are no files here, so I'll just go ahead & make one more CD anyway
    34883516
    3489     sprintf(tmp, "Writing the final ISO");
     3517    mr_asprintf(&tmp, "Writing the final ISO");
    34903518    mr_msg(2, tmp);
    34913519    center_string(tmp, 80);
     
    34953523    }
    34963524#endif
     3525    mr_free(tmp);
    34973526    res = write_iso_and_go_on(bkpinfo, TRUE);
    34983527#ifndef _XWIN
     
    35023531#endif
    35033532    mr_msg(2, "Returning from writing final ISO (res=%d)", res);
    3504     mr_free(tmp);
    35053533    return (res);
    35063534}
     
    35433571    int res = 0;
    35443572
    3545     malloc_string(tmp);
    3546     malloc_string(cdno_fname);
    3547     malloc_string(lastcd_fname);
    3548     malloc_string(isofile);
    3549 
    35503573    assert(bkpinfo != NULL);
    35513574    orig_vfy_flag_val = bkpinfo->verify_data;
     
    35603583    }
    35613584    mr_msg(1, "OK, time to make %s #%d",
    3562             media_descriptor_string(bkpinfo->backup_media_type),
     3585            bkpinfo->backup_media_string,
    35633586            g_current_media_number);
    35643587
    35653588    /* label the ISO with its number */
    35663589
    3567     sprintf(cdno_fname, "%s/archives/THIS-CD-NUMBER", bkpinfo->scratchdir);
     3590    mr_asprintf(&cdno_fname, "%s/archives/THIS-CD-NUMBER",
     3591             bkpinfo->scratchdir);
    35683592    fout = fopen(cdno_fname, "w");
    35693593    fprintf(fout, "%d", g_current_media_number);
    35703594    paranoid_fclose(fout);
    3571 
    3572     sprintf(tmp, "cp -f %s/autorun %s/", g_mondo_home,
    3573             bkpinfo->scratchdir);
     3595    mr_free(cdno_fname);
     3596
     3597    mr_asprintf(&tmp, "cp -f %s/autorun %s/", g_mondo_home,
     3598             bkpinfo->scratchdir);
    35743599    if (run_program_and_log_output(tmp, FALSE)) {
    35753600        mr_msg(2, "Warning - unable to copy autorun to scratchdir");
    35763601    }
     3602    mr_free(tmp);
    35773603
    35783604    /* last CD or not? Label accordingly */
    3579     sprintf(lastcd_fname, "%s/archives/NOT-THE-LAST", bkpinfo->scratchdir);
     3605    mr_asprintf(&lastcd_fname, "%s/archives/NOT-THE-LAST",
     3606             bkpinfo->scratchdir);
    35803607    if (last_cd) {
    35813608        unlink(lastcd_fname);
     
    35883615        paranoid_fclose(fout);
    35893616    }
     3617    mr_free(lastcd_fname);
     3618
    35903619    if (space_occupied_by_cd(bkpinfo->scratchdir) / 1024 >
    35913620        bkpinfo->media_size[g_current_media_number]) {
    3592         sprintf(tmp,
     3621        mr_asprintf(&tmp,
    35933622                "Warning! %s is too big. It occupies %ld KB, which is more than the %ld KB allowed.",
    35943623                media_descriptor_string(bkpinfo->backup_media_type),
     
    35963625                (long) bkpinfo->media_size[g_current_media_number]);
    35973626        log_to_screen(tmp);
     3627        mr_free(tmp);
    35983628    }
    35993629    if (bkpinfo->backup_media_type != usb) {
    3600         sprintf(isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir,
     3630        mr_asprintf(&isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir,
    36013631            bkpinfo->nfs_remote_dir, bkpinfo->prefix,
    36023632            g_current_media_number);
     
    36323662            that_one_was_ok = TRUE;
    36333663        } else {
    3634             sprintf(tmp, "Failed to burn %s #%d. Retry?",
    3635                     media_descriptor_string(bkpinfo->backup_media_type),
    3636                     g_current_media_number);
     3664            mr_asprintf(&tmp, "Failed to burn %s #%d. Retry?",
     3665                     bkpinfo->backup_media_string,
     3666                     g_current_media_number);
    36373667            res = ask_me_yes_or_no(tmp);
     3668            mr_free(tmp);
    36383669            if (!res) {
    36393670                if (ask_me_yes_or_no("Abort the backup?")) {
     
    36483679        }
    36493680    }
    3650 /*
    3651   if (using_nfs)
    3652     {
    3653       sprintf(tmp,"mv -f %s %s/%s/", isofile, bkpinfo->isodir, bkpinfo->nfs_remote_dir);
    3654       if (run_program_and_log_output(tmp, FALSE))
    3655         { log_to_screen("Unable to move ISO to NFS dir"); }
    3656     }
    3657 */
     3681    mr_free(isofile);
     3682
    36583683    g_current_media_number++;
    36593684    if (g_current_media_number > MAX_NOOF_MEDIA) {
     
    36613686    }
    36623687    wipe_archives(bkpinfo->scratchdir);
    3663     sprintf(tmp, "rm -Rf %s/images/*gz %s/images/*data*img",
    3664             bkpinfo->scratchdir, bkpinfo->scratchdir);
     3688    mr_asprintf(&tmp, "rm -Rf %s/images/*gz %s/images/*data*img",
     3689             bkpinfo->scratchdir, bkpinfo->scratchdir);
    36653690    if (system(tmp)) {
    3666         mr_msg
    3667             (2,
    3668              "Error occurred when I tried to delete the redundant IMGs and GZs");
    3669     }
     3691        mr_msg(2,
     3692                "Error occurred when I tried to delete the redundant IMGs and GZs");
     3693    }
     3694    mr_free(tmp);
    36703695
    36713696    if (last_cd) {
     
    36763701
    36773702    bkpinfo->verify_data = orig_vfy_flag_val;
    3678     mr_free(tmp);
    3679     mr_free(cdno_fname);
    3680     mr_free(lastcd_fname);
    3681     mr_free(isofile);
    36823703    return (0);
    36833704}
    36843705
    36853706/* @} - end of LLarchiveGroup */
    3686 
    3687 
    36883707
    36893708
     
    37023721{
    37033722    int res = 0, retval = 0, cdno = 0;
    3704     char *tmp;
     3723    char *tmp = NULL;
    37053724    long diffs = 0;
    37063725
    3707     malloc_string(tmp);
    37083726    assert(bkpinfo != NULL);
    37093727    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
     
    37423760            retval += res;
    37433761            if (res) {
    3744                 sprintf(tmp,
    3745                         "Warnings/errors were reported while checking %s #%d",
    3746                         media_descriptor_string(bkpinfo->
    3747                                                 backup_media_type),
    3748                         g_current_media_number);
     3762                mr_asprintf(&tmp,
     3763                         "Warnings/errors were reported while checking %s #%d",
     3764                         bkpinfo->backup_media_string,
     3765                         g_current_media_number);
    37493766                log_to_screen(tmp);
    3750 
    3751             }
    3752         }
    3753 /*
    3754       sprintf (tmp,
    3755            "cat %s | grep \"afio: \" | cut -d'\"' -f2 | sort -u | awk '{print \"/\"$0;};' | tr -s '/' '/' | grep -vx \"/afio:.*\" > /tmp/changed.files",
    3756            MONDO_LOGFILE);
    3757       system (tmp);
    3758 */
    3759         sprintf(tmp,
    3760                 "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files",
    3761                 MONDO_LOGFILE);
     3767                mr_free(tmp);
     3768
     3769            }
     3770        }
     3771        mr_asprintf(&tmp,
     3772                 "grep 'afio: ' %s | sed 's/afio: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files",
     3773                 MONDO_LOGFILE);
    37623774        system(tmp);
    3763 
    3764         sprintf(tmp,
    3765                 "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files",
    3766                 MONDO_LOGFILE);
     3775        mr_free(tmp);
     3776
     3777        mr_asprintf(&tmp,
     3778                 "grep 'star: ' %s | sed 's/star: //' | grep -vE '^/dev/.*$' >> /tmp/changed.files",
     3779                 MONDO_LOGFILE);
    37673780        system(tmp);
     3781        mr_free(tmp);
     3782
    37683783        run_program_and_log_output("umount " MNT_CDROM, FALSE);
    3769 //    if (bkpinfo->backup_media_type != iso && !bkpinfo->please_dont_eject_when_restoring)
    3770 //{
    37713784        eject_device(bkpinfo->media_device);
    3772 //}
    37733785    }
    37743786    diffs = count_lines_in_file("/tmp/changed.files");
     
    37793791        }
    37803792    }
    3781     mr_free(tmp);
    37823793    return (retval);
    37833794}
    3784 
    3785 
    3786 
    37873795
    37883796
     
    38163824
    38173825
    3818     malloc_string(tmp);
    3819     malloc_string(title);
    38203826    /* pretty stuff */
    38213827    if (!(p = strrchr(datafile, '/'))) {
     
    38243830        p++;
    38253831    }
    3826     sprintf(title, "Writing %s to floppy", p);
     3832    mr_asprintf(&title, "Writing %s to floppy", p);
    38273833    open_evalcall_form(title);
     3834    mr_free(title);
     3835
    38283836    /* functional stuff */
    38293837    for (p = device + strlen(device); p != device && isdigit(*(p - 1));
     
    38333841        maxblocks = 1440;
    38343842    }
    3835     sprintf(tmp, "maxblocks = %d; p=%s", maxblocks, p);
     3843    mr_asprintf(&tmp, "maxblocks = %d; p=%s", maxblocks, p);
    38363844    mr_msg(2, tmp);
     3845    mr_free(tmp);
     3846
    38373847    /* copy data from image to floppy */
    38383848    if (!(fin = fopen(datafile, "r"))) {
     
    38613871        }
    38623872        if (((blockno + 1) % 128) == 0) {
    3863             paranoid_system("sync");    /* fflush doesn't work; dunno why */
     3873            sync(); /* fflush doesn't work; dunno why */
    38643874            update_evalcall_form(percentage);
    38653875        }
     
    38673877    paranoid_fclose(fin);
    38683878    paranoid_fclose(fout);
    3869     mr_free(tmp);
    3870     mr_free(title);
    38713879    close_evalcall_form();
    38723880    return (res);
    38733881}
    3874 
    3875 
    3876 
    3877 
    3878 
    3879 
    3880 
    38813882
    38823883
  • branches/stable/mondo/src/common/libmondo-tools.c

    r1152 r1155  
    717717    }
    718718
    719     unlink(MONDO_TRACEFILE);
    720719    run_program_and_log_output("rm -Rf /tmp/changed.files*", FALSE);
    721720    if (find_and_store_mondoarchives_home(g_mondo_home)) {
Note: See TracChangeset for help on using the changeset viewer.