1
2
3
4
5
6
7 #define CHET_MT 0
8 #define CHET_ST 1
9 #define CHET_IE 2
10 #define CHET_DT 3
11 #define CHET_V1 4
12 #define CHET_V2 5
13 #define CHET_V3 6
14 #define CHET_V4 7
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 struct changer_params {
30 int cp_curpicker;
31 int cp_npickers;
32 int cp_nslots;
33 int cp_nportals;
34 int cp_ndrives;
35 };
36 struct changer_vendor_params {
37 int cvp_n1;
38 char cvp_label1[16];
39 int cvp_n2;
40 char cvp_label2[16];
41 int cvp_n3;
42 char cvp_label3[16];
43 int cvp_n4;
44 char cvp_label4[16];
45 int reserved[8];
46 };
47
48
49
50
51
52
53 struct changer_move {
54 int cm_fromtype;
55 int cm_fromunit;
56 int cm_totype;
57 int cm_tounit;
58 int cm_flags;
59 };
60 #define CM_INVERT 1
61
62
63
64
65
66
67
68
69 struct changer_exchange {
70 int ce_srctype;
71 int ce_srcunit;
72 int ce_fdsttype;
73 int ce_fdstunit;
74 int ce_sdsttype;
75 int ce_sdstunit;
76 int ce_flags;
77 };
78 #define CE_INVERT1 1
79 #define CE_INVERT2 2
80
81
82
83
84
85
86 struct changer_position {
87 int cp_type;
88 int cp_unit;
89 int cp_flags;
90 };
91 #define CP_INVERT 1
92
93
94
95
96
97
98 struct changer_element_status {
99 int ces_type;
100 unsigned char __user *ces_data;
101 };
102 #define CESTATUS_FULL 0x01
103 #define CESTATUS_IMPEXP 0x02
104 #define CESTATUS_EXCEPT 0x04
105 #define CESTATUS_ACCESS 0x08
106 #define CESTATUS_EXENAB 0x10
107 #define CESTATUS_INENAB 0x20
108
109
110
111
112
113
114 struct changer_get_element {
115 int cge_type;
116 int cge_unit;
117 int cge_status;
118 int cge_errno;
119 int cge_srctype;
120 int cge_srcunit;
121 int cge_id;
122 int cge_lun;
123 char cge_pvoltag[36];
124 char cge_avoltag[36];
125 int cge_flags;
126 };
127
128 #define CGE_ERRNO 0x01
129 #define CGE_INVERT 0x02
130 #define CGE_SRC 0x04
131 #define CGE_IDLUN 0x08
132 #define CGE_PVOLTAG 0x10
133 #define CGE_AVOLTAG 0x20
134
135
136
137
138
139
140 struct changer_set_voltag {
141 int csv_type;
142 int csv_unit;
143 char csv_voltag[36];
144 int csv_flags;
145 };
146 #define CSV_PVOLTAG 0x01
147 #define CSV_AVOLTAG 0x02
148 #define CSV_CLEARTAG 0x04
149
150
151 #define CHIOMOVE _IOW('c', 1,struct changer_move)
152 #define CHIOEXCHANGE _IOW('c', 2,struct changer_exchange)
153 #define CHIOPOSITION _IOW('c', 3,struct changer_position)
154 #define CHIOGPICKER _IOR('c', 4,int)
155 #define CHIOSPICKER _IOW('c', 5,int)
156 #define CHIOGPARAMS _IOR('c', 6,struct changer_params)
157 #define CHIOGSTATUS _IOW('c', 8,struct changer_element_status)
158 #define CHIOGELEM _IOW('c',16,struct changer_get_element)
159 #define CHIOINITELEM _IO('c',17)
160 #define CHIOSVOLTAG _IOW('c',18,struct changer_set_voltag)
161 #define CHIOGVPARAMS _IOR('c',19,struct changer_vendor_params)
162
163
164
165
166
167
168
169