Annotation of coherent/f/usr/include.78/sys/xlft.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * /usr/include/sys/ftxl.h
                      3:  *
                      4:  * Generic QIC-177 support, Archive style.
                      5:  *
                      6:  * Revised: Thu May 27 17:22:26 1993 CDT
                      7:  */
                      8: #ifndef __SYS_XLFT_H__
                      9: #define __SYS_XLFT_H__
                     10: 
                     11: /*
                     12:  * Device names.
                     13:  *     f l q80 n r  (also, "c" suffix allowed, for control device)
                     14:  *     | |  |  | |
                     15:  *     | |  |  | \---  if "r" suffix present, retension on open
                     16:  *     | |  |  \-----  if "n" suffix present, no rewind on open/close
                     17:  *     | |  \--------  q80/q40
                     18:  *     | \-----------  unit 0 or 1
                     19:  *     \-------------  f = floppy tape
                     20:  *
                     21:  * Minor numbers.
                     22:  *     01frwcuu (leading bits of 01 indicate floppy tape)
                     23:  *
                     24:  *     f - 0=qic40/1=qic80
                     25:  *     r - 1=retension
                     26:  *     w - 1=rewind
                     27:  *     c - 1=control
                     28:  *     u - unit 0..3
                     29:  */
                     30: 
                     31: #define M_FMT          0x20
                     32: #define M_RET          0x10
                     33: #define M_REW          0x08
                     34: #define M_CTL          0x04
                     35: #define M_UNT          0x03
                     36: 
                     37: #define FT_UNIT(x)     (minor(x) & M_UNT)
                     38: #define FT_FORMAT(x)   ((minor(x) & M_FMT)) >> 5)
                     39: 
                     40: union xl_status {
                     41:        struct {
                     42:                unsigned short ready:1;         /* drive ready          */
                     43:                unsigned short error:1;         /* error detected       */
                     44:                unsigned short cpres:1;         /* cartridge present    */
                     45:                unsigned short wprot:1;         /* write protected      */
                     46:                unsigned short newcart:1;       /* new cart inserted    */
                     47:                unsigned short cref:1;          /* cart referenced      */
                     48:                unsigned short bot:1;           /* beginning of tape    */
                     49:                unsigned short eot:1;           /* end of tape          */
                     50: 
                     51:                unsigned short errnum:8;        /* error number         */
                     52:                unsigned short errcmd:8;        /* associated command   */
                     53: 
                     54:                unsigned short sfterr;          /* soft errors          */
                     55:                unsigned short hrderr;          /* hard errors          */
                     56:                unsigned short undrun;          /* underruns            */
                     57:        } status;
                     58:        unsigned char stat[9];
                     59: };
                     60: 
                     61: #define XLIOC                  ('x'<<8)
                     62: #define XL_STATUS              (XLIOC | 0)     /* read tape status     */
                     63: #define XL_RESET               (XLIOC | 1)     /* reset tape drive     */
                     64: #define XL_RETEN               (XLIOC | 2)     /* retension tape       */
                     65: #define XL_REWIND              (XLIOC | 3)     /* rewind tape          */
                     66: #define XL_ERASE               (XLIOC | 4)     /* erase tape           */
                     67: #define XL_AMOUNT              (XLIOC | 5)     /* report xfer amount   */
                     68: #define XL_RFM                 (XLIOC | 6)     /* read file mark       */
                     69: #define XL_FORMAT              (XLIOC | 7)     /* format track pair    */
                     70: #define XL_DEBUG               (XLIOC | 11)    /* set debug variable   */
                     71: 
                     72: #endif  /* __SYS_XLFT_H__ */

unix.superglobalmegacorp.com

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