Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2002 18:13:55 -0500
From:      Ray Kohler <rkohler1@cox.rr.com>
To:        sridharv@ufl.edu, questions@FreeBSD.ORG
Subject:   Re: about /dev
Message-ID:  <0aa490111231012FE4@Mail4.mgfairfax.rr.com>
In-Reply-To: <200201160407.XAA15222@anansi.vpha.health.ufl.edu>
References:  <200201160407.XAA15222@anansi.vpha.health.ufl.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 15 January 2002 11:07 pm, sridharv@ufl.edu wrote:
> what do the device files in the /dev directory point to
> exactly. the device drivers for that device??
> have seen some material about this but its not too
> clear..

They are "virtual files" that can trick the system into thinking a 
lot of hardware are just regular files. For instance, if a program 
opens a regular file for writing, and writes on it, the data goes 
into that file on the disk. If it does the same to /dev/cuaa0, the 
data gets sent to the first serial port (assuming you have that 
driver in your kernel). This allows programmers not to care whether 
the output is to a file or to some hardware. All that's really 
stored on the disk for a device file is a pair of numbers to tell 
the kernel what kind of device it is and which one to use. 

-- 
Ray Kohler
Playing an unamplified electric guitar is like strumming on a picnic
table.
		-- Dave Barry, "The Snake"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0aa490111231012FE4>