Annotation of Gnu-Mach/include/device/tape_status.h, revision 1.1

1.1     ! root        1: /* 
        !             2:  * Mach Operating System
        !             3:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
        !             4:  * All Rights Reserved.
        !             5:  * 
        !             6:  * Permission to use, copy, modify and distribute this software and its
        !             7:  * documentation is hereby granted, provided that both the copyright
        !             8:  * notice and this permission notice appear in all copies of the
        !             9:  * software, derivative works or modified versions, and any portions
        !            10:  * thereof, and that both notices appear in supporting documentation.
        !            11:  * 
        !            12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
        !            13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
        !            14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
        !            15:  * 
        !            16:  * Carnegie Mellon requests users of this software to return to
        !            17:  * 
        !            18:  *  Software Distribution Coordinator  or  [email protected]
        !            19:  *  School of Computer Science
        !            20:  *  Carnegie Mellon University
        !            21:  *  Pittsburgh PA 15213-3890
        !            22:  * 
        !            23:  * any improvements or extensions that they make and grant Carnegie Mellon
        !            24:  * the rights to redistribute these changes.
        !            25:  */
        !            26: /*
        !            27:  * Copyright (c) 1982, 1986 The Regents of the University of California.
        !            28:  * All rights reserved.
        !            29:  *
        !            30:  * Redistribution and use in source and binary forms are permitted
        !            31:  * provided that the above copyright notice and this paragraph are
        !            32:  * duplicated in all such forms and that any documentation,
        !            33:  * advertising materials, and other materials related to such
        !            34:  * distribution and use acknowledge that the software was developed
        !            35:  * by the University of California, Berkeley.  The name of the
        !            36:  * University may not be used to endorse or promote products derived
        !            37:  * from this software without specific prior written permission.
        !            38:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
        !            39:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
        !            40:  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            41:  *
        !            42:  *     @(#)mtio.h      7.4 (Berkeley) 8/31/88
        !            43:  */
        !            44: 
        !            45: #ifndef        _TAPE_STATUS_H_
        !            46: #define        _TAPE_STATUS_H_
        !            47: 
        !            48: /*
        !            49:  * Tape status
        !            50:  */
        !            51: 
        !            52: struct tape_status {
        !            53:        unsigned int    mt_type;
        !            54:        unsigned int    speed;
        !            55:        unsigned int    density;
        !            56:        unsigned int    flags;
        !            57: #      define TAPE_FLG_REWIND  0x1
        !            58: #      define TAPE_FLG_WP      0x2
        !            59: };
        !            60: #define        TAPE_STATUS_COUNT       (sizeof(struct tape_status)/sizeof(int))
        !            61: #define        TAPE_STATUS             (('m'<<16) + 1)
        !            62: 
        !            63: /*
        !            64:  * Constants for mt_type.  These are the same
        !            65:  * for controllers compatible with the types listed.
        !            66:  */
        !            67: #define        MT_ISTS         0x01            /* TS-11 */
        !            68: #define        MT_ISHT         0x02            /* TM03 Massbus: TE16, TU45, TU77 */
        !            69: #define        MT_ISTM         0x03            /* TM11/TE10 Unibus */
        !            70: #define        MT_ISMT         0x04            /* TM78/TU78 Massbus */
        !            71: #define        MT_ISUT         0x05            /* SI TU-45 emulation on Unibus */
        !            72: #define        MT_ISCPC        0x06            /* SUN */
        !            73: #define        MT_ISAR         0x07            /* SUN */
        !            74: #define        MT_ISTMSCP      0x08            /* DEC TMSCP protocol (TU81, TK50) */
        !            75: #define        MT_ISCY         0x09            /* CCI Cipher */
        !            76: #define        MT_ISSCSI       0x0a            /* SCSI tape (all brands) */
        !            77: 
        !            78: 
        !            79: /*
        !            80:  * Set status parameters
        !            81:  */
        !            82: 
        !            83: struct tape_params {
        !            84:        unsigned int    mt_operation;
        !            85:        unsigned int    mt_repeat_count;
        !            86: };
        !            87: 
        !            88: /* operations */
        !            89: #define MTWEOF         0       /* write an end-of-file record */
        !            90: #define MTFSF          1       /* forward space file */
        !            91: #define MTBSF          2       /* backward space file */
        !            92: #define MTFSR          3       /* forward space record */
        !            93: #define MTBSR          4       /* backward space record */
        !            94: #define MTREW          5       /* rewind */
        !            95: #define MTOFFL         6       /* rewind and put the drive offline */
        !            96: #define MTNOP          7       /* no operation, sets status only */
        !            97: #define MTCACHE                8       /* enable controller cache */
        !            98: #define MTNOCACHE      9       /* disable controller cache */
        !            99: 
        !           100: 
        !           101: /*
        !           102:  * U*x compatibility
        !           103:  */
        !           104: 
        !           105: /* structure for MTIOCGET - mag tape get status command */
        !           106: 
        !           107: struct mtget {
        !           108:        short   mt_type;        /* type of magtape device */
        !           109: /* the following two registers are grossly device dependent */
        !           110:        short   mt_dsreg;       /* ``drive status'' register */
        !           111:        short   mt_erreg;       /* ``error'' register */
        !           112: /* end device-dependent registers */
        !           113:        short   mt_resid;       /* residual count */
        !           114: /* the following two are not yet implemented */
        !           115:        unsigned long   mt_fileno;      /* file number of current position */
        !           116:        unsigned long   mt_blkno;       /* block number of current position */
        !           117: /* end not yet implemented */
        !           118: };
        !           119: 
        !           120: 
        !           121: /* mag tape io control commands */
        !           122: #define        MTIOCTOP        _IOW('m', 1, struct tape_params)/* do a mag tape op */
        !           123: #define        MTIOCGET        _IOR('m', 2, struct mtget)      /* get tape status */
        !           124: #define MTIOCIEOT      _IO('m', 3)                     /* ignore EOT error */
        !           125: #define MTIOCEEOT      _IO('m', 4)                     /* enable EOT error */
        !           126: 
        !           127: 
        !           128: #endif _TAPE_STATUS_H_

unix.superglobalmegacorp.com

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