Changeset 3237 in MondoRescue
- Timestamp:
- Jan 3, 2014, 5:44:13 PM (11 years ago)
- Location:
- branches/3.2/mondo/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-devices.c
r3212 r3237 3264 3264 char *which_partition_format(const char *drive) 3265 3265 { 3266 static char output[4];3266 char *output = NULL; 3267 3267 char *tmp = NULL; 3268 3268 char *command; … … 3277 3277 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command)); 3278 3278 if (strstr(tmp, "GPT") == NULL) { 3279 strcpy(output, "MBR");3279 mr_asprintf(output, "%s", "MBR"); 3280 3280 } else { 3281 strcpy(output, "GPT");3281 mr_asprintf(output, "%s", "GPT"); 3282 3282 } 3283 3283 mr_free(tmp); -
branches/3.2/mondo/src/common/libmondo-mountlist.c
r3236 r3237 67 67 68 68 /*@ pointers ******************************************************* */ 69 char *part_table_fmt ;69 char *part_table_fmt = NULL; 70 70 71 71 /*@ initialize ***************************************************** */ … … 195 195 part_table_fmt = which_partition_format(drive); 196 196 /* no spare primary partitions to help accommodate the logical(s)? */ 197 if ((curr_part_no >= 5 && prev_part_no == 4) 198 && (strcmp(part_table_fmt, "MBR") == 0)) { 197 if ((curr_part_no >= 5 && prev_part_no == 4) && (strcmp(part_table_fmt, "MBR") == 0)) { 199 198 mr_asprintf(tmp, " Partition %ss4 is occupied.", drive); 200 199 log_it(tmp); … … 203 202 res++; 204 203 } 204 mr_free(part_table_fmt); 205 205 206 /* does partition /dev/adXsY exist more than once in the mountlist? */ 206 207 for (i = 0, device_copies = 0; -
branches/3.2/mondo/src/mondorestore/mondo-prep.c
r3185 r3237 1755 1755 /** pointers **********************************************************/ 1756 1756 char *p; 1757 char *part_table_fmt ;1757 char *part_table_fmt = NULL; 1758 1758 FILE *fout; 1759 1759 … … 1844 1844 } 1845 1845 } 1846 mr_free(part_table_fmt); 1847 1846 1848 mr_strcat(output, "\n"); /*start block (ENTER for next free blk */ 1847 1849 if (partsize > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.