|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ ! 23: /* ! 24: * The NEXTSTEP Software License Agreement specifies the terms ! 25: * and conditions for redistribution. ! 26: */ ! 27: ! 28: #ifndef _SYS_CHIO_H_ ! 29: #define _SYS_CHIO_H_ ! 30: ! 31: /* ! 32: * Structures and definitions for changer io control commands ! 33: */ ! 34: ! 35: #define CH_INVERT 0x10000 ! 36: #define CH_ADDR_MASK 0xffff ! 37: struct chop { ! 38: short ch_op; /* operations defined below */ ! 39: short result; /* the result */ ! 40: union { ! 41: struct { ! 42: int chm; /* Transport element */ ! 43: int from; ! 44: int to; ! 45: } move; ! 46: struct { ! 47: int chm; /* Transport element */ ! 48: int to; ! 49: } position; ! 50: struct { ! 51: short chmo; /* Offset of first CHM */ ! 52: short chms; /* No. of CHM */ ! 53: short slots; /* No. of Storage Elements */ ! 54: short sloto; /* Offset of first SE */ ! 55: short imexs; /* No. of Import/Export Slots */ ! 56: short imexo; /* Offset of first IM/EX */ ! 57: short drives; /* No. of CTS */ ! 58: short driveo; /* Offset of first CTS */ ! 59: short rot; /* CHM can rotate */ ! 60: } getparam; ! 61: struct { ! 62: int type; ! 63: #define CH_CHM 1 ! 64: #define CH_STOR 2 ! 65: #define CH_IMEX 3 ! 66: #define CH_CTS 4 ! 67: int from; ! 68: struct { ! 69: u_char elema_1; ! 70: u_char elema_0; ! 71: u_char full:1; ! 72: u_char rsvd:1; ! 73: u_char except:1; ! 74: u_char :5; ! 75: u_char rsvd2; ! 76: union { ! 77: struct { ! 78: u_char add_sense_code; ! 79: u_char add_sense_code_qualifier; ! 80: } specs; ! 81: short add_sense; ! 82: /* WARINING LSB only */ ! 83: #define CH_CHOLDER 0x0290 /* Cartridge holder is missing */ ! 84: #define CH_STATUSQ 0x0390 /* Status is questionable */ ! 85: #define CH_CTS_CLOSED 0x0490 /* CTS door is closed */ ! 86: } ch_add_sense; ! 87: u_char rsvd3[3]; ! 88: u_char :6; ! 89: u_char invert:1; ! 90: u_char svalid:1; ! 91: u_char source_1; ! 92: u_char source_0; ! 93: u_char rsvd4[4]; ! 94: } elem_data; ! 95: } get_elem_stat; ! 96: } u; ! 97: }; ! 98: ! 99: /* operations */ ! 100: #define CHMOVE 1 ! 101: #define CHPOSITION 2 ! 102: #define CHGETPARAM 3 ! 103: #define CHGETELEM 4 ! 104: ! 105: ! 106: /* Changer IO control command */ ! 107: #define CHIOOP _IOWR('c', 1, struct chop) /* do a mag tape op */ ! 108: ! 109: #endif /* !_SYS_CHIO_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.