Changeset 2273 in MondoRescue
- Timestamp:
- Jul 12, 2009, 2:05:36 AM (16 years ago)
- Location:
- branches/2.2.10/mondo/src/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-cli.c
r2271 r2273 149 149 { 150 150 int j; 151 char tmp[MAX_STR_LEN], *p ,151 char tmp[MAX_STR_LEN], *p; 152 152 char *comment = NULL; 153 153 -
branches/2.2.10/mondo/src/common/libmondo-files.c
r2272 r2273 214 214 char *infname = NULL; 215 215 char *outfname = NULL; 216 char *tmp NULL;216 char *tmp = NULL; 217 217 char incoming[MAX_STR_LEN]; 218 218 … … 503 503 /*@ buffers ***************************************************** */ 504 504 static char output[MAX_STR_LEN]; 505 char *command = NULL 505 char *command = NULL; 506 506 char *tmp = NULL; 507 507 … … 820 820 mr_asprintf(&command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", fname); 821 821 log_it("command = %s", command); 822 mr_as orintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));822 mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command)); 823 823 mr_free(command); 824 824 … … 1153 1153 char *nfs_server_ipaddr = NULL; 1154 1154 char *tmp = NULL; 1155 char *command = NULL 1155 char *command = NULL; 1156 1156 1157 1157 /*@ pointers ***** */ … … 1174 1174 "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\n' | head -n1 | cut -d' ' -f1"); 1175 1175 mr_asprintf(&nfs_dev, "%s", call_program_and_get_last_line_of_output(command)); 1176 mr -free(command);1176 mr_free(command); 1177 1177 1178 1178 mr_asprintf(&command, 1179 1179 "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f7 | cut -d':' -f2"); 1180 1180 mr_asprintf(&nfs_client_ipaddr, "%s", call_program_and_get_last_line_of_output(command)); 1181 mr -free(command);1181 mr_free(command); 1182 1182 1183 1183 mr_asprintf(&command, 1184 1184 "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f9 | cut -d':' -f2"); 1185 1185 mr_asprintf(&nfs_client_netmask, "%s", call_program_and_get_last_line_of_output(command)); 1186 mr -free(command);1186 mr_free(command); 1187 1187 1188 1188 mr_asprintf(&command, 1189 1189 "%s", "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f8 | cut -d':' -f2"); 1190 1190 mr_asprintf(&nfs_client_broadcast, "%s", call_program_and_get_last_line_of_output(command)); 1191 mr -free(command);1191 mr_free(command); 1192 1192 1193 1193 mr_asprintf(&command, 1194 1194 "%s", "route -n | grep '^0.0.0.0' | awk '{print $2}'"); 1195 1195 mr_asprintf(&nfs_client_defgw, "%s", call_program_and_get_last_line_of_output(command)); 1196 mr -free(command);1196 mr_free(command); 1197 1197 1198 1198 if (strlen(nfs_dev) < 2) { … … 1214 1214 "%s", "ifconfig %s | awk '{print $5}' | head -n1", nfs_dev); 1215 1215 mr_asprintf(&mac_addr, "%s", call_program_and_get_last_line_of_output(command)); 1216 mr -free(command);1216 mr_free(command); 1217 1217 1218 1218 mr_asprintf(&command, "ifconfig | grep -E '%s' | grep -v '%s' | head -n1 | cut -d' ' -f1", mac_addr,nfs_dev); … … 1221 1221 1222 1222 mr_asprintf(&nfs_dev, call_program_and_get_last_line_of_output(command)); 1223 mr -free(command);1223 mr_free(command); 1224 1224 1225 1225 log_to_screen("Replacing it with %s\n", nfs_dev);
Note:
See TracChangeset
for help on using the changeset viewer.