Changeset 2697 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-devices.c
- Timestamp:
- Jan 25, 2011, 10:44:33 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-devices.c
r2683 r2697 2064 2064 log_to_screen("==> %s", mounted_on_dsf); 2065 2065 log_msg (5, "Adding to bkpinfo->exclude_paths due to -E option: %s", mounted_on_dsf); 2066 strcat(bkpinfo->exclude_paths, " "); 2067 strcat(bkpinfo->exclude_paths, mounted_on_dsf); 2068 strcat(bkpinfo->exclude_paths, " "); 2066 mr_strcat(bkpinfo->exclude_paths, " %s ",mounted_on_dsf); 2069 2067 mr_strcat(bkpinfo->exclude_devs, " %s ",token); 2070 2068 } … … 2077 2075 log_to_screen("Not archiving the following file systems:"); 2078 2076 log_to_screen("==> %s", not_mounted_on_dsf); 2079 strcat(bkpinfo->exclude_paths, " "); 2080 strcat(bkpinfo->exclude_paths, not_mounted_on_dsf); 2081 strcat(bkpinfo->exclude_paths, " "); 2077 mr_strcat(bkpinfo->exclude_paths, " %s ", not_mounted_on_dsf); 2082 2078 } 2083 2079 } … … 2095 2091 mr_asprintf(&tmp," %s ",bkpinfo->exclude_paths); 2096 2092 if (strstr(tmp,tmp1) == NULL) { 2097 strcat(bkpinfo->exclude_paths, tmp1);2093 mr_strcat(bkpinfo->exclude_paths, tmp1); 2098 2094 } 2099 2095 } else { … … 2141 2137 char *tmp1 = NULL; 2142 2138 char *mds = NULL; 2139 char p[8*MAX_STR_LEN]; 2143 2140 char *sz_size; 2144 2141 char *command; … … 2658 2655 mr_asprintf(&tmp, "%s", list_of_NETFS_mounts_only()); 2659 2656 if (strlen(tmp) > 2) { 2660 if (bkpinfo->exclude_paths[0]) { 2661 strcat(bkpinfo->exclude_paths, " "); 2662 } 2663 strncpy(bkpinfo->exclude_paths, tmp, MAX_STR_LEN); 2657 mr_strcat(bkpinfo->exclude_paths, " %s",tmp); 2664 2658 } 2665 2659 mr_free(tmp); … … 2677 2671 } 2678 2672 2679 2680 if (!popup_and_get_string 2681 ("Exclude paths", 2682 "Please enter paths which you do NOT want to backup. Separate them with spaces. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup.", 2683 bkpinfo->exclude_paths, (4*MAX_STR_LEN)-1)) { 2673 strncpy(p,bkpinfo->exclude_paths,(8*MAX_STR_LEN)-1); 2674 popup_and_get_string("Exclude paths", "Please enter paths which you do NOT want to backup. Separate them with spaces. NB: /tmp and /proc are always excluded. :-) Just hit 'Enter' if you want to do a full system backup.", p, (8*MAX_STR_LEN)-1); 2675 if (p == NULL) { 2684 2676 log_to_screen("User has chosen not to backup the PC"); 2685 2677 finish(1); 2686 2678 } 2687 /* Always needs to be finished by a space */2688 if (bkpinfo->exclude_paths[0]) {2689 strcat(bkpinfo->exclude_paths, " ");2690 } 2679 mr_free(bkpinfo->exclude_paths); 2680 mr_asprintf(&tmp, "%s", p); 2681 bkpinfo->exclude_paths = tmp; 2682 2691 2683 if (!popup_and_get_string 2692 2684 ("Temporary directory",
Note:
See TracChangeset
for help on using the changeset viewer.