Changeset 2405 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-raid.c
- Timestamp:
- Sep 17, 2009, 3:45:24 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-raid.c
r2357 r2405 591 591 { 592 592 FILE *fin; 593 char *tmp;594 593 char *label; 595 594 char *value; … … 597 596 int v; 598 597 599 malloc_string(tmp);600 malloc_string(label);601 malloc_string(value);602 598 assert(raidlist != NULL); 603 599 assert_string_is_neither_NULL_nor_zerolength(fname); … … 606 602 log_it("Raidtab is very small or non-existent. Ignoring it."); 607 603 raidlist->entries = 0; 608 paranoid_free(tmp);609 paranoid_free(label);610 paranoid_free(value);611 604 return (0); 612 605 } 613 606 if (!(fin = fopen(fname, "r"))) { 614 607 log_it("Cannot open raidtab"); 615 paranoid_free(tmp);616 paranoid_free(label);617 paranoid_free(value);618 608 return (1); 619 609 } 620 610 items = 0; 621 611 log_it("Loading raidtab..."); 612 malloc_string(label); 613 malloc_string(value); 622 614 get_next_raidtab_line(fin, label, value); 623 615 while (!feof(fin)) { … … 631 623 v++; 632 624 get_next_raidtab_line(fin, label, value); 633 log_it(tmp);634 625 } 635 626 raidlist->el[items].additional_vars.entries = v; … … 651 642 log_msg(1, "Raidtab loaded successfully."); 652 643 log_msg(1, "%d RAID devices in raidtab", items); 653 paranoid_free(tmp);654 644 paranoid_free(label); 655 645 paranoid_free(value);
Note:
See TracChangeset
for help on using the changeset viewer.