Changeset 3194 in MondoRescue for branches/3.2/mondo/src/mondorestore
- Timestamp:
- Sep 29, 2013, 7:27:11 PM (12 years ago)
- Location:
- branches/3.2/mondo/src/mondorestore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/mondorestore/mondo-rstr-compare.c
r3193 r3194 90 90 newtRefresh(); 91 91 } 92 if (checksum == NULL ]) {92 if (checksum == NULL) { 93 93 log_msg(2, "Warning - %s has no checksum", bigfile_fname); 94 94 } … … 235 235 char *tmp = NULL; 236 236 char *archiver_exe = NULL; 237 char *tmp1 = NULL;238 237 char *logfile = NULL; 239 238 char *compressor_exe = NULL; … … 241 240 use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE; 242 241 assert_string_is_neither_NULL_nor_zerolength(tarball_fname); 243 mr_asprintf(filelist_name, MNT_CDROM "/archives/filelist.%d", current_tarball_number);244 242 245 243 if (strstr(tarball_fname, ".bz2")) { -
branches/3.2/mondo/src/mondorestore/mondo-rstr-newt.c
r3193 r3194 2632 2632 char sz_res[MAX_STR_LEN]; 2633 2633 char *header_text = NULL; 2634 char *p = NULL;2635 2634 2636 2635 /** int **************************************************************/ … … 2736 2735 memcpy((void *) disklist, (void *) bkp_disklist, sizeof(struct list_of_disks)); 2737 2736 } 2738 paranoid_free(sz_res);2739 2737 mr_free(bkp_raidrec); 2740 2738 mr_free(bkp_disklist); -
branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c
r3193 r3194 639 639 /** add mallocs **/ 640 640 char value[MAX_STR_LEN]; 641 char *tmp = NULL;642 641 char *tmp1 = NULL; 643 642 char *envtmp1 = NULL; … … 936 935 log_it("command = %s", command); 937 936 log_it("res of it = %s", call_program_and_get_last_line_of_output(command)); 938 mr_strcpy(iso_mnt, call_program_and_get_last_line_of_output(command));937 sprintf(iso_mnt, "%s", call_program_and_get_last_line_of_output(command)); 939 938 mr_free(command); 940 939 } else { 941 mr_asprintf(iso_mnt, "/tmp/isodir");940 sprintf(iso_mnt, "/tmp/isodir"); 942 941 mr_asprintf(tmp1, "mkdir -p %s", iso_mnt); 943 942 run_program_and_log_output(tmp1, 5); … … 979 978 } 980 979 g_backup_media_type = bkpinfo->backup_media_type; 981 paranoid_free(value);982 paranoid_free(iso_mnt);983 paranoid_free(iso_path);984 980 return (0); 985 981 … … 2053 2049 /* Doing that allow us to remain compatible with pre-2.2.5 versions */ 2054 2050 log_msg(2, "pre-2.2.4 compatible mode on"); 2055 mr_ sprintf(command, "dd if=%s bs=%ld count=%ld 2> /dev/null | tar -zx %s %s %s %s %s", dev, bkpinfo->internal_tape_block_size, 1024L * 1024 * 32 / bkpinfo->internal_tape_block_size, MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, IWANTMYLVM_STUB);2051 mr_asprintf(command, "dd if=%s bs=%ld count=%ld 2> /dev/null | tar -zx %s %s %s %s %s", dev, bkpinfo->internal_tape_block_size, 1024L * 1024 * 32 / bkpinfo->internal_tape_block_size, MOUNTLIST_FNAME_STUB, MONDO_CFG_FILE_STUB, BIGGIELIST_TXT_STUB, FILELIST_FULL_STUB, IWANTMYLVM_STUB); 2056 2052 log_msg(2, "command = '%s'", command); 2057 2053 res = run_program_and_log_output(command, -1); … … 2103 2099 unlink(FILELIST_FULL_STUB); 2104 2100 unlink(BIGGIELIST_TXT_STUB); 2105 mr 2101 mr_asprintf(command, "mkdir -p %s", mountpt); 2106 2102 run_program_and_log_output(command, FALSE); 2107 2103 mr_free(command); -
branches/3.2/mondo/src/mondorestore/mondorestore.c
r3193 r3194 431 431 /** needs malloc **********/ 432 432 char *tmp; 433 char *p = NULL;434 433 char *tmp1 = NULL; 435 434 char *fstab_fname = NULL; … … 460 459 log_it("Done loading config file; resizing ML"); 461 460 462 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat " CMDLINE);461 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE)); 463 462 if (strstr(tmp1, "noresize")) { 464 463 log_msg(1, "Not resizing mountlist."); … … 578 577 strcpy(tmp, old_restpath); 579 578 // (NB: %s is where your filesystem is mounted now, by default)", MNT_RESTORING); 580 if (popup_and_get_string 581 ("Restore path", "Restore files to where?", tmp, 582 MAX_STR_LEN / 4)) { 579 if (popup_and_get_string("Restore path", "Restore files to where?", tmp, MAX_STR_LEN / 4)) { 583 580 if (!strcmp(tmp, "/")) { 584 581 if (!ask_me_yes_or_no("Are you sure?")) { … … 788 785 twenty_seconds_til_yikes(); 789 786 g_fprep = fopen("/tmp/prep.sh", "w"); 790 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat " CMDLINE,TRUE));787 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE)); 791 788 if (strstr(tmp1, "nopart")) { 792 789 log_msg(2, "Not partitioning drives due to 'nopart' option."); … … 860 857 861 858 after_the_nuke: 862 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat " CMDLINE,TRUE));859 mr_asprintf(tmp1, "%s", call_program_and_get_last_line_of_output("cat "CMDLINE)); 863 860 if (retval) { 864 861 log_to_screen("Errors occurred during the nuke phase."); … … 912 909 strcpy(bkpinfo->restore_path, "/"); 913 910 if (!g_restoring_live_from_cd && !g_restoring_live_from_netfs) { 914 popup_and_OK 915 ("Please insert tape/CD/USB Key, then hit 'OK' to continue."); 911 popup_and_OK("Please insert tape/CD/USB Key, then hit 'OK' to continue."); 916 912 sleep(1); 917 913 } … … 940 936 save_filelist(filelist, "/tmp/selected-files.txt"); 941 937 mr_asprintf(old_restpath, "%s", bkpinfo->restore_path); 942 if (popup_and_get_string("Restore path", 943 "Restore files to where? )", 944 bkpinfo->restore_path, MAX_STR_LEN / 4)) { 938 if (popup_and_get_string("Restore path", "Restore files to where? ", bkpinfo->restore_path, MAX_STR_LEN / 4)) { 945 939 log_it("Restoring everything"); 946 940 retval += restore_everything(filelist); … … 958 952 } 959 953 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 960 log_msg(2, 961 "Tape : I don't need to unmount or eject the CD-ROM."); 954 log_msg(2, "Tape : I don't need to unmount or eject the CD-ROM."); 962 955 } else { 963 956 run_program_and_log_output("umount -d " MNT_CDROM, FALSE); … … 987 980 * @{ 988 981 */ 982 989 983 /** 990 984 * Restore biggiefile @p bigfileno from the currently mounted CD. … … 998 992 * @return 0 for success (or skip), nonzero for failure. 999 993 */ 1000 int 1001 restore_a_biggiefile_from_CD(long bigfileno, 994 int restore_a_biggiefile_from_CD(long bigfileno, 1002 995 struct s_node *filelist, 1003 996 char *pathname_of_last_file_restored) … … 2204 2197 /** malloc add ****/ 2205 2198 char *tmp = NULL; 2199 char *tmp1 = NULL; 2206 2200 char *biggie_fname; 2207 2201 char *biggie_cksum; -
branches/3.2/mondo/src/mondorestore/mr-externs.h
r3193 r3194 9 9 #define BIGGIELIST MNT_CDROM"/archives/biggielist.txt" 10 10 #define ARCHIVES_PATH MNT_CDROM"/archives" 11 /* 11 12 #define BIGGIELIST ARCHIVES_PATH"/biggielist.txt" 13 */ 12 14 13 15 #ifdef __FreeBSD__
Note:
See TracChangeset
for help on using the changeset viewer.