This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
fatfs lseek EOF bug
- From: Gratian Crisan <nelu at iv dot ro>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 9 May 2005 12:28:04 +0300
- Subject: [ECOS] fatfs lseek EOF bug
Hi all,
I think I've found a bug in the ecos FAT implementation for lseek function.
(fatfs_fo_lseek).
When calling the function like this 'lseek(fd, 0, SEEK_CUR)' to get the
current file position and the postion is right at the end of the file the fat
lseek function returns end of file error EEOF. I've looked at the other
filesystems from ecos and did a test in linux and the correct behavior seems
to be to return the current position of the end of file if the read/write
pointer is at the end of file (equal with the file size).
This bug occurs for example when creating a new file, writing some data in it
and calling lseek(fd, 0, SEEK_CUR) to get the current file position.
Suggestions?
Thanks,
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