Changeset 2237 in MondoRescue
- Timestamp:
- Jun 19, 2009, 9:10:17 PM (16 years ago)
- Location:
- branches/2.2.9/mondo/src
- Files:
-
- 3 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; -
branches/2.2.9/mondo/src/common/libmondo-string.c
r2230 r2237 843 843 char *trunc = NULL; 844 844 845 assert_string_is_neither_NULL_nor_zerolength(partition); 845 846 mr_asprintf(&trunc, "%s", partition); 846 847 … … 858 859 #else 859 860 860 assert_string_is_neither_NULL_nor_zerolength(partition);861 861 /* first see if it's a devfs style device */ 862 862 c = strrchr(trunc, '/'); -
branches/2.2.9/mondo/src/include/my-stuff.h
r2227 r2237 124 124 #define MAXIMUM_RAID_DEVS 32 ///< The maximum number of RAID devices in the raidlist. 125 125 #define MAXIMUM_ADDITIONAL_RAID_VARS 32 ///< The maximum number of additional RAID variables per RAID device in the raidlist. 126 #define MAXIMUM_DISKS_PER_RAID_DEV 32///< The maximum number of disks per RAID device in the raidtab.126 #define MAXIMUM_DISKS_PER_RAID_DEV 1024 ///< The maximum number of disks per RAID device in the raidtab. 127 127 128 128 #define RAIDTAB_FNAME "/etc/raidtab" ///< The filename of the raidtab file, at least on Linux.
Note:
See TracChangeset
for help on using the changeset viewer.