From 602688dc89b7baaa86ca9b8c57e548e6d9cc54e1 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Tue, 14 Apr 2009 12:19:30 +0200 Subject: [PATCH] TestDisk: Force screen redraw --- src/adv.c | 2 ++ src/fat1x.c | 4 ---- src/fat32.c | 6 ------ src/tntfs.c | 6 ------ 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/adv.c b/src/adv.c index 0f714478..d72b1ad6 100644 --- a/src/adv.c +++ b/src/adv.c @@ -490,6 +490,7 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const free(image_dd); } } + rewrite=1; break; case 'u': case 'U': @@ -500,6 +501,7 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const else dir_partition(disk_car, partition, 0, current_cmd); } + rewrite=1; break; case 'l': case 'L': diff --git a/src/fat1x.c b/src/fat1x.c index 1d82233a..d6df205f 100644 --- a/src/fat1x.c +++ b/src/fat1x.c @@ -75,7 +75,6 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos { unsigned char *buffer_bs; const char *options="DR"; - int rescan=1; #ifdef HAVE_NCURSES struct MenuItem menu_fat1x[]= { @@ -98,7 +97,6 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos #endif int command; screen_buffer_reset(); - if(rescan==1) { #ifdef HAVE_NCURSES aff_copy(stdscr); @@ -132,7 +130,6 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos screen_buffer_add("\n"); screen_buffer_add("A valid FAT Boot sector must be present in order to access\n"); screen_buffer_add("any data; even if the partition is not bootable.\n"); - rescan=0; } screen_buffer_to_log(); if(*current_cmd!=NULL) @@ -185,7 +182,6 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos return 0; case 'R': /* R : rebuild boot sector */ rebuild_FAT_BS(disk_car,partition,verbose,dump_ind,1,expert,current_cmd); - rescan=1; break; case 'D': dump_fat1x(disk_car, partition, buffer_bs); diff --git a/src/fat32.c b/src/fat32.c index 951ff520..0cb8a08a 100644 --- a/src/fat32.c +++ b/src/fat32.c @@ -79,7 +79,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos unsigned char *buffer_bs; unsigned char *buffer_backup_bs; const char *options="DRC"; - int rescan=1; #ifdef HAVE_NCURSES struct MenuItem menu_fat32[]= { @@ -102,7 +101,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos unsigned int menu=0; int command; screen_buffer_reset(); - if(rescan==1) { int opt_over=0; int opt_B=0; @@ -205,7 +203,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos else options="DR"; } - rescan=0; } screen_buffer_to_log(); if(*current_cmd!=NULL) @@ -273,7 +270,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos display_message("Write error: Can't overwrite FAT32 backup boot sector\n"); } disk_car->sync(disk_car); - rescan=1; } #endif break; @@ -287,7 +283,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos display_message("Write error: Can't overwrite FAT32 boot sector\n"); } disk_car->sync(disk_car); - rescan=1; } #endif break; @@ -309,7 +304,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos break; case 'R': /* R : rebuild boot sector */ rebuild_FAT_BS(disk_car,partition,verbose,dump_ind,1,expert,current_cmd); - rescan=1; break; } } diff --git a/src/tntfs.c b/src/tntfs.c index def28188..5f4baee1 100644 --- a/src/tntfs.c +++ b/src/tntfs.c @@ -76,7 +76,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose unsigned char *buffer_bs; unsigned char *buffer_backup_bs; const char *options=""; - int rescan=1; #ifdef HAVE_NCURSES struct MenuItem menu_ntfs[]= { @@ -100,7 +99,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose unsigned int menu=0; int command; screen_buffer_reset(); - if(rescan==1) { int identical_sectors=0; int opt_B=0; @@ -183,7 +181,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose } else options="DR"; - rescan=0; } screen_buffer_to_log(); if(*current_cmd!=NULL) @@ -250,7 +247,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose display_message("Write error: Can't overwrite NTFS backup boot sector\n"); } disk_car->sync(disk_car); - rescan=1; } #endif break; @@ -264,7 +260,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose display_message("Write error: Can't overwrite NTFS boot sector\n"); } disk_car->sync(disk_car); - rescan=1; } #endif break; @@ -283,7 +278,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose break; case 'R': /* R : rebuild boot sector */ rebuild_NTFS_BS(disk_car, partition, verbose, 1, expert, current_cmd); - rescan=1; break; case 'D': dump_NTFS(disk_car, partition, buffer_bs, buffer_backup_bs);