How it works

As a driver writer, there are two 'touchy-feely' ways of doing things:
  1. You either assume that the correct device file is on the system, or you create it on the fly.
  2. You are either assigned a major number or you hijack a unused (or sometimes used!) major number.
With devfs, a driver writer registers a device by name rather than major number. This is a more concrete way of doing things and eliminates the two touchy feely things that driver writers need to do. The device files will automagically appear in /dev with whatever permissions and ownership the driver says. The default perms and ownership can be modified by either a driver argument (the hard way) or by the devfs daemon, devfsd (the easy way).