Changeset 1645 in MondoRescue for branches/2.2.5/mondo/src/mondorestore/mondo-rstr-compare.c
- Timestamp:
- Sep 24, 2007, 3:04:43 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-compare.c
r1644 r1645 67 67 extern char *MONDO_LOGFILE; 68 68 69 /* Reference to global bkpinfo */ 70 extern struct s_bkpinfo *bkpinfo; 71 69 72 //static char cvsid[] = "$Id$"; 70 73 … … 82 85 * @note This function uses an MD5 checksum. 83 86 */ 84 int compare_a_biggiefile( struct s_bkpinfo *bkpinfo,long bigfileno)87 int compare_a_biggiefile(long bigfileno) 85 88 { 86 89 … … 127 130 if (!does_file_exist(slice_fname(bigfileno, 0, ARCHIVES_PATH, ""))) { 128 131 if (does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST")) { 129 insist_on_this_cd_number( bkpinfo,(++g_current_media_number));132 insist_on_this_cd_number((++g_current_media_number)); 130 133 } else { 131 134 sprintf(tmp_ptr, … … 230 233 /** 231 234 * Compare all biggiefiles in the backup. 232 * @param bkpinfo The backup information structure. Used only in compare_a_biggiefile().233 235 * @return 0 for success, nonzero for failure. 234 236 */ 235 int compare_all_biggiefiles( struct s_bkpinfo *bkpinfo)237 int compare_all_biggiefiles() 236 238 { 237 239 int retval = 0; … … 240 242 char tmp[MAX_STR_LEN]; 241 243 242 assert(bkpinfo != NULL);243 244 log_msg(1, "Comparing biggiefiles"); 244 245 … … 263 264 log_msg(1, tmp); 264 265 update_progress_form(tmp); 265 res = compare_a_biggiefile(b kpinfo, bigfileno);266 res = compare_a_biggiefile(bigfileno); 266 267 retval += res; 267 268 g_current_progress++; … … 417 418 * @return 0 for success, nonzero for failure. 418 419 */ 419 int compare_all_tarballs( struct s_bkpinfo *bkpinfo)420 int compare_all_tarballs() 420 421 { 421 422 int retval = 0; … … 449 450 450 451 for (;;) { 451 insist_on_this_cd_number( bkpinfo,g_current_media_number);452 insist_on_this_cd_number(g_current_media_number); 452 453 update_progress_form(progress_str); 453 454 sprintf(tarball_fname, … … 523 524 * @return 0 for success, nonzero for failure. 524 525 */ 525 int compare_to_CD( struct s_bkpinfo *bkpinfo)526 int compare_to_CD() 526 527 { 527 528 /** needs malloc *********/ … … 541 542 chdir(bkpinfo->restore_path); 542 543 getcwd(new, MAX_STR_LEN - 1); 543 insist_on_this_cd_number( bkpinfo,g_current_media_number);544 insist_on_this_cd_number(g_current_media_number); 544 545 unlink(MINDI_CACHE"/changed.txt"); 545 546 546 resA = compare_all_tarballs( bkpinfo);547 resB = compare_all_biggiefiles( bkpinfo);547 resA = compare_all_tarballs(); 548 resB = compare_all_biggiefiles(); 548 549 chdir(cwd); 549 550 noof_changed_files = count_lines_in_file(MINDI_CACHE"/changed.txt"); … … 586 587 */ 587 588 int 588 compare_mode(struct s_bkpinfo *bkpinfo, 589 struct mountlist_itself *mountlist, 589 compare_mode(struct mountlist_itself *mountlist, 590 590 struct raidlist_itself *raidlist) 591 591 { … … 608 608 assert(raidlist != NULL); 609 609 610 while (get_cfg_file_from_archive( bkpinfo)) {610 while (get_cfg_file_from_archive()) { 611 611 if (!ask_me_yes_or_no 612 612 ("Failed to find config file/archives. Choose another source?")) … … 614 614 fatal_error("Unable to find config file/archives. Aborting."); 615 615 } 616 interactively_obtain_media_parameters_from_user( bkpinfo,FALSE);617 } 618 619 read_cfg_file_into_bkpinfo(g_mondo_cfg_file , bkpinfo);616 interactively_obtain_media_parameters_from_user(FALSE); 617 } 618 619 read_cfg_file_into_bkpinfo(g_mondo_cfg_file); 620 620 g_current_media_number = 1; 621 621 mvaddstr_and_log_it(1, 30, "Comparing Automatically"); … … 629 629 if (bkpinfo->backup_media_type == tape 630 630 || bkpinfo->backup_media_type == udev) { 631 retval += compare_to_tape( bkpinfo);631 retval += compare_to_tape(); 632 632 } else if (bkpinfo->backup_media_type == cdstream) { 633 retval += compare_to_cdstream( bkpinfo);634 } else { 635 retval += compare_to_CD( bkpinfo);633 retval += compare_to_cdstream(); 634 } else { 635 retval += compare_to_CD(); 636 636 } 637 637 if (retval) { … … 695 695 * @return 0 for success, nonzero for failure. 696 696 */ 697 int compare_to_cdstream( struct s_bkpinfo *bkpinfo)697 int compare_to_cdstream() 698 698 { 699 699 int res; … … 721 721 find_cdrom_device(bkpinfo->media_device, FALSE); 722 722 } 723 res = verify_tape_backups( bkpinfo);723 res = verify_tape_backups(); 724 724 chdir(dir); 725 725 if (length_of_file(MINDI_CACHE"/changed.txt") > 2 … … 754 754 * returns: int * 755 755 **************************************************************************/ 756 int compare_to_tape( struct s_bkpinfo *bkpinfo)756 int compare_to_tape() 757 757 { 758 758 int res; … … 770 770 mvaddstr_and_log_it(g_currentY, 771 771 0, "Verifying archives against filesystem"); 772 res = verify_tape_backups( bkpinfo);772 res = verify_tape_backups(); 773 773 chdir(dir); 774 774 if (res) {
Note:
See TracChangeset
for help on using the changeset viewer.