[lkml]   [2005]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: An idea on devfs vs. udev
On Sunday October 30, wrote:
> So, why cannot we substitute the "dev" file within /sys with the actual device
> file?

I'd just like to say that I am 100% in favour of this idea.

The argument against it seems to be something that I have never
managed to understand about "policy not belonging in the kernel".
Now I agree that the kernel should avoid implementing policy, but I
fail to see how that relates to the current issue.

In fact, the way I see it, the current practice clearly violates the
"avoid policy" policy.

The kernel needs to export major/minor information through the
file system. The "obvious" mechanism for doing this is through a
device special file.
But instead, a text file with %d:%d is used. Why? I presume to stop
people from just opening /sys/.../dev. Stopping people from doing
such a thing is clearly implementing a "Thou shall not" policy.

But then to make matters worse, there is this "" file. UGH!
It's a bit of shell code exported by the kernel.
mknod /dev/hda b 3 0

This contortion would be totally unnecessary if 'dev' were an honest
device special file. Then instead of
sh $sysfspath/
you could
cp -R $sysfspath/dev /dev/`basename $sysfspath`

- obviously a different name would have to be chosen for back
compatibility (rdev?).
- I would *not* be in favour of then allowing chown/chmod. These
special files should stay root/root/0600.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-10-30 22:21    [W:0.074 / U:1.684 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site