Changeset 2206 in MondoRescue
- Timestamp:
- May 14, 2009, 4:23:28 AM (16 years ago)
- Location:
- branches/2.2.9/mondo
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-filelist.c
r2203 r2206 483 483 } 484 484 log_msg(8, "Analyzing %s", file_to_analyze); 485 tmp = mr_stresc(file_to_analyze, "`$\\\"() '|!#~", '\\');485 tmp = mr_stresc(file_to_analyze, "`$\\\"(){}[]'*?&|!#~", '\\'); 486 486 (void)asprintf(&strtmp, syscall_sprintf, tmp); 487 487 paranoid_free(tmp); … … 1378 1378 time_t this_time; 1379 1379 1380 dir = mr_stresc(dir1, "`$\\\"() '|!#~", '\\');1380 dir = mr_stresc(dir1, "`$\\\"(){}'[]&*?|!#~", '\\'); 1381 1381 p = strrchr(dir, '/'); 1382 1382 if (p) { -
branches/2.2.9/mondo/src/common/libmondo-mountlist.c
r2205 r2206 673 673 674 674 (void) truncate_to_drive_name(drive); 675 log_msg(8, "drive truncated to %s", drive); 676 675 677 for (j = 0; 676 678 j < noof_drives 677 679 && strcmp(drivelist->el[j].device, drive) != 0; j++) { 678 paranoid_free(drive);679 680 continue; 680 681 } 681 682 if (j == noof_drives) { 682 str cpy(drivelist->el[noof_drives++].device, drive);683 strncpy(drivelist->el[noof_drives++].device, drive, 63); 683 684 } 684 685 paranoid_free(drive); … … 817 818 if (res < 5) { 818 819 /* no label found */ 819 asprintf(&tmp, "%s", "");820 mountlist->el[items].label = tmp;820 log_msg(4, "no label found for %s",mountlist->el[items].device); 821 strcpy(mountlist->el[items].label,""); 821 822 } 822 823 #elif __FreeBSD__ … … 826 827 mountlist->el[items].mountpoint, 827 828 mountlist->el[items].format, siz); 828 asprintf(&tmp, "%s", ""); 829 mountlist->el[items].label = tmp; 829 strcpy(mountlist->el[items].label,""); 830 830 #endif 831 831 … … 846 846 if (mountlist->el[items].device[0] != '\0' 847 847 && mountlist->el[items].device[0] != '#') { 848 if (items >= ARBITRARY_MAXIMUM) {849 log_to_screen("Too many lines in mountlist.. ABORTING");850 finish(1);851 }852 848 for (j = 0; 853 849 j < items … … 884 880 mountlist->el[items].label); 885 881 items++; 882 if (items >= MAX_MOUNTLIST_ENTRIES) { 883 log_to_screen("Too many lines in mountlist.. ABORTING"); 884 finish(1); 885 } 886 886 } 887 887 (void) fgets(incoming, MAX_STR_LEN - 1, fin); -
branches/2.2.9/mondo/src/mondorestore/mondo-rstr-tools.c
r2195 r2206 2205 2205 char *ramdisk_fname; 2206 2206 char *mountlist_file; 2207 bool extract_mountlist_stub ;2208 bool extract_i_want_my_lvm ;2207 bool extract_mountlist_stub = FALSE; 2208 bool extract_i_want_my_lvm = FALSE; 2209 2209 2210 2210 bool try_plan_B; -
branches/2.2.9/mondo/test/test-mountlist.c
r2204 r2206 45 45 asprintf(&MONDO_LOGFILE,"/tmp/mrtest-mountlist.log"); 46 46 47 /* Globals */ 47 48 g_loglevel = 99; 48 49 g_text_mode = FALSE; 50 g_main_pid = getpid(); 51 49 52 if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) { 50 53 fatal_error("Cannot malloc mountlist"); … … 57 60 setup_newt_stuff(); 58 61 asprintf(&g_mountlist_fname, "/tmp/mountlist.txt"); 62 log_it("before mountlist"); 59 63 load_mountlist(mountlist, g_mountlist_fname); 64 log_it("after mountlist"); 60 65 resize_mountlist_proportionately_to_suit_new_drives(mountlist); 66 log_it("after resize_mountlist_proportionately_to_suit_new_drives"); 61 67 load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME); 68 log_it("after load_raidtab_into_raidlist"); 62 69 edit_mountlist(g_mountlist_fname, mountlist, raidlist); 70 log_it("after edit_mountlist"); 63 71 exit(0); 64 72 }
Note:
See TracChangeset
for help on using the changeset viewer.