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

Re: [Sheflug] Where is /dev/eth0 ? What are major & minor devicenumbers?



On Thu, 2002-05-30 at 19:57, Andrew Basterfield wrote:
> It's certainly not essential to get connected to a LAN, I have never seen
> a /dev/eth0, ethernet devices don't need to interact with the filesystem
> so they don't get /dev/ entries.

Things don't sit in /dev/ if they need to interact with the filesystem -
they sit there because the filesystem is a convenient method of
accessing devices - (almost) everything is a file. You'd have a hard
time arguing /dev/mixed, for example, needs to interact with the fs.

> DevFS _doesn't_ use major and minor number, 

rendevous:~# ls -l /dev/hda
brw-rw----    1 root     disk       3,   0 Jan 24 16:26 /dev/hda
rendevous:~# ls -l /devfs/ide/host0/bus0/target0/lun0/cd 
brw-rw-rw-    1 root     root       3,   0 Jan  1  1970
/devfs/ide/host0/bus0/target0/lun0/cd

Hmmm....

> it's the old filesystem based device nodes 

Devfs is filesystem based. "Device Filesystem" = Devfs.

> that use major and minor numbers. DevFS is much more sensible.

Actually, it's Linux (the kernel) which uses major/minors, so you have
to implement them (as Devfs does).

> Yes, but not for network devices as they don't need a /dev entry. Mandrake
> may have had one for some reason but none of my boxes do.

I have seen them related to sniffing stuff - vastly uncommon on Linux
though. eth* lives in a special space all of it's own.

Cheers,

Alex.

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.