summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-03-31 09:31:33 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-03-31 09:31:33 +0200
commitbf8739f75a4d62f56192611e848238a5751f3724 (patch)
tree0452cf660ea079c1a02a80f6cee6f22ac7bf2e92
parente51a2d7c4887f299a91e3cf266c0b180bee9e336 (diff)
PhotoRec: only save the blocksize in photorec.ses if positive
-rw-r--r--src/sessionp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sessionp.c b/src/sessionp.c
index a399e8d..d04246b 100644
--- a/src/sessionp.c
+++ b/src/sessionp.c
@@ -180,8 +180,11 @@ int session_save(alloc_data_t *list_free_space, struct ph_param *params, const
{
log_trace("session_save\n");
}
- fprintf(f_session,"#%u\n%s %s,%u,blocksize,%u,fileopt,",
- (unsigned int)time(NULL), params->disk->device, params->disk->arch->part_name_option, params->partition->order, params->blocksize);
+ fprintf(f_session,"#%u\n%s %s,%u",
+ (unsigned int)time(NULL), params->disk->device, params->disk->arch->part_name_option, params->partition->order);
+ if(params->blocksize>0)
+ fprintf(f_session,"blocksize,%u,", params->blocksize);
+ fprintf(f_session,"fileopt,");
for(i=0;files_enable[i].file_hint!=NULL;i++)
{
if(files_enable[i].enable==0)