Changeset 689 in MondoRescue for trunk/mondo/mondo/common/libmondo-fork.c
- Timestamp:
- Jul 17, 2006, 7:43:58 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-fork.c
r688 r689 510 510 // BACKUP 511 511 int res = -1; 512 char*command; 512 char *command = NULL; 513 char *tmp = NULL; 513 514 514 515 if (!does_file_exist(input_device)) { 515 516 fatal_error("input device does not exist"); 516 517 } 517 if ( !find_home_of_exe("ntfsclone")) { 518 tmp = find_home_of_exe("ntfsclone"); 519 if (!tmp) { 518 520 fatal_error("ntfsclone not found"); 519 521 } 520 malloc_string(command); 521 sprintf(command, "ntfsclone --force --save-image --overwrite %s %s", output_fname, input_device); 522 paranoid_free(tmp); 523 524 asprintf(&command, "ntfsclone --force --save-image --overwrite %s %s", output_fname, input_device); 522 525 res = run_program_and_log_output(command, 5); 523 526 paranoid_free(command); 527 524 528 unlink(output_fname); 525 529 return (res); … … 678 682 // RESTORE 679 683 int res = -1; 680 char *command; 681 682 if ( !find_home_of_exe("ntfsclone")) { 684 char *command = NULL; 685 char *tmp = NULL; 686 687 tmp = find_home_of_exe("ntfsclone"); 688 if (!tmp) { 683 689 fatal_error("ntfsclone not found"); 684 690 } 691 paranoid_free(tmp); 692 685 693 asprintf(&command, "ntfsclone --force --restore-image --overwrite %s %s", output_device, input_fifo); 686 694 res = run_program_and_log_output(command, 5);
Note:
See TracChangeset
for help on using the changeset viewer.