Changeset 2328 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-files.c
- Timestamp:
- Aug 18, 2009, 3:20:42 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-files.c
r2327 r2328 274 274 char *command = NULL;; 275 275 276 if (!kernel[0]) { 277 strcpy(kernel, 278 call_program_and_get_last_line_of_output 279 ("mindi --findkernel 2> /dev/null")); 276 if (kernel == NULL) { 277 mr_asprintf(kernel, "%s", call_program_and_get_last_line_of_output("mindi --findkernel 2> /dev/null")); 280 278 } 281 279 // If we didn't get anything back, check whether mindi raised a fatal error … … 294 292 log_it("Calling Mindi with kernel path of '%s'", kernel); 295 293 while (!kernel[0]) { 296 if (!ask_me_yes_or_no 297 ("Kernel not found or invalid. Choose another?")) { 294 if (!ask_me_yes_or_no("Kernel not found or invalid. Choose another?")) { 298 295 return (1); 299 296 } … … 302 299 fatal_error("Kernel not found. Please specify with the '-k' flag."); 303 300 } 304 strcpy(kernel, tmp);305 mr_free(tmp);301 mr_free(kernel); 302 kernel = tmp; 306 303 307 304 log_it("User says kernel is at %s", kernel); … … 1054 1051 mr_free(command); 1055 1052 1056 if (bkpinfo->postnuke_tarball [0]) {1053 if (bkpinfo->postnuke_tarball) { 1057 1054 mr_asprintf(command, "cp -f %s %s/post-nuke.tgz", bkpinfo->postnuke_tarball, bkpinfo->tmpdir); 1058 1055 res = run_program_and_log_output(command, FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.