• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _LINUX_MTIO_H
7 #define _LINUX_MTIO_H
8 #include <linux/types.h>
9 #include <linux/ioctl.h>
10 struct	mtop {
11 	short	mt_op;
12 	int	mt_count;
13 };
14 #define MTRESET 0
15 #define MTFSF	1
16 #define MTBSF	2
17 #define MTFSR	3
18 #define MTBSR	4
19 #define MTWEOF	5
20 #define MTREW	6
21 #define MTOFFL	7
22 #define MTNOP	8
23 #define MTRETEN 9
24 #define MTBSFM	10
25 #define MTFSFM  11
26 #define MTEOM	12
27 #define MTERASE 13
28 #define MTRAS1  14
29 #define MTRAS2	15
30 #define MTRAS3  16
31 #define MTSETBLK 20
32 #define MTSETDENSITY 21
33 #define MTSEEK	22
34 #define MTTELL	23
35 #define MTSETDRVBUFFER 24
36 
37 #define MTFSS	25
38 #define MTBSS	26
39 #define MTWSM	27
40 #define MTLOCK  28
41 #define MTUNLOCK 29
42 #define MTLOAD  30
43 #define MTUNLOAD 31
44 #define MTCOMPRESSION 32
45 #define MTSETPART 33
46 #define MTMKPART  34
47 #define MTWEOFI	35
48 struct	mtget {
49 	long	mt_type;
50 	long	mt_resid;
51 
52 	long	mt_dsreg;
53 	long	mt_gstat;
54 	long	mt_erreg;
55 
56 	__kernel_daddr_t mt_fileno;
57 	__kernel_daddr_t mt_blkno;
58 };
59 #define MT_ISUNKNOWN		0x01
60 #define MT_ISQIC02		0x02
61 #define MT_ISWT5150		0x03
62 #define MT_ISARCHIVE_5945L2	0x04
63 #define MT_ISCMSJ500		0x05
64 #define MT_ISTDC3610		0x06
65 #define MT_ISARCHIVE_VP60I	0x07
66 #define MT_ISARCHIVE_2150L	0x08
67 #define MT_ISARCHIVE_2060L	0x09
68 #define MT_ISARCHIVESC499	0x0A
69 #define MT_ISQIC02_ALL_FEATURES	0x0F
70 #define MT_ISWT5099EEN24	0x11
71 #define MT_ISTEAC_MT2ST		0x12
72 #define MT_ISEVEREX_FT40A	0x32
73 #define MT_ISDDS1		0x51
74 #define MT_ISDDS2		0x52
75 #define MT_ISONSTREAM_SC        0x61
76 #define MT_ISSCSI1		0x71
77 #define MT_ISSCSI2		0x72
78 #define MT_ISFTAPE_UNKNOWN	0x800000
79 #define MT_ISFTAPE_FLAG	0x800000
80 struct	mtpos {
81 	long 	mt_blkno;
82 };
83 #define	MTIOCTOP	_IOW('m', 1, struct mtop)
84 #define	MTIOCGET	_IOR('m', 2, struct mtget)
85 #define	MTIOCPOS	_IOR('m', 3, struct mtpos)
86 #define GMT_EOF(x)              ((x) & 0x80000000)
87 #define GMT_BOT(x)              ((x) & 0x40000000)
88 #define GMT_EOT(x)              ((x) & 0x20000000)
89 #define GMT_SM(x)               ((x) & 0x10000000)
90 #define GMT_EOD(x)              ((x) & 0x08000000)
91 #define GMT_WR_PROT(x)          ((x) & 0x04000000)
92 #define GMT_ONLINE(x)           ((x) & 0x01000000)
93 #define GMT_D_6250(x)           ((x) & 0x00800000)
94 #define GMT_D_1600(x)           ((x) & 0x00400000)
95 #define GMT_D_800(x)            ((x) & 0x00200000)
96 #define GMT_DR_OPEN(x)          ((x) & 0x00040000)
97 #define GMT_IM_REP_EN(x)        ((x) & 0x00010000)
98 #define GMT_CLN(x)              ((x) & 0x00008000)
99 #define MT_ST_BLKSIZE_SHIFT	0
100 #define MT_ST_BLKSIZE_MASK	0xffffff
101 #define MT_ST_DENSITY_SHIFT	24
102 #define MT_ST_DENSITY_MASK	0xff000000
103 #define MT_ST_SOFTERR_SHIFT	0
104 #define MT_ST_SOFTERR_MASK	0xffff
105 #define MT_ST_OPTIONS		0xf0000000
106 #define MT_ST_BOOLEANS		0x10000000
107 #define MT_ST_SETBOOLEANS	0x30000000
108 #define MT_ST_CLEARBOOLEANS	0x40000000
109 #define MT_ST_WRITE_THRESHOLD	0x20000000
110 #define MT_ST_DEF_BLKSIZE	0x50000000
111 #define MT_ST_DEF_OPTIONS	0x60000000
112 #define MT_ST_TIMEOUTS		0x70000000
113 #define MT_ST_SET_TIMEOUT	(MT_ST_TIMEOUTS | 0x000000)
114 #define MT_ST_SET_LONG_TIMEOUT	(MT_ST_TIMEOUTS | 0x100000)
115 #define MT_ST_SET_CLN		0x80000000
116 #define MT_ST_BUFFER_WRITES	0x1
117 #define MT_ST_ASYNC_WRITES	0x2
118 #define MT_ST_READ_AHEAD	0x4
119 #define MT_ST_DEBUGGING		0x8
120 #define MT_ST_TWO_FM		0x10
121 #define MT_ST_FAST_MTEOM	0x20
122 #define MT_ST_AUTO_LOCK		0x40
123 #define MT_ST_DEF_WRITES	0x80
124 #define MT_ST_CAN_BSR		0x100
125 #define MT_ST_NO_BLKLIMS	0x200
126 #define MT_ST_CAN_PARTITIONS    0x400
127 #define MT_ST_SCSI2LOGICAL      0x800
128 #define MT_ST_SYSV              0x1000
129 #define MT_ST_NOWAIT            0x2000
130 #define MT_ST_SILI		0x4000
131 #define MT_ST_NOWAIT_EOF	0x8000
132 #define MT_ST_CLEAR_DEFAULT	0xfffff
133 #define MT_ST_DEF_DENSITY	(MT_ST_DEF_OPTIONS | 0x100000)
134 #define MT_ST_DEF_COMPRESSION	(MT_ST_DEF_OPTIONS | 0x200000)
135 #define MT_ST_DEF_DRVBUFFER	(MT_ST_DEF_OPTIONS | 0x300000)
136 #define MT_ST_HPLOADER_OFFSET 10000
137 #endif
138