Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _LINUX_MTIO_H |
| 8 | #define _LINUX_MTIO_H |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/ioctl.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | struct mtop { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 12 | short mt_op; |
| 13 | int mt_count; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 14 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define MTRESET 0 |
| 16 | #define MTFSF 1 |
| 17 | #define MTBSF 2 |
| 18 | #define MTFSR 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | #define MTBSR 4 |
| 20 | #define MTWEOF 5 |
| 21 | #define MTREW 6 |
| 22 | #define MTOFFL 7 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define MTNOP 8 |
| 24 | #define MTRETEN 9 |
| 25 | #define MTBSFM 10 |
| 26 | #define MTFSFM 11 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define MTEOM 12 |
| 28 | #define MTERASE 13 |
| 29 | #define MTRAS1 14 |
| 30 | #define MTRAS2 15 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define MTRAS3 16 |
| 32 | #define MTSETBLK 20 |
| 33 | #define MTSETDENSITY 21 |
| 34 | #define MTSEEK 22 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define MTTELL 23 |
| 36 | #define MTSETDRVBUFFER 24 |
| 37 | #define MTFSS 25 |
| 38 | #define MTBSS 26 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define MTWSM 27 |
| 40 | #define MTLOCK 28 |
| 41 | #define MTUNLOCK 29 |
| 42 | #define MTLOAD 30 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define MTUNLOAD 31 |
| 44 | #define MTCOMPRESSION 32 |
| 45 | #define MTSETPART 33 |
| 46 | #define MTMKPART 34 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define MTWEOFI 35 |
| 48 | struct mtget { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 49 | long mt_type; |
| 50 | long mt_resid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | long mt_dsreg; |
| 52 | long mt_gstat; |
| 53 | long mt_erreg; |
| 54 | __kernel_daddr_t mt_fileno; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | __kernel_daddr_t mt_blkno; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | }; |
| 57 | #define MT_ISUNKNOWN 0x01 |
| 58 | #define MT_ISQIC02 0x02 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define MT_ISWT5150 0x03 |
| 60 | #define MT_ISARCHIVE_5945L2 0x04 |
| 61 | #define MT_ISCMSJ500 0x05 |
| 62 | #define MT_ISTDC3610 0x06 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define MT_ISARCHIVE_VP60I 0x07 |
| 64 | #define MT_ISARCHIVE_2150L 0x08 |
| 65 | #define MT_ISARCHIVE_2060L 0x09 |
| 66 | #define MT_ISARCHIVESC499 0x0A |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define MT_ISQIC02_ALL_FEATURES 0x0F |
| 68 | #define MT_ISWT5099EEN24 0x11 |
| 69 | #define MT_ISTEAC_MT2ST 0x12 |
| 70 | #define MT_ISEVEREX_FT40A 0x32 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | #define MT_ISDDS1 0x51 |
| 72 | #define MT_ISDDS2 0x52 |
| 73 | #define MT_ISONSTREAM_SC 0x61 |
| 74 | #define MT_ISSCSI1 0x71 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | #define MT_ISSCSI2 0x72 |
| 76 | #define MT_ISFTAPE_UNKNOWN 0x800000 |
| 77 | #define MT_ISFTAPE_FLAG 0x800000 |
| 78 | struct mtpos { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | long mt_blkno; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | }; |
| 81 | #define MTIOCTOP _IOW('m', 1, struct mtop) |
| 82 | #define MTIOCGET _IOR('m', 2, struct mtget) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | #define MTIOCPOS _IOR('m', 3, struct mtpos) |
| 84 | #define GMT_EOF(x) ((x) & 0x80000000) |
| 85 | #define GMT_BOT(x) ((x) & 0x40000000) |
| 86 | #define GMT_EOT(x) ((x) & 0x20000000) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 87 | #define GMT_SM(x) ((x) & 0x10000000) |
| 88 | #define GMT_EOD(x) ((x) & 0x08000000) |
| 89 | #define GMT_WR_PROT(x) ((x) & 0x04000000) |
| 90 | #define GMT_ONLINE(x) ((x) & 0x01000000) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | #define GMT_D_6250(x) ((x) & 0x00800000) |
| 92 | #define GMT_D_1600(x) ((x) & 0x00400000) |
| 93 | #define GMT_D_800(x) ((x) & 0x00200000) |
| 94 | #define GMT_DR_OPEN(x) ((x) & 0x00040000) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 95 | #define GMT_IM_REP_EN(x) ((x) & 0x00010000) |
| 96 | #define GMT_CLN(x) ((x) & 0x00008000) |
| 97 | #define MT_ST_BLKSIZE_SHIFT 0 |
| 98 | #define MT_ST_BLKSIZE_MASK 0xffffff |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 99 | #define MT_ST_DENSITY_SHIFT 24 |
| 100 | #define MT_ST_DENSITY_MASK 0xff000000 |
| 101 | #define MT_ST_SOFTERR_SHIFT 0 |
| 102 | #define MT_ST_SOFTERR_MASK 0xffff |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | #define MT_ST_OPTIONS 0xf0000000 |
| 104 | #define MT_ST_BOOLEANS 0x10000000 |
| 105 | #define MT_ST_SETBOOLEANS 0x30000000 |
| 106 | #define MT_ST_CLEARBOOLEANS 0x40000000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 107 | #define MT_ST_WRITE_THRESHOLD 0x20000000 |
| 108 | #define MT_ST_DEF_BLKSIZE 0x50000000 |
| 109 | #define MT_ST_DEF_OPTIONS 0x60000000 |
| 110 | #define MT_ST_TIMEOUTS 0x70000000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 111 | #define MT_ST_SET_TIMEOUT (MT_ST_TIMEOUTS | 0x000000) |
| 112 | #define MT_ST_SET_LONG_TIMEOUT (MT_ST_TIMEOUTS | 0x100000) |
| 113 | #define MT_ST_SET_CLN 0x80000000 |
| 114 | #define MT_ST_BUFFER_WRITES 0x1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 115 | #define MT_ST_ASYNC_WRITES 0x2 |
| 116 | #define MT_ST_READ_AHEAD 0x4 |
| 117 | #define MT_ST_DEBUGGING 0x8 |
| 118 | #define MT_ST_TWO_FM 0x10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | #define MT_ST_FAST_MTEOM 0x20 |
| 120 | #define MT_ST_AUTO_LOCK 0x40 |
| 121 | #define MT_ST_DEF_WRITES 0x80 |
| 122 | #define MT_ST_CAN_BSR 0x100 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 123 | #define MT_ST_NO_BLKLIMS 0x200 |
| 124 | #define MT_ST_CAN_PARTITIONS 0x400 |
| 125 | #define MT_ST_SCSI2LOGICAL 0x800 |
| 126 | #define MT_ST_SYSV 0x1000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 127 | #define MT_ST_NOWAIT 0x2000 |
| 128 | #define MT_ST_SILI 0x4000 |
| 129 | #define MT_ST_NOWAIT_EOF 0x8000 |
| 130 | #define MT_ST_CLEAR_DEFAULT 0xfffff |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | #define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000) |
| 132 | #define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000) |
| 133 | #define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000) |
| 134 | #define MT_ST_HPLOADER_OFFSET 10000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 135 | #endif |