Changeset 2324 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-raid.c
- Timestamp:
- Aug 18, 2009, 3:13:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-raid.c
r2323 r2324 471 471 { 472 472 FILE *fin; 473 char *tmp1 = NULL;474 473 int items; 475 474 … … 585 584 fclose(fin); 586 585 log_it("Raidtab loaded successfully."); 587 mr_asprintf(tmp1, "%d RAID devices in raidtab", raidlist->entries); 588 log_it(tmp1); 589 mr_free(tmp1); 586 log_it("%d RAID devices in raidtab", raidlist->entries); 590 587 return (0); 591 588 } … … 687 684 688 685 /*@ add mallocs * */ 689 char *tmp = NULL;690 686 char *labelB; 691 687 char *valueB; … … 744 740 } 745 741 if (!disklist) { 746 mr_asprintf(tmp, "Ignoring '%s %s' pair of disk %s", labelB, valueB, label); 747 log_it(tmp); 748 mr_free(tmp); 742 log_it("Ignoring '%s %s' pair of disk %s", labelB, valueB, label); 749 743 } else { 750 744 index = atoi(valueB); … … 1008 1002 mr_asprintf(strtmp, "%s", pos); 1009 1003 strcpy(string, strtmp); 1010 paranoid_free(strtmp);1004 mr_free(strtmp); 1011 1005 // if we have newline after only spaces, this is a blank line, update 1012 1006 // counters, otherwise do normal parsing … … 1029 1023 mr_asprintf(strtmp,"%s%s", device_prefix, token); 1030 1024 strcpy(raidlist->el[raidlist->entries].raid_device, strtmp); 1031 paranoid_free(strtmp);1025 mr_free(strtmp); 1032 1026 mr_free(token); 1033 1027 // skip ':' and status … … 1088 1082 mr_asprintf(strtmp,"%s%s", device_prefix, token); 1089 1083 strcpy(raidlist->el[raidlist->entries].data_disks.el[raidlist->el[raidlist->entries].data_disks.entries].device, strtmp); 1090 paranoid_free(strtmp);1084 mr_free(strtmp); 1091 1085 raidlist->el[raidlist->entries].data_disks.entries++; 1092 1086 break; … … 1095 1089 mr_asprintf(strtmp,"%s%s", device_prefix, token); 1096 1090 strcpy(raidlist->el[raidlist->entries].spare_disks.el[raidlist->el[raidlist->entries].spare_disks.entries].device, strtmp); 1097 paranoid_free(strtmp);1091 mr_free(strtmp); 1098 1092 raidlist->el[raidlist->entries].spare_disks.entries++; 1099 1093 break; … … 1102 1096 mr_asprintf(strtmp,"%s%s", device_prefix, token); 1103 1097 strcpy(raidlist->el[raidlist->entries].failed_disks.el[raidlist->el[raidlist->entries].failed_disks.entries].device, strtmp); 1104 paranoid_free(strtmp);1098 mr_free(strtmp); 1105 1099 raidlist->el[raidlist->entries].failed_disks.entries++; 1106 1100 log_it("At least one failed disk found in RAID array.\n");
Note:
See TracChangeset
for help on using the changeset viewer.