Changeset 2331 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-fork.c
- Timestamp:
- Aug 18, 2009, 3:25:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-fork.c
r2325 r2331 589 589 // BACKUP 590 590 int res = -1; 591 char *command = NULL;591 char *command = NULL; 592 592 593 593 if (!does_file_exist(input_device)) { 594 594 fatal_error("input device does not exist"); 595 595 } 596 if ( !find_home_of_exe("ntfsclone")) { 596 command = find_home_of_exe("ntfsclone"); 597 if (!command) { 598 mr_free(command); 597 599 fatal_error("ntfsclone not found"); 598 600 } 601 mr_free(command); 602 599 603 mr_asprintf(command, "ntfsclone --force --save-image --overwrite %s %s", output_fname, input_device); 600 604 res = run_program_and_log_output(command, 5); … … 639 643 /*@ buffers *********************************************************** */ 640 644 char *command = NULL; 641 char *title ;645 char *title = NULL; 642 646 /*@ pointers ********************************************************** */ 643 647 static int chldres = 0; … … 650 654 *pchild_result = 999; 651 655 652 malloc_string(title);653 strcpy(title, tt);654 656 mr_asprintf(command, "%s 2>> %s", cmd, MONDO_LOGFILE); 655 657 log_msg(3, "command = '%s'", command); … … 659 661 660 662 log_msg(8, "Parent running"); 663 mr_asprintf(title, "%s", tt); 661 664 open_evalcall_form(title); 665 mr_free(title); 666 662 667 for (sleep(1); command[0] != '\0'; sleep(1)) { 663 668 pcno = grab_percentage_from_last_line_of_file(MONDO_LOGFILE); … … 669 674 if (pcno <= 5 && last_pcno >= 40) { 670 675 close_evalcall_form(); 671 strcpy(title, "Verifying...");676 mr_asprintf(title, "Verifying..."); 672 677 open_evalcall_form(title); 678 mr_free(title); 673 679 } 674 680 if (counter++ >= 5) { … … 690 696 } 691 697 log_msg(3, "Parent res = %d", res); 692 paranoid_free(title);693 698 return (res); 694 699 } 695 696 697 700 698 701 … … 709 712 char *command = NULL; 710 713 711 if ( !find_home_of_exe("ntfsclone")) { 714 command = find_home_of_exe("ntfsclone"); 715 if (!command) { 716 mr_free(command); 712 717 fatal_error("ntfsclone not found"); 713 718 } 719 mr_free(command); 720 714 721 mr_asprintf(command, "ntfsclone --force --restore-image --overwrite %s %s", output_device, input_fifo); 715 722 res = run_program_and_log_output(command, 5);
Note:
See TracChangeset
for help on using the changeset viewer.