|
|
1.1 root 1: /* mtio.h 6.1 83/07/29 */
2:
3: /*
4: * Structures and definitions for mag tape io control commands
5: */
6:
7: /* structure for MTIOCTOP - mag tape op command */
8: struct mtop {
9: short mt_op; /* operations defined below */
10: daddr_t mt_count; /* how many of them */
11: };
12:
13: /* operations */
14: #define MTWEOF 0 /* write an end-of-file record */
15: #define MTFSF 1 /* forward space file */
16: #define MTBSF 2 /* backward space file */
17: #define MTFSR 3 /* forward space record */
18: #define MTBSR 4 /* backward space record */
19: #define MTREW 5 /* rewind */
20: #define MTOFFL 6 /* rewind and put the drive offline */
21: #define MTNOP 7 /* no operation, sets status only */
22:
23: /* structure for MTIOCGET - mag tape get status command */
24:
25: struct mtget {
26: short mt_type; /* type of magtape device */
27: /* the following two registers are grossly device dependent */
28: short mt_dsreg; /* ``drive status'' register */
29: short mt_erreg; /* ``error'' register */
30: /* end device-dependent registers */
31: short mt_resid; /* residual count */
32: /* the following two are not yet implemented */
33: daddr_t mt_fileno; /* file number of current position */
34: daddr_t mt_blkno; /* block number of current position */
35: /* end not yet implemented */
36: };
37:
38: /*
39: * Constants for mt_type byte
40: */
41: #define MT_ISTS 0x01
42: #define MT_ISHT 0x02
43: #define MT_ISTM 0x03
44: #define MT_ISMT 0x04
45: #define MT_ISUT 0x05
46: #define MT_ISCPC 0x06
47: #define MT_ISAR 0x07
48:
49: /* mag tape io control commands */
50: #define MTIOCTOP _IOW(m, 1, struct mtop) /* do a mag tape op */
51: #define MTIOCGET _IOR(m, 2, struct mtget) /* get tape status */
52:
53: #ifndef KERNEL
54: #define DEFTAPE "/dev/rmt12"
55: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.