[ECOS] fseek on JFFS2
Jonathan Larmour
jifl@eCosCentric.com
Wed Sep 27 16:18:00 GMT 2006
Jonathan Larmour wrote:
>
> I agree with your analysis, but I think I would prefer a fix like:
>
> Index: include/stream.inl
> ===================================================================
> RCS file:
> /cvs/ecos/ecos/packages/language/c/libc/stdio/current/include/stream.inl,v
> retrieving revision 1.7
> diff -u -5 -p -r1.7 stream.inl
> --- include/stream.inl 29 Mar 2004 11:24:38 -0000 1.7
> +++ include/stream.inl 27 Sep 2006 15:14:52 -0000
> @@ -440,10 +440,11 @@ Cyg_StdioStream::set_position( fpos_t po
> return ENOERR;
> } // endif (bytesavail > posdiff)
>
> if (whence == SEEK_CUR) {
> position += bytesavail;
> + pos -= bytesavail;
> }
> } //endif (whence != SEEK_END)
>
> Cyg_ErrNo err;
>
> What do you think?
Actually since at worst it doesn't cause any test regressions, I'll check
it in, because I'm an optimist. Full patch attached.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
------["The best things in life aren't things."]------ Opinions==mine
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stdio.seek.tweaks.patch.txt
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20060927/01b83a7c/attachment.txt>
-------------- next part --------------
--
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
mailing list