diff options
author | Christophe Grenier <grenier@cgsecurity.org> | 2014-01-07 22:25:32 +0100 |
---|---|---|
committer | Christophe Grenier <grenier@cgsecurity.org> | 2014-01-07 22:25:32 +0100 |
commit | 665aea4e8ab54e75a190fed7dcbbb031be1f2fb6 (patch) | |
tree | 2b84bc3f5a0dc0d33c6d66191f52ca82ea0d7f2c /src/photorec.c | |
parent | db5f5e8713007aee561ba65cf9b8f13f4dec63d7 (diff) |
update_blocksize: Resize the last sectors range
Diffstat (limited to 'src/photorec.c')
-rw-r--r-- | src/photorec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/photorec.c b/src/photorec.c index 999073c..0ddcaf6 100644 --- a/src/photorec.c +++ b/src/photorec.c @@ -529,6 +529,13 @@ void update_blocksize(unsigned int blocksize, alloc_data_t *list_search_space, c free(current_search_space); } } + /* Align end of last range */ + search_walker=list_search_space->list.prev; + { + alloc_data_t *current_search_space; + current_search_space=td_list_entry(search_walker, alloc_data_t, list); + current_search_space->end=(current_search_space->end+1-offset%blocksize+blocksize-1)/blocksize*blocksize+offset%blocksize-1; + } } uint64_t free_list_allocation_end=0; |