Changeset 3263 in MondoRescue
- Timestamp:
- Apr 22, 2014, 11:06:38 AM (11 years ago)
- Location:
- branches/3.2/mondo/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-devices.c
r3237 r3263 3283 3283 mr_free(tmp); 3284 3284 3285 log_msg(0, "Found %s partition table format type ", output);3285 log_msg(0, "Found %s partition table format type on %s", output, drive); 3286 3286 paranoid_free(command); 3287 3287 paranoid_free(fdisk); -
branches/3.2/mondo/src/common/libmondo-mountlist.c
r3237 r3263 413 413 } 414 414 415 /* GPT allows more than 4 primary partitions - detect partition type now */ 416 part_table_fmt = which_partition_format(drive); 417 415 418 for (curr_part_no = 1; curr_part_no < 99; curr_part_no++) { 416 419 build_partition_name(device, drive, curr_part_no); … … 428 431 mr_free(tmp); 429 432 res++; 430 } else if (curr_part_no > 5 431 || (curr_part_no <= 4 && prev_part_no > 0)) { 433 } else if (curr_part_no > 5 || (curr_part_no <= 4 && prev_part_no > 0)) { 432 434 mr_asprintf(tmp, " Gap on %s between %d and %d.", drive, prev_part_no, curr_part_no); 433 435 log_it(tmp); … … 437 439 } 438 440 } 439 /* GPT allows more than 4 primary partitions */440 part_table_fmt = which_partition_format(drive);441 441 /* no spare primary partitions to help accommodate the logical(s)? */ 442 442 if ((curr_part_no >= 5 && prev_part_no == 4) && (strcmp(part_table_fmt, "MBR") == 0)) { … … 447 447 res++; 448 448 } 449 mr_free(part_table_fmt);450 449 451 450 /* does partition /dev/hdNX exist more than once in the mountlist? */ … … 498 497 prev_part_no = curr_part_no; 499 498 } 499 mr_free(part_table_fmt); 500 500 501 501 /* Over-allocated the disk? Unallocated space on disk? */ … … 589 589 } 590 590 } 591 if (copies > 1 && last_copy == currline 592 && strcmp(curr_mountpoint, "raid")) { 591 if (copies > 1 && last_copy == currline && strcmp(curr_mountpoint, "raid")) { 593 592 mr_asprintf(tmp, " %s %s's.", number_to_text(copies), curr_mountpoint); 594 593 mr_strcat(flaws_str, "%s", tmp); -
branches/3.2/mondo/src/mondorestore/mondo-prep.c
r3237 r3263 2616 2616 2617 2617 if (g_mountlist_fname[0] == '\0') { 2618 log_it 2619 ("resize_mountlist_prop...() - warning - mountlist fname is blank"); 2618 log_it("resize_mountlist_prop...() - warning - mountlist fname is blank"); 2620 2619 log_it("That does NOT affect the functioning of this subroutine."); 2621 2620 log_it("--- Hugo, 2002/11/20"); … … 2625 2624 log_it("Back from MLoDiM"); 2626 2625 for (driveno = 0; driveno < drivelist->entries; driveno++) { 2627 resize_drive_proportionately_to_suit_new_drives(mountlist, 2628 drivelist-> 2629 el[driveno]. 2630 device); 2626 resize_drive_proportionately_to_suit_new_drives(mountlist, drivelist->el[driveno].device); 2631 2627 } 2632 2628 log_to_screen("Mountlist adjusted to suit current hard drive(s)"); -
branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c
r3211 r3263 185 185 { 186 186 while (get_cfg_file_from_archive()) { 187 if (!ask_me_yes_or_no 188 ("Failed to find config file/archives. Choose another source?")) 189 { 190 fatal_error("Could not find config file/archives. Aborting."); 191 } 192 interactively_obtain_media_parameters_from_user(FALSE); 193 } 187 if (!ask_me_yes_or_no("Failed to find config file/archives. Choose another source?")) { 188 fatal_error("Could not find config file/archives. Aborting."); 189 } 190 interactively_obtain_media_parameters_from_user(FALSE); 191 } 194 192 } 195 193 … … 2118 2116 log_msg(2, "gcffa --- calling mount_media now :)"); 2119 2117 if (!mount_media()) { 2120 log_msg(2, 2121 "gcffa --- managed to mount CD; so, no need for Plan B"); 2118 log_msg(2, "gcffa --- managed to mount CD; so, no need for Plan B"); 2122 2119 try_plan_B = FALSE; 2123 2120 } else { … … 2176 2173 } 2177 2174 2178 log_msg(2, 2179 "gcffa --- Plan B, a.k.a. untarring some file from all.tar.gz"); 2175 log_msg(2, "gcffa --- Plan B, a.k.a. untarring some file from all.tar.gz"); 2180 2176 mr_asprintf(command, "tar -zxvf " MNT_CDROM "/images/all.tar.gz ./%s ./%s ./%s ./%s ./%s", MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, IWANTMYLVM_STUB); // add -b TAPE_BLOCK_SIZE if you _really_ think it's necessary 2181 2177 run_program_and_log_output(command, TRUE); … … 2200 2196 mr_asprintf(command, "cp -f %s %s", tmp, cfg_file); 2201 2197 log_it("%s",command); 2202 if (strcmp(tmp, cfg_file) 2203 && run_program_and_log_output(command, 1)) { 2198 if (strcmp(tmp, cfg_file) && run_program_and_log_output(command, 1)) { 2204 2199 log_msg(1, 2205 2200 "... but an error occurred when I tried to move it to %s", … … 2213 2208 log_it("%s",command); 2214 2209 if (extract_mountlist_stub) { 2215 if (strcmp(tmp, cfg_file) 2216 && run_program_and_log_output(command, 1)) { 2210 if (strcmp(tmp, cfg_file) && run_program_and_log_output(command, 1)) { 2217 2211 log_msg(1, "Failed to get mountlist"); 2218 2212 } else { … … 2238 2232 log_it("%s",cfg_file); 2239 2233 log_msg(1, "%s not found", cfg_file); 2240 log_to_screen 2241 ("Oh dear. Unable to recover configuration file from boot disk"); 2234 log_to_screen("Oh dear. Unable to recover configuration file from boot disk"); 2242 2235 return (1); 2243 2236 } … … 2246 2239 if (!does_file_exist(MOUNTLIST_FNAME_STUB)) { 2247 2240 log_to_screen("...but not mountlist.txt - a pity, really..."); 2248 } 2249 else { 2241 } else { 2250 2242 /* Is this code really useful ??? */ 2251 2243 if (extract_mountlist_stub) { -
branches/3.2/mondo/src/mondorestore/mondorestore.c
r3194 r3263 760 760 flaws_str = evaluate_mountlist(mountlist); 761 761 if (flaws_str != NULL) { 762 sprintf(tmp, 763 "Mountlist analyzed. Result: \"%s\" Switch to Interactive Mode?", 764 flaws_str); 762 mr_asprintf(tmp, "Mountlist analyzed. Result: \"%s\" Switch to Interactive Mode?", flaws_str); 765 763 mr_free(flaws_str); 766 764 if (ask_me_yes_or_no(tmp)) { 767 765 retval = interactive_mode(mountlist, raidlist); 766 mr_free(tmp); 768 767 goto after_the_nuke; 769 768 } else { … … 846 845 847 846 mr_asprintf(tmp1, "label-partitions-as-necessary %s < /tmp/fstab >> %s 2>> %s", MINDI_CACHE"/mountlist.txt", MONDO_LOGFILE, MONDO_LOGFILE); 848 res = run_program_and_log_output(tmp , TRUE);847 res = run_program_and_log_output(tmp1, TRUE); 849 848 mr_free(tmp1); 850 849 if (res) {
Note:
See TracChangeset
for help on using the changeset viewer.