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

RE: Making new "/dev" entries

On 07-Jul-2000 Walter Williams wrote:
> So it sounds like there are files containing
> pre-defined information for making /dev entries.
> I would therefore conclude that it knows that 
> "lp3" would be a printer port and configures 
> it accordingly.
> That helps immensely, thank you
> I would presume that to learn more about this 
> subject I would have to delve into kernel
> construction. I should count my blessings
> that it was made this easy.
> Walt

There are no such files, the information is in MAKEDEV, which is a script, so
look into it ! Each device has a major and a minor number (just do an ls -l in
/dev, these numbers are after the user & group names). The only thing MAKEDEV
knows is that lp3 is major 6, minor 3; the rest is on the parport driver, who
registers itself as handler of major 6 devices. When a process opens lp3, the
kernel sends the request to the driver who handles the #6 devices, and passes
the minor number to it as an argument. Thus the parport driver will know that he
was requested to open the fourth parallel port.


Reply to: