Re: [PATCH] Clean up old names in tty code to current names

Albert Cahalan
2006-07-11T02:18:37Z

Jon Smirl writes:

> If I use udev to rename my devices, the names aren't going
> to match /proc/tty and what ps shows.

It's not as if ps will mislead you. You get "?" if you
redirected stderr or if you lack permission to examine
the /proc/*/fd/* links.

Of course, failing to follow Documentation/devices.txt is
complete foolishness. We have standards you know. The names
are pretty much part of the ABI. Feel free to swap /dev/zero
with /dev/random if you believe otherwise.

> The idea behind udev is that the kernel only deals in device
> numbers and all naming happens in user space.

For many things, the kernel knows:

$ cat /proc/*/maps | egrep '000[ ].*/dev'
3001e000-30020000 rw-s 90000000 03:0d 2989877 /dev/fb0
3002a000-3004a000 rw-s f0000000 03:0d 2990830 /dev/mem
3004a000-3104a000 rw-s 94000000 03:0d 2989877 /dev/fb0

The kernel only needs to remember, by keeping a dentry around.

Not that a devices.txt-compliant devfs wouldn't kick ass...