On Wed, Jun 13, 2001 at 11:09:23PM -0400, Tom Rauschenbach wrote:

> Maybe I phrased the question poorly.  I know I can't nfs mount a
> remote /dev but if I created a /nfs/exportstuff directory and made
> symlinks to the devices I wanted to share, and then machine B nfs
> mounted /nfs/exportstuff on /dev/remdevs could machine B play a wav
> on /dev/remdevs/audio ?
> 
> I could and probably will do the experiment, unless someone can tell
> me easily that I can't get there from here.

Well, being not a kernel hacker, AND being too lazy to do the
experiment myself (given that it's way too late and most of my
hardware is disassembled on my living room floor) this is more of an
educated guess than anything...

I'd say not.  A device file, even though it is treated much like a
regular file in many respects, is very different.  It's sort of like a
symbolic link to a kernel driver.  The file directory entries include
a major and minor number, which are sort of like a driver number and
device number.  When they're opened, and I/O is performed on them, it
doesn't actually go into a file.  Instead, the kernel uses the major
and minor number to determine which driver to use, and it sends the
data directly to the hardware.

My best guess is that if you NFS mounted a device file, say, /dev/dsp,
that if you wrote to that NFS-mounted device file, the sound would
play on the local machine, just as if you'd sent it to the local
filesystem's /dev/dsp.  It would do that because the major and minor
number of the device file is the same as the local one, and that (as I
understand it) is really all that the kernel cares about.

Hopefully if I'm wrong, someone who better understands how this works
will speak up...


-- 
---------------------------------------------------
Derek Martin          |   Unix/Linux geek
[EMAIL PROTECTED]    |   GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to