summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-11-15 07:16:09 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2011-11-15 07:16:09 +0100
commit681a2531a2229c23e10275f8ee566201a729a3e1 (patch)
treecccf7cc7b2cc1f36d53a08f5025414ce349b3d56 /src
parente97359ef26949b69100d3c180f9b2852b706b9b2 (diff)
Use "./configure --disable-dfxml" to disable DFXML feature
Diffstat (limited to 'src')
-rw-r--r--src/dfxml.c2
-rw-r--r--src/phmain.c2
-rw-r--r--src/photorec.c4
-rw-r--r--src/phrecn.c4
4 files changed, 12 insertions, 0 deletions
diff --git a/src/dfxml.c b/src/dfxml.c
index b621748..e9385a1 100644
--- a/src/dfxml.c
+++ b/src/dfxml.c
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#ifdef ENABLE_DFXML
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
@@ -371,3 +372,4 @@ void xml_log_file_recovered2(const alloc_data_t *space, const file_recovery_t *f
xml_pop("byte_runs");
xml_pop("fileobject");
}
+#endif
diff --git a/src/phmain.c b/src/phmain.c
index ac9213c..e8d8665 100644
--- a/src/phmain.c
+++ b/src/phmain.c
@@ -251,7 +251,9 @@ int main( int argc, char **argv )
free(params.recup_dir);
return 0;
}
+#ifdef ENABLE_DFXML
xml_set_command_line(argc, argv);
+#endif
if(create_log!=TD_LOG_NONE)
log_handle=log_open(logfile, create_log);
#ifdef HAVE_SETLOCALE
diff --git a/src/photorec.c b/src/photorec.c
index 9ac6d00..6590e5b 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -660,7 +660,9 @@ int file_finish(file_recovery_t *file_recovery, struct ph_param *params,
else
{
list_space_used(file_recovery, params->disk->sector_size);
+#ifdef ENABLE_DFXML
xml_log_file_recovered(file_recovery);
+#endif
update_search_space(file_recovery, list_search_space, current_search_space, offset, params->blocksize);
file_recovered=1; /* note that file was recovered */
}
@@ -752,7 +754,9 @@ alloc_data_t *file_finish2(file_recovery_t *file_recovery, struct ph_param *para
}
else
{
+#ifdef ENABLE_DFXML
xml_log_file_recovered2(list_search_space, file_recovery);
+#endif
datanext=file_truncate(list_search_space, file_recovery, params->disk->sector_size, params->blocksize);
}
free_list_allocation(&file_recovery->location);
diff --git a/src/phrecn.c b/src/phrecn.c
index cf4125b..c92bbbd 100644
--- a/src/phrecn.c
+++ b/src/phrecn.c
@@ -825,9 +825,11 @@ int photorec(struct ph_param *params, const struct ph_options *options, alloc_da
/* make the first recup_dir */
params->dir_num=photorec_mkdir(params->recup_dir, params->dir_num);
+#ifdef ENABLE_DFXML
/* Open the XML output file */
xml_open(params->recup_dir, params->dir_num);
xml_setup(params->disk, params->partition);
+#endif
for(params->pass=0; params->status!=STATUS_QUIT; params->pass++)
{
@@ -1069,8 +1071,10 @@ int photorec(struct ph_param *params, const struct ph_options *options, alloc_da
free(params->file_stats);
params->file_stats=NULL;
free_header_check();
+#ifdef ENABLE_DFXML
xml_shutdown();
xml_close();
+#endif
return 0;
}