- Timestamp:
- Mar 4, 2024, 5:47:08 PM (15 months ago)
- Location:
- branches/3.3/mondo/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/common/libmondo-devices.c
r3826 r3831 2719 2719 } 2720 2720 bkpinfo->boot_loader = i; 2721 /* TODO: Check consis ytency of boot type and boot loader */2721 /* TODO: Check consistency of boot type and boot loader */ 2722 2722 2723 2723 if (bkpinfo->include_paths) { … … 2815 2815 bkpinfo->backup_data = TRUE; 2816 2816 if (strcmp(compression_type,"lzo") == 0) { 2817 strcpy(bkpinfo->zip_exe, "lzop");2818 strcpy(bkpinfo->zip_suffix, "lzo");2817 mr_asprintf(bkpinfo->zip_exe, "%s", "lzop"); 2818 mr_asprintf(bkpinfo->zip_suffix, "%s", "lzo"); 2819 2819 } else if (strcmp(compression_type,"gzip") == 0) { 2820 strcpy(bkpinfo->zip_exe, "gzip");2821 strcpy(bkpinfo->zip_suffix, "gz");2820 mr_asprintf(bkpinfo->zip_exe, "%s", "gzip"); 2821 mr_asprintf(bkpinfo->zip_suffix, "%s", "gz"); 2822 2822 } else if (strcmp(compression_type,"lzma") == 0) { 2823 //strcpy(bkpinfo->zip_exe, "xy");2824 //strcpy(bkpinfo->zip_suffix, "xy");2823 mr_asprintf(bkpinfo->zip_exe, "%s", "xz"); 2824 mr_asprintf(bkpinfo->zip_suffix, "%s", "xz"); 2825 2825 } else if (strcmp(compression_type,"bzip2") == 0) { 2826 strcpy(bkpinfo->zip_exe, "bzip2");2827 strcpy(bkpinfo->zip_suffix, "bz2");2826 mr_asprintf(bkpinfo->zip_exe, "%s", "bzip2"); 2827 mr_asprintf(bkpinfo->zip_suffix, "%s", "bz2"); 2828 2828 } else { 2829 bkpinfo->zip_exe[0] = bkpinfo->zip_suffix[0] = '\0'; 2829 mr_free(bkpinfo->zip_exe); 2830 mr_free(bkpinfo->zip_suffix); 2830 2831 } 2831 2832 #if __FreeBSD__ == 5 2832 strcpy(bkpinfo->kernel_path, "/boot/kernel/kernel");2833 mr_asprintf(bkpinfo->kernel_path, "%s", "/boot/kernel/kernel"); 2833 2834 #elif __FreeBSD__ == 4 2834 strcpy(bkpinfo->kernel_path, "/kernel");2835 mr_asprintf(bkpinfo->kernel_path, "%s", "/kernel"); 2835 2836 #elif linux 2836 2837 if (figure_out_kernel_path_interactively_if_necessary(bkpinfo->kernel_path)) { -
branches/3.3/mondo/src/mondorestore/mondorestore.c
r3830 r3831 23 23 24 24 extern void wait_until_software_raids_are_prepped(char *, int); 25 extern char *mr_popup_and_get_string(char *, char *, char *); 25 26 26 27 extern void twenty_seconds_til_yikes(void); … … 1991 1992 gotos_suck: 1992 1993 // (NB: MNT_RESTORING is where your filesystem is mounted now, by default) 1993 tmp = mr_popup_and_get_string("Restore path", "Restore files to where?", old_restpath);1994 if (tmp != NULL) {1995 if (!strcmp(tmp , "/")) {1994 tmp1 = mr_popup_and_get_string("Restore path", "Restore files to where?", old_restpath); 1995 if (tmp1 != NULL) { 1996 if (!strcmp(tmp1, "/")) { 1996 1997 if (!ask_me_yes_or_no("Are you sure?")) { 1997 mr_free(tmp );1998 mr_free(tmp1); 1998 1999 goto gotos_suck; 1999 2000 } 2000 mr_asprintf(tmp, "%s", ""); // so we restore to [blank]/file/name :) 2001 mr_free(tmp1); 2002 mr_asprintf(tmp1, "%s", ""); // so we restore to [blank]/file/name :) 2001 2003 } 2002 mr_asprintf(bkpinfo->restore_path, "%s", tmp );2004 mr_asprintf(bkpinfo->restore_path, "%s", tmp1); 2003 2005 log_msg(1, "Restoring subset"); 2004 2006 retval += restore_everything(filelist); … … 2007 2009 mr_asprintf(bkpinfo->restore_path, "%s", old_restpath); 2008 2010 } 2011 mr_free(tmp1); 2009 2012 free_filelist(filelist); 2010 2013 if (!ask_me_yes_or_no("Restore another subset of your backup?")) { … … 2064 2067 "Warning - errors occurred during the restore phase."); 2065 2068 } 2066 end_of_func:2067 2069 log_it("Leaving interactive_mode()"); 2068 2070 return (retval);
Note:
See TracChangeset
for help on using the changeset viewer.