Re: The guts of /dev/* ?
From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 12/05/04
- Next message: bd: "Re: 32-bit addressing question"
- Previous message: moma: "Re: Kmail won't start anymore"
- In reply to: Jean-David Beyer: "Re: The guts of /dev/* ?"
- Next in thread: Mike Mol: "Re: The guts of /dev/* ?"
- Reply: Mike Mol: "Re: The guts of /dev/* ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 05 Dec 2004 10:11:06 GMT
Jean-David Beyer wrote:
> Bill Unruh wrote:
>
>> Robert Heller <heller@deepsoft.com> writes:
>>
>> ] not@top-post,
>> ] In a message on Sat, 04 Dec 2004 10:54:05 -0600, wrote :
>>
>> ]n> Where would I find text explaining the 'innards' of /dev/* ?
>> ]n> Not at a 'salesClerk level': "try xyz [it worked for me]. ", but
>> ]n> down at asm, interrupts ...etc. level.
>>
>> Read the source code. I highly doubt that this is what you want.
>> The files in /dev/are links to the device drivers. The input and output
>> depend on what the specific device driver will do. cat /dev/dsp reads
>> from teh oss audio device, and pushes the stuff out on
>> stdout. Exactly what is read depends on how the device driver happens
>> to have been
>> set by the ioctls for that device. (ioctls are commands sent to the
>> device
>> driver with routines which deliver the ioctl codes to the driver).
>>
>>
> While you are not wrong, I would never call them _links_, since I use
> that term mainly for the things the _ln_ command creates. I think of
> them as an index to a two-dimensional table inside the kernel that the
> kernel uses to call the proper driver. (I do not mean to imply that it
> is actually implemented that way, though it might be: I never looked.)
>
The major number indexes to the proper driver. It is up to
the driver to use the minor number in whatever way it deems
suitable. An example is the hard disk driver using the minor
number for drive and partition on the drive.
The list of the allocated major device numbers is in the
Linux sources at /usr/src/linux/Documentation/devices.txt
-- Tauno Voipio tauno voipio (at) iki fi
- Next message: bd: "Re: 32-bit addressing question"
- Previous message: moma: "Re: Kmail won't start anymore"
- In reply to: Jean-David Beyer: "Re: The guts of /dev/* ?"
- Next in thread: Mike Mol: "Re: The guts of /dev/* ?"
- Reply: Mike Mol: "Re: The guts of /dev/* ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|