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


jjtsai wrote:
> 
> ----- Original Message -----
> From: Jonathan Larmour <jlarmour@redhat.com>
> To: jjtsai <jjtsai@itri.org.tw>
> Cc: <ecos-discuss@sources.redhat.com>
> Sent: Wednesday, July 18, 2001 4:09 AM
> Subject: Re: [ECOS] [eCos] a question about ROMFS
> 
> > jjtsai wrote:
> > > > I'll see if I can work on a better patch.
> > > That would be great!
> >
> > Can you try the attached patch for me please? I haven't even tried
> > compiling it yet nevermind testing it, but I was hoping you could do that
> > instead :-). Let me know how it goes. Then I'll check it in.
>  Your attached patch still has problems. Test program (fseek.c) is attached.
> 
>  I do a little modification on the stream.inl (based on your patch) and
> romfs.c.
>  It works well in my test program. Patch files are attached.
> 
> Have a try please. I am afraid if I make any mistakes.
> 
> Instruction about how to apply the patch files:
> 
>  cd $(ECOS_REPOSITORY)/packages/language/c/libc/stdio/current/include
> patch -p0 < $(WHERE_THE_PATCH_IS)/stream_inl.pat
> (This is the patch to the original file.)

Oops, I was so caught up in trying to seek within the buffer, I forgot
about the original problem :). I'm going to update anon CVS with this later
today. You can try it from there to make sure it's okay. I made a slight
variation on your change, just for efficiency and code size.
 
>  cd $(ECOS_REPOSITORY)/packages/fs/rom/current/src
> patch -p0 < $(WHERE_THE_PATCH_IS)/romfs_c.pat

I don't get this one. Your change doesn't appear to do anything because
further in dev_fo_lseek there is:

    // All OK, set fp offset and return new position.
    *apos = fp->f_offset = pos;

And your comment for the SEEK_CUR case: are you saying that pos shouldn't
be changed? If so, can you explain in more detail why?

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


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