summaryrefslogtreecommitdiffstats
path: root/src/pblocksize.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-11-21 10:29:09 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2015-11-21 10:29:09 +0100
commitf9ee894489b447ae1001f280d8ecbe1159793e6b (patch)
tree896ac0c65490d82586e189eab48aa93e094d5734 /src/pblocksize.c
parent2fb0921edc802de8c6fee18c5a940e33d488be4d (diff)
PhotoRec: allow to select blocksize up to 1 MB
Diffstat (limited to 'src/pblocksize.c')
-rw-r--r--src/pblocksize.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/pblocksize.c b/src/pblocksize.c
index 72e1ef3..aafc268 100644
--- a/src/pblocksize.c
+++ b/src/pblocksize.c
@@ -39,7 +39,7 @@ void menu_choose_blocksize(unsigned int *blocksize, uint64_t *offset, const unsi
{
int command;
unsigned int menu=0;
- const char *optionsBlocksize="BS51248736";
+ const char *optionsBlocksize="BS512487360ACM";
static const struct MenuItem menuBlocksize[]=
{
{'B',"1",""},
@@ -52,6 +52,10 @@ void menu_choose_blocksize(unsigned int *blocksize, uint64_t *offset, const unsi
{'7',"16384",""},
{'3',"32768",""},
{'6',"65536",""},
+ {'0',"128k",""},
+ {'A',"256k",""},
+ {'C',"512k",""},
+ {'M',"1M",""},
{0,NULL,NULL}
};
switch(sector_size)
@@ -65,6 +69,10 @@ void menu_choose_blocksize(unsigned int *blocksize, uint64_t *offset, const unsi
case 16384: optionsBlocksize+=7;break;
case 32768: optionsBlocksize+=8; break;
case 65536: optionsBlocksize+=9; break;
+ case 131072: optionsBlocksize+=10; break;
+ case 262144: optionsBlocksize+=11; break;
+ case 524288: optionsBlocksize+=12; break;
+ case 1048576: optionsBlocksize+=13; break;
}
switch(*blocksize)
{
@@ -78,6 +86,10 @@ void menu_choose_blocksize(unsigned int *blocksize, uint64_t *offset, const unsi
case 16384: menu=7; break;
case 32768: menu=8; break;
case 65536: menu=9; break;
+ case 131072: menu=10; break;
+ case 262144: menu=11; break;
+ case 524288: menu=12; break;
+ case 1048576: menu=13; break;
}
aff_copy(stdscr);
wmove(stdscr,INTER_PARTITION_Y-1,0);
@@ -96,6 +108,10 @@ void menu_choose_blocksize(unsigned int *blocksize, uint64_t *offset, const unsi
case '7': *blocksize=16384; break;
case '3': *blocksize=32768; break;
case '6': *blocksize=65536; break;
+ case '0': *blocksize=131072; break;
+ case 'A': *blocksize=262144; break;
+ case 'C': *blocksize=524288; break;
+ case 'M': *blocksize=1048576; break;
}
*offset=*offset % *blocksize;
if(*offset%sector_size!=0)