This is the mail archive of the ecos-discuss@sourceware.org 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: fseek on JFFS2


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

-- 
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]