Changeset 3194 in MondoRescue
- Timestamp:
- Sep 29, 2013, 7:27:11 PM (11 years ago)
- Location:
- branches/3.2/mondo/src
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-cli.c
r3191 r3194 75 75 int res = 0; 76 76 int retval = 0; 77 int i = 0 , j;77 int i = 0; 78 78 79 79 /*@ buffers *************** */ 80 char *tmp = NULL;81 80 char flag_val[128][MAX_STR_LEN]; 82 81 bool flag_set[128]; -
branches/3.2/mondo/src/common/libmondo-devices.c
r3191 r3194 884 884 if (!tmp[0]) { 885 885 mr_free(tmp); 886 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep \)\ \' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1"));886 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("cdrecord -scanbus 2> /dev/null | grep -E '\)\ \'' | grep -n '' | grep -E '[D|C][V|D]' | cut -d':' -f1")); 887 887 } 888 888 if (tmp[0]) { … … 2400 2400 2401 2401 /* Initiate bkpinfo netfs_mount path from running environment if not already done */ 2402 if ( !bkpinfo->netfs_mount == NULL) {2403 mr_asprintf(bkpinfo->netfs_mount, call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f1 | head -n1"));2402 if (bkpinfo->netfs_mount == NULL) { 2403 mr_asprintf(bkpinfo->netfs_mount, "%s", call_program_and_get_last_line_of_output("mount | grep \":\" | cut -d' ' -f1 | head -n1")); 2404 2404 } 2405 2405 #ifdef __FreeBSD__ … … 2417 2417 } 2418 2418 mr_free(bkpinfo->netfs_mount); 2419 mr_asprintf(bkpinfo->netfs_mount, "%s", p ;2419 mr_asprintf(bkpinfo->netfs_mount, "%s", p); 2420 2420 if (!bkpinfo->restore_data) { 2421 2421 if ((compression_type = which_compression_type()) == NULL) { … … 2448 2448 2449 2449 if (!bkpinfo->restore_data) { 2450 mr_ sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4482 MB2450 mr_asprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4482 MB 2451 2451 mr_asprintf(comment, "How much data (in Megabytes) will each media store?"); 2452 2452 strcpy(tmp1, sz_size); … … 2496 2496 strcpy(tmp1, ""); 2497 2497 } 2498 if (!popup_and_get_string("Network user", "Which user should I use if any ?",tmp1 )) {2498 if (!popup_and_get_string("Network user", "Which user should I use if any ?",tmp1, MAX_STR_LEN)) { 2499 2499 log_to_screen("User has chosen not to backup the PC"); 2500 2500 finish(1); … … 2556 2556 finish(1); 2557 2557 } 2558 strcpy(bkpinfo->netfs_remote_dir, tmp1);2558 mr_asprintf(bkpinfo->netfs_remote_dir, "%s", tmp1); 2559 2559 2560 2560 // check whether writable - we better remove surrounding spaces for this 2561 strip_spaces(bkpinfo->netfs_remote_dir);2561 mr_strip_spaces(bkpinfo->netfs_remote_dir); 2562 2562 2563 2563 if (!popup_and_get_string … … 2820 2820 2821 2821 /* Handle devices passed in bkpinfo and print result */ 2822 /* the mr_make_devlist_from_pathlist function appends 2822 /* the mr_make_devlist_from_pathlist function appends */ 2823 2823 /* to the *_paths variables so copy before */ 2824 2824 mr_make_devlist_from_pathlist(bkpinfo->exclude_paths, 'E'); -
branches/3.2/mondo/src/common/libmondo-devices.h
r3154 r3194 12 12 long get_phys_size_of_drive(char *drive); 13 13 bool is_this_a_valid_disk_format(char *format); 14 int mount_CDROM_here(char *device, c har *mountpoint);14 int mount_CDROM_here(char *device, const char *mountpoint); 15 15 int find_device_in_mountlist(struct mountlist_itself *mountlist, 16 16 char *device); -
branches/3.2/mondo/src/common/libmondo-filelist.c
r3191 r3194 439 439 char *syscall = NULL; 440 440 char *file_to_analyze = NULL; 441 char *strtmp = NULL;442 441 char *tmp = NULL; 443 442 int i; … … 1791 1790 } 1792 1791 log_msg(5, "Found '%s'", fname); 1793 tmp = mr_stresc(fname, "[]*?", '\\', "'");1792 tmp = mr_stresc(fname, "[]*?", '\\', '\''); 1794 1793 mr_free(fname); 1795 1794 fname = tmp; -
branches/3.2/mondo/src/common/libmondo-files.c
r3191 r3194 291 291 log_it("Calling Mindi with kernel path of '%s'", kernel); 292 292 while (!kernel[0]) { 293 if (!ask_me_yes_or_no 294 ("Kernel not found or invalid. Choose another?")) { 293 if (!ask_me_yes_or_no("Kernel not found or invalid. Choose another?")) { 295 294 return (1); 296 295 } 297 if (!popup_and_get_string 298 ("Kernel path", 299 "What is the full path and filename of your kernel, please?", 300 kernel, MAX_STR_LEN / 4)) { 301 fatal_error 302 ("Kernel not found. Please specify with the '-k' flag."); 296 if (!popup_and_get_string("Kernel path", "What is the full path and filename of your kernel, please?", kernel, MAX_STR_LEN / 4)) { 297 fatal_error("Kernel not found. Please specify with the '-k' flag."); 303 298 } 304 299 log_it("User says kernel is at %s", kernel); … … 335 330 mr_free(incoming); 336 331 output[0] = '\0'; 337 return 332 return(NULL); // forget it :) 338 333 } 339 334 mr_asprintf(command, "file %s 2> /dev/null | cut -d':' -f1 2> /dev/null", incoming); 340 mr_free(incomi g);335 mr_free(incoming); 341 336 342 337 mr_asprintf(incoming, "%s", call_program_and_get_last_line_of_output(command)); … … 352 347 strcpy(output, incoming); 353 348 if (output[0] != '\0' && does_file_exist(output)) { 354 log_msg(4, "find_home_of_exe ()--- Found %s at %s", fname, incoming);349 log_msg(4, "find_home_of_exe --- Found %s at %s", fname, incoming); 355 350 } else { 356 351 output[0] = '\0'; 357 log_msg(4, "find_home_of_exe ()--- Could not find %s", fname);352 log_msg(4, "find_home_of_exe --- Could not find %s", fname); 358 353 } 359 354 mr_free(incoming); 360 355 if (!output[0]) { 361 return 356 return(NULL); 362 357 } else { 363 return 358 return(output); 364 359 } 365 360 } … … 433 428 if (!lastline[0]) { 434 429 mr_free(lastline); 435 return 430 return(0); 436 431 } 437 432 } else { … … 444 439 } else { 445 440 mr_free(lastline); 446 return 441 return(0); 447 442 } 448 443 … … 453 448 i = atoi(p); 454 449 mr_free(lastline); 455 return 450 return(i); 456 451 } 457 452 … … 471 466 static char output[MAX_STR_LEN]; 472 467 char *command = NULL; 468 char *p = NULL; 473 469 474 470 /*@ pointers **************************************************** */ … … 478 474 479 475 if (!does_file_exist(filename)) { 480 log_it("Tr ing to get last line of nonexistent file (%s)", filename);476 log_it("Trying to get last line of nonexistent file (%s)", filename); 481 477 output[0] = '\0'; 482 478 return (output); … … 493 489 output[strlen(output) - 1] = '\0'; 494 490 } 495 return 491 return(output); 496 492 } 497 493 … … 513 509 log_it("filename=%s", filename); 514 510 log_OS_error("Unable to openin filename"); 515 return 511 return(-1); 516 512 } 517 513 fseeko(fin, 0, SEEK_END); 518 514 length = ftello(fin); 519 515 paranoid_fclose(fin); 520 return 516 return(length); 521 517 } 522 518 … … 561 557 log_OS_error("Unable to fopen-in filelist"); 562 558 log_to_screen("Can't open filelist"); 563 return 559 return(1); 564 560 } 565 561 fout = fopen(cksumlist, "w"); … … 568 564 paranoid_fclose(fin); 569 565 log_to_screen("Can't open checksum list"); 570 return 566 return(1); 571 567 } 572 568 for (mr_getline(stub_fname, fin); !feof(fin); mr_getline(stub_fname, fin)) { 573 if (stub_fname[(i = strlen(stub_fname) - 1)] < 32) { 569 i = strlen(stub_fname) - 1; 570 if (stub_fname[i] < 32) { 574 571 stub_fname[i] = '\0'; 575 572 } … … 605 602 paranoid_fclose(fin); 606 603 log_it("Done."); 607 return 604 return(0); 608 605 } 609 606 … … 623 620 res = system(tmp); 624 621 mr_free(tmp); 625 return 622 return(res); 626 623 } 627 624 … … 659 656 660 657 unlink(outfile_fname); 661 return 658 return(0); 662 659 } 663 660 … … 687 684 if (!fin) { 688 685 log_OS_error("Unable to openin filelist_fname"); 689 return 686 return(0); 690 687 } 691 688 mr_getline(incoming, fin); … … 699 696 mr_free(incoming); 700 697 paranoid_fclose(fin); 701 return 698 return(matches); 702 699 } 703 700 … … 728 725 mr_free(command); 729 726 730 return 727 return(file_len_K); 731 728 } 732 729 … … 806 803 paranoid_fclose(fin); 807 804 log_it("Finished calculating total size of all biggiefiles"); 808 return 805 return(scratchL); 809 806 } 810 807 … … 848 845 mr_free(command); 849 846 850 return 847 return(llres); 851 848 } 852 849 … … 864 861 tmp = (crc >> 8) ^ c; 865 862 crc = (crc << 8) ^ crctttab[tmp & 255]; 866 return crc;863 return(crc); 867 864 } 868 865 … … 879 876 tmp = crc ^ c; 880 877 crc = (crc >> 8) ^ crc16tab[tmp & 0xff]; 881 return crc;878 return(crc); 882 879 } 883 880 … … 905 902 log_to_screen("There may be hyperlink at http://www.mondorescue.org which"); 906 903 log_to_screen("will take you to the relevant (missing) package."); 907 return 904 return(1); 908 905 } else { 909 return 906 return(0); 910 907 } 911 908 } … … 969 966 log_it("fname=%s", fname); 970 967 log_OS_error("Unable to openin fname"); 971 return 968 return(1); 972 969 } 973 970 res = fscanf(fin, "%s\n", contents); … … 978 975 paranoid_fclose(fin); 979 976 res = 0; 980 return (res); 981 } 982 983 984 977 return(res); 978 } 985 979 986 980 … … 1084 1078 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 1085 1079 } 1086 1087 1088 1089 1080 1090 1081 … … 1115 1106 char *p; 1116 1107 1117 if ( ! bkpinfo->netfs_mount) {1108 if (bkpinfo->netfs_mount == NULL) { 1118 1109 fatal_error("No netfs_mount found !"); 1119 1110 } … … 1152 1143 1153 1144 mr_asprintf(command, "ifconfig %s | head -1 | awk '{print $5}'", netfs_dev); 1154 mr_asprintf(netfs_client_hwaddr, "%s" call_program_and_get_last_line_of_output(command));1145 mr_asprintf(netfs_client_hwaddr, "%s", call_program_and_get_last_line_of_output(command)); 1155 1146 mr_free(command); 1156 1147 … … 1229 1220 mr_free(tmp); 1230 1221 1231 sprintf(tmp, "%s/NETFS-PROTO", bkpinfo->tmpdir);1222 mr_asprintf(tmp, "%s/NETFS-PROTO", bkpinfo->tmpdir); 1232 1223 write_one_liner_data_file(tmp, bkpinfo->netfs_proto); 1233 1224 mr_free(tmp); -
branches/3.2/mondo/src/common/libmondo-fork.c
r3191 r3194 43 43 /*@ pointers **************************************************** */ 44 44 FILE *fin = NULL; 45 int res = 0;46 45 47 46 /*@ initialize data ********************************************* */ -
branches/3.2/mondo/src/common/libmondo-stream.c
r3191 r3194 282 282 283 283 mr_asprintf(command, "%s -scanbus 2> /dev/null | tr -s '\t' ' ' | grep \"[0-9]*,[0-9]*,[0-9]*\" | grep -v \"[0-9]*) \\*\" | grep -i TAPE | cut -d' ' -f2 | head -n1", cdr_exe); 284 mr_asprintf(tmp, "%s", all_program_and_get_last_line_of_output(command));284 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command)); 285 285 mr_free(command); 286 286 -
branches/3.2/mondo/src/common/libmondo-string-EXT.h
r3042 r3194 31 31 32 32 extern int compare_two_filelist_entries(void *va, void *vb); 33 extern int severity_of_difference(char *filename, char *out_reason); 34 33 extern int severity_of_difference(char *filename, char **out_reason); 35 34 extern char *percent_media_full_comment(); 36 35 -
branches/3.2/mondo/src/common/libmondo-string.c
r3191 r3194 866 866 * @return The severity (1-3). 867 867 */ 868 int severity_of_difference(char *fn, char * out_reason) {868 int severity_of_difference(char *fn, char **out_reason) { 869 869 870 870 int sev = 3; … … 971 971 } 972 972 if (out_reason) { 973 strcpy( out_reason, reason);973 strcpy(*out_reason, reason); 974 974 } 975 975 mr_free(filename); -
branches/3.2/mondo/src/common/libmondo-string.h
r3042 r3194 26 26 27 27 int compare_two_filelist_entries(void *va, void *vb); 28 int severity_of_difference(char *filename, char * out_reason);28 int severity_of_difference(char *filename, char **out_reason); 29 29 30 30 char *percent_media_full_comment(); -
branches/3.2/mondo/src/common/libmondo-tools.c
r3191 r3194 34 34 extern int g_current_media_number; 35 35 extern char *MONDO_LOGFILE; 36 extern char *g_serial_string;37 36 38 37 /* Reference to global bkpinfo */ … … 61 60 * The serial string (used to differentiate between backups) of the current backup. 62 61 */ 63 char *g_serial_string = NULL;62 extern char *g_serial_string; 64 63 65 64 /** … … 359 358 char *cdr_exe = NULL; 360 359 char *tmp = NULL; 361 char *p = NULL;362 360 char *call_before_iso_user = NULL; 363 361 char *iso_dev = NULL; … … 633 631 mr_asprintf(ip_address, "%s", inet_ntoa((struct in_addr) *((struct in_addr *) hent->h_addr))); 634 632 mr_strcat(ip_address, strchr(bkpinfo->netfs_mount, ':')); 635 strcpy(bkpinfo->netfs_mount, ip_address);636 mr_free(ip_address);633 mr_free(bkpinfo->netfs_mount); 634 bkpinfo->netfs_mount = ip_address; 637 635 } 638 636 } … … 801 799 void reset_bkpinfo() 802 800 { 803 int i;804 801 log_msg(1, "Initializing bkpinfo"); 805 802 … … 824 821 bkpinfo->internal_tape_block_size = DEFAULT_INTERNAL_TAPE_BLOCK_SIZE; 825 822 826 /* We need tmpdir as early as possible for further function calls */ 827 bkpinfo->tmpdir = NULL; // Really setup after 823 /* We need tmpdir as early as possible for further function calls */ 824 bkpinfo->tmpdir[0]= '\0'; // Really setup after 825 bkpinfo->scratchdir[0]= '\0'; // Really setup after 828 826 setup_tmpdir(NULL); 829 827 setup_scratchdir(NULL); … … 848 846 bkpinfo->call_after_iso[0] = '\0'; 849 847 bkpinfo->kernel_path[0] = '\0'; 850 bkpinfo->netfs_mount [0] = '\0';848 bkpinfo->netfs_mount = NULL; 851 849 bkpinfo->netfs_proto = NULL; 852 850 bkpinfo->netfs_user = NULL; 853 bkpinfo->netfs_remote_dir [0] = '\0';851 bkpinfo->netfs_remote_dir = NULL; 854 852 bkpinfo->postnuke_tarball[0] = '\0'; 855 853 bkpinfo->subdir = NULL; … … 1365 1363 * Function pointer to the @c log_debug_msg function to use. Points to standard_log_debug_msg() by default. 1366 1364 */ 1367 void (*log_debug_msg) (int, const char *, const char *, int, const char *, 1368 ...) = standard_log_debug_msg; 1365 void (*log_debug_msg) (int, const char *, const char *, int, const char *, ...) = standard_log_debug_msg; 1369 1366 1370 1367 -
branches/3.2/mondo/src/common/libmondo-verify.c
r3191 r3194 412 412 char *outlog = NULL; 413 413 char *tmp = NULL; 414 char *p = NULL;415 414 416 415 /*@ pointers ******************************************************* */ -
branches/3.2/mondo/src/common/newt-specific.c
r3191 r3194 20 20 #include "my-stuff.h" 21 21 #include "mr_mem.h" 22 #include "mr_str.h" 22 23 #include "mondostructures.h" 23 24 #include "newt-specific.h" … … 1579 1580 if (filelist->entries > 0) { 1580 1581 malloc_string(reason); 1581 severity_of_difference(filelist->el[currline]. 1582 severity_of_difference(filelist->el[currline].filename, &reason); 1582 1583 mr_asprintf(tmp, "%s --- %s", filelist->el[currline].filename, reason); 1583 1584 -
branches/3.2/mondo/src/lib/mr_str.c
r3193 r3194 222 222 length = strlen(in_out); 223 223 224 / * Skip initial caracs */224 // Skip initial caracs 225 225 for (i = 0; index(caracs, in_out[i]) != NULL && i < (int)length ; i++); 226 226 227 / * Shift the string to the begining if needed */227 // Shift the string to the begining if needed 228 228 if (i != 0) { 229 229 for (j = 0; i < (int)length ; i++, j++) { 230 230 in_out[j] = in_out[i]; 231 231 } 232 / * Erase the end of the string if needed */232 // Erase the end of the string if needed 233 233 j++; 234 234 in_out[j] = '\0'; 235 235 } 236 236 237 / * Skip final caracs */237 // Skip final caracs 238 238 for (i = (int)strlen(in_out) - 1; i >= 0 && index(caracs, in_out[i]) != NULL; i--); 239 239 240 / * The string now ends after that char */240 // The string now ends after that char 241 241 i++; 242 242 in_out[i] = '\0'; -
branches/3.2/mondo/src/mondoarchive/mondoarchive.c
r3193 r3194 161 161 char *tmp1 = NULL; 162 162 int res = 0; 163 int i = 0;164 163 int retval = 0; 165 164 char *say_at_end = NULL; … … 243 242 g_text_mode = TRUE; 244 243 setup_newt_stuff(); 245 tmp1 = mr_stresc(argv[2], "[]*?", '\\' );244 tmp1 = mr_stresc(argv[2], "[]*?", '\\', '\''); 246 245 printf("in=%s; out=%s\n", argv[2], tmp1); 247 246 mr_free(tmp1); -
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.