[ECOS] Re: JFFS2 lseek
Thu Mar 25 15:35:00 GMT 2004
the same problem can be found in RAMFS.
-------- Original Message --------
Subject: JFFS2 lseek (23-Mrz-2004 11:31)
> 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?
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss