move del_search_space() from src/filegen.h to src/photorec.h

This commit is contained in:
Christophe Grenier 2019-10-13 11:06:57 +02:00
parent 920c166039
commit 54fb54dd4b
8 changed files with 21 additions and 13 deletions

View file

@ -31,6 +31,7 @@
#include "common.h"
#include "list.h"
#include "filegen.h"
#include "photorec.h"
#include "exfatp.h"
#include "exfat.h"
#include "log.h"

View file

@ -33,6 +33,7 @@
#include "common.h"
#include "list.h"
#include "filegen.h"
#include "photorec.h"
#include "intrf.h"
#include "dir.h"
#ifdef HAVE_EXT2FS_EXT2_FS_H

View file

@ -31,6 +31,7 @@
#include "common.h"
#include "list.h"
#include "filegen.h"
#include "photorec.h"
#include "fatp.h"
#include "fat.h"
#include "fat_common.h"

View file

@ -237,7 +237,12 @@ void file_search_footer(file_recovery_t *file_recovery, const void*footer, const
}
#if 0
void file_search_lc_footer(file_recovery_t *file_recovery, const unsigned char*footer, const unsigned int footer_length)
/*@
@ requires \valid(file_recovery);
@ requires footer_length > 0;
@ requires \valid_read((char *)footer+(0..footer_length-1));
@*/
static void file_search_lc_footer(file_recovery_t *file_recovery, const unsigned char*footer, const unsigned int footer_length)
{
const unsigned int read_size=4096;
unsigned char*buffer;

View file

@ -139,18 +139,6 @@ uint64_t file_rsearch(FILE *handle, uint64_t offset, const void*footer, const un
@*/
void file_search_footer(file_recovery_t *file_recovery, const void*footer, const unsigned int footer_length, const unsigned int extra_length);
/*@
@ requires \valid(file_recovery);
@ requires footer_length > 0;
@ requires \valid_read((char *)footer+(0..footer_length-1));
@*/
void file_search_lc_footer(file_recovery_t *file_recovery, const unsigned char*footer, const unsigned int footer_length);
/*@
@ requires \valid(list_search_space);
@*/
void del_search_space(alloc_data_t *list_search_space, const uint64_t start, const uint64_t end);
/*@
@ requires buffer_size > 0;
@ requires \valid_read((char *)buffer+(0..buffer_size-1));

View file

@ -37,6 +37,7 @@
#include "common.h"
#include "list.h"
#include "filegen.h"
#include "photorec.h"
#ifdef HAVE_LIBNTFS
#include <ntfs/attrib.h>
#endif

View file

@ -85,6 +85,11 @@ void del_search_space(alloc_data_t *list_search_space, const uint64_t start, con
update_search_space_aux(list_search_space, start, end, NULL, NULL);
}
/*@
@ requires \valid(list_search_space);
@ requires new_current_search_space == \null || \valid(*new_current_search_space);
@ requires offset == \null || \valid(*offset);
@*/
static void update_search_space_aux(alloc_data_t *list_search_space, const uint64_t start, const uint64_t end, alloc_data_t **new_current_search_space, uint64_t *offset)
{
struct td_list_head *search_walker = NULL;

View file

@ -93,6 +93,12 @@ void file_block_log(const file_recovery_t *file_recovery, const unsigned int sec
void file_block_free(alloc_list_t *list_allocation);
void file_block_append(file_recovery_t *file_recovery, alloc_data_t *list_search_space, alloc_data_t **new_current_search_space, uint64_t *offset, const unsigned int blocksize, const unsigned int data);
void file_block_truncate_and_move(file_recovery_t *file_recovery, alloc_data_t *list_search_space, const unsigned int blocksize, alloc_data_t **new_current_search_space, uint64_t *offset, unsigned char *buffer);
/*@
@ requires \valid(list_search_space);
@*/
void del_search_space(alloc_data_t *list_search_space, const uint64_t start, const uint64_t end);
#ifdef __cplusplus
} /* closing brace for extern "C" */
#endif