summaryrefslogtreecommitdiffstats
path: root/src/photorec.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-09-19 20:16:55 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-09-19 20:16:55 +0200
commit8a37700513c6e8d380365b8581ce005932dbb857 (patch)
tree744340ee813ee763ae333815ae6b2febab92b005 /src/photorec.c
parent8238ff4db4c5cd12f4d088eef979b310dda8008d (diff)
Modify get_prev_location_smart() to always use offset_skipped_header if available
Diffstat (limited to 'src/photorec.c')
-rw-r--r--src/photorec.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/photorec.c b/src/photorec.c
index ff520d4..68c8159 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -275,26 +275,6 @@ unsigned int photorec_mkdir(const char *recup_dir, const unsigned int initial_di
return dir_num;
}
-void get_prev_location(alloc_data_t *list_search_space, alloc_data_t **current_search_space, uint64_t *offset, const uint64_t prev_location)
-{
- int nbr;
- alloc_data_t *file_space=*current_search_space;
- uint64_t size=0;
- /* Search backward the first fragment of a file not successfully recovered
- * Limit the search to 10 fragments or 1GB */
- for(nbr=0; nbr<3 && size < (uint64_t)200*1024*1024; nbr++)
- {
- file_space=td_list_prev_entry(file_space, list);
- if(file_space==list_search_space)
- return;
- size+=file_space->end - file_space->start + 1;
- if(file_space->start < prev_location)
- return ;
- *current_search_space=file_space;
- *offset=file_space->start;
- }
-}
-
int get_prev_file_header(alloc_data_t *list_search_space, alloc_data_t **current_search_space, uint64_t *offset)
{
int nbr;