home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
OS9_Unix.lzh
/
DEFS
/
SYS
/
mtio.h
< prev
next >
Wrap
Text File
|
1992-10-01
|
3KB
|
71 lines
#ifndef _SYS_MTIO_INCLUDED
#define _SYS_MTIO_INCLUDED
/*
* Structures and definitions for mag tape io control commands
*/
/* structure for MTIOCTOP - mag tape op command */
struct mtop {
short mt_op; /* operations defined below */
long mt_count; /* how many of them */
};
/* operations */
#define MTWEOF 0 /* write an end-of-file record */
#define MTFSF 1 /* forward space file */
#define MTBSF 2 /* backward space file */
#define MTFSR 3 /* forward space record */
#define MTBSR 4 /* backward space record */
#define MTREW 5 /* rewind */
#define MTOFFL 6 /* rewind and put the drive offline */
#define MTNOP 7 /* no operation, sets status only */
#define MTEOD 8 /* (DDS device only) seek to EOD point*/
#define MTWSS 9 /* (DDS device only) write mt_count save setmarks*/
#define MTFSS 10 /* (DDS device only) forward mt_count save setmarks*/
#define MTBSS 11 /* (DDS device only) backward mt_count save setmarks*/
/* structure for MTIOCGET - mag tape get status command */
struct mtget {
long mt_type; /* type of magtape device */
long mt_resid; /* residual count */
/* the following registers are (hideously?) device dependent */
long mt_dsreg1; /* status register (msb) */
long mt_dsreg2; /* status register (lsb) */
long mt_gstat; /* generic (device independent) status */
long mt_erreg; /* error register */
};
/*
* Constants for mt_type
*/
#define MT_ISSTREAM 0x05
#define MT_ISDDS1 0x06 /* HPCS/HPIB DDS device without partitions*/
#define MT_ISDDS2 0x07 /* HPCS/HPIB DDS device with partitions*/
#define MT_ISSCSI1 0x08 /* ANSI SCSI-1 device */
/* generic mag tape (device independent) status macros */
/* for examining mt_gstat */
#define GMT_EOF(x) ((x) & 0x80000000)
#define GMT_BOT(x) ((x) & 0x40000000)
#define GMT_EOT(x) ((x) & 0x20000000)
#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
#define GMT_WR_PROT(x) ((x) & 0x04000000)
#define GMT_ONLINE(x) ((x) & 0x01000000)
#define GMT_D_6250(x) ((x) & 0x00800000)
#define GMT_D_1600(x) ((x) & 0x00400000)
#define GMT_D_800(x) ((x) & 0x00200000)
#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open */
#define GMT_IM_REP_EN(x) ((x) & 0x00010000)
/* mag tape io control commands */
#define MTIOCTOP (('m'<<8)|1) /* do a mag tape op */
#define MTIOCGET (('m'<<8)|2) /* get mag tape status */
#endif /* not _SYS_MTIO_INCLUDED */