summaryrefslogtreecommitdiffstats
path: root/src/phrecn.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-05 21:52:54 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-05 21:52:54 +0200
commit3f03c0e6aafef241a795e62f2edb159b1de4b038 (patch)
treec04b806dd3d93d89dc2dfbeea1e2cd070252253b /src/phrecn.c
parentb9458447e8cbce92cbb8bb082ae447cc5a9d9341 (diff)
Migrate from file_data to file_info structure
Diffstat (limited to 'src/phrecn.c')
-rw-r--r--src/phrecn.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/phrecn.c b/src/phrecn.c
index ede75c8..eb62a29 100644
--- a/src/phrecn.c
+++ b/src/phrecn.c
@@ -311,14 +311,17 @@ static int photorec_aux(struct ph_param *params, const struct ph_options *option
if(file_recovery.file_stat->file_hint==&file_hint_dir && options->verbose > 0)
{ /* FAT directory found, list the file */
- file_data_t *dir_list;
- dir_list=dir_fat_aux(buffer,read_size,0,0);
- if(dir_list!=NULL)
+ static file_info_t dir_list = {
+ .list = TD_LIST_HEAD_INIT(dir_list.list),
+ .name = NULL
+ };
+ dir_fat_aux(buffer,read_size,0,0, &dir_list);
+ if(!td_list_empty(&dir_list.list))
{
log_info("Sector %lu\n",
(unsigned long)(file_recovery.location.start/params->disk->sector_size));
- dir_aff_log(NULL, dir_list);
- delete_list_file(dir_list);
+ dir_aff_log(NULL, &dir_list);
+ delete_list_file(&dir_list);
}
}
}