Changeset 2318 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-cli.c
- Timestamp:
- Aug 18, 2009, 2:36:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-cli.c
r2316 r2318 806 806 log_to_screen("Not archiving the following file systems:\n"); 807 807 log_to_screen(" %s\n", not_mounted_on_dsf); 808 strcat(bkpinfo->exclude_paths, not_mounted_on_dsf); 809 strcat(bkpinfo->exclude_paths, ""); 808 mr_strcat(bkpinfo->exclude_paths, "%s ", not_mounted_on_dsf); 810 809 } 811 810 break; … … 1095 1094 log_to_screen("Please supply a sensible value with '-E'\n"); 1096 1095 } 1097 if (bkpinfo->exclude_paths[0]) { 1098 strcat(bkpinfo->exclude_paths, " "); 1099 } 1096 mr_strcat(bkpinfo->exclude_paths, " "); 1100 1097 mr_asprintf(&tmp1, "%s", flag_val['E']); 1101 1098 … … 1140 1137 log_to_screen(" %s\n", mounted_on_dsf); 1141 1138 log_msg (5, "Adding to bkpinfo->exclude_paths due to -E option: %s", mounted_on_dsf); 1142 strcat(bkpinfo->exclude_paths, mounted_on_dsf);1143 strcat(bkpinfo->exclude_paths, " ");1139 mr_strcat(bkpinfo->exclude_paths, "%s ", mounted_on_dsf); 1140 } 1144 1141 } 1145 1142 break; … … 1150 1147 /* A device special file was not passed in. Process it as a path. */ 1151 1148 case -1: 1152 strcat(bkpinfo->exclude_paths, token); 1153 strcat(bkpinfo->exclude_paths, " "); 1149 mr_strcat(bkpinfo->exclude_paths, "%s ", token); 1154 1150 break; 1155 1151 } 1156 1152 mr_free(token); 1157 1153 } 1158 log_msg(1, "exclude_paths is now '%s'", bkpinfo->exclude_paths); 1154 if (bkpinfo->exclude_paths != NULL) { 1155 log_msg(1, "exclude_paths is now '%s'", bkpinfo->exclude_paths); 1156 } 1159 1157 log_msg(4, "Finished with the -E option"); 1160 1158 } … … 1166 1164 if ((flag_set['N']) && (! bkpinfo->restore_data)) // exclude NFS mounts & devices 1167 1165 { 1168 // strncpy(psz, list_of_NFS_devices_and_mounts(), MAX_STR_LEN);1169 1166 mr_asprintf(&psz, "%s", list_of_NFS_mounts_only()); 1170 if (bkpinfo->exclude_paths[0]) { 1171 strncat(bkpinfo->exclude_paths, " ", 4*MAX_STR_LEN); 1172 } 1173 strncat(bkpinfo->exclude_paths, psz, 4*MAX_STR_LEN); 1167 mr_strcat(bkpinfo->exclude_paths, "%s ", psz); 1174 1168 mr_free(psz); 1175 1169 1176 log_msg(3, "-N means we're now excluding %s", 1177 bkpinfo->exclude_paths); 1178 } 1179 1180 if (strlen(bkpinfo->exclude_paths) >= 4*MAX_STR_LEN) { 1181 fatal_error 1182 ("Your '-E' parameter is too long. Increase MAX_STR_LEN"); 1170 if (bkpinfo->exclude_paths != NULL) { 1171 log_msg(3, "-N means we're now excluding %s", bkpinfo->exclude_paths); 1172 } 1183 1173 } 1184 1174
Note:
See TracChangeset
for help on using the changeset viewer.