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