Changeset 2230 in MondoRescue
- Timestamp:
- Jun 17, 2009, 10:53:23 PM (16 years ago)
- Location:
- branches/2.2.9/mondo/src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-archive.c
r2227 r2230 1475 1475 maintain_collection_of_recent_archives(bkpinfo->tmpdir, 1476 1476 storing_afioball_fname); 1477 log_it(" %s","Writing EXAT files");1477 log_it("Writing EXAT files"); 1478 1478 res += 1479 1479 write_EXAT_files_to_tape(curr_xattr_list_fname, … … 1999 1999 log_msg(1, "--> tmp = '%s'", tmp); 2000 2000 if (strstr(tmp, "NTFS")) { 2001 log_it(" %s","TRUE");2001 log_it("TRUE"); 2002 2002 ret = TRUE; 2003 2003 } else { 2004 log_it(" %s","FALSE");2004 log_it("FALSE"); 2005 2005 ret = FALSE; 2006 2006 } … … 2271 2271 register_in_tape_catalog(fileset, curr_set_no, -1, curr_afioball_fname); 2272 2272 maintain_collection_of_recent_archives(bkpinfo->tmpdir, curr_afioball_fname); 2273 log_it(" %s","Writing EXAT files");2273 log_it("Writing EXAT files"); 2274 2274 res += 2275 2275 write_EXAT_files_to_tape(curr_xattr_list_fname, … … 3450 3450 media_descriptor_string(g_backup_media_type)); 3451 3451 chdir("/"); 3452 log_it(" %s","Before calling verification of image()");3452 log_it("Before calling verification of image()"); 3453 3453 if (bkpinfo->backup_media_type == usb) { 3454 3454 res += verify_usb_image(); … … 3456 3456 res += verify_cd_image(); 3457 3457 } 3458 log_it(" %s","After calling verification of image()");3458 log_it("After calling verification of image()"); 3459 3459 } 3460 3460 if (!res) { -
branches/2.2.9/mondo/src/common/libmondo-filelist.c
r2227 r2230 592 592 pout = popen(syscall_pout, "w"); 593 593 if (!pout) { 594 log_it(" %s","Unable to openout to syscall_pout");594 log_it("Unable to openout to syscall_pout"); 595 595 return (1); 596 596 } … … 598 598 if (!pin) { 599 599 pclose(pout); 600 log_it(" %s","Unable to openin from syscall");600 log_it("Unable to openin from syscall"); 601 601 return (1); 602 602 } … … 605 605 pclose(pin); 606 606 pclose(pout); 607 log_it(" %s","Unable to openin masklist");607 log_it("Unable to openin masklist"); 608 608 return (1); 609 609 } -
branches/2.2.9/mondo/src/common/libmondo-mountlist.c
r2219 r2230 652 652 /*@ buffers ********************************************************* */ 653 653 char *drive = NULL; 654 char *truncdrive = NULL; 654 655 655 656 long long size; … … 676 677 log_msg(8, "Putting %s with size %lli in list of drives", drive, size); 677 678 678 (void)truncate_to_drive_name(drive);679 log_msg(8, "drive truncated to %s", drive);679 truncdrive = truncate_to_drive_name(drive); 680 log_msg(8, "drive truncated to %s", truncdrive); 680 681 681 682 for (j = 0; 682 683 j < noof_drives 683 && strcmp(drivelist->el[j].device, drive) != 0; j++) {684 && strcmp(drivelist->el[j].device, truncdrive) != 0; j++) { 684 685 continue; 685 686 } 686 687 if (j == noof_drives) { 687 str ncpy(drivelist->el[noof_drives++].device, drive, 63);688 strcpy(drivelist->el[noof_drives++].device, truncdrive); 688 689 } 689 690 paranoid_free(drive); 691 paranoid_free(truncdrive); 690 692 } 691 693 drivelist->entries = noof_drives; -
branches/2.2.9/mondo/src/common/libmondo-stream.c
r2229 r2230 555 555 last = g_tapecatalog->entries - 1; 556 556 if (last <= 0) { 557 log_it(" %s","Too early to start deleting from collection.");557 log_it("Too early to start deleting from collection."); 558 558 return (0); 559 559 } … … 568 568 } 569 569 if (curr < 0) { 570 log_it(" %s","Not far enough into tape to start deleting old archives from collection.");570 log_it("Not far enough into tape to start deleting old archives from collection."); 571 571 return (0); 572 572 } … … 1716 1716 g_tape_stream) / 1024; 1717 1717 if (g_sigpipe) { 1718 log_it(" %s","Sigpipe occurred recently. I'll start a new tape.");1718 log_it("Sigpipe occurred recently. I'll start a new tape."); 1719 1719 fclose(fin); 1720 1720 g_sigpipe = FALSE; -
branches/2.2.9/mondo/src/common/libmondo-string.c
r2211 r2230 841 841 int i = strlen(partition) - 1; 842 842 char *c; 843 char *trunc = NULL; 844 845 mr_asprintf(&trunc, "%s", partition); 843 846 844 847 #ifdef __FreeBSD__ 845 848 846 if (islower( partition[i])) // BSD subpartition849 if (islower(trunc[i])) // BSD subpartition 847 850 i--; 848 if ( partition[i -1] == 's') {849 while (isdigit( partition[i]))851 if (trunc[i-1] == 's') { 852 while (isdigit(trunc[i])) 850 853 i--; 851 854 i--; 852 855 } 853 partition[i +1] = '\0';856 trunc[i+1] = '\0'; 854 857 855 858 #else … … 857 860 assert_string_is_neither_NULL_nor_zerolength(partition); 858 861 /* first see if it's a devfs style device */ 859 c = strrchr( partition, '/');862 c = strrchr(trunc, '/'); 860 863 if (c && strncmp(c, "/part", 5) == 0) { 861 864 /* yup it's devfs, return the "disc" path */ 862 865 strcpy(c + 1, "disc"); 863 return partition;866 return trunc; 864 867 } 865 868 /* then see if it's a dm style device */ 866 869 if (c && strncmp(c, "/dm-", 4) == 0) { 867 870 /* yup it's dm, return the full path */ 868 return partition;869 } 870 871 872 for (i = strlen( partition); isdigit(partition[i -1]); i--)871 return trunc; 872 } 873 874 875 for (i = strlen(trunc); isdigit(trunc[i-1]); i--) 873 876 continue; 874 if ( partition[i - 1] == 'p' && isdigit(partition[i -2])) {877 if (trunc[i-1] == 'p' && isdigit(trunc[i-2])) { 875 878 i--; 876 879 } else { 877 880 /* Some full devices like this /dev/mapper/mpath0 878 881 /dev/cciss/c0d0 may be used as partition names */ 879 if ((strstr( partition,"/dev/mapper/mpath") != NULL) ||880 (strstr( partition,"/dev/cciss/c") != NULL) ||881 (strstr( partition,"/dev/rd/") != NULL)) {882 return partition;882 if ((strstr(trunc,"/dev/mapper/mpath") != NULL) || 883 (strstr(trunc,"/dev/cciss/c") != NULL) || 884 (strstr(trunc,"/dev/rd/") != NULL)) { 885 return trunc; 883 886 } 884 887 } 885 partition[i] = '\0';888 trunc[i] = '\0'; 886 889 887 890 #endif 888 891 889 return partition;892 return trunc; 890 893 } 891 894 -
branches/2.2.9/mondo/src/common/libmondo-tools.c
r2226 r2230 1345 1345 1346 1346 if (debug_level <= g_loglevel) { 1347 va_start(args, fmt);1348 1347 if (!(fout = fopen(MONDO_LOGFILE, "a"))) { 1349 1348 return; … … 1361 1360 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile, szFunction, nLine); 1362 1361 } 1362 va_start(args, fmt); 1363 1363 vfprintf(fout, fmt, args); 1364 va_end(args); 1364 1365 1365 1366 // do not slow down the progran if standard debug level … … 1368 1369 //if (g_dwDebugLevel != 1) 1369 1370 1370 va_end(args);1371 1371 fprintf(fout, "\n"); 1372 1372 paranoid_fclose(fout); -
branches/2.2.9/mondo/src/common/libmondo-verify.c
r2227 r2230 281 281 } 282 282 283 log_it(" %s","before vsbf");283 log_it("before vsbf"); 284 284 sprintf(tmp, "Verifying %s#%d's big files", 285 285 media_descriptor_string(bkpinfo->backup_media_type), 286 286 g_current_media_number); 287 287 open_evalcall_form(tmp); 288 log_it(" %s","after vsbf");288 log_it("after vsbf"); 289 289 sprintf(mountpoint, "%s/archives", mtpt); 290 290 if (last_bigfile_num == -1) { … … 780 780 res = read_header_block_from_stream(&size, fname, &ctrl_chr); 781 781 if (ctrl_chr != BLK_START_AFIOBALLS) { 782 log_it(" %s","YOU SHOULD NOT GET HERE");783 log_it(" %s","Grabbing the EXAT files");782 log_it("YOU SHOULD NOT GET HERE"); 783 log_it("Grabbing the EXAT files"); 784 784 if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) { 785 785 res = … … 805 805 } 806 806 if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) { 807 log_it(" %s","Reading EXAT files from tape");807 log_it("Reading EXAT files from tape"); 808 808 res = 809 809 read_EXAT_files_from_tape(&size, fname, &ctrl_chr, … … 895 895 if (ctrl_chr != BLK_START_BIGGIEFILES) { 896 896 if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) { 897 log_it(" %s","Grabbing the EXAT biggiefiles");897 log_it("Grabbing the EXAT biggiefiles"); 898 898 res = 899 899 read_EXAT_files_from_tape(&size, orig_fname, … … 1019 1019 paranoid_free(tmp); 1020 1020 verify_afioballs_on_CD(mountpoint); 1021 log_it(" %s","before verify_all_slices");1021 log_it("before verify_all_slices"); 1022 1022 verify_all_slices_on_CD(mountpoint); 1023 1023 … … 1141 1141 } 1142 1142 verify_afioballs_on_CD(mountpoint); 1143 log_it(" %s","before verify_all_slices");1143 log_it("before verify_all_slices"); 1144 1144 verify_all_slices_on_CD(mountpoint); 1145 1145 -
branches/2.2.9/mondo/src/common/newt-specific.c
r2227 r2230 1400 1400 assert_string_is_neither_NULL_nor_zerolength(source_file); 1401 1401 1402 log_it(" %s","entering");1402 log_it("entering"); 1403 1403 if (!(fin = fopen(source_file, "r"))) { 1404 1404 log_OS_error(source_file); … … 1483 1483 } 1484 1484 paranoid_free(tmp); 1485 log_it(" %s","leaving");1485 log_it("leaving"); 1486 1486 return (0); 1487 1487 } … … 1499 1499 char *tmp = NULL; 1500 1500 1501 log_it(" %s","entering");1501 log_it("entering"); 1502 1502 assert(flentry != NULL); 1503 1503 if (flentry->severity == 0) { … … 1515 1515 paranoid_free(tmp); 1516 1516 1517 log_it(" %s","leaving");1517 log_it("leaving"); 1518 1518 return (comment); 1519 1519 } -
branches/2.2.9/mondo/src/mondorestore/mondo-prep.c
r2227 r2230 240 240 241 241 // do_this_last[0] = '\0'; 242 log_it(" %s","STARTING");242 log_it("STARTING"); 243 243 log_msg(1, "OK, opened i-want-my-lvm. Shutting down LVM volumes..."); 244 244 if (find_home_of_exe("lvm")) // found it :) cool … … 417 417 system("sync"); 418 418 sleep(1); 419 log_it(" %s","ENDING");419 log_it("ENDING"); 420 420 if (retval > 2) { 421 421 log_msg(1, "%d errors. I'm reporting this.", retval); … … 1613 1613 system("sync"); 1614 1614 #else 1615 log_it(" %s","New, kernel-friendly partition remover");1615 log_it("New, kernel-friendly partition remover"); 1616 1616 for (i = 20; i > 0; i--) { 1617 1617 fprintf(pout_to_fdisk, "d\n%d\n", i); … … 2591 2591 log_it("--- Hugo, 2002/11/20"); 2592 2592 } 2593 log_it(" %s","Resizing mountlist");2593 log_it("Resizing mountlist"); 2594 2594 make_list_of_drives_in_mountlist(mountlist, drivelist); 2595 log_it(" %s","Back from MLoDiM");2595 log_it("Back from MLoDiM"); 2596 2596 for (driveno = 0; driveno < drivelist->entries; driveno++) { 2597 2597 resize_drive_proportionately_to_suit_new_drives(mountlist, -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-compare.c
r2227 r2230 576 576 577 577 /* edit_mountlist if wanted */ 578 log_it(" %s","About to edit mountlist");578 log_it("About to edit mountlist"); 579 579 if (g_text_mode) { 580 580 save_mountlist_to_disk(mountlist, g_mountlist_fname); … … 585 585 res = edit_mountlist(g_mountlist_fname, mountlist, raidlist); 586 586 } 587 log_it(" %s","Finished editing mountlist");587 log_it("Finished editing mountlist"); 588 588 if (res) { 589 589 paranoid_MR_finish(1); … … 594 594 g_current_media_number = 1; 595 595 mvaddstr_and_log_it(1, 30, "Comparing Automatically"); 596 log_it(" %s","Pre-MAD");596 log_it("Pre-MAD"); 597 597 retval = mount_all_devices(mountlist, FALSE); 598 log_it(" %s","Post-MAD");598 log_it("Post-MAD"); 599 599 if (retval) { 600 600 unmount_all_devices(mountlist); -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-newt.c
r2227 r2230 2067 2067 int res = 0; 2068 2068 2069 log_it(" %s","entering eml");2069 log_it("entering eml"); 2070 2070 2071 2071 if (g_text_mode) { … … 2076 2076 res = edit_mountlist_in_newt(mountlist_fname, mountlist, raidlist); 2077 2077 } 2078 log_it(" %s","leaving eml");2078 log_it("leaving eml"); 2079 2079 return (res); 2080 2080 } … … 2732 2732 assert(disklist != NULL); 2733 2733 2734 log_it(" %s","malloc'ing");2734 log_it("malloc'ing"); 2735 2735 malloc_string(tmp); 2736 2736 malloc_string(help_text); … … 2760 2760 sizeof(struct list_of_disks)); 2761 2761 2762 log_it(" %s","Post-malloc");2762 log_it("Post-malloc"); 2763 2763 strcpy(help_text, 2764 2764 " Edit this RAID device's list of partitions. Choose OK or Cancel when done."); -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-tools.c
r2227 r2230 2419 2419 2420 2420 assert(wait_for_percentage <= 100); 2421 log_it(" %s","wait_until_software_raids_are_prepped");2421 log_it("wait_until_software_raids_are_prepped"); 2422 2422 while (unfinished_mdstat_devices > 0) { 2423 2423 // FIXME: Prefix '/dev/' should really be dynamic! -
branches/2.2.9/mondo/src/mondorestore/mondorestore.c
r2229 r2230 262 262 int retval = 0; 263 263 264 log_it(" %s","inside catchall");264 log_it("inside catchall"); 265 265 assert(bkpinfo != NULL); 266 266 assert(mountlist != NULL); 267 267 assert(raidlist != NULL); 268 268 malloc_string(tmp); 269 log_it(" %s","pre wrm");269 log_it("pre wrm"); 270 270 c = which_restore_mode(); 271 log_it(" %s","post wrm");271 log_it("post wrm"); 272 272 if (c == 'I' || c == 'C') { 273 273 interactively_obtain_media_parameters_from_user(FALSE); … … 286 286 } 287 287 288 log_it(" %s","post int");288 log_it("post int"); 289 289 290 290 if (bkpinfo->backup_media_type == iso) { … … 465 465 } 466 466 467 log_it(" %s","About to load config file");467 log_it("About to load config file"); 468 468 get_cfg_file_from_archive_or_bust(); 469 469 read_cfg_file_into_bkpinfo(g_mondo_cfg_file); 470 log_it(" %s","Done loading config file; resizing ML");470 log_it("Done loading config file; resizing ML"); 471 471 if (bkpinfo->backup_media_type == nfs) { 472 472 strcpy(tmp, bkpinfo->prefix); … … 493 493 } 494 494 for (done = FALSE; !done;) { 495 log_it(" %s","About to edit mountlist");495 log_it("About to edit mountlist"); 496 496 if (g_text_mode) { 497 497 save_mountlist_to_disk(mountlist, g_mountlist_fname); … … 502 502 res = edit_mountlist(g_mountlist_fname, mountlist, raidlist); 503 503 } 504 log_it(" %s","Finished editing mountlist");504 log_it("Finished editing mountlist"); 505 505 if (res) { 506 506 paranoid_MR_finish(1); … … 681 681 } 682 682 683 log_it(" %s","About to leave interactive_mode()");683 log_it("About to leave interactive_mode()"); 684 684 if (retval) { 685 685 mvaddstr_and_log_it(g_currentY++, … … 691 691 paranoid_free(fstab_fname); 692 692 paranoid_free(old_restpath); 693 log_it(" %s","Leaving interactive_mode()");693 log_it("Leaving interactive_mode()"); 694 694 return (retval); 695 695 } … … 885 885 return (retval); 886 886 } 887 log_it(" %s","Restoring everything");887 log_it("Restoring everything"); 888 888 retval += restore_everything(NULL); 889 889 clean_multipathconf(); … … 1006 1006 "Restore files to where? )", 1007 1007 bkpinfo->restore_path, MAX_STR_LEN / 4)) { 1008 log_it(" %s","Restoring everything");1008 log_it("Restoring everything"); 1009 1009 retval += restore_everything(filelist); 1010 1010 free_filelist(filelist); … … 2035 2035 2036 2036 if (g_getfattr) { 2037 log_it(" %s","Restoring xattr stuff");2037 log_it("Restoring xattr stuff"); 2038 2038 res = set_fattr_list(filelist_subset_fname, xattr_fname); 2039 2039 if (res) { … … 2046 2046 2047 2047 if (g_getfacl) { 2048 log_it(" %s","Restoring acl stuff");2048 log_it("Restoring acl stuff"); 2049 2049 res = set_acl_list(filelist_subset_fname, acl_fname); 2050 2050 if (res) { … … 2505 2505 fclose(fbw); 2506 2506 if (length_of_file(biggies_whose_EXATs_we_should_set) > 2) { 2507 log_it(" %s","Setting biggie-EXATs");2507 log_it("Setting biggie-EXATs"); 2508 2508 if (g_getfattr) { 2509 2509 if (length_of_file(xattr_fname) > 0) { … … 2522 2522 } 2523 2523 } else { 2524 log_it(" %s","No biggiefiles selected. So, no biggie-EXATs to set.");2524 log_it("No biggiefiles selected. So, no biggie-EXATs to set."); 2525 2525 } 2526 2526 } … … 2630 2630 } 2631 2631 if (ctrl_chr == BLK_START_EXTENDED_ATTRIBUTES) { 2632 log_it(" %s","Reading EXAT files from tape");2632 log_it("Reading EXAT files from tape"); 2633 2633 res = 2634 2634 read_EXAT_files_from_tape(&tmp_size, tmp_fname, … … 2944 2944 } 2945 2945 2946 log_it(" %s","what time is it");2946 log_it("what time is it"); 2947 2947 2948 2948 /* Process command-line parameters */ … … 3127 3127 log_msg(2, "FYI, MOUNTLIST_FNAME = %s ", g_mountlist_fname); 3128 3128 3129 log_it(" %s","About to call load_mountlist and load_raidtab");3129 log_it("About to call load_mountlist and load_raidtab"); 3130 3130 strcpy(bkpinfo->restore_path, MNT_RESTORING); 3131 3131 read_cfg_file_into_bkpinfo(g_mondo_cfg_file); 3132 3132 retval = load_mountlist(mountlist, g_mountlist_fname); 3133 3133 retval += load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 3134 log_it(" %s","Returned from calling load_mountlist and load_raidtab successfully");3134 log_it("Returned from calling load_mountlist and load_raidtab successfully"); 3135 3135 3136 3136 // BCO:To be reviewed … … 3156 3156 3157 3157 if (bkpinfo->restore_mode == nuke) { 3158 log_it(" %s","nuking");3158 log_it("nuking"); 3159 3159 retval += nuke_mode(mountlist, raidlist); 3160 3160 } else if (bkpinfo->restore_mode == interactive) { 3161 log_it(" %s","catchall");3161 log_it("catchall"); 3162 3162 retval += catchall_mode(mountlist, raidlist); 3163 3163 } else if (bkpinfo->restore_mode == compare) { 3164 log_it(" %s","compare");3164 log_it("compare"); 3165 3165 retval += compare_mode(mountlist, raidlist); 3166 3166 } else if (bkpinfo->restore_mode == isoonly) { 3167 log_it(" %s","iso");3167 log_it("iso"); 3168 3168 retval = iso_mode(mountlist, raidlist, FALSE); 3169 3169 } else if (bkpinfo->restore_mode == mbr) { 3170 log_it(" %s","mbr");3170 log_it("mbr"); 3171 3171 retval = mount_all_devices(mountlist, TRUE); 3172 3172 if (!retval) { … … 3178 3178 } 3179 3179 } else if (bkpinfo->restore_mode == isonuke) { 3180 log_it(" %s","isonuke");3180 log_it("isonuke"); 3181 3181 retval = iso_mode(mountlist, raidlist, TRUE); 3182 3182 } else { 3183 log_it(" %s","catchall (no mode specified in command-line call");3183 log_it("catchall (no mode specified in command-line call"); 3184 3184 retval += catchall_mode(mountlist, raidlist); 3185 3185 }
Note:
See TracChangeset
for help on using the changeset viewer.