Changeset 59 in MondoRescue for trunk/mondo/mondo/common/libmondo-mountlist.c
- Timestamp:
- Oct 11, 2005, 1:34:31 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-mountlist.c
r49 r59 122 122 if (device_copies > 1) { 123 123 asprintf(&tmp, " %s %s's.", number_to_text(device_copies), 124 device);124 device); 125 125 if (!strstr(flaws_str, tmp)) { 126 126 log_it(tmp); … … 184 184 return ++res; // fatal error 185 185 } 186 187 186 // BERLIOS : useless ? asprintf(&mountpoint, mountlist->el[pos].mountpoint); 188 187 if (pos > 0 && !npos) { … … 199 198 || (curr_part_no <= 4 && prev_part_no > 0)) { 200 199 asprintf(&tmp, " Gap between %ss%d and %d.", drive, 201 prev_part_no, curr_part_no);200 prev_part_no, curr_part_no); 202 201 log_it(tmp); 203 202 strcat(flaws_str, tmp); … … 226 225 if (device_copies > 1) { 227 226 asprintf(&tmp, " %s %s's.", number_to_text(device_copies), 228 device);227 device); 229 228 if (!strstr(flaws_str, tmp)) { 230 229 log_it(tmp); … … 268 267 /* Check subpartitions */ 269 268 for (cur_sp_no = 'a'; cur_sp_no < 'z'; ++cur_sp_no) { 270 asprintf(&device, "%ss%d%c", drive, curr_part_no, cur_sp_no); 269 asprintf(&device, "%ss%d%c", drive, curr_part_no, 270 cur_sp_no); 271 271 pos = find_device_in_mountlist(mountlist, device); 272 272 if (pos < 0) { … … 276 276 /* is it too big? */ 277 277 if (curr_part_no > 'h') { 278 asprintf(&tmp, " Can only have up to 'h' in disklabel."); 278 asprintf(&tmp, 279 " Can only have up to 'h' in disklabel."); 279 280 log_it(tmp); 280 281 strcat(flaws_str, tmp); … … 291 292 if (device_copies > 1) { 292 293 asprintf(&tmp, " %s %s's.", 293 number_to_text(device_copies), device);294 number_to_text(device_copies), device); 294 295 if (!strstr(flaws_str, tmp)) { 295 296 log_it(tmp); … … 345 346 { 346 347 asprintf(&tmp, " %ld MB over-allocated on %s.", 347 amount_allocated - physical_drive_size, drive);348 amount_allocated - physical_drive_size, drive); 348 349 log_it(tmp); 349 350 strcat(flaws_str, tmp); … … 352 353 } else if (amount_allocated < physical_drive_size - 1) { /* NOT AN ERROR, JUST A WARNING :-) */ 353 354 asprintf(&tmp, " %ld MB unallocated on %s.", 354 physical_drive_size - amount_allocated, drive);355 physical_drive_size - amount_allocated, drive); 355 356 log_it(tmp); 356 357 strcat(flaws_str, tmp); 357 358 paranoid_free(tmp); 358 359 } … … 407 408 log_msg(1, tmp); 408 409 paranoid_free(tmp); 409 return (FALSE);410 return (FALSE); 410 411 } else { 411 412 asprintf(&tmp, "%s is %ld MB", drive, physical_drive_size); … … 439 440 || (curr_part_no <= 4 && prev_part_no > 0)) { 440 441 asprintf(&tmp, " Gap between %s%d and %d.", drive, 441 prev_part_no, curr_part_no);442 prev_part_no, curr_part_no); 442 443 log_it(tmp); 443 444 strcat(flaws_str, tmp); … … 466 467 if (device_copies > 1) { 467 468 asprintf(&tmp, " %s %s's.", number_to_text(device_copies), 468 device);469 device); 469 470 if (!strstr(flaws_str, tmp)) { 470 471 log_it(tmp); … … 512 513 if (amount_allocated > physical_drive_size + 1) { 513 514 asprintf(&tmp, " %ld MB over-allocated on %s.", 514 amount_allocated - physical_drive_size, drive);515 amount_allocated - physical_drive_size, drive); 515 516 log_it(tmp); 516 517 strcat(flaws_str, tmp); … … 519 520 } else if (amount_allocated < physical_drive_size - 1) { /* NOT AN ERROR, JUST A WARNING :-) */ 520 521 asprintf(&tmp, " %ld MB unallocated on %s.", 521 physical_drive_size - amount_allocated, drive);522 physical_drive_size - amount_allocated, drive); 522 523 log_it(tmp); 523 524 strcat(flaws_str, tmp); … … 578 579 DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE)) { 579 580 asprintf(&tmp, " Not evaluating %s (I don't know how yet)", 580 drivelist->el[i].device);581 drivelist->el[i].device); 581 582 log_it(tmp); 582 583 } else { … … 668 669 && strcmp(curr_mountpoint, "raid")) { 669 670 asprintf(&tmp, " %s %s's.", number_to_text(copies), 670 curr_mountpoint);671 curr_mountpoint); 671 672 strcat(flaws_str, tmp); 672 673 log_it(tmp); … … 707 708 && strcmp(mountlist->el[i].mountpoint, "image") != 0) { 708 709 asprintf(&tmp, " %s has unknown format.", 709 mountlist->el[i].device);710 mountlist->el[i].device); 710 711 log_it(tmp); 711 712 strcat(flaws_str, tmp); … … 760 761 if (!strncmp(drive, RAID_DEVICE_STUB, strlen(RAID_DEVICE_STUB))) { 761 762 asprintf(&tmp, 762 "Not putting %s in list of drives: it's a virtual drive",763 drive);763 "Not putting %s in list of drives: it's a virtual drive", 764 drive); 764 765 log_msg(8, tmp); 765 766 paranoid_free(tmp); … … 770 771 if (size == 0) { 771 772 asprintf(&tmp, 772 "Not putting %s in list of drives: it has zero size (maybe an LVM volume)",773 drive);773 "Not putting %s in list of drives: it has zero size (maybe an LVM volume)", 774 drive); 774 775 log_msg(8, tmp); 775 776 paranoid_free(tmp); … … 789 790 790 791 asprintf(&tmp, 791 "Putting %s with size %lli in list of drives",792 drive, size);792 "Putting %s with size %lli in list of drives", 793 drive, size); 793 794 log_msg(8, tmp); 794 795 paranoid_free(tmp); … … 820 821 */ 821 822 void make_list_of_unallocated_raid_partitions(struct mountlist_itself 822 *output_list, 823 struct mountlist_itself 824 *mountlist, 825 struct raidlist_itself 823 *output_list, struct mountlist_itself 824 *mountlist, struct raidlist_itself 826 825 *raidlist) 827 826 { … … 853 852 sizeof(struct mountlist_line)); 854 853 asprintf(&tmp, 855 "%s is available; user may choose to add it to raid device",856 output_list->el[items - 1].device);854 "%s is available; user may choose to add it to raid device", 855 output_list->el[items - 1].device); 857 856 log_it(tmp); 858 857 paranoid_free(tmp); … … 972 971 strcat(mountlist->el[items].device, "_dup"); 973 972 asprintf(&tmp, 974 "Duplicate entry in mountlist - renaming to %s",975 mountlist->el[items].device);973 "Duplicate entry in mountlist - renaming to %s", 974 mountlist->el[items].device); 976 975 log_it(tmp); 977 976 paranoid_free(tmp); … … 993 992 994 993 asprintf(&tmp, 995 "%s %s %s %lld %s", 996 mountlist->el[items].device, 997 mountlist->el[items].mountpoint, 998 mountlist->el[items].format, 999 mountlist->el[items].size, mountlist->el[items].label); 994 "%s %s %s %lld %s", 995 mountlist->el[items].device, 996 mountlist->el[items].mountpoint, 997 mountlist->el[items].format, 998 mountlist->el[items].size, 999 mountlist->el[items].label); 1000 1000 1001 1001 log_it(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.