Changeset 3190 in MondoRescue for branches/3.1/mondo/src/common/libmondo-fork.c
- Timestamp:
- Sep 25, 2013, 8:55:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/mondo/src/common/libmondo-fork.c
r3161 r3190 123 123 char *cd_number_str = NULL; 124 124 char *command = NULL; 125 char *p ;125 char *p= NULL; 126 126 char *tmp1 = NULL; 127 127 char *tmp2 = NULL; … … 140 140 141 141 mr_asprintf(cd_number_str, "%d", cd_no); 142 midway_call = resolve_naff_tokens(tmp1, isofile, "_ISO_"); 142 143 log_msg(4, "basic call = '%s'", tmp1); 143 midway_call = resolve_naff_tokens(tmp1, isofile, "_ISO_");144 144 mr_free(tmp1); 145 145 146 tmp = resolve_naff_tokens(midway_call, cd_number_str, "_CD#_"); 146 147 log_msg(4, "midway_call = '%s'", midway_call); 147 tmp = resolve_naff_tokens(midway_call, cd_number_str, "_CD#_");148 148 mr_free(cd_number_str); 149 149 mr_free(midway_call); 150 150 151 log_msg(4, "tmp = '%s'", tmp);152 151 ultimate_call = resolve_naff_tokens(tmp, MONDO_LOGFILE, "_ERR_"); 152 log_msg(4, "ultimate call = '%s'", ultimate_call); 153 153 mr_free(tmp); 154 154 155 log_msg(4, "ultimate call = '%s'", ultimate_call);156 155 mr_asprintf(command, "%s >> %s", ultimate_call, MONDO_LOGFILE); 157 156 mr_free(ultimate_call); 158 157 159 log_to_screen 160 ("Please be patient. Do not be alarmed by on-screen inactivity."); 161 log_msg(4, "Calling open_evalcall_form() with what_i_am_doing='%s'", 162 what_i_am_doing); 158 log_to_screen("Please be patient. Do not be alarmed by on-screen inactivity."); 159 log_msg(4, "Calling open_evalcall_form() with what_i_am_doing='%s'", what_i_am_doing); 163 160 if (bkpinfo->manual_cd_tray) { 164 161 mr_asprintf(tmp2, "%s", command); 165 162 p = strstr(tmp2, "2>>"); 166 163 if (p) { 167 *p++ = ' '; 168 *p++ = ' '; 169 *p++ = ' '; 164 sprintf(p, " "); 170 165 while (*p == ' ') { 171 166 p++; … … 376 371 return (1); 377 372 } 378 mr_free(command);379 373 380 374 if (!does_file_exist(lockfile)) { … … 384 378 } 385 379 } 380 mr_free(command); 386 381 387 382 for (; does_file_exist(lockfile); sleep(1)) { … … 535 530 bytes_to_be_read = atol(tmp1); 536 531 } 532 } 533 534 if (direction == 'w') { 535 mr_asprintf(tmp, "%-64s", PIMP_END_SZ); 536 if (fwrite(tmp, 1, 64, fout) != 64) { 537 mr_free(tmp); 538 fatal_error("Can't write the final block"); 539 } 540 mr_free(tmp); 541 } else { 537 542 log_msg(1, "tmpA is %s", tmp1); 538 543 if (!strstr(tmp1, PIMP_END_SZ)) { … … 554 559 } 555 560 556 sprintf(tmp, "I am here - %lld", (long long)ftello(fin));561 mr_asprintf(tmp, "I am here - %lld", (long long)ftello(fin)); 557 562 if (fread(tmp, 1, tmpcap, fin)) { 563 mr_free(tmp); 558 564 fatal_error("Can't fread here"); 559 565 } 560 566 log_msg(0, "tmp = '%s'", tmp); 561 567 if (fwrite(tmp, 1, tmpcap, ftmp)) { 568 mr_free(tmp); 562 569 fatal_error("Can't fwrite there"); 563 570 } 564 571 fclose(ftmp); 565 mr_free(tmp 1);572 mr_free(tmp); 566 573 fatal_error("Missing terminating block"); 567 574 } 568 575 } 569 mr_free(tmp1);570 }576 } 577 mr_free(tmp1); 571 578 572 579 paranoid_free(buf); … … 595 602 command = find_home_of_exe("ntfsclone"); 596 603 if (!command) { 597 mr_free(command);598 604 fatal_error("ntfsclone not found"); 599 605 } … … 641 647 /*@ buffers *********************************************************** */ 642 648 char *command = NULL; 643 char *title = NULL;644 649 /*@ pointers ********************************************************** */ 645 650 static int chldres = 0; … … 659 664 660 665 log_msg(8, "Parent running"); 661 mr_asprintf(title, "%s", tt); 662 open_evalcall_form(title); 663 mr_free(title); 666 open_evalcall_form(tt); 664 667 665 668 for (sleep(1); command[0] != '\0'; sleep(1)) { … … 672 675 if (pcno <= 5 && last_pcno >= 40) { 673 676 close_evalcall_form(); 674 mr_asprintf(title, "Verifying..."); 675 open_evalcall_form(title); 676 mr_free(title); 677 open_evalcall_form("Verifying..."); 677 678 } 678 679 if (counter++ >= 5) {
Note:
See TracChangeset
for help on using the changeset viewer.