Ignore:
Timestamp:
Sep 12, 2009, 2:53: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.

File:
1 edited

Legend:

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

    r2384 r2394  
    498498 * for each drive, and then spreads the flaws across three lines.
    499499 * @param mountlist The mountlist to evaluate.
    500  * @param flaws_str_A Where to put the first line listing errors found.
    501  * @param flaws_str_B Where to put the second line listing errors found.
    502  * @param flaws_str_C Where to put the third line listing errors found.
    503  * @return The number of flaws found (0 for success).
     500 * @return The flaws string (NULL for success).
    504501 * @see evaluate_drive_within_mountlist
    505502 */
    506 char *evaluate_mountlist(struct mountlist_itself *mountlist, int *res) {
     503char *evaluate_mountlist(struct mountlist_itself *mountlist) {
    507504
    508505    /*@ buffer *********************************************************** */
     
    523520    /*@ initialize ******************************************************* */
    524521
    525     *res = 0;
    526522    drivelist = malloc(sizeof(struct list_of_disks));
    527523    assert(mountlist != NULL);
    528 
    529     mr_asprintf(&flaws_str, "%s", "");
    530524
    531525    make_list_of_drives_in_mountlist(mountlist, drivelist);
     
    543537            log_msg(8, "Evaluating drive #%d (%s) within mountlist", i, drivelist->el[i].device);
    544538            tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device);
    545             if (tmp != NULL) {
    546                 (*res)++;
    547             }
    548539        }
    549540        log_msg(8,"Entry: %d (%s)", i, drivelist->el[i].device);
    550541        /* BCO: tmp can be NULL */
    551542        if (tmp != NULL) {
    552             log_msg(8,"Adding: %s to %s", tmp, flaws_str);
     543            log_msg(8,"Adding: %s to flaws_str", tmp);
    553544            mr_strcat(flaws_str, "%s", tmp);
    554545            paranoid_free(tmp);
     
    571562            mr_asprintf(&tmp, " %s %s's.", number_to_text(copies), curr_mountpoint);
    572563            mr_strcat(flaws_str, "%s", tmp);
    573             log_it(tmp);
     564            log_msg(8,"Adding: %s to flaws_str", tmp);
    574565            paranoid_free(tmp);
    575             (*res)++;
    576566        }
    577567        paranoid_free(curr_mountpoint);
Note: See TracChangeset for help on using the changeset viewer.