Changeset 1669 in MondoRescue for branches/stable/mondo/src/common/libmondo-files.c
- Timestamp:
- Sep 30, 2007, 8:16:06 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-files.c
r1663 r1669 250 250 char *command = NULL; 251 251 252 malloc_string(tmp); 253 if (!kernel[0]) { 254 strcpy(kernel, 252 if (kernel == NULL) { 253 mr_allocstr(kernel, 255 254 call_program_and_get_last_line_of_output 256 255 ("mindi --findkernel 2> /dev/null")); 257 256 } 258 257 // If we didn't get anything back, check whether mindi raised a fatal error 259 if ( !kernel[0]) {258 if (kernel == NULL) { 260 259 mr_asprintf(&command, "grep 'Fatal error' /var/log/mindi.log"); 261 strcpy(tmp, call_program_and_get_last_line_of_output(command));260 mr_asprintf(&tmp, call_program_and_get_last_line_of_output(command)); 262 261 if (strlen(tmp) > 1) { 263 262 popup_and_OK(tmp); … … 265 264 } 266 265 mr_free(command); 266 mr_free(tmp); 267 267 } 268 268 log_it("Calling Mindi with kernel path of '%s'", kernel); 269 while ( !kernel[0]) {269 while (kernel == NULL) { 270 270 if (!ask_me_yes_or_no 271 271 ("Kernel not found or invalid. Choose another?")) {
Note:
See TracChangeset
for help on using the changeset viewer.