*BSD News Article 74724


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.dacom.co.kr!arclight.uoregon.edu!dispatch.news.demon.net!demon!jraynard.demon.co.uk!not-for-mail
From: james@jraynard.demon.co.uk (James Raynard)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: _IOR and _IOW
Date: 26 Jul 1996 01:01:51 -0000
Organization: A FreeBSD Box
Lines: 15
Message-ID: <4t95dv$dhe@jraynard.demon.co.uk>
References: <clxyVBW00YUt0tk340@andrew.cmu.edu>
NNTP-Posting-Host: localhost
X-NNTP-Posting-Host: jraynard.demon.co.uk

In article <clxyVBW00YUt0tk340@andrew.cmu.edu>,
Mahesh Saptharishi  <mahesh+@andrew.cmu.edu> wrote:
>
>I would like to know what the macros _IOR and _IOW do?

They're used to declare the commands used for the "request"
argument of ioctl(2).  _IOW is used for an 'in' parameter,
_IOR for an 'out' parameter and there's an _IOWR macro that
combines the two.  See <sys/scsiio.h> for an example of their
use.

-- 
James Raynard, Edinburgh, Scotland
james@jraynard.demon.co.uk
http://www.freebsd.org/~jraynard/