Annotation of researchv10dc/man/man4/mt.4, revision 1.1

1.1     ! root        1: .TH MT 4
        !             2: .CT 2 comm_mach
        !             3: .SH NAME
        !             4: mt \- magtape interface
        !             5: .SH SYNOPSIS
        !             6: .B #include <sys/types.h>
        !             7: .br
        !             8: .B #include <sys/mtio.h>
        !             9: .SH DESCRIPTION
        !            10: The 
        !            11: .I rmt
        !            12: files refer to magnetic tape drives.
        !            13: Filenames beginning with
        !            14: .L rmt
        !            15: are rewound when closed;
        !            16: those beginning with
        !            17: .L nrmt
        !            18: are not.
        !            19: When a file open for writing is closed, two file marks are written.
        !            20: If the tape is not to be rewound,
        !            21: it is positioned with the head between the two
        !            22: file marks.
        !            23: .PP
        !            24: Conventionally 
        !            25: .B rmt0
        !            26: is 800,
        !            27: .B rmt1
        !            28: is 1600,
        !            29: and
        !            30: .B rmt2
        !            31: is 6250 bpi.
        !            32: .PP
        !            33: Each
        !            34: .IR read (2)
        !            35: or
        !            36: .IR write
        !            37: call reads or writes the next record on the tape.
        !            38: .I Read
        !            39: returns at most a single record;
        !            40: the return value is the record size.
        !            41: If the next record is larger than the read buffer,
        !            42: an error is returned.
        !            43: A file mark causes
        !            44: .I read
        !            45: to return 0;
        !            46: the next
        !            47: .I read
        !            48: will return the next record.
        !            49: Seeks are ignored.
        !            50: .PP
        !            51: An
        !            52: .IR ioctl (2)
        !            53: call performs special operations:
        !            54: .TF MTIOCEEOT
        !            55: .TP
        !            56: .B MTIOCTOP
        !            57: perform a suboperation encoded as below in the
        !            58: .B mt_op
        !            59: field of a structure whose address is passed
        !            60: as the third argument of
        !            61: .I ioctl.
        !            62: .IP
        !            63: .EX
        !            64: .ta \w'struct 'u +\w'daddr_t 'u +\w'mt_count;  'u
        !            65: struct mtop {
        !            66:        short   mt_op;          /* operation */
        !            67:        daddr_t mt_count;       /* repeat count */
        !            68: };
        !            69: .EE
        !            70: .PD0
        !            71: .RS
        !            72: .TF MTOFFL
        !            73: .TP
        !            74: .B MTWEOF
        !            75: write an end-of-file record
        !            76: .TP
        !            77: .B MTFSF
        !            78: forward space file
        !            79: .TP
        !            80: .B MTBSF
        !            81: backward space file
        !            82: .TP
        !            83: .B MTFSR
        !            84: forward space record
        !            85: .TP
        !            86: .B MTBSR
        !            87: backward space record
        !            88: .TP
        !            89: .B MTREW
        !            90: rewind
        !            91: .TP
        !            92: .B MTOFFL
        !            93: rewind and put the drive offline
        !            94: .RE
        !            95: .PD
        !            96: .PP
        !            97: The files described above provide a `raw' interface.
        !            98: There is also a `block' interface which attempts to treat the tape
        !            99: like an ordinary file as much as possible.
        !           100: Block tapes are accessed through files with names beginning with
        !           101: .L mt
        !           102: or
        !           103: .LR nmt .
        !           104: Such a tape contains a single file,
        !           105: consisting of a series of 1024-byte records
        !           106: followed by a file mark.
        !           107: Seeks have their usual meaning,
        !           108: and it is possible to read and write a byte at a time,
        !           109: though writing in very small units may create enormous record gaps.
        !           110: The file always ends at the most recently written byte.
        !           111: .PP
        !           112: Conventions for minor device numbers
        !           113: vary among different hardware drivers:
        !           114: .IP ""
        !           115: For the TU78,
        !           116: the drive unit number
        !           117: is encoded in the two low-order bits.
        !           118: Adding 4 prevents the tape from rewinding at close time.
        !           119: Adding 8 selects 6250 bpi for writing;
        !           120: the default is 1600.
        !           121: The tape drive senses density automatically when reading.
        !           122: .IP
        !           123: The TE16 is like the TU78,
        !           124: except that the default density is 800 bpi,
        !           125: and adding 8 to the device number selects 1600.
        !           126: .IP
        !           127: For TMSCP tape drives such as the TU81 and the TK50,
        !           128: the unit number is encoded in the three low-order bits.
        !           129: Adding 128 prevents the tape from rewinding on close.
        !           130: Density is selected by octal bits 070;
        !           131: the eight possible values represent
        !           132: eight different device-dependent tape formats.
        !           133: For 9-track tape drives,
        !           134: add 0 for 800 bpi,
        !           135: 8 for 1600,
        !           136: 16 for 6250.
        !           137: For TK50 cartridge drives,
        !           138: add 24 (old-style block format).
        !           139: For TK70 drives,
        !           140: add 8.
        !           141: The tape drives sense density automatically on reading,
        !           142: but if a drive
        !           143: doesn't support a particular density,
        !           144: the hardware may complain when the device is opened.
        !           145: .SH FILES
        !           146: .F /dev/mt?
        !           147: .br
        !           148: .F /dev/rmt?
        !           149: .br
        !           150: .F /dev/nmt?
        !           151: .br
        !           152: .F /dev/nrmt?
        !           153: .SH "SEE ALSO"
        !           154: .IR tape (1)
        !           155: .SH BUGS
        !           156: If any non-data error is encountered,
        !           157: the tape drivers generally refuse to do anything
        !           158: more until closed.
        !           159: .br
        !           160: The naming convention behaves poorly with multiple tape drives.
        !           161: .br
        !           162: Block tape has probably outlived its usefulness.

unix.superglobalmegacorp.com

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