This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: [ECOS] fseek on JFFS2
- From: Ivan Djelic <ivan dot djelic at parrot dot fr>
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: Andrew Lunn <andrew at lunn dot ch>, eCos Patches List <ecos-patches at ecos dot sourceware dot org>, Paluch Sebastian <the_sorcerer at op dot pl>, eCos Disuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 27 Sep 2006 22:46:09 +0200
- Subject: Re: [ECOS] fseek on JFFS2
- References: <45197541.70500@eCosCentric.com> <20060927094050.GA1885@parrot.fr> <451A959B.6000007@eCosCentric.com>
On Wed, Sep 27, 2006 at 04:15:39PM +0100, 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?
My fix sure was a hasty one. This one looks better, I'll take it :-)
Ivan