Hardware manual

23.5 Lock-Files if you used the depreciated devfs
The abandoned device-filesystem (devfs) has the /dev directory with subdirectories. As of late 2001, there
were problems with lockfiles. For example, the lockfile mechanism considered dev/usb/tts/0 and /dev/tts/0 to
be the same device with name "0". Ditto for all other devices that had the same "leaf" name. Also, if some
applications use the old name for a device and other applications use the devfs name for the same device, then
the lockfiles will have different names. But the serial driver should know they are the same.
23.6 Devfs (The deprecated Device File System. History)
Kernel 2.4 introduced the now obsolete optional "device file system" (devfs) with a whole new set of names
for everything. Some people used it but the majority probably didn't. But in 2003-4, it was claimed that devfs
had unsolvable problems and starting with kernel 2.6.12 it was replaced with "udev" (kernels prior to 2.6.12
also could use udev but with some problems). Although udev doesn't provide all the functionality of devfs, it
does handle hot plugging. Also, the use of udev isn't required to run Linux so some people don't use it. But
many distributions install it by default.
Devfs was a good idea and was claimed to be more efficient than udev. But unfortunately, the author of devfs
didn't maintain it for long and it allegedly became not too well maintained. So for better or worse we now
have udev instead although the debate of devfs vs. udev still continues. For a detailed description of devfs see:
http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html Also see the kernel documentation tree:
filesystems/devfs.
The names of devices for the devfs can be used in udev, but usually are not and may not be simple to activate.
Here's the devfs names for serial devices: ttyS1 becomes tts/1, ttyUSB1 becomes /usb/tts/1, and ttyACM1 is
/usb/acm/1. Note that the number 1 above is just an example. It could be replaced by 0, 2, 3, 4, etc. Some
more examples of udev names: ttyS2 becomes tts/2 (Serial port), tty3 becomes vc/3 (Virtual Console), ptyp1
becomes pty/m1 (PTY master), ttyp2 becomes pty/s2 (PTY slave). "tts" looks like a directory which contains
devices "files": 0, 1, 2, etc. All of these new names were put in the /dev directory although optionally one may
put them elsewhere.
For devfs, device names in the /dev directory are created automatically by the corresponding driver. Thus, if
serial support comes from a module and that module isn't loaded yet, there will not be any serial devices in the
/dev directory. This can be confusing: you physically have serial ports but don't see them in the /dev directory.
However, if a device name is requested (attempt to open it) by a communication program and the serial
module isn't loaded, the kernel is supposed to try to find a driver for it and create a name for it in the /dev
directory.
This works OK if it finds a driver. But suppose there is no driver found for it. For example, if you try to use
"setserial" to configure a port that the driver failed to detect, it claims there is no such port. How does one
create a devfs port in this case?
For multiport devices for example, /dev/ttyF9 becomes /dev/ttf/9, or in a later version /dev/tts/F9. Substitute
for F (or f) whatever letter(s) your multiport board uses for this purpose. A multiport driver is supposed to
create a devfs name similar to the above and put it into the /dev directory
END OF Serial-HOWTO
Serial HOWTO
23.5 Lock-Files if you used the depreciated devfs 81