This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
JFFS2 lseek
- From: eibach at gdsys dot de
- To: ecos-discuss at ecos dot sourceware dot org
- Date: 23 Mar 2004 10:30:53 UT
- Subject: [ECOS] JFFS2 lseek
Hello,
The The Single UNIX Specification, Version 2 states the following about the lseek function:
"The lseek() function will allow the file offset to be set beyond the end of the existing data in the file. If data is later written at this point, subsequent reads of data in the gap will return bytes with the value 0 until data is actually written into the gap."
The code in jffs2_fo_lseek contains the following:
// Check that pos is still within current file size, or at the
// very end.
if (pos < 0 || pos > node->i_size)
return EINVAL;
So it seems lseek() does not allow to set the offset beyond the current end of file. Is that correct or am I getting something wrong?
Any suggestions how this could be fixed?
Regards,
Dirk
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss