summaryrefslogtreecommitdiffstats
path: root/src/dfxml.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-12-21 18:18:55 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-12-21 18:18:55 +0100
commitb47b36998a17dccb922bc8a9591c8071f951c14f (patch)
tree9702e81b4ad3b3ac7c7933390711ff869e76f7b5 /src/dfxml.c
parent5f4faee1f6f82fb3667653a951714c80932522db (diff)
Remove loc field from struct file_recovery_struct, use location instead
Diffstat (limited to 'src/dfxml.c')
-rw-r--r--src/dfxml.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/dfxml.c b/src/dfxml.c
index ce9c1e5..fa63292 100644
--- a/src/dfxml.c
+++ b/src/dfxml.c
@@ -329,51 +329,4 @@ void xml_log_file_recovered(const file_recovery_t *file_recovery)
xml_pop("byte_runs");
xml_pop("fileobject");
}
-
-static void xml_log_file_recovered2_aux(const alloc_data_t *space, const alloc_data_t *file, const uint64_t file_size)
-{
- const struct td_list_head *tmp;
- uint64_t size=0;
- for(tmp=&file->list; tmp!=&space->list; tmp=tmp->next)
- {
- const alloc_data_t *element=td_list_entry_const(tmp, const alloc_data_t, list);
- if(size >= file_size)
- return ;
- if(element->data>0)
- {
- const uint64_t len=element->end - element->start + 1;
- if(size + len < file_size)
- {
- xml_printf("<byte_run offset='%llu' img_offset='%llu' len='%llu'/>\n",
- (long long unsigned)size,
- (long long unsigned)element->start,
- (long long unsigned)len);
- size+=len;
- }
- else
- {
- xml_printf("<byte_run offset='%llu' img_offset='%llu' len='%llu'/>\n",
- (long long unsigned)size,
- (long long unsigned)element->start,
- (long long unsigned)(file_size - size));
- return ;
- }
- }
- }
-}
-
-void xml_log_file_recovered2(const alloc_data_t *space, const file_recovery_t *file_recovery)
-{
- if(xml_handle==NULL)
- return;
- if(file_recovery==NULL || file_recovery->filename[0]=='\0')
- return;
- xml_push("fileobject", "");
- xml_out2s("filename", relative_name(file_recovery->filename));
- xml_out2i("filesize", file_recovery->file_size);
- xml_push("byte_runs", "");
- xml_log_file_recovered2_aux(space, file_recovery->loc, file_recovery->file_size);
- xml_pop("byte_runs");
- xml_pop("fileobject");
-}
#endif