Copyright © 2000 by Chris M. Costello
The File Descriptor table file system (fdescfs) has been my project for the past couple of months, off and on. I've recently gotten around to updating this file system to make it cleaner, with the intent of including it into the devfs project.
DTYPE macros are used to differentiate between different types in the file descriptor table. There are currently five such macros--DTYPE_VNODE, DTYPE_SOCKET, DTYPE_PIPE, DTYPE_FIFO, and DTYPE_KQUEUE. There are two very large problems with this technique:
To add any new file type to the system, for example, for the kqueue mechanism, fdescfs and other code using DTYPE macros to report a file table need to be modified and recompiled.
Should any driver register itself a new file type (by means of a new fileops entry), fdescfs would probably report inaccurate information for it, if not just plain garbage.