summaryrefslogtreecommitdiffstats
path: root/src/godmode.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-25 10:47:46 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-25 10:47:46 +0200
commit08c21092732aacf8aaec78681455a7e6c637eab6 (patch)
tree64c20364e16aa6328aa835a84615d6cec0a43ec8 /src/godmode.c
parent4a26cd4a96d091e7cbdca6fd9fd2b0b42d85dce8 (diff)
TestDisk: Also search for backup boot sector/backup superblock during Quick Search
Diffstat (limited to 'src/godmode.c')
-rw-r--r--src/godmode.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/godmode.c b/src/godmode.c
index a921fcc..0381e95 100644
--- a/src/godmode.c
+++ b/src/godmode.c
@@ -610,19 +610,14 @@ static list_part_t *search_part(disk_t *disk_car, const list_part_t *list_part_o
test_nbr++;
}
if(res<=0 && test_nbr==1)
- {
- if(fast_mode==0)
- test_nbr=6;
- else
- {
- if((disk_car->arch==&arch_i386 &&
- ((start.sector==7 && (start.head<=2 || fast_mode>1)) ||
- search_location%(2048*512)==(7-1)*512)) ||
- (disk_car->arch!=&arch_i386 && (search_location%location_boundary==(7-1)*512)) ||
- (disk_car->arch==&arch_none && search_location==(7-1)*512))
- res=search_FAT_backup(buffer_disk,disk_car,partition,verbose,dump_ind);
- test_nbr++;
- }
+ {
+ if((disk_car->arch==&arch_i386 &&
+ ((start.sector==7 && (start.head<=2 || fast_mode>1)) ||
+ search_location%(2048*512)==(7-1)*512)) ||
+ (disk_car->arch!=&arch_i386 && (search_location%location_boundary==(7-1)*512)) ||
+ (disk_car->arch==&arch_none && search_location==(7-1)*512))
+ res=search_FAT_backup(buffer_disk,disk_car,partition,verbose,dump_ind);
+ test_nbr++;
}
if(res<=0 && test_nbr==2)
{