|
|
1.1 root 1: /*
2: * Copyright (c) 1982, 1986 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms, with or without
6: * modification, are permitted provided that the following conditions
7: * are met:
8: * 1. Redistributions of source code must retain the above copyright
9: * notice, this list of conditions and the following disclaimer.
10: * 2. Redistributions in binary form must reproduce the above copyright
11: * notice, this list of conditions and the following disclaimer in the
12: * documentation and/or other materials provided with the distribution.
13: * 3. All advertising materials mentioning features or use of this software
14: * must display the following acknowledgement:
15: * This product includes software developed by the University of
16: * California, Berkeley and its contributors.
17: * 4. Neither the name of the University nor the names of its contributors
18: * may be used to endorse or promote products derived from this software
19: * without specific prior written permission.
20: *
21: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31: * SUCH DAMAGE.
32: *
1.1.1.2 ! root 33: * from: @(#)mtio.h 7.6 (Berkeley) 2/5/91
! 34: * chio.h,v 1.3 1993/05/20 16:21:55 cgd Exp
1.1 root 35: */
36:
1.1.1.2 ! root 37: /* This is a "converted" mtio.h from 386BSD
1.1 root 38: Stefan Grefen [email protected]
39: */
40:
1.1.1.2 ! root 41: #ifndef _SYS_CHIO_H_
! 42: #define _SYS_CHIO_H_
! 43:
1.1 root 44: /*
45: * Structures and definitions for changer io control commands
46: */
47:
48: #define CH_INVERT 0x10000
49: #define CH_ADDR_MASK 0xffff
50: struct chop {
51: short ch_op; /* operations defined below */
52: short result; /* The result */
53: union {
54: struct {
55: int chm; /* Transport element */
56: int from;
57: int to;
58: } move;
59: struct {
60: int chm; /* Transport element */
61: int to;
62: } position;
63: struct {
64: short chmo; /* Offset of first CHM */
65: short chms; /* No. of CHM */
66: short slots; /* No. of Storage Elements */
67: short sloto; /* Offset of first SE */
68: short imexs; /* No. of Import/Export Slots */
69: short imexo; /* Offset of first IM/EX */
70: short drives; /* No. of CTS */
71: short driveo; /* Offset of first CTS */
72: short rot; /* CHM can rotate */
73: } getparam;
74: struct {
75: int type;
76: #define CH_CHM 1
77: #define CH_STOR 2
78: #define CH_IMEX 3
79: #define CH_CTS 4
80: int from;
81: struct {
82: u_char elema_1;
83: u_char elema_0;
84: u_char full:1;
85: u_char rsvd:1;
86: u_char except:1;
87: u_char :5;
88: u_char rsvd2;
89: union {
90: struct {
91: u_char add_sense_code;
92: u_char add_sense_code_qualifier;
93: } specs;
94: short add_sense;
95: /* WARINING LSB only */
96: #define CH_CHOLDER 0x0290 /* Cartridge holder is missing */
97: #define CH_STATUSQ 0x0390 /* Status is questionable */
98: #define CH_CTS_CLOSED 0x0490 /* CTS door is closed */
99:
100: } ch_add_sense;
101: u_char rsvd3[3];
102: u_char :6;
103: u_char invert:1;
104: u_char svalid:1;
105: u_char source_1;
106: u_char source_0;
107: u_char rsvd4[4];
108: } elem_data;
109: } get_elem_stat;
110: } u;
111: };
112:
113: /* operations */
114: #define CHMOVE 1
115: #define CHPOSITION 2
116: #define CHGETPARAM 3
117: #define CHGETELEM 4
118:
119:
120: /* Changer IO control command */
121: #define CHIOOP _IOWR('c', 1, struct chop) /* do a mag tape op */
1.1.1.2 ! root 122:
! 123: #endif /* !_SYS_CHIO_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.