summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-04-02 23:54:03 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-04-02 23:54:03 +0200
commit26cd126d3f7afc348c82eb0a56045b72d3e874ff (patch)
treec0a44b14f13a9ddb863a4005b52cf11ab3c572c4 /src
parent3e43d84bdc46798fead571004a731923bf86b42b (diff)
PhotoRec: read 512k chunks instead of 128k
Diffstat (limited to 'src')
-rw-r--r--src/phrecn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/phrecn.c b/src/phrecn.c
index 7cbeb20..7529e87 100644
--- a/src/phrecn.c
+++ b/src/phrecn.c
@@ -814,7 +814,7 @@ static int photorec_aux(disk_t *disk_car, partition_t *partition, const int verb
time_t previous_time;
int ind_stop=0;
unsigned int buffer_size;
- unsigned int read_size;
+ const unsigned int read_size=((*blocksize)>65536?(*blocksize):65536);
alloc_data_t *current_search_space;
file_recovery_t file_recovery;
static alloc_data_t list_file={
@@ -823,8 +823,7 @@ static int photorec_aux(disk_t *disk_car, partition_t *partition, const int verb
static list_cluster_t list_cluster= {
.list = TD_LIST_HEAD_INIT(list_cluster.list)
};
-#define READ_SIZE 256*512
- read_size=((*blocksize)>8192?(*blocksize):8192);
+#define READ_SIZE 1024*512
buffer_size=(*blocksize)+READ_SIZE;
buffer_start=MALLOC(buffer_size);
buffer_olddata=buffer_start;