Changeset 783 in MondoRescue for trunk/mondo/mondo/common/libmondo-mountlist.c
- Timestamp:
- Aug 31, 2006, 5:09:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-mountlist.c
r688 r783 63 63 char *tmp1 = NULL; 64 64 char *device = NULL; 65 char *ndevice = NULL; 65 66 // BERLIOS : useless ? char *mountpoint; 66 67 … … 203 204 npos = 0; 204 205 for (cur_sp_no = 'a'; cur_sp_no <= 'h'; cur_sp_no++) { 205 sprintf(device, "%ss%i%c", device, curr_part_no, cur_sp_no);206 if (find_device_in_mountlist(mountlist, device) >= 0)206 asprintf(&ndevice, "%ss%d%c", device, curr_part_no, cur_sp_no); 207 if (find_device_in_mountlist(mountlist, ndevice) >= 0) 207 208 npos++; 209 paranoid_free(ndevice); 208 210 } 209 211 paranoid_free(device); … … 500 502 501 503 /*@ buffers ******************************************************** */ 502 char *tmp; 503 char *device; 504 char *tmp = NULL; 505 char *tmp1 = NULL; 506 char *device = NULL; 504 507 505 508 /*@ long *********************************************************** */ 506 long physical_drive_size = 0 ;507 long amount_allocated = 0 ;509 long physical_drive_size = 0L; 510 long amount_allocated = 0L; 508 511 509 512 /*@ pointers ******************************************************* */ 510 char *part_table_fmt ;513 char *part_table_fmt = NULL; 511 514 512 515 /*@ initialize ***************************************************** */ … … 559 562 continue; 560 563 } 561 // BERLIOS : useless ? str cpy(mountpoint, mountlist->el[pos].mountpoint);564 // BERLIOS : useless ? str-cpy(mountpoint, mountlist->el[pos].mountpoint); 562 565 /* gap in the partition list? */ 563 566 if (curr_part_no - prev_part_no > 1) { … … 751 754 drivelist = malloc(sizeof(struct list_of_disks)); 752 755 assert(mountlist != NULL); 753 assert(flaws_str_A != NULL);754 assert(flaws_str_B != NULL);755 assert(flaws_str_C != NULL);756 756 757 757 asprintf(&flaws_str, " ");
Note:
See TracChangeset
for help on using the changeset viewer.