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]

Re: [eCos] a question about ROMFS



----- Original Message -----
From: Jonathan Larmour <jlarmour@redhat.com>
To: jjtsai <jjtsai@itri.org.tw>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Tuesday, July 17, 2001 5:01 AM
Subject: Re: [ECOS] [eCos] a question about ROMFS


> > [Question Description]
> >     A fseek(,,SEEK_CUR) after fread() will cause inconsistency between
> > "(CYG_StdioStream) real_stream.position"
> >     and "fp->f_offset". See also stream.inl and rom_fs.c.
>
> I believe I understand the problem: the position required by lseek differs
> from the stream position, potentially by the number of bytes in the
buffer.
> In that case your patch is not quite complete to address this problem:
what
> if you are moving forward 1 byte, ie. fseek(,1, SEEK_CUR), *but* the data
> is already in the buffer. For a true stream rather than a file, we should
> not flush the input buffer.
Yes, you do understand my question and my solution. :p

> I'll see if I can work on a better patch.
That would be great!

best regards,
JJ



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