# 2.11BSD#431 - /usr/src/sys/h/mtio.h

##### Macros

    DEFTAPE           X
    MTBSF             X
    MTBSR             X
    MTCACHE           X
    MTFLUSH           X
    MTFSF             X
    MTFSR             X
    MTF_BOM           X
    MTF_EOM           X
    MTF_OFFLINE       X
    MTF_WRITTEN       X
    MTF_WRTLCK        X
    MTIOCEEOT         X
    MTIOCGET          X
    MTIOCIEOT         X
    MTIOCTOP          X
    MTNOCACHE         X
    MTNOP             X
    MTOFFL            X
    MTREW             X
    MTWEOF            X
    MT_DEF            X
    MT_ISAR           X
    MT_ISCPC          X
    MT_ISHT           X
    MT_ISMT           X
    MT_ISTM           X
    MT_ISTMSCP        X
    MT_ISTS           X
    MT_ISUT           X

##### struct's

    mtget             X
    mtop              X

       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

- in /usr/src/bin/mt.c line 51(2), 159(2)
- in /usr/src/bin/tar.c line 1246(2)
- in /usr/src/sys/pdpuba/ht.c line 407(2), 447(2)
- in /usr/src/sys/pdpuba/tm.c line 623(2), 663(2)
- in /usr/src/sys/pdpuba/tmscp.c line 1412(2), 1471(2)
- in /usr/src/sys/pdpuba/ts.c line 659(2), 697(2)
- in /usr/src/usr.lib/libU77/tapeio.c line 50(2)
- in /usr/src/usr.sbin/rmt/rmt.c line 136(2)

mtop defined in line 14; used 36 times

- in /usr/src/bin/mt.c line 50(2)
- in /usr/src/bin/tar.c line 1245(2)
- in /usr/src/new/ansi/ansitape.c line 372(2), 381(2), 390(2), 399(2)
- in /usr/src/new/vmsbackup/vmsbackup.c line 248(2)
- in /usr/src/sys/pdpstand/maketape.c line 23(2)
- in /usr/src/sys/pdpuba/ht.c line 406(2), 414(2)
- in /usr/src/sys/pdpuba/tm.c line 622(2), 630(2)
- in /usr/src/sys/pdpuba/tmscp.c line 1411(2), 1430(2)
- in /usr/src/sys/pdpuba/ts.c line 658(2), 667(2)
- in /usr/src/ucb/tcopy.c line 42(2)
- in /usr/src/usr.sbin/rmt/rmt.c line 125(2)

#### Defined macros

DEFTAPE defined in line 78; used 2 times

- in /usr/src/old/dump/dumpdir.c line 25
- in /usr/src/sbin/dump/dumpdir.c line 23

MTBSF defined in line 22; used 2 times

- in /usr/src/bin/mt.c line 37
- in /usr/src/new/ansi/ansitape.c line 400

MTBSR defined in line 24; used 5 times

- in /usr/src/bin/mt.c line 39
- in /usr/src/bin/tar.c line 1245
- in /usr/src/sys/pdpuba/ht.c line 439
- in /usr/src/sys/pdpuba/tm.c line 655
- in /usr/src/sys/pdpuba/ts.c line 689

MTCACHE defined in line 28; used 1 times

- in /usr/src/bin/mt.c line 44

MTFLUSH defined in line 30; never used
MTFSF defined in line 21; used 3 times

- in /usr/src/bin/mt.c line 36
- in /usr/src/new/ansi/ansitape.c line 391
- in /usr/src/new/vmsbackup/vmsbackup.c line 843

MTFSR defined in line 23; used 4 times

- in /usr/src/bin/mt.c line 38
- in /usr/src/sys/pdpuba/ht.c line 439
- in /usr/src/sys/pdpuba/tm.c line 655
- in /usr/src/sys/pdpuba/ts.c line 689

MTF_BOM defined in line 65; used 10 times

- in /usr/src/sys/pdpuba/tmscp.c line 1424-1426(2), 1665-1668(2), 1731, 1790-1792(2), 1817-1819(2), 1929

MTF_EOM defined in line 66; used 5 times

- in /usr/src/sys/pdpuba/tmscp.c line 1358, 1871-1873(2), 1899, 1938

MTF_OFFLINE defined in line 67; never used
MTF_WRITTEN defined in line 69; used 5 times

- in /usr/src/sys/pdpuba/tmscp.c line 783, 1663, 1714, 1806-1811(2)

MTF_WRTLCK defined in line 68; used 3 times

- in /usr/src/sys/pdpuba/tmscp.c line 1772-1774(2), 1913

MTIOCEEOT defined in line 75; never used
MTIOCGET defined in line 73; used 7 times

- in /usr/src/bin/mt.c line 98
- in /usr/src/bin/tar.c line 1249
- in /usr/src/sys/pdpuba/tmscp.c line 1421
- in /usr/src/usr.lib/libU77/tapeio.c line 23, 418-421(2)
- in /usr/src/usr.sbin/rmt/rmt.c line 137

MTIOCIEOT defined in line 74; never used
MTIOCTOP defined in line 72; used 11 times

- in /usr/src/bin/mt.c line 91
- in /usr/src/bin/tar.c line 1251
- in /usr/src/new/ansi/ansitape.c line 375, 384, 393, 402
- in /usr/src/new/vmsbackup/vmsbackup.c line 833, 845
- in /usr/src/sys/pdpstand/maketape.c line 64
- in /usr/src/ucb/tcopy.c line 110
- in /usr/src/usr.sbin/rmt/rmt.c line 128

MTNOCACHE defined in line 29; used 1 times

- in /usr/src/bin/mt.c line 45

MTNOP defined in line 27; used 2 times

- in /usr/src/bin/mt.c line 43, 84

MTOFFL defined in line 26; used 2 times

- in /usr/src/bin/mt.c line 41-42(2)

MTREW defined in line 25; used 3 times

- in /usr/src/bin/mt.c line 40
- in /usr/src/new/ansi/ansitape.c line 382
- in /usr/src/new/vmsbackup/vmsbackup.c line 831

MTWEOF defined in line 20; used 7 times

- in /usr/src/bin/mt.c line 34-35(2)
- in /usr/src/new/ansi/ansitape.c line 373
- in /usr/src/sys/pdpstand/maketape.c line 62
- in /usr/src/ucb/tcopy.c line 108
- in /usr/src/usr.lib/libU77/tapeio.c line 49, 417

MT_DEF defined in line 79; used 1 times

- in /usr/src/bin/mt.c line 67

MT_ISAR defined in line 57; used 1 times

- in /usr/src/bin/mt.c line 144

MT_ISCPC defined in line 56; used 1 times

- in /usr/src/bin/mt.c line 143

MT_ISHT defined in line 52; used 3 times

- in /usr/src/bin/mt.c line 137, 148
- in /usr/src/sys/pdpuba/ht.c line 451

MT_ISMT defined in line 54; used 1 times

- in /usr/src/bin/mt.c line 139

MT_ISTM defined in line 53; used 3 times

- in /usr/src/bin/mt.c line 138, 149
- in /usr/src/sys/pdpuba/tm.c line 667

MT_ISTMSCP defined in line 58; used 2 times

- in /usr/src/bin/mt.c line 150
- in /usr/src/sys/pdpuba/tmscp.c line 1472

MT_ISTS defined in line 51; used 3 times

- in /usr/src/bin/mt.c line 136, 147
- in /usr/src/sys/pdpuba/ts.c line 701

MT_ISUT defined in line 55; used 1 times

- in /usr/src/bin/mt.c line 140

#### Usage of this include

mtio.h used 15 times

- in /usr/src/bin/mt.c line 24
- in /usr/src/bin/tar.c line 25
- in /usr/src/new/ansi/ansitape.c line 3
- in /usr/src/new/vmsbackup/vmsbackup.c line 86
- in /usr/src/old/dump/dumpdir.c line 6
- in /usr/src/sbin/dump/dumpdir.c line 6
- in /usr/src/sbin/dump/dumprmt.c line 39
- in /usr/src/sys/pdpstand/maketape.c line 15
- in /usr/src/sys/pdpuba/ht.c line 20
- in /usr/src/sys/pdpuba/tm.c line 22
- in /usr/src/sys/pdpuba/tmscp.c line 259
- in /usr/src/sys/pdpuba/ts.c line 23
- in /usr/src/ucb/tcopy.c line 20
- in /usr/src/usr.lib/libU77/tapeio.c line 25
- in /usr/src/usr.sbin/rmt/rmt.c line 22

Last modified: 1998-03-08 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 655 |