Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: chanpost@chol.com (chanpost)
Subject: Re: How to access law device on tru64unix
Date: 30 Dec 2003 16:28:51 -0800	[thread overview]
Message-ID: <afea6c23.0312301628.566262a4@posting.google.com> (raw)
In-Reply-To: bspfs9$10f8$1@jeeves.eng.abbnm.com

peter@abbnm.com (Peter da Silva) wrote in message news:<bspfs9$10f8$1@jeeves.eng.abbnm.com>...
> In article <afea6c23.0312282229.6630af87@posting.google.com>,
> chanpost <chanpost@chol.com> wrote:
> > By the way, I want to create "law device" in this unix and access...
> 
> I assume you mean "raw device"?
> 
> What sort of device, and what version of tru64?



I am sorry.
It is my mistake.
And unix version is 5.1A..
Alan Rollow (alan@nabeth.cxo.cpqcorp.net ) gave reply as following very kindly.
Desire to be refered.
  

The words "law device" in regard to Tru64 UNIX (or any other UNIX) 
don't make sense together. Someone else followed up, perhaps you 
meant "raw device". 

UNIX systems have traditionally allowed direct access to I/O 
devices through the special device file interface. The files 
representing devices are typically kept in the /dev directory. 
They can be opened, read and written by applications that need 
direct access to a device. The special files are divided into 
two general groups; character device or block devices. The 
character devices are also called raw device, because they give 
the most direct access to the device; writing a single byte 
to the raw device will, in so far as the device is capable of 
of it, cause a single byte to be written to the device. 

The block devices put the file system buffer cache between the 
application and device, accepting writes until some internal 
buffer is full and then writing it. For reads, a whole buffer 
is read and given back to the user at whatever I/O size they 
use. Generally only disk devices provide a block device 
interface. 

I qualified my description of raw device as "in so far as the 
device is capable". Most disk device only allow I/O in the 
sector size supported by the device. A single byte I/O, or 
an other not the sector size, may be disallowed. 

A Tru64 UNIX provides character/raw devices for all tape, 
disk and tty devices available on the system. A variety 
of other special device are provide for access to other 
parts of the system; /dev/mem and /dev/kmem for direct 
access to memory, /dev/console for access to the console 
device, etc. Other drivers may provide access to whatever 
class drive they support; some versions include a SCSI-2 
Media Changer driver that allows access to SCSI-2 Media 
Changers. Drivers of this class may only allow a small 
handful of generic command using the ioctl(2) interface to 
send SCSI commands to the device. The particulars depend 
on the device and driver. 

Special device files has two key characterics that allows 
access to a device; the major and minor device number. The 
major number is the index into a table of device drivers. 
The minor number encodes which unit controlled by that driver 
and other device specific characteristics. If you know the 
major and minor numbers associated with a device, you can 
create the special files yourself with mknod(1) command. 
But, as noted before, most devices that are going to allow 
direct access will have their special files created without 
you needing to do so. Generally this is done when the 
system boots.


  reply	other threads:[~2003-12-31  0:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-29  6:29 How to access law device on tru64unix chanpost
2003-12-29 15:05 ` Peter da Silva
2003-12-31  0:28   ` chanpost [this message]
2004-01-01 14:41     ` How to access [r]aw " Peter da Silva
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox