Changeset 2321 in MondoRescue for branches/2.2.10/mondo/src/mondorestore/mondorestore.c
- Timestamp:
- Aug 18, 2009, 2:37:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2320 r2321 2720 2720 exit(127); 2721 2721 } 2722 if (! 2723 (bkpinfo = malloc(sizeof(struct s_bkpinfo)))) { 2724 fatal_error("Cannot malloc bkpinfo"); 2725 } 2726 reset_bkpinfo(); 2722 bkpinfo = (struct s_bkpinfo *)mr_malloc(sizeof(struct s_bkpinfo)); 2723 init_bkpinfo(); 2727 2724 2728 2725 g_loglevel = DEFAULT_MR_LOGLEVEL; 2729 2726 2730 /* Configure global variables */ 2727 /* Configure global variables */ 2728 malloc_libmondo_global_strings(); 2731 2729 #ifdef __FreeBSD__ 2732 if (strstr 2733 (call_program_and_get_last_line_of_output("cat /tmp/cmdline"), 2734 "textonly")) 2730 if (strstr(call_program_and_get_last_line_of_output("cat /tmp/cmdline"), "textonly")) 2735 2731 #else 2736 if (strstr 2737 (call_program_and_get_last_line_of_output("cat /proc/cmdline"), 2738 "textonly")) 2732 if (strstr(call_program_and_get_last_line_of_output("cat /proc/cmdline"), "textonly")) 2739 2733 #endif 2740 2734 { … … 2744 2738 g_text_mode = FALSE; 2745 2739 } // newt :-) 2746 if (!(mountlist = malloc(sizeof(struct mountlist_itself)))) { 2747 fatal_error("Cannot malloc mountlist"); 2748 } 2749 if (!(raidlist = malloc(sizeof(struct raidlist_itself)))) { 2750 fatal_error("Cannot malloc raidlist"); 2751 } 2752 2753 malloc_libmondo_global_strings(); 2754 2755 strcpy(g_mondo_home, 2756 call_program_and_get_last_line_of_output("which mondorestore")); 2740 2741 /* Init GUI */ 2742 setup_newt_stuff(); /* call newtInit and setup screen log */ 2743 2744 strcpy(g_mondo_home, call_program_and_get_last_line_of_output("which mondorestore")); 2757 2745 g_current_media_number = 1; // precaution 2758 2746 … … 2774 2762 log_msg(1, "FYI - g_mountlist_fname = %s", g_mountlist_fname); 2775 2763 if (strlen(g_mountlist_fname) < 3) { 2776 fatal_error 2777 ("Serious error in malloc()'ing. Could be a bug in your glibc."); 2764 fatal_error("Serious error in malloc()'ing. Could be a bug in your glibc."); 2778 2765 } 2779 2766 mkdir(MNT_CDROM, 0x770); … … 2783 2770 mr_asprintf(&tmp, "%s.orig", g_mountlist_fname); 2784 2771 if (!does_file_exist(g_mountlist_fname)) { 2785 log_msg(2, 2786 "%ld: Warning - g_mountlist_fname (%s) does not exist yet", 2787 __LINE__, g_mountlist_fname); 2772 log_msg(2, "%ld: Warning - g_mountlist_fname (%s) does not exist yet", __LINE__, g_mountlist_fname); 2788 2773 } else if (!does_file_exist(tmp)) { 2789 2774 mr_free(tmp); … … 2797 2782 make_hole_for_dir("/tmp/tmpfs"); /* just in case... */ 2798 2783 run_program_and_log_output("umount " MNT_CDROM, FALSE); 2799 /*2800 run_program_and_log_output("ln -sf /var/log/mondo-archive.log /tmp/mondorestore.log",2801 FALSE);2802 */2803 2784 2804 2785 run_program_and_log_output("rm -Rf /tmp/tmpfs/mondo.tmp.*", FALSE); 2805 2786 2806 /* Init GUI */2807 setup_newt_stuff(); /* call newtInit and setup screen log */2808 2787 welcome_to_mondorestore(); 2809 2788 if (bkpinfo->disaster_recovery) { … … 2814 2793 2815 2794 log_it("what time is it"); 2795 2796 mountlist = (struct mountlist_itself *)mr_malloc(sizeof(struct mountlist_itself)); 2797 raidlist = (struct raidlist_itself *)mr_malloc(sizeof(struct raidlist_itself)); 2816 2798 2817 2799 /* Process command-line parameters */
Note:
See TracChangeset
for help on using the changeset viewer.