Ignore:
Timestamp:
Sep 30, 2007, 8:16:06 PM (17 years ago)
Author:
Bruno Cornec
Message:

use conf file for kernel_path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-files.c

    r1663 r1669  
    250250    char *command = NULL;
    251251
    252     malloc_string(tmp);
    253     if (!kernel[0]) {
    254         strcpy(kernel,
     252    if (kernel == NULL) {
     253        mr_allocstr(kernel,
    255254               call_program_and_get_last_line_of_output
    256255               ("mindi --findkernel 2> /dev/null"));
    257256    }
    258257    // If we didn't get anything back, check whether mindi raised a fatal error
    259     if (!kernel[0]) {
     258    if (kernel == NULL) {
    260259        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));
    262261        if (strlen(tmp) > 1) {
    263262            popup_and_OK(tmp);
     
    265264        }
    266265        mr_free(command);
     266        mr_free(tmp);
    267267    }
    268268    log_it("Calling Mindi with kernel path of '%s'", kernel);
    269     while (!kernel[0]) {
     269    while (kernel == NULL) {
    270270        if (!ask_me_yes_or_no
    271271            ("Kernel not found or invalid. Choose another?")) {
Note: See TracChangeset for help on using the changeset viewer.