Changeset 2211 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-mountlist.c
- Timestamp:
- Jun 3, 2009, 7:10:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-mountlist.c
r2209 r2211 74 74 prev_part_no = 0; 75 75 tmp[0] = '\0'; 76 asprintf(&flaws_str, "%s", "");76 mr_asprintf(&flaws_str, "%s", ""); 77 77 78 78 … … 363 363 assert_string_is_neither_NULL_nor_zerolength(drive); 364 364 assert(mountlist != NULL); 365 asprintf(&flaws_str, "%s", "");365 mr_asprintf(&flaws_str, "%s", ""); 366 366 367 367 malloc_string(tmp); … … 522 522 assert(flaws_str_C != NULL); 523 523 524 asprintf(&flaws_str, "%s", "");524 mr_asprintf(&flaws_str, "%s", ""); 525 525 526 526 make_list_of_drives_in_mountlist(mountlist, drivelist); … … 532 532 (drivelist->el[i].device, 533 533 DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE)) { 534 asprintf(&tmp, " Not evaluating %s (I don't know how yet)",534 mr_asprintf(&tmp, " Not evaluating %s (I don't know how yet)", 535 535 drivelist->el[i].device); 536 536 log_it(tmp); … … 606 606 607 607 for (currline = 0; currline < mountlist->entries; currline++) { 608 asprintf(&curr_mountpoint, "%s", mountlist->el[currline].mountpoint);608 mr_asprintf(&curr_mountpoint, "%s", mountlist->el[currline].mountpoint); 609 609 for (i = 0, copies = 0, last_copy = -1; i < mountlist->entries; 610 610 i++) { … … 618 618 if (copies > 1 && last_copy == currline 619 619 && strcmp(curr_mountpoint, "raid")) { 620 asprintf(&tmp, " %s %s's.", number_to_text(copies),620 mr_asprintf(&tmp, " %s %s's.", number_to_text(copies), 621 621 curr_mountpoint); 622 622 mr_strcat(flaws_str, "%s", tmp); … … 657 657 for (lino = 0, noof_drives = 0; lino < mountlist->entries; lino++) { 658 658 659 asprintf(&drive, "%s", mountlist->el[lino].device);659 mr_asprintf(&drive, "%s", mountlist->el[lino].device); 660 660 if (!strncmp(drive, RAID_DEVICE_STUB, strlen(RAID_DEVICE_STUB))) { 661 661 log_msg(8, "Not putting %s in list of drives: it's a virtual drive", drive); … … 733 733 (void *) &mountlist->el[i], 734 734 sizeof(struct mountlist_line)); 735 asprintf(&tmp,735 mr_asprintf(&tmp, 736 736 "%s is available; user may choose to add it to raid device", 737 737 output_list->el[items - 1].device); … … 853 853 if (j < items) { 854 854 strcat(mountlist->el[items].device, "_dup"); 855 asprintf(&tmp,855 mr_asprintf(&tmp, 856 856 "Duplicate entry in mountlist - renaming to %s", 857 857 mountlist->el[items].device); … … 859 859 paranoid_free(tmp); 860 860 } 861 asprintf(&tmp, "%s", mountlist->el[items].device);861 mr_asprintf(&tmp, "%s", mountlist->el[items].device); 862 862 if (strstr(tmp, "/dev/md/")) { 863 863 log_it("format_device() --- Contracting %s", tmp); … … 1008 1008 assert(b >= 0); 1009 1009 1010 asprintf(&device, "%s", mountlist->el[a].device);1011 asprintf(&mountpoint, "%s", mountlist->el[a].mountpoint);1012 asprintf(&format, "%s", mountlist->el[a].format);1010 mr_asprintf(&device, "%s", mountlist->el[a].device); 1011 mr_asprintf(&mountpoint, "%s", mountlist->el[a].mountpoint); 1012 mr_asprintf(&format, "%s", mountlist->el[a].format); 1013 1013 1014 1014 size = mountlist->el[a].size;
Note:
See TracChangeset
for help on using the changeset viewer.