Ignore:
Timestamp:
Apr 30, 2014, 1:05:17 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • flaws_str should be NULL if no error detected not ""
  • Try to redirect back fd at restore time before launching mondorestore to avoid garbage in log
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/common/libmondo-mountlist.c

    r3263 r3279  
    556556    drivelist = malloc(sizeof(struct list_of_disks));
    557557    assert(mountlist != NULL);
    558     mr_asprintf(flaws_str, "%s", "");
    559558
    560559    make_list_of_drives_in_mountlist(mountlist, drivelist);
     
    573572        if (tmp != NULL) {
    574573            log_msg(8,"Adding: %s to flaws_str", tmp);
    575             mr_strcat(flaws_str, "%s", tmp);
     574            if (flaws_str != NULL) {
     575                mr_strcat(flaws_str, "%s", tmp);
     576            } else {
     577                mr_asprintf(flaws_str, "%s", tmp);
     578            }
    576579            mr_free(tmp);
    577580        }
     
    591594        if (copies > 1 && last_copy == currline && strcmp(curr_mountpoint, "raid")) {
    592595            mr_asprintf(tmp, " %s %s's.", number_to_text(copies), curr_mountpoint);
    593             mr_strcat(flaws_str, "%s", tmp);
    594596            log_msg(8,"Adding: %s to flaws_str", tmp);
     597            if (flaws_str != NULL) {
     598                mr_strcat(flaws_str, "%s", tmp);
     599            } else {
     600                mr_asprintf(flaws_str, "%s", tmp);
     601            }
    595602            mr_free(tmp);
    596603        }
    597604        mr_free(curr_mountpoint);
    598605    }
    599 
    600606    return(flaws_str);
    601607}
Note: See TracChangeset for help on using the changeset viewer.