[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Locking of serial devices and devfs



>Neither are device majors/minors unless you want to give up compatibility
>with other Unix (like) systems or perhaps even POSIX completely, at
>which point the kernel probably won't be called 'Linux' anymore.
>
>A _lot_ of things currently depend on major/minor numbers in /dev,
>userlevel stuff such as the 'tty' program. And these programs aren't
>going to go away soon.

could you please give some examples ?

readlink("/proc/self/fd/0") does not depend on major/minor numbers.
(that is what "tty" does, do an strace).

locking does work with device names only, as long as a device has only
one name.

[special case: serial devices]
for some strange reason, serial devices have two names.
that was necessary to do locking. it was a bad idea, and a proper
locking done via /var/lock files (with a consisten policy) is much
better.

13 Apr 1997: makedev was changed not to create /dev/cu* devices
by default. since then no new installation of debian should have
these files (so, starting with potato ?).

if people use cu* and tty* devices, the proper way of
locking (if the kernel doesn't. does it ?) involved name -> major/minor
lookup. 

so, why do we need major/minor numbers ?
execpt to create /dev files (but devfs can do that) ? 

btw: i have no idea at all, why devfs creates /dev/cu*.
did anyone ask richard vor a /prov/fs/devfs/includeold ?
it might be nice to turn this off/on.

regards, andreas



Reply to: