Re: [Yaffs] Direct Interface, files contain zero when mounti…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: stephane.lesage
CC: yaffs
Subject: Re: [Yaffs] Direct Interface, files contain zero when mounting without checkpoint
On Monday 04 June 2012 21:26:49 Stéphane Lesage wrote:
> Le 01/06/2012 11:33, Stéphane Lesage a écrit :
> > but I still have the problem here on the last step.
> >
> > I pretty sure my low-level NAND functions (or file simulation) work
> > correctly, so this must be a bad configuration.
>
> I found the problem: my loff_t type is 32 bits...


Just curious... What compiler are you using?

> which leeds to a wrong initial shrink size when scanning, because of:
>
> the_obj->variant.file_variant.shrink_size=yaffs_max_file_size(dev);
>
> loff_tyaffs_max_file_size(structyaffs_dev*dev)
>
> {
>
>     return  ((loff_t)  YAFFS_MAX_CHUNK_ID)  *  dev->data_bytes_per_chunk;

>
> }
>
> BTW, there is a define for the same thing in yaffsfs.h:
> #defineYAFFS_MAX_FILE_SIZE(0x800000000LL-1)
>
> It is possible to add support for 32 bits loff_t ?


Ok. I can do that. It is probably useful for many situations.

-- Charles