woods@hao.UUCP (Greg Woods) (01/17/84)
We have just converted to 4.2BSD, and I am having some trouble with
the mag tape ioctl(2) calls. In the include file <sys/mtio.h>, the old
MTIOCTOP is defined as "_IOW(m,1,struct mtop)". When I try to recompile
some libraries I had to do mag tape operations, the variable "m" is
giving a compiler error, since it was not declared in my old software,
and was not needed there. My problem is, I can't find *any* documentation
or source for _IOW, so I have no idea what "m" is or how to fix my program
to work (it used to run under 4.1aBSD). Does anyone out there know where to
find source and/or documentation for _IOW under 4.2, and/or know what the
function of the mysterious "m" is? Thanks for any help.
GREG
--
{ucbvax!hplabs | allegra!nbires | decvax!kpno | harpo!seismo | ihnp4!kpno}
!hao!woodsguy@rlgvax.UUCP (Guy Harris) (01/18/84)
_IOW and their friends are defined in <sys/ioccom.h> which is, in turn,
included by <sys/ioctl.h> but not, for some reason, by <sys/mtio.h> (at least
this is the case on 4.1c).
Guy Harris
{seismo,ihnp4,allegra}!rlgvax!guyguy@rlgvax.UUCP (Guy Harris) (01/18/84)
Oh yes, "m" isn't a variable, it's a character constant(yes!) - check the
definition of _IOW in <sys/ioccom.h>! Strange, but true...
Guy Harris
{seismo,ihnp4,allegra}!rlgvax!guygwyn%brl-vld@sri-unix.UUCP (01/21/84)
From: Doug Gwyn (VLD/VMB) <gwyn@brl-vld> _IOW is just a macro used to construct the proper TIOC*** code. It is defined in /usr/include/sys/ioctl.h .