[plug] Device files

Jim Householder nofixed at westnet.com.au
Wed Mar 30 23:28:08 WST 2005


Hi

How is the correspondence between device files in /dev and hardware
determined and/or coded?

I want to use a parallel port to control a small LCD character display
and some relays.  I have installed parapin
(http://parapin.sourceforge.net) with no errors.

I have a separate parallel port card installed which I want to use.
Having burned my fingers in the past, I *really* don't want to
use the port on the motherboard.

The parapin program appears to execute ok, but I see nothing.  I
suspect the driver defaults to the port I don't want to use.

The script I run to create /dev/parport has the following:
NAME="parport"
depmod
modprobe kparapin
modprobe parapindriver devname=${NAME}
rm -f /dev/${NAME}
mknod /dev/${NAME} u `grep $NAME /proc/devices | cut -d " " -f 1` 0

/proc/devices appears empty (length 0, file says it's empty), yet
ls -al /dev/parport gives
crwxrwxrwx  1  root root  253, 0  Mar 30 22:15 2005  parport

Where did the 253 major come from?
How can I create a file that points to the PCI card?
I get the following numbers according to XP:
PCI
Bus            0
Device         7
Sub-device    16
Function       0

TIA
Jim



More information about the plug mailing list