Changeset 3190 in MondoRescue for branches/3.1/mondo/src/common/newt-specific.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/newt-specific.c
r3161 r3190 122 122 123 123 /*@ buffers ********************************************************** */ 124 int i ;125 char *tmp ;124 int i = 0; 125 char *tmp = NULL; 126 126 127 127 assert_string_is_neither_NULL_nor_zerolength(prompt); … … 173 173 int i; 174 174 175 assert_string_is_neither_NULL_nor_zerolength(prompt); 175 176 if (g_fail_immediately) { 176 177 // We consider the user aborted by using the -F option … … 326 327 paranoid_system("killall mindi 2> /dev/null"); 327 328 kill_anything_like_this("/mondo/do-not"); 328 kill_anything_like_this(" tmp.mondo");329 kill_anything_like_this("mondo.tmp"); 329 330 kill_anything_like_this("ntfsclone"); 330 331 sync(); … … 420 421 free_newt_stuff(); 421 422 if (!g_text_mode) { 422 log_msg(1, "Calling newtFinished()"); 423 newtFinished(); 423 if (does_file_exist("/THIS-IS-A-RAMDISK")) { 424 log_msg(1, "Calling newtFinished()"); 425 newtFinished(); 426 } else { 427 log_msg(1, "Calling newtSuspend()"); 428 newtSuspend(); 429 } 424 430 } 425 431 printf("Execution run ended; result=%d\n", signal); … … 440 446 char *command = NULL; 441 447 char *tmp = NULL; 448 char *p = NULL; 442 449 443 450 /*@ pointers ********************************************************* */ … … 465 472 for (err_log_lines[i][0] = '\0'; 466 473 strlen(err_log_lines[i]) < 2 && !feof(fin);) { 467 if (fgets(err_log_lines[i], MAX_NEWT_COMMENT_LEN, fin)) { 468 //FIXME 474 p = fgets(err_log_lines[i], MAX_NEWT_COMMENT_LEN, fin); 475 if (!p) { 476 // FIXME 469 477 } 470 478 /* Commented to make valgrind happy and avoid crash … … 571 579 572 580 /*@ buffers ********************************************************* */ 573 char *title = NULL;574 581 char *tmp = NULL; 575 582 … … 580 587 assert(ttl != NULL); 581 588 malloc_string(tmp); 582 mr_asprintf(title, "%s", ttl); 583 strcpy(g_isoform_header_str, title); 584 if (g_text_mode) { 585 log_msg(0, title); 586 } else { 587 strcpy(tmp, title); 589 strcpy(g_isoform_header_str, ttl); 590 if (g_text_mode) { 591 log_msg(0, ttl); 592 } else { 593 strcpy(tmp, ttl); 588 594 center_string(tmp, 80); 589 595 newtPushHelpLine(tmp); … … 596 602 g_isoform_header = newtLabel(1, 1, g_isoform_header_str); 597 603 g_isoform_scale = newtScale(3, 3, 34, 100); 598 newtCenteredWindow(40, 7, t itle);604 newtCenteredWindow(40, 7, ttl); 599 605 g_isoform_main = newtForm(NULL, NULL, 0); 600 606 g_isoform_timeline = newtLabel(1, 5, " "); … … 607 613 } 608 614 update_evalcall_form(0); 609 mr_free(title);610 615 paranoid_free(tmp); 611 616 } … … 971 976 } 972 977 if (percentage >= 3) { 973 mr_strcat(taskprogress, "] %3d%% done; %2ld:%02ld to go", percentage, time_remaining / 60,time_remaining % 60);978 mr_strcat(taskprogress, "] %3d%% done; %2ld:%02ld to go", percentage, (long) time_remaining / 60, (long) time_remaining % 60); 974 979 printf("---evalcall---1--- %s\n", g_isoform_header_str); 975 980 printf("---evalcall---2--- %s\n", taskprogress); … … 1225 1230 mr_free(title_sz); 1226 1231 mr_free(minimsg_sz); 1227 paranoid_free(outstr);1228 1232 return (output); 1229 1233 } … … 1369 1373 log_msg(2, "Loading %s", source_file); 1370 1374 for (filelist->entries = 0; filelist->entries <= ARBITRARY_MAXIMUM; ) { 1371 if (tmp != NULL) { 1372 mr_free(tmp); 1373 } 1375 mr_free(tmp); 1374 1376 if (feof(fin)) { 1375 1377 break; … … 1568 1570 } 1569 1571 } 1570 1571 1572 newtFormDestroy(myForm); 1572 1573 newtPopWindow();
Note:
See TracChangeset
for help on using the changeset viewer.