TestDisk: Force screen redraw

This commit is contained in:
Christophe Grenier 2009-04-14 12:19:30 +02:00
parent 349d85840b
commit 602688dc89
4 changed files with 2 additions and 16 deletions

View file

@ -490,6 +490,7 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
free(image_dd); free(image_dd);
} }
} }
rewrite=1;
break; break;
case 'u': case 'u':
case 'U': case 'U':
@ -500,6 +501,7 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
else else
dir_partition(disk_car, partition, 0, current_cmd); dir_partition(disk_car, partition, 0, current_cmd);
} }
rewrite=1;
break; break;
case 'l': case 'l':
case 'L': case 'L':

View file

@ -75,7 +75,6 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
{ {
unsigned char *buffer_bs; unsigned char *buffer_bs;
const char *options="DR"; const char *options="DR";
int rescan=1;
#ifdef HAVE_NCURSES #ifdef HAVE_NCURSES
struct MenuItem menu_fat1x[]= struct MenuItem menu_fat1x[]=
{ {
@ -98,7 +97,6 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
#endif #endif
int command; int command;
screen_buffer_reset(); screen_buffer_reset();
if(rescan==1)
{ {
#ifdef HAVE_NCURSES #ifdef HAVE_NCURSES
aff_copy(stdscr); 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("\n");
screen_buffer_add("A valid FAT Boot sector must be present in order to access\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"); screen_buffer_add("any data; even if the partition is not bootable.\n");
rescan=0;
} }
screen_buffer_to_log(); screen_buffer_to_log();
if(*current_cmd!=NULL) if(*current_cmd!=NULL)
@ -185,7 +182,6 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
return 0; return 0;
case 'R': /* R : rebuild boot sector */ case 'R': /* R : rebuild boot sector */
rebuild_FAT_BS(disk_car,partition,verbose,dump_ind,1,expert,current_cmd); rebuild_FAT_BS(disk_car,partition,verbose,dump_ind,1,expert,current_cmd);
rescan=1;
break; break;
case 'D': case 'D':
dump_fat1x(disk_car, partition, buffer_bs); dump_fat1x(disk_car, partition, buffer_bs);

View file

@ -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_bs;
unsigned char *buffer_backup_bs; unsigned char *buffer_backup_bs;
const char *options="DRC"; const char *options="DRC";
int rescan=1;
#ifdef HAVE_NCURSES #ifdef HAVE_NCURSES
struct MenuItem menu_fat32[]= 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; unsigned int menu=0;
int command; int command;
screen_buffer_reset(); screen_buffer_reset();
if(rescan==1)
{ {
int opt_over=0; int opt_over=0;
int opt_B=0; int opt_B=0;
@ -205,7 +203,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
else else
options="DR"; options="DR";
} }
rescan=0;
} }
screen_buffer_to_log(); screen_buffer_to_log();
if(*current_cmd!=NULL) 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"); display_message("Write error: Can't overwrite FAT32 backup boot sector\n");
} }
disk_car->sync(disk_car); disk_car->sync(disk_car);
rescan=1;
} }
#endif #endif
break; 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"); display_message("Write error: Can't overwrite FAT32 boot sector\n");
} }
disk_car->sync(disk_car); disk_car->sync(disk_car);
rescan=1;
} }
#endif #endif
break; break;
@ -309,7 +304,6 @@ int fat32_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos
break; break;
case 'R': /* R : rebuild boot sector */ case 'R': /* R : rebuild boot sector */
rebuild_FAT_BS(disk_car,partition,verbose,dump_ind,1,expert,current_cmd); rebuild_FAT_BS(disk_car,partition,verbose,dump_ind,1,expert,current_cmd);
rescan=1;
break; break;
} }
} }

View file

@ -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_bs;
unsigned char *buffer_backup_bs; unsigned char *buffer_backup_bs;
const char *options=""; const char *options="";
int rescan=1;
#ifdef HAVE_NCURSES #ifdef HAVE_NCURSES
struct MenuItem menu_ntfs[]= 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; unsigned int menu=0;
int command; int command;
screen_buffer_reset(); screen_buffer_reset();
if(rescan==1)
{ {
int identical_sectors=0; int identical_sectors=0;
int opt_B=0; int opt_B=0;
@ -183,7 +181,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose
} }
else else
options="DR"; options="DR";
rescan=0;
} }
screen_buffer_to_log(); screen_buffer_to_log();
if(*current_cmd!=NULL) 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"); display_message("Write error: Can't overwrite NTFS backup boot sector\n");
} }
disk_car->sync(disk_car); disk_car->sync(disk_car);
rescan=1;
} }
#endif #endif
break; 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"); display_message("Write error: Can't overwrite NTFS boot sector\n");
} }
disk_car->sync(disk_car); disk_car->sync(disk_car);
rescan=1;
} }
#endif #endif
break; break;
@ -283,7 +278,6 @@ int ntfs_boot_sector(disk_t *disk_car, partition_t *partition, const int verbose
break; break;
case 'R': /* R : rebuild boot sector */ case 'R': /* R : rebuild boot sector */
rebuild_NTFS_BS(disk_car, partition, verbose, 1, expert, current_cmd); rebuild_NTFS_BS(disk_car, partition, verbose, 1, expert, current_cmd);
rescan=1;
break; break;
case 'D': case 'D':
dump_NTFS(disk_car, partition, buffer_bs, buffer_backup_bs); dump_NTFS(disk_car, partition, buffer_bs, buffer_backup_bs);