1: /*
   2:  * Copyright (c) 1982, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)mtio.h	7.1.2 (2.11BSD) 1998/3/7
   7:  */
   8: 
   9: /*
  10:  * Structures and definitions for mag tape io control commands
  11:  */
  12: 
  13: /* structure for MTIOCTOP - mag tape op command */
  14: struct  mtop    {
  15:     short   mt_op;      /* operations defined below */
  16:     daddr_t mt_count;   /* how many of them */
  17: };
  18: 
  19: /* operations */
  20: #define MTWEOF  0   /* write an end-of-file record */
  21: #define MTFSF   1   /* forward space file */
  22: #define MTBSF   2   /* backward space file */
  23: #define MTFSR   3   /* forward space record */
  24: #define MTBSR   4   /* backward space record */
  25: #define MTREW   5   /* rewind */
  26: #define MTOFFL  6   /* rewind and put the drive offline */
  27: #define MTNOP   7   /* no operation, sets status only */
  28: #define MTCACHE 8   /* enable controller cache */
  29: #define MTNOCACHE 9 /* disable controller cache */
  30: #define MTFLUSH 10  /* flush cache */
  31: 
  32: /* structure for MTIOCGET - mag tape get status command */
  33: 
  34: struct  mtget   {
  35:     short   mt_type;    /* type of magtape device */
  36: /* the following two registers are grossly device dependent */
  37:     short   mt_dsreg;   /* ``drive status'' register */
  38:     short   mt_erreg;   /* ``error'' register */
  39: /* end device-dependent registers */
  40:     short   mt_resid;   /* residual count */
  41: /* the following two are not yet implemented */
  42:     daddr_t mt_fileno;  /* file number of current position */
  43:     daddr_t mt_blkno;   /* block number of current position */
  44: /* end not yet implemented */
  45: };
  46: 
  47: /*
  48:  * Constants for mt_type byte.  These are the same
  49:  * for other controllers compatible with the types listed.
  50:  */
  51: #define MT_ISTS     0x01        /* TS-11 */
  52: #define MT_ISHT     0x02        /* TM03 Massbus: TE16, TU45, TU77 */
  53: #define MT_ISTM     0x03        /* TM11/TE10 Unibus */
  54: #define MT_ISMT     0x04        /* TM78/TU78 Massbus */
  55: #define MT_ISUT     0x05        /* SI TU-45 emulation on Unibus */
  56: #define MT_ISCPC    0x06        /* SUN */
  57: #define MT_ISAR     0x07        /* SUN */
  58: #define MT_ISTMSCP  0x08        /* DEC TMSCP protocol (TU81, TK50) */
  59: 
  60: /*
  61:  * At present only the TMSCP driver reports this information in the
  62:  * high byte of the 'drive status' word.  Other drives will (hopefully)
  63:  * be updated in the future.
  64: */
  65: #define MTF_BOM     0x01        /* At beginning of media */
  66: #define MTF_EOM     0x02        /* At the end of media */
  67: #define MTF_OFFLINE 0x04        /* Drive is offline */
  68: #define MTF_WRTLCK  0x08        /* Drive is write protected */
  69: #define MTF_WRITTEN 0x10        /* Tape has been written */
  70: 
  71: /* mag tape io control commands */
  72: #define MTIOCTOP    _IOW(m, 1, struct mtop)     /* do a mag tape op */
  73: #define MTIOCGET    _IOR(m, 2, struct mtget)    /* get tape status */
  74: #define MTIOCIEOT   _IO(m, 3)           /* ignore EOT error */
  75: #define MTIOCEEOT   _IO(m, 4)           /* enable EOT error */
  76: 
  77: #ifndef KERNEL
  78: #define DEFTAPE "/dev/rmt8"
  79: #define MT_DEF  "/dev/nrmt8"
  80: #endif

Defined struct's

mtget defined in line 34; used 26 times

Defined macros

DEFTAPE defined in line 78; used 2 times
MTBSF defined in line 22; used 2 times
MTCACHE defined in line 28; used 1 times
MTFLUSH defined in line 30; never used
MTFSR defined in line 23; used 4 times
MTF_BOM defined in line 65; used 10 times
MTF_EOM defined in line 66; used 5 times
MTF_OFFLINE defined in line 67; never used
MTF_WRITTEN defined in line 69; used 5 times
MTF_WRTLCK defined in line 68; used 3 times
MTIOCEEOT defined in line 75; never used
MTIOCIEOT defined in line 74; never used
MTNOCACHE defined in line 29; used 1 times
MTNOP defined in line 27; used 2 times
MTOFFL defined in line 26; used 2 times
MT_DEF defined in line 79; used 1 times
MT_ISAR defined in line 57; used 1 times
MT_ISCPC defined in line 56; used 1 times
MT_ISHT defined in line 52; used 3 times
MT_ISMT defined in line 54; used 1 times
MT_ISTM defined in line 53; used 3 times
MT_ISTMSCP defined in line 58; used 2 times
MT_ISTS defined in line 51; used 3 times
MT_ISUT defined in line 55; used 1 times

Usage of this include

Last modified: 1998-03-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3193
Valid CSS Valid XHTML 1.0 Strict