Changeset 2394 in MondoRescue for branches/2.2.9/mondo/src/common
- Timestamp:
- Sep 12, 2009, 2:53:02 AM (16 years ago)
- Location:
- branches/2.2.9/mondo/src/common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-mountlist-EXT.h
r2384 r2394 1 1 /* libmondo-mountlist-EXT.h */ 2 2 3 extern char *evaluate_mountlist(struct mountlist_itself *mountlist , int *res);3 extern char *evaluate_mountlist(struct mountlist_itself *mountlist); 4 4 extern int find_device_in_mountlist(struct mountlist_itself *mountlist, 5 5 char *device); -
branches/2.2.9/mondo/src/common/libmondo-mountlist.c
r2384 r2394 498 498 * for each drive, and then spreads the flaws across three lines. 499 499 * @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). 504 501 * @see evaluate_drive_within_mountlist 505 502 */ 506 char *evaluate_mountlist(struct mountlist_itself *mountlist , int *res) {503 char *evaluate_mountlist(struct mountlist_itself *mountlist) { 507 504 508 505 /*@ buffer *********************************************************** */ … … 523 520 /*@ initialize ******************************************************* */ 524 521 525 *res = 0;526 522 drivelist = malloc(sizeof(struct list_of_disks)); 527 523 assert(mountlist != NULL); 528 529 mr_asprintf(&flaws_str, "%s", "");530 524 531 525 make_list_of_drives_in_mountlist(mountlist, drivelist); … … 543 537 log_msg(8, "Evaluating drive #%d (%s) within mountlist", i, drivelist->el[i].device); 544 538 tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device); 545 if (tmp != NULL) {546 (*res)++;547 }548 539 } 549 540 log_msg(8,"Entry: %d (%s)", i, drivelist->el[i].device); 550 541 /* BCO: tmp can be NULL */ 551 542 if (tmp != NULL) { 552 log_msg(8,"Adding: %s to %s", tmp, flaws_str);543 log_msg(8,"Adding: %s to flaws_str", tmp); 553 544 mr_strcat(flaws_str, "%s", tmp); 554 545 paranoid_free(tmp); … … 571 562 mr_asprintf(&tmp, " %s %s's.", number_to_text(copies), curr_mountpoint); 572 563 mr_strcat(flaws_str, "%s", tmp); 573 log_ it(tmp);564 log_msg(8,"Adding: %s to flaws_str", tmp); 574 565 paranoid_free(tmp); 575 (*res)++;576 566 } 577 567 paranoid_free(curr_mountpoint); -
branches/2.2.9/mondo/src/common/libmondo-mountlist.h
r2384 r2394 4 4 5 5 6 char *evaluate_mountlist(struct mountlist_itself *mountlist , int *res);6 char *evaluate_mountlist(struct mountlist_itself *mountlist); 7 7 int find_device_in_mountlist(struct mountlist_itself *mountlist, 8 8 char *device);
Note:
See TracChangeset
for help on using the changeset viewer.