[ECOS] romfs on linux / use of fread
Jonathan Larmour
jlarmour@redhat.com
Thu Jun 14 10:14:00 GMT 2001
rob.wj.jansen@philips.com wrote:
>
> All,
>
> after having some problems with fread() on my private filesystem I decided to test this with the romfs package.
>
> It seems that fread() works in CYGNUM_LIBC_STDIO_BUFSIZE and it will read a maximum of this number of
> bytes from a file at a time.
>
> performing an fread(buff, 1, 4096, fp) (right after opening the file) tells me that 256 items have been read.
> Performing multiple fread(buff, 1, 250, fp) operations return 250, 6, 250, 6 etc. and looking at the implementation
> I found that indeed the function stops after reading all data from the current buffer.
I agree that this is actually a bug rather than a performance issue - the
standard says it should only read less than requested on error or EOF.
Since you offered to make a patch that would be the most convenient :-).
Ditto fwrite presumably?
You can have your name in lights if you also include a ChangeLog entry.
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/
More information about the Ecos-discuss
mailing list