1: /*
2: * Copyright (c) 1982, 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)mtio.h 7.1 (Berkeley) 6/4/86
7: */
8:
9: /*
10: * Structures and definitions for mag tape io control commands
11: */
12:
13: /* structure for MTIOCTOP - mag tape op command */
14: struct mtop {
15: short mt_op; /* operations defined below */
16: daddr_t mt_count; /* how many of them */
17: };
18:
19: /* operations */
20: #define MTWEOF 0 /* write an end-of-file record */
21: #define MTFSF 1 /* forward space file */
22: #define MTBSF 2 /* backward space file */
23: #define MTFSR 3 /* forward space record */
24: #define MTBSR 4 /* backward space record */
25: #define MTREW 5 /* rewind */
26: #define MTOFFL 6 /* rewind and put the drive offline */
27: #define MTNOP 7 /* no operation, sets status only */
28: #define MTCACHE 8 /* enable controller cache */
29: #define MTNOCACHE 9 /* disable controller cache */
30:
31: /* structure for MTIOCGET - mag tape get status command */
32:
33: struct mtget {
34: short mt_type; /* type of magtape device */
35: /* the following two registers are grossly device dependent */
36: short mt_dsreg; /* ``drive status'' register */
37: short mt_erreg; /* ``error'' register */
38: /* end device-dependent registers */
39: short mt_resid; /* residual count */
40: /* the following two are not yet implemented */
41: daddr_t mt_fileno; /* file number of current position */
42: daddr_t mt_blkno; /* block number of current position */
43: /* end not yet implemented */
44: };
45:
46: /*
47: * Constants for mt_type byte. These are the same
48: * for controllers compatible with the types listed.
49: */
50: #define MT_ISTS 0x01 /* TS-11 */
51: #define MT_ISHT 0x02 /* TM03 Massbus: TE16, TU45, TU77 */
52: #define MT_ISTM 0x03 /* TM11/TE10 Unibus */
53: #define MT_ISMT 0x04 /* TM78/TU78 Massbus */
54: #define MT_ISUT 0x05 /* SI TU-45 emulation on Unibus */
55: #define MT_ISCPC 0x06 /* SUN */
56: #define MT_ISAR 0x07 /* SUN */
57: #define MT_ISTMSCP 0x08 /* DEC TMSCP protocol (TU81, TK50) */
58:
59: /* mag tape io control commands */
60: #define MTIOCTOP _IOW(m, 1, struct mtop) /* do a mag tape op */
61: #define MTIOCGET _IOR(m, 2, struct mtget) /* get tape status */
62: #define MTIOCIEOT _IO(m, 3) /* ignore EOT error */
63: #define MTIOCEEOT _IO(m, 4) /* enable EOT error */
64:
65: #ifndef KERNEL
66: #define DEFTAPE "/dev/rmt12"
67: #endif
Defined struct's
mtget
defined in line
33; used 24 times
mtop
defined in line
14; used 24 times
Defined macros
MTBSF
defined in line
22;
never used
MTBSR
defined in line
24; used 5 times
MTFSF
defined in line
21;
never used
MTFSR
defined in line
23; used 5 times
MTNOP
defined in line
27;
never used
MTREW
defined in line
25;
never used
Usage of this include