summaryrefslogtreecommitdiffstats
path: root/README_dev_photorec.txt
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-02-24 20:27:08 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2016-02-24 20:27:08 +0100
commitcc7f97cd2931bf65f68754031681f1a1e20046fa (patch)
tree5921ffcee446f42b09c5d0cda0ba88b760464cdd /README_dev_photorec.txt
parentb9dc788eb633fa9e5c1f274f2dce6d1f1dd8ac75 (diff)
Split README into README.md and README_dev_photorec.txt
Diffstat (limited to 'README_dev_photorec.txt')
-rw-r--r--README_dev_photorec.txt58
1 files changed, 58 insertions, 0 deletions
diff --git a/README_dev_photorec.txt b/README_dev_photorec.txt
new file mode 100644
index 0000000..04d64e9
--- /dev/null
+++ b/README_dev_photorec.txt
@@ -0,0 +1,58 @@
+PhotoRec - Theory of operation:
+
+Carvers are plugable. Each carver consists of:
+
+struct file_hint_t - describes extension, name, max size, enable by default, etc.
+file_enable_t list_file_enable[] - array with all file hints and whether enabled or not.
+
+
+phmain.c - Contains the main() and driver logic for photorec.
+
+main():
+ - reads parameters
+ - scans for available devices
+ - parses the HD (or image)
+ - resets the list of which file carvers are enabled
+ - Initializes ncurses
+ - Calls do_curses_photorec() (in pdisksel.c)
+ - shuts down ncurses
+
+
+pdiskseln.c -
+ int do_curses_photorec(struct ph_param *params, struct ph_options *options, const list_disk_t *list_disk)
+ - Implements Disk selection
+ - May call photorec_disk_selection_ncurses()
+ - Eventually call menu_photorec() in ppartseln.c
+
+ppartseln.c -
+ void menu_photorec(struct ph_param *params, struct ph_options *options, alloc_data_t*list_search_space)
+ - Implements Partition selection and Search/Options/File Opt/Geometry/Quit menu
+ - Search Option call photorec()
+
+phrecn.c -
+ int photorec(struct ph_param *params, const struct ph_options *options, alloc_data_t *list_search_space)
+ - runs multiple passes until status==STATUS_QUIT
+ - calls photorec_mkdir() to actually make the output directory
+ - calls photorec_find_blocksize() to find the block size
+ - calls photorec_aux() to do the recovery
+ - may call photorec_bf() to recover more files by brute-force method
+
+src/psearchn.c -
+ pstatus_t photorec_aux(struct ph_param *params, const struct ph_options *options, alloc_data_t *list_search_space)
+ - calls file_finish2() when recovery of a file is finished (ie. a new file has been found)
+ - calls file_recovery_aborted() if the user stops the recovery or there is not enough space on the destination
+
+photorec.c: -
+ int file_finish_bf(file_recovery_t *file_recovery, struct ph_param *params, alloc_data_t *list_search_space)
+ - called when recovery of a file is done by
+ - photorec_bf()
+ - photorec_bf_pad()
+ - photorec_bf_frag()
+ - photorec_bf_aux()
+
+photorec.c
+ pfstatus_t file_finish2(file_recovery_t *file_recovery, struct ph_param *params, const int paranoid, alloc_data_t *list_search_space)
+ - called when a file is done by
+ - photorec_aux() (in three places)
+
+