chio.h
001:
002:
003:
004:
005:
006: #define CHET_MT 0
007: #define CHET_ST 1
008: #define CHET_IE 2
009: #define CHET_DT 3
010: #define CHET_V1 4
011: #define CHET_V2 5
012: #define CHET_V3 6
013: #define CHET_V4 7
014:
015:
016:
017:
018:
019:
020:
021:
022:
023:
024:
025:
026:
027:
028: struct changer_params {
029: int cp_curpicker;
030: int cp_npickers;
031: int cp_nslots;
032: int cp_nportals;
033: int cp_ndrives;
034: };
035: struct changer_vendor_params {
036: int cvp_n1;
037: char cvp_label1[16];
038: int cvp_n2;
039: char cvp_label2[16];
040: int cvp_n3;
041: char cvp_label3[16];
042: int cvp_n4;
043: char cvp_label4[16];
044: int reserved[8];
045: };
046:
047:
048:
049:
050:
051:
052: struct changer_move {
053: int cm_fromtype;
054: int cm_fromunit;
055: int cm_totype;
056: int cm_tounit;
057: int cm_flags;
058: };
059: #define CM_INVERT 1
060:
061:
062:
063:
064:
065:
066:
067:
068: struct changer_exchange {
069: int ce_srctype;
070: int ce_srcunit;
071: int ce_fdsttype;
072: int ce_fdstunit;
073: int ce_sdsttype;
074: int ce_sdstunit;
075: int ce_flags;
076: };
077: #define CE_INVERT1 1
078: #define CE_INVERT2 2
079:
080:
081:
082:
083:
084:
085: struct changer_position {
086: int cp_type;
087: int cp_unit;
088: int cp_flags;
089: };
090: #define CP_INVERT 1
091:
092:
093:
094:
095:
096:
097: struct changer_element_status {
098: int ces_type;
099: unsigned char *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:
113: struct 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:
139: struct 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:
© Andrew Scott 2006 -
2025,
All Rights Reserved