Mail Archives: djgpp-workers/2001/01/16/16:46:17
Hello.
DJ Delorie wrote:
> > Would an FSEXT hook for setmode() be useful?
>
> Why? Isn't the bin/text processing done in the layer above fsext?
I don't know enough about the inner workings of the I/O routines to answer
that. I was just posing the question from an ideological point of view.
> > What do you think the behaviour for SEEK_CUR and SEEK_END should be?
>
> It's not a real file, so you can't seek in it. IMHO it should return
> a "not a file" error.
For /dev/zero this is probably OK.
The full(4) man page on Linux says that "[s]eeks on /dev/full will always
succeed", so I'm not sure we can do that for /dev/full. One solution is to
pretend that /dev/full is a 2GB file (i.e. maximum off_t) and store the
current offset. Then SEEK_* could be handled better than the current code.
OTOH if you don't think this is a good idea, then I will make it return
the error, as you suggest.
Does anyone have an idea what happens on other systems?
Bye, Rich =]
--
Richard Dawe <richdawe AT bigfoot DOT com> http://www.bigfoot.com/~richdawe/
"The soul is the mirror of an indestructible universe."
--- Gottfried W. Leibniz
- Raw text -