Subject: Re: setting O_NONBLOCK on /dev/null
To: Dan <kasper37@netzero.com>
From: Andrew Brown <atatat@atatdot.net>
List: current-users
Date: 02/26/2002 17:06:38
>I understand that it may make sense that one would not need O_NONBLOCKING on
>/dev/null but I don't see why it should throw an error. In other words there's
>nothing wrong with it technically (that I know of) and I don't see anything in
>the spec that hints to this fact. In even plainer words, what implimentation is
>correct?
it would be easy to tweak sys/conf.h around the line where it #defines
cdev_mm_init() so that mmioctl didn't get #defined to enodev(), and
instead got defined to nullop().
the correctness of such a fix, however, isn't something i can comment
on. you have to keep in mind that the following devices:
/dev/io (i386 only?)
/dev/mem
/dev/kmem
/dev/null
/dev/zero
are all backed by the same set of functions in arch/.../.../mem.c
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
andrew@crossbar.com * "information is power -- share the wealth."