Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: mtio.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* linux/mtio.h header file for Linux. Written by H. Bergman
[2] Fix | Delete
*
[3] Fix | Delete
* Modified for special ioctls provided by zftape in September 1997
[4] Fix | Delete
* by C.-J. Heine.
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
#ifndef _LINUX_MTIO_H
[8] Fix | Delete
#define _LINUX_MTIO_H
[9] Fix | Delete
[10] Fix | Delete
#include <linux/types.h>
[11] Fix | Delete
#include <linux/ioctl.h>
[12] Fix | Delete
[13] Fix | Delete
/*
[14] Fix | Delete
* Structures and definitions for mag tape io control commands
[15] Fix | Delete
*/
[16] Fix | Delete
[17] Fix | Delete
/* structure for MTIOCTOP - mag tape op command */
[18] Fix | Delete
struct mtop {
[19] Fix | Delete
short mt_op; /* operations defined below */
[20] Fix | Delete
int mt_count; /* how many of them */
[21] Fix | Delete
};
[22] Fix | Delete
[23] Fix | Delete
/* Magnetic Tape operations [Not all operations supported by all drivers]: */
[24] Fix | Delete
#define MTRESET 0 /* +reset drive in case of problems */
[25] Fix | Delete
#define MTFSF 1 /* forward space over FileMark,
[26] Fix | Delete
* position at first record of next file
[27] Fix | Delete
*/
[28] Fix | Delete
#define MTBSF 2 /* backward space FileMark (position before FM) */
[29] Fix | Delete
#define MTFSR 3 /* forward space record */
[30] Fix | Delete
#define MTBSR 4 /* backward space record */
[31] Fix | Delete
#define MTWEOF 5 /* write an end-of-file record (mark) */
[32] Fix | Delete
#define MTREW 6 /* rewind */
[33] Fix | Delete
#define MTOFFL 7 /* rewind and put the drive offline (eject?) */
[34] Fix | Delete
#define MTNOP 8 /* no op, set status only (read with MTIOCGET) */
[35] Fix | Delete
#define MTRETEN 9 /* retension tape */
[36] Fix | Delete
#define MTBSFM 10 /* +backward space FileMark, position at FM */
[37] Fix | Delete
#define MTFSFM 11 /* +forward space FileMark, position at FM */
[38] Fix | Delete
#define MTEOM 12 /* goto end of recorded media (for appending files).
[39] Fix | Delete
* MTEOM positions after the last FM, ready for
[40] Fix | Delete
* appending another file.
[41] Fix | Delete
*/
[42] Fix | Delete
#define MTERASE 13 /* erase tape -- be careful! */
[43] Fix | Delete
[44] Fix | Delete
#define MTRAS1 14 /* run self test 1 (nondestructive) */
[45] Fix | Delete
#define MTRAS2 15 /* run self test 2 (destructive) */
[46] Fix | Delete
#define MTRAS3 16 /* reserved for self test 3 */
[47] Fix | Delete
[48] Fix | Delete
#define MTSETBLK 20 /* set block length (SCSI) */
[49] Fix | Delete
#define MTSETDENSITY 21 /* set tape density (SCSI) */
[50] Fix | Delete
#define MTSEEK 22 /* seek to block (Tandberg, etc.) */
[51] Fix | Delete
#define MTTELL 23 /* tell block (Tandberg, etc.) */
[52] Fix | Delete
#define MTSETDRVBUFFER 24 /* set the drive buffering according to SCSI-2 */
[53] Fix | Delete
/* ordinary buffered operation with code 1 */
[54] Fix | Delete
#define MTFSS 25 /* space forward over setmarks */
[55] Fix | Delete
#define MTBSS 26 /* space backward over setmarks */
[56] Fix | Delete
#define MTWSM 27 /* write setmarks */
[57] Fix | Delete
[58] Fix | Delete
#define MTLOCK 28 /* lock the drive door */
[59] Fix | Delete
#define MTUNLOCK 29 /* unlock the drive door */
[60] Fix | Delete
#define MTLOAD 30 /* execute the SCSI load command */
[61] Fix | Delete
#define MTUNLOAD 31 /* execute the SCSI unload command */
[62] Fix | Delete
#define MTCOMPRESSION 32/* control compression with SCSI mode page 15 */
[63] Fix | Delete
#define MTSETPART 33 /* Change the active tape partition */
[64] Fix | Delete
#define MTMKPART 34 /* Format the tape with one or two partitions */
[65] Fix | Delete
#define MTWEOFI 35 /* write an end-of-file record (mark) in immediate mode */
[66] Fix | Delete
[67] Fix | Delete
/* structure for MTIOCGET - mag tape get status command */
[68] Fix | Delete
[69] Fix | Delete
struct mtget {
[70] Fix | Delete
long mt_type; /* type of magtape device */
[71] Fix | Delete
long mt_resid; /* residual count: (not sure)
[72] Fix | Delete
* number of bytes ignored, or
[73] Fix | Delete
* number of files not skipped, or
[74] Fix | Delete
* number of records not skipped.
[75] Fix | Delete
*/
[76] Fix | Delete
/* the following registers are device dependent */
[77] Fix | Delete
long mt_dsreg; /* status register */
[78] Fix | Delete
long mt_gstat; /* generic (device independent) status */
[79] Fix | Delete
long mt_erreg; /* error register */
[80] Fix | Delete
/* The next two fields are not always used */
[81] Fix | Delete
__kernel_daddr_t mt_fileno; /* number of current file on tape */
[82] Fix | Delete
__kernel_daddr_t mt_blkno; /* current block number */
[83] Fix | Delete
};
[84] Fix | Delete
[85] Fix | Delete
[86] Fix | Delete
[87] Fix | Delete
/*
[88] Fix | Delete
* Constants for mt_type. Not all of these are supported,
[89] Fix | Delete
* and these are not all of the ones that are supported.
[90] Fix | Delete
*/
[91] Fix | Delete
#define MT_ISUNKNOWN 0x01
[92] Fix | Delete
#define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer */
[93] Fix | Delete
#define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02 */
[94] Fix | Delete
#define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02? */
[95] Fix | Delete
#define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?) */
[96] Fix | Delete
#define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24 */
[97] Fix | Delete
#define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02 */
[98] Fix | Delete
#define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L */
[99] Fix | Delete
#define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L */
[100] Fix | Delete
#define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller */
[101] Fix | Delete
#define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features */
[102] Fix | Delete
#define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24 */
[103] Fix | Delete
#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */
[104] Fix | Delete
#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */
[105] Fix | Delete
#define MT_ISDDS1 0x51 /* DDS device without partitions */
[106] Fix | Delete
#define MT_ISDDS2 0x52 /* DDS device with partitions */
[107] Fix | Delete
#define MT_ISONSTREAM_SC 0x61 /* OnStream SCSI tape drives (SC-x0)
[108] Fix | Delete
and SCSI emulated (DI, DP, USB) */
[109] Fix | Delete
#define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit */
[110] Fix | Delete
#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */
[111] Fix | Delete
[112] Fix | Delete
/* QIC-40/80/3010/3020 ftape supported drives.
[113] Fix | Delete
* 20bit vendor ID + 0x800000 (see ftape-vendors.h)
[114] Fix | Delete
*/
[115] Fix | Delete
#define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */
[116] Fix | Delete
#define MT_ISFTAPE_FLAG 0x800000
[117] Fix | Delete
[118] Fix | Delete
[119] Fix | Delete
/* structure for MTIOCPOS - mag tape get position command */
[120] Fix | Delete
[121] Fix | Delete
struct mtpos {
[122] Fix | Delete
long mt_blkno; /* current block number */
[123] Fix | Delete
};
[124] Fix | Delete
[125] Fix | Delete
[126] Fix | Delete
/* mag tape io control commands */
[127] Fix | Delete
#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */
[128] Fix | Delete
#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
[129] Fix | Delete
#define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */
[130] Fix | Delete
[131] Fix | Delete
[132] Fix | Delete
/* Generic Mag Tape (device independent) status macros for examining
[133] Fix | Delete
* mt_gstat -- HP-UX compatible.
[134] Fix | Delete
* There is room for more generic status bits here, but I don't
[135] Fix | Delete
* know which of them are reserved. At least three or so should
[136] Fix | Delete
* be added to make this really useful.
[137] Fix | Delete
*/
[138] Fix | Delete
#define GMT_EOF(x) ((x) & 0x80000000)
[139] Fix | Delete
#define GMT_BOT(x) ((x) & 0x40000000)
[140] Fix | Delete
#define GMT_EOT(x) ((x) & 0x20000000)
[141] Fix | Delete
#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
[142] Fix | Delete
#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
[143] Fix | Delete
#define GMT_WR_PROT(x) ((x) & 0x04000000)
[144] Fix | Delete
/* #define GMT_ ? ((x) & 0x02000000) */
[145] Fix | Delete
#define GMT_ONLINE(x) ((x) & 0x01000000)
[146] Fix | Delete
#define GMT_D_6250(x) ((x) & 0x00800000)
[147] Fix | Delete
#define GMT_D_1600(x) ((x) & 0x00400000)
[148] Fix | Delete
#define GMT_D_800(x) ((x) & 0x00200000)
[149] Fix | Delete
/* #define GMT_ ? ((x) & 0x00100000) */
[150] Fix | Delete
/* #define GMT_ ? ((x) & 0x00080000) */
[151] Fix | Delete
#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
[152] Fix | Delete
/* #define GMT_ ? ((x) & 0x00020000) */
[153] Fix | Delete
#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
[154] Fix | Delete
#define GMT_CLN(x) ((x) & 0x00008000) /* cleaning requested */
[155] Fix | Delete
/* 15 generic status bits unused */
[156] Fix | Delete
[157] Fix | Delete
[158] Fix | Delete
/* SCSI-tape specific definitions */
[159] Fix | Delete
/* Bitfield shifts in the status */
[160] Fix | Delete
#define MT_ST_BLKSIZE_SHIFT 0
[161] Fix | Delete
#define MT_ST_BLKSIZE_MASK 0xffffff
[162] Fix | Delete
#define MT_ST_DENSITY_SHIFT 24
[163] Fix | Delete
#define MT_ST_DENSITY_MASK 0xff000000
[164] Fix | Delete
[165] Fix | Delete
#define MT_ST_SOFTERR_SHIFT 0
[166] Fix | Delete
#define MT_ST_SOFTERR_MASK 0xffff
[167] Fix | Delete
[168] Fix | Delete
/* Bitfields for the MTSETDRVBUFFER ioctl */
[169] Fix | Delete
#define MT_ST_OPTIONS 0xf0000000
[170] Fix | Delete
#define MT_ST_BOOLEANS 0x10000000
[171] Fix | Delete
#define MT_ST_SETBOOLEANS 0x30000000
[172] Fix | Delete
#define MT_ST_CLEARBOOLEANS 0x40000000
[173] Fix | Delete
#define MT_ST_WRITE_THRESHOLD 0x20000000
[174] Fix | Delete
#define MT_ST_DEF_BLKSIZE 0x50000000
[175] Fix | Delete
#define MT_ST_DEF_OPTIONS 0x60000000
[176] Fix | Delete
#define MT_ST_TIMEOUTS 0x70000000
[177] Fix | Delete
#define MT_ST_SET_TIMEOUT (MT_ST_TIMEOUTS | 0x000000)
[178] Fix | Delete
#define MT_ST_SET_LONG_TIMEOUT (MT_ST_TIMEOUTS | 0x100000)
[179] Fix | Delete
#define MT_ST_SET_CLN 0x80000000
[180] Fix | Delete
[181] Fix | Delete
#define MT_ST_BUFFER_WRITES 0x1
[182] Fix | Delete
#define MT_ST_ASYNC_WRITES 0x2
[183] Fix | Delete
#define MT_ST_READ_AHEAD 0x4
[184] Fix | Delete
#define MT_ST_DEBUGGING 0x8
[185] Fix | Delete
#define MT_ST_TWO_FM 0x10
[186] Fix | Delete
#define MT_ST_FAST_MTEOM 0x20
[187] Fix | Delete
#define MT_ST_AUTO_LOCK 0x40
[188] Fix | Delete
#define MT_ST_DEF_WRITES 0x80
[189] Fix | Delete
#define MT_ST_CAN_BSR 0x100
[190] Fix | Delete
#define MT_ST_NO_BLKLIMS 0x200
[191] Fix | Delete
#define MT_ST_CAN_PARTITIONS 0x400
[192] Fix | Delete
#define MT_ST_SCSI2LOGICAL 0x800
[193] Fix | Delete
#define MT_ST_SYSV 0x1000
[194] Fix | Delete
#define MT_ST_NOWAIT 0x2000
[195] Fix | Delete
#define MT_ST_SILI 0x4000
[196] Fix | Delete
#define MT_ST_NOWAIT_EOF 0x8000
[197] Fix | Delete
[198] Fix | Delete
/* The mode parameters to be controlled. Parameter chosen with bits 20-28 */
[199] Fix | Delete
#define MT_ST_CLEAR_DEFAULT 0xfffff
[200] Fix | Delete
#define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000)
[201] Fix | Delete
#define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000)
[202] Fix | Delete
#define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000)
[203] Fix | Delete
[204] Fix | Delete
/* The offset for the arguments for the special HP changer load command. */
[205] Fix | Delete
#define MT_ST_HPLOADER_OFFSET 10000
[206] Fix | Delete
[207] Fix | Delete
#endif /* _LINUX_MTIO_H */
[208] Fix | Delete
[209] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function