summaryrefslogtreecommitdiffstats
path: root/src/photorec.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-15 13:53:12 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-15 13:53:12 +0200
commite2711613a26a931180264c077339acc1c8887918 (patch)
tree90bb514047b4ace440c82d539b81de527fa55510 /src/photorec.c
parentfd9c697a03a5501e326479192dad98e2d6fdb64e (diff)
New functions log_all_partitions() and init_list_part()
Diffstat (limited to 'src/photorec.c')
-rw-r--r--src/photorec.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/photorec.c b/src/photorec.c
index 0896e3a..ef1fb57 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -1070,4 +1070,17 @@ void status_inc(struct ph_param *params, const struct ph_options *options)
}
}
-
+list_part_t *init_list_part(disk_t *disk, const struct ph_options *options)
+{
+ int insert_error=0;
+ list_part_t *list_part;
+ partition_t *partition_wd;
+ list_part=disk->arch->read_part(disk, (options!=NULL?options->verbose:0), 0);
+ partition_wd=new_whole_disk(disk);
+ list_part=insert_new_partition(list_part, partition_wd, 0, &insert_error);
+ if(insert_error>0)
+ {
+ free(partition_wd);
+ }
+ return list_part;
+}