Mail Archives: djgpp-workers/2003/01/10/05:22:00
Hello.
Martin Str|mberg wrote:
>
> According to Richard Dawe:
> > Below is a patch fixing bugs in the /dev/zero and /dev/full support.
> > The bugs fixed are:
> >
> > * open: Don't decide we're emulating until we've checked that /dev/zero
> > or /dev/full (as appropriate) have been installed.
> >
> > * link: Don't allow linking to or from /dev/{zero,full}.
>
> Why?
Because we don't support hardlinks. See:
info libc alpha link
and/or:
src/libc/posix/unistd/link.c
We "simulate" hardlinks by copying the source file to the destination, which
doesn't work for /dev/{zero,full}.
> > * unlink: Check the filenames. If we're not trying to remove
> > /dev/{zero,full}, then pass it through.
>
> This mean that "rm /dev/zero" can never be removed, right?
Yes. Is that a problem?
> Does that mean that when somebody codes support for /dev/hda (e. g.)
> he must add it to this list?
Which list? You'd have to write another FSEXT to handle /dev/hd[a-z][0-9a-f]?
or whatever.
The /dev/{zero,full} code only handles /dev/zero and /dev/full. It should pass
anything else through. The code in CVS is buggy, because it does not pass
things through, when it should. Hence the patch.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -