Ignore:
Timestamp:
Jun 19, 2013, 8:34:46 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • First pass on svn merge -r 2935:3146 ../3.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/mondo/src/mondorestore/mondo-rstr-compare.c

    r2704 r3147  
    7171        return (1);
    7272    }
    73     fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin);
     73    if (fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin)) {
     74        // FIXME
     75    }
    7476    paranoid_fclose(fin);
    7577
     
    218220    int retval = 0;
    219221    int res;
    220     long noof_lines;
    221222    long archiver_errors;
    222223    bool use_star;
     
    289290    if (use_star) {
    290291        // doesn't use compressor_exe
    291         mr_asprintf(command, "%s -diff H=exustar file=%s >> %s 2>> %s", archiver_exe, tarball_fname, logfile, logfile);
     292        mr_asprintf(command, "%s -sparse -diff H=exustar file=%s >> %s 2>> %s", archiver_exe, tarball_fname, logfile, logfile);
    292293    } else {
    293294        mr_asprintf(command, "%s -r -b %ld -M 16m -c %ld %s %s >> %s 2>> %s", archiver_exe, TAPE_BLOCK_SIZE, BUFSIZE, compressor_exe, tarball_fname, logfile, logfile);
     
    308309    if (length_of_file(logfile) > 5) {
    309310        mr_asprintf(command, "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vE \"^dev/.*\" >> "MONDO_CACHE"/changed.txt", logfile);
    310         system(command);
     311        paranoid_system(command);
    311312        mr_free(command);
    312313
     
    337338{
    338339    int retval = 0;
    339     int res;
    340340    int current_tarball_number = 0;
    341341
     
    409409            log_to_screen(progress_str);
    410410        } else {
    411             res = compare_a_tarball(tarball_fname, current_tarball_number);
     411            retval += compare_a_tarball(tarball_fname, current_tarball_number);
    412412
    413413            g_current_progress++;
     
    459459    assert(bkpinfo != NULL);
    460460
    461     getcwd(cwd, MAX_STR_LEN - 1);
    462     chdir(bkpinfo->restore_path);
    463     getcwd(new, MAX_STR_LEN - 1);
     461    if (getcwd(cwd, MAX_STR_LEN - 1)) {
     462        // FIXME
     463    }
     464    if (chdir(bkpinfo->restore_path)) {
     465        //FIXME
     466    }
     467    if (getcwd(new, MAX_STR_LEN - 1)) {
     468        // FIXME
     469    }
    464470    insist_on_this_cd_number(g_current_media_number);
    465471    unlink(MONDO_CACHE"/changed.txt");
     
    467473    resA = compare_all_tarballs();
    468474    resB = compare_all_biggiefiles();
    469     chdir(cwd);
     475    if (chdir(cwd)) {
     476        // FIXME
     477    }
    470478    noof_changed_files = count_lines_in_file(MONDO_CACHE"/changed.txt");
    471479    if (noof_changed_files) {
     
    594602
    595603            log_msg(2, "calling popup_changelist_from_file()");
    596             getcwd(cwd, MAX_STR_LEN - 1);
    597             chdir(bkpinfo->restore_path);
    598             getcwd(new, MAX_STR_LEN - 1);
     604            if (getcwd(cwd, MAX_STR_LEN - 1)) {
     605                //FIXME
     606            }
     607            if (chdir(bkpinfo->restore_path)) {
     608                // FIXME
     609            }
     610            if (getcwd(new, MAX_STR_LEN - 1)) {
     611                //FIXME
     612            }
    599613            popup_changelist_from_file(MONDO_CACHE"/changed.files");
    600             chdir(cwd);
     614            if (chdir(cwd)) {
     615                // FIXME
     616            }
    601617            log_msg(2, "Returning from popup_changelist_from_file()");
    602618        }
     
    634650    assert(bkpinfo != NULL);
    635651    malloc_string(dir);
    636     getcwd(dir, MAX_STR_LEN);
    637     chdir(bkpinfo->restore_path);
     652    if (getcwd(dir, MAX_STR_LEN)) {
     653        // FIXME
     654    }
     655    if (chdir(bkpinfo->restore_path)) {
     656        // FIXME
     657    }
    638658
    639659    mvaddstr_and_log_it(g_currentY,
     
    647667    }
    648668    res = verify_tape_backups();
    649     chdir(dir);
     669    if (chdir(dir)) {
     670        // FIXME
     671    }
    650672    if (length_of_file(MONDO_CACHE"/changed.txt") > 2
    651673        && length_of_file(MONDO_CACHE"/changed.files") > 2) {
     
    686708    malloc_string(dir);
    687709
    688     getcwd(dir, MAX_STR_LEN);
    689     chdir(bkpinfo->restore_path);
     710    if (getcwd(dir, MAX_STR_LEN)) {
     711        // FIXME
     712    }
     713    if (chdir(bkpinfo->restore_path)) {
     714        // FIXME
     715    }
    690716
    691717    mvaddstr_and_log_it(g_currentY,
    692718                        0, "Verifying archives against filesystem");
    693719    res = verify_tape_backups();
    694     chdir(dir);
     720    if (chdir(dir)) {
     721        // FIXME
     722    }
    695723    if (res) {
    696724        mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
Note: See TracChangeset for help on using the changeset viewer.