Ignore:
Timestamp:
Sep 12, 2009, 2:57:02 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Fix interface of evaluate_mountlist (remove 2nd param useless) and fix nuke mode which wasn't working.
  • Tries to add support for bzip2 and lzma initramfs (preliminary, not tested) for 2.6.30

(Backport from 2.2.9)

File:
1 edited

Legend:

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

    r2385 r2395  
    517517 * for each drive, and then spreads the flaws across three lines.
    518518 * @param mountlist The mountlist to evaluate.
    519  * @param flaws_str_A Where to put the first line listing errors found.
    520  * @param flaws_str_B Where to put the second line listing errors found.
    521  * @param flaws_str_C Where to put the third line listing errors found.
    522  * @return The number of flaws found (0 for success).
     519 * @return The flaws string (NULL for success).
    523520 * @see evaluate_drive_within_mountlist
    524521 */
    525 char *evaluate_mountlist(struct mountlist_itself *mountlist, int *res) {
     522char *evaluate_mountlist(struct mountlist_itself *mountlist) {
    526523
    527524    /*@ buffer *********************************************************** */
     
    542539    /*@ initialize ******************************************************* */
    543540
    544     *res = 0;
    545541    drivelist = malloc(sizeof(struct list_of_disks));
    546542    assert(mountlist != NULL);
    547 
    548     mr_asprintf(flaws_str, "%s", "");
    549543
    550544    make_list_of_drives_in_mountlist(mountlist, drivelist);
     
    560554            log_msg(8, "Evaluating drive #%d (%s) within mountlist", i, drivelist->el[i].device);
    561555            tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device);
    562             if (tmp != NULL) {
    563                 (*res)++;
    564             }
    565556        }
    566557        log_msg(8,"Entry: %d (%s)", i, drivelist->el[i].device);
    567558        /* BCO: tmp can be NULL */
    568559        if (tmp != NULL) {
    569             log_msg(8,"Adding: %s to %s", tmp, flaws_str);
     560            log_msg(8,"Adding: %s to flaws_str", tmp);
    570561            mr_strcat(flaws_str, "%s", tmp);
    571562            mr_free(tmp);
     
    589580            mr_asprintf(tmp, " %s %s's.", number_to_text(copies), curr_mountpoint);
    590581            mr_strcat(flaws_str, "%s", tmp);
    591             log_it(tmp);
     582            log_msg(8,"Adding: %s to flaws_str", tmp);
    592583            mr_free(tmp);
    593             (*res)++;
    594584        }
    595585        mr_free(curr_mountpoint);
Note: See TracChangeset for help on using the changeset viewer.