Changeset 3147 in MondoRescue for branches/3.1/mondo/src/mondorestore/mondo-rstr-compare.c
- Timestamp:
- Jun 19, 2013, 8:34:46 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mondo/src/mondorestore/mondo-rstr-compare.c
r2704 r3147 71 71 return (1); 72 72 } 73 fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin); 73 if (fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin)) { 74 // FIXME 75 } 74 76 paranoid_fclose(fin); 75 77 … … 218 220 int retval = 0; 219 221 int res; 220 long noof_lines;221 222 long archiver_errors; 222 223 bool use_star; … … 289 290 if (use_star) { 290 291 // 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); 292 293 } else { 293 294 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); … … 308 309 if (length_of_file(logfile) > 5) { 309 310 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); 311 312 mr_free(command); 312 313 … … 337 338 { 338 339 int retval = 0; 339 int res;340 340 int current_tarball_number = 0; 341 341 … … 409 409 log_to_screen(progress_str); 410 410 } else { 411 re s= compare_a_tarball(tarball_fname, current_tarball_number);411 retval += compare_a_tarball(tarball_fname, current_tarball_number); 412 412 413 413 g_current_progress++; … … 459 459 assert(bkpinfo != NULL); 460 460 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 } 464 470 insist_on_this_cd_number(g_current_media_number); 465 471 unlink(MONDO_CACHE"/changed.txt"); … … 467 473 resA = compare_all_tarballs(); 468 474 resB = compare_all_biggiefiles(); 469 chdir(cwd); 475 if (chdir(cwd)) { 476 // FIXME 477 } 470 478 noof_changed_files = count_lines_in_file(MONDO_CACHE"/changed.txt"); 471 479 if (noof_changed_files) { … … 594 602 595 603 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 } 599 613 popup_changelist_from_file(MONDO_CACHE"/changed.files"); 600 chdir(cwd); 614 if (chdir(cwd)) { 615 // FIXME 616 } 601 617 log_msg(2, "Returning from popup_changelist_from_file()"); 602 618 } … … 634 650 assert(bkpinfo != NULL); 635 651 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 } 638 658 639 659 mvaddstr_and_log_it(g_currentY, … … 647 667 } 648 668 res = verify_tape_backups(); 649 chdir(dir); 669 if (chdir(dir)) { 670 // FIXME 671 } 650 672 if (length_of_file(MONDO_CACHE"/changed.txt") > 2 651 673 && length_of_file(MONDO_CACHE"/changed.files") > 2) { … … 686 708 malloc_string(dir); 687 709 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 } 690 716 691 717 mvaddstr_and_log_it(g_currentY, 692 718 0, "Verifying archives against filesystem"); 693 719 res = verify_tape_backups(); 694 chdir(dir); 720 if (chdir(dir)) { 721 // FIXME 722 } 695 723 if (res) { 696 724 mvaddstr_and_log_it(g_currentY++, 74, "Failed.");
Note:
See TracChangeset
for help on using the changeset viewer.