This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fatfs lseek EOF bug


On Tuesday 10 May 2005 13:49, Savin Zlobec wrote:
>
> [snip]
>
> >	See the file attached. The test is for an MMC driver but should be pretty
> >straight forward to adapt (only the mount command should be changed).
> >The test creates a file and writes blocks of data into it while printing
> > the current file offset. In a new file after writing the first block, for
> > which the value returned is 0, the value returned by lseek function is
> > -1. The strange thing is that if you overwrite an existing file the lseek
> > function correctly returns the current file offset (equal to EOF).
>
> Found the BUG -- Please try the attached patch and let me know if it works.
>
> savin

The patch works OK :), thanks.

On a side note: I'm looking for an alternative implementation for 'ftruncate' 
POSIX function which is missing from eCos. Do you know how I could implement 
it for fatfs?

-nelu

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]