Annotation of kernel/bsd/sys/chio.h, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.