Changeset 2237 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-mountlist.c
- Timestamp:
- Jun 19, 2009, 9:10:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-mountlist.c
r2236 r2237 678 678 log_msg(8, "Putting %s with size %lli in list of drives", drive, size); 679 679 680 /* memory allocation */ 680 681 truncdrive = truncate_to_drive_name(drive); 682 paranoid_free(drive); 683 681 684 log_msg(8, "drive truncated to %s", truncdrive); 682 685 … … 687 690 } 688 691 if (j == noof_drives) { 689 strncpy(drivelist->el[noof_drives].device, drive, 63);692 strncpy(drivelist->el[noof_drives].device, truncdrive, 63); 690 693 drivelist->el[noof_drives].device[63] = '\0'; 691 694 log_msg(8,"Adding drive %s to list", drivelist->el[noof_drives].device); 692 695 noof_drives++; 693 696 } 694 paranoid_free(drive);695 697 paranoid_free(truncdrive); 698 if (noof_drives >= MAXIMUM_DISKS_PER_RAID_DEV) { 699 log_msg(0, "Unable to handle mountlist with more than %d lines", MAXIMUM_DISKS_PER_RAID_DEV); 700 log_to_screen("Unable to handle a so big mountlist"); 701 finish(1); 702 } 696 703 } 697 704 drivelist->entries = noof_drives;
Note:
See TracChangeset
for help on using the changeset viewer.