Changeset 2395 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-mountlist.c
- Timestamp:
- Sep 12, 2009, 2:57:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-mountlist.c
r2385 r2395 517 517 * for each drive, and then spreads the flaws across three lines. 518 518 * @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). 523 520 * @see evaluate_drive_within_mountlist 524 521 */ 525 char *evaluate_mountlist(struct mountlist_itself *mountlist , int *res) {522 char *evaluate_mountlist(struct mountlist_itself *mountlist) { 526 523 527 524 /*@ buffer *********************************************************** */ … … 542 539 /*@ initialize ******************************************************* */ 543 540 544 *res = 0;545 541 drivelist = malloc(sizeof(struct list_of_disks)); 546 542 assert(mountlist != NULL); 547 548 mr_asprintf(flaws_str, "%s", "");549 543 550 544 make_list_of_drives_in_mountlist(mountlist, drivelist); … … 560 554 log_msg(8, "Evaluating drive #%d (%s) within mountlist", i, drivelist->el[i].device); 561 555 tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device); 562 if (tmp != NULL) {563 (*res)++;564 }565 556 } 566 557 log_msg(8,"Entry: %d (%s)", i, drivelist->el[i].device); 567 558 /* BCO: tmp can be NULL */ 568 559 if (tmp != NULL) { 569 log_msg(8,"Adding: %s to %s", tmp, flaws_str);560 log_msg(8,"Adding: %s to flaws_str", tmp); 570 561 mr_strcat(flaws_str, "%s", tmp); 571 562 mr_free(tmp); … … 589 580 mr_asprintf(tmp, " %s %s's.", number_to_text(copies), curr_mountpoint); 590 581 mr_strcat(flaws_str, "%s", tmp); 591 log_ it(tmp);582 log_msg(8,"Adding: %s to flaws_str", tmp); 592 583 mr_free(tmp); 593 (*res)++;594 584 } 595 585 mr_free(curr_mountpoint);
Note:
See TracChangeset
for help on using the changeset viewer.