- Timestamp:
- Dec 17, 2024, 11:28:04 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/mondorestore/mondorestore.c
r3893 r3900 13 13 #include "mr_mem.h" 14 14 #include "mr_file.h" 15 #include "mr_msg.h" 16 #include "mr_str.h" 15 17 #include "mondostructures.h" 16 18 #include "mondorestore.h" 17 #include "mr_msg.h"18 19 #include "mondo-rstr-compare-EXT.h" 19 20 #include "mondo-rstr-tools-EXT.h" … … 167 168 * @ingroup restoreUtilityGroup 168 169 */ 169 bool 170 partition_table_contains_Compaq_diagnostic_partition(struct mountlist_itself * mountlist) { 170 bool partition_table_contains_Compaq_diagnostic_partition(struct mountlist_itself * mountlist) { 171 171 172 172 int i; … … 905 905 * @return 0 for success, or the number of filesets that failed. 906 906 */ 907 int 908 restore_all_tarballs_from_CD(struct s_node *filelist) 909 { 907 int restore_all_tarballs_from_CD(struct s_node *filelist) { 910 908 int retval = 0; 911 909 int res; … … 1802 1800 closein_tape(); 1803 1801 } else { 1804 mount_media(MNT_CDROM); 1805 mvaddstr_and_log_it(g_currentY++, 0, 1806 "Restoring OS and data from CD/USB "); 1802 mvaddstr_and_log_it(g_currentY++, 0, "Restoring OS and data from CD/USB "); 1807 1803 resA = restore_all_tarballs_from_CD(filelist); 1808 1804 resB = restore_all_biggiefiles_from_CD(filelist); … … 2563 2559 exit(127); 2564 2560 } 2565 if (! 2566 (bkpinfo = malloc(sizeof(struct s_bkpinfo)))) { 2567 fatal_error("Cannot malloc bkpinfo"); 2568 } 2561 alloc_bkpinfo(); 2569 2562 reset_bkpinfo(); 2570 2563 2571 2564 g_loglevel = DEFAULT_MR_LOGLEVEL; 2572 2565 2573 /* Configure global variables */2566 /* Configure global variables */ 2574 2567 tmp = call_program_and_get_last_line_of_output("cat "CMDLINE); 2575 2568 if (strstr(tmp, "textonly")) { … … 2595 2588 tmp = call_program_and_get_last_line_of_output("which mondorestore"); 2596 2589 strcpy(g_mondo_home, tmp); 2597 2590 mr_free(tmp); 2598 2591 2599 2592 g_current_media_number = 1; // precaution 2600 run_program_and_log_output("mkdir -p " MNT_CDROM, FALSE); 2593 if (!does_file_exist(MNT_CDROM)) { 2594 res = run_program_and_log_output("mkdir -p " MNT_CDROM, FALSE); 2595 if ( res != 0) { 2596 fatal_error("Unable to create " MNT_CDROM); 2597 } 2598 } 2601 2599 2602 2600 setup_MR_global_filenames(); // malloc() and set globals, using bkpinfo->tmpdir etc. … … 2616 2614 ("Serious error in malloc()'ing. Could be a bug in your glibc."); 2617 2615 } 2618 mkdir(MNT_CDROM, 0x770);2619 2616 make_hole_for_dir(MONDO_CACHE); 2620 2617 … … 2781 2778 /* setup log level for new log system as well */ 2782 2779 mr_msg_init(MONDO_LOGFILE,g_loglevel,argc,argv); 2780 log_msg(0, "Time started: %s", mr_date()); 2783 2781 2784 2782 // Handle params here first
Note:
See TracChangeset
for help on using the changeset viewer.