Changeset 2334 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-files.c
- Timestamp:
- Aug 18, 2009, 5:28:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-files.c
r2332 r2334 269 269 * @return 0 for success, 1 for failure. 270 270 */ 271 int figure_out_kernel_path_interactively_if_necessary(char *kernel) 272 { 271 char *figure_out_kernel_path_interactively_if_necessary(void) { 272 273 273 char *tmp = NULL; 274 274 char *command = NULL;; 275 276 if (kernel == NULL) { 277 278 }275 char *kernel = NULL;; 276 277 mr_asprintf(kernel, "%s", call_program_and_get_last_line_of_output("mindi --findkernel 2> /dev/null")); 278 279 279 // If we didn't get anything back, check whether mindi raised a fatal error 280 280 if (!kernel[0]) { … … 285 285 mr_free(tmp); 286 286 mr_free(command); 287 mr_free(kernel); 287 288 fatal_error("Mindi gave a fatal error. Please check '/var/log/mindi.log'."); 288 289 } … … 293 294 while (!kernel[0]) { 294 295 if (!ask_me_yes_or_no("Kernel not found or invalid. Choose another?")) { 295 return ( 1);296 return (NULL); 296 297 } 297 298 tmp = popup_and_get_string("Kernel path", "What is the full path and filename of your kernel, please?", kernel); … … 304 305 log_it("User says kernel is at %s", kernel); 305 306 } 306 return ( 0);307 return (kernel); 307 308 } 308 309 … … 1103 1104 } 1104 1105 *(p++) = '\0'; 1105 mr_asprintf(nfs_server_ipaddr, tmp);1106 mr_asprintf(nfs_mount, p);1106 mr_asprintf(nfs_server_ipaddr, "%s", tmp); 1107 mr_asprintf(nfs_mount, "%s", p); 1107 1108 mr_free(tmp); 1108 1109 … … 1151 1152 mr_free(nfs_dev); 1152 1153 1153 mr_asprintf(nfs_dev, call_program_and_get_last_line_of_output(command));1154 mr_asprintf(nfs_dev, "%s", call_program_and_get_last_line_of_output(command)); 1154 1155 mr_free(command); 1155 1156
Note:
See TracChangeset
for help on using the changeset viewer.