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: JFFS2 lseek


Hello,

the same problem can be found in RAMFS.

Regards,
Dirk

-------- Original Message --------
Subject: JFFS2 lseek (23-Mrz-2004 11:31)
From:    eibach@gdsys.de
To:      ecos-discuss@ecos.sourceware.org

> 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


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