Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2009, 2010 Jeff Mahoney <jeffm@suse.com> |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * 1. Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * 2. Redistributions in binary form must reproduce the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer in the |
| 12 | * documentation and/or other materials provided with the distribution. |
| 13 | * 3. The name of the author may not be used to endorse or promote products |
| 14 | * derived from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 17 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 18 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 19 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 22 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 23 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #include "defs.h" |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 29 | #include <linux/blkpg.h> |
| 30 | #include <linux/fs.h> |
| 31 | #include <linux/hdreg.h> |
| 32 | |
| 33 | /* ioctls <= 114 are present in Linux 2.4. The following ones have been |
| 34 | * added since then and headers containing them may not be available on |
| 35 | * every system. */ |
| 36 | |
| 37 | #define BLKTRACE_BDEV_SIZE 32 |
| 38 | struct blk_user_trace_setup { |
| 39 | char name[BLKTRACE_BDEV_SIZE]; /* output */ |
| 40 | uint16_t act_mask; /* input */ |
| 41 | uint32_t buf_size; /* input */ |
| 42 | uint32_t buf_nr; /* input */ |
| 43 | uint64_t start_lba; |
| 44 | uint64_t end_lba; |
| 45 | uint32_t pid; |
| 46 | }; |
| 47 | |
| 48 | #ifndef BLKTRACESETUP |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 49 | # define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 50 | #endif |
| 51 | #ifndef BLKTRACESTART |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 52 | # define BLKTRACESTART _IO(0x12,116) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 53 | #endif |
Dmitry V. Levin | 4cee0af | 2011-04-07 19:58:10 +0000 | [diff] [blame] | 54 | #ifndef BLKTRACESTOP |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 55 | # define BLKTRACESTOP _IO(0x12,117) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 56 | #endif |
| 57 | #ifndef BLKTRACETEARDOWN |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 58 | # define BLKTRACETEARDOWN _IO(0x12,118) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 59 | #endif |
| 60 | #ifndef BLKDISCARD |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 61 | # define BLKDISCARD _IO(0x12,119) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 62 | #endif |
| 63 | #ifndef BLKIOMIN |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 64 | # define BLKIOMIN _IO(0x12,120) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 65 | #endif |
| 66 | #ifndef BLKIOOPT |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 67 | # define BLKIOOPT _IO(0x12,121) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 68 | #endif |
| 69 | #ifndef BLKALIGNOFF |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 70 | # define BLKALIGNOFF _IO(0x12,122) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 71 | #endif |
| 72 | #ifndef BLKPBSZGET |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 73 | # define BLKPBSZGET _IO(0x12,123) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 74 | #endif |
| 75 | #ifndef BLKDISCARDZEROES |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 76 | # define BLKDISCARDZEROES _IO(0x12,124) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 77 | #endif |
| 78 | #ifndef BLKSECDISCARD |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 79 | # define BLKSECDISCARD _IO(0x12,125) |
| 80 | #endif |
| 81 | #ifndef BLKROTATIONAL |
| 82 | # define BLKROTATIONAL _IO(0x12,126) |
| 83 | #endif |
| 84 | #ifndef BLKZEROOUT |
| 85 | # define BLKZEROOUT _IO(0x12,127) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 86 | #endif |
| 87 | |
Dmitry V. Levin | 0ed617b | 2014-04-25 23:30:54 +0000 | [diff] [blame] | 88 | #include "xlat/blkpg_ops.h" |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 89 | |
| 90 | static void |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 91 | print_blkpg_req(struct tcb *tcp, const struct blkpg_ioctl_arg *blkpg) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 92 | { |
| 93 | struct blkpg_partition p; |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 94 | |
Denys Vlasenko | 60fe8c1 | 2011-09-01 10:00:28 +0200 | [diff] [blame] | 95 | tprints("{"); |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 96 | printxval(blkpg_ops, blkpg->op, "BLKPG_???"); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 97 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 98 | tprintf(", flags=%d, datalen=%d, data=", |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 99 | blkpg->flags, blkpg->datalen); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 100 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 101 | if (!umove_or_printaddr(tcp, (long) blkpg->data, &p)) { |
Dmitry V. Levin | 0a87058 | 2015-01-25 01:04:01 +0000 | [diff] [blame] | 102 | tprintf("{start=%lld, length=%lld, pno=%d, devname=", |
| 103 | p.start, p.length, p.pno); |
| 104 | print_quoted_string(p.devname, sizeof(p.devname), |
| 105 | QUOTE_0_TERMINATED); |
| 106 | tprints(", volname="); |
| 107 | print_quoted_string(p.volname, sizeof(p.volname), |
| 108 | QUOTE_0_TERMINATED); |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 109 | tprints("}"); |
Dmitry V. Levin | 0a87058 | 2015-01-25 01:04:01 +0000 | [diff] [blame] | 110 | } |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 111 | tprints("}"); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | int |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 115 | block_ioctl(struct tcb *tcp, const unsigned int code, const long arg) |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 116 | { |
| 117 | switch (code) { |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 118 | /* take arg as a value, not as a pointer */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 119 | case BLKRASET: |
| 120 | case BLKFRASET: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 121 | tprintf(", %lu", arg); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 122 | break; |
| 123 | |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 124 | /* take a signed int */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 125 | case BLKROSET: |
| 126 | case BLKBSZSET: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 127 | tprints(", "); |
| 128 | printnum_int(tcp, arg, "%d"); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 129 | break; |
| 130 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 131 | /* return an unsigned short */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 132 | case BLKSECTGET: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 133 | case BLKROTATIONAL: |
| 134 | if (entering(tcp)) |
| 135 | return 0; |
| 136 | tprints(", "); |
| 137 | printnum_short(tcp, arg, "%hu"); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 138 | break; |
| 139 | |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 140 | /* return a signed int */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 141 | case BLKROGET: |
| 142 | case BLKBSZGET: |
| 143 | case BLKSSZGET: |
| 144 | case BLKALIGNOFF: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 145 | if (entering(tcp)) |
| 146 | return 0; |
| 147 | tprints(", "); |
| 148 | printnum_int(tcp, arg, "%d"); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 149 | break; |
| 150 | |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 151 | /* return an unsigned int */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 152 | case BLKPBSZGET: |
| 153 | case BLKIOMIN: |
| 154 | case BLKIOOPT: |
| 155 | case BLKDISCARDZEROES: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 156 | if (entering(tcp)) |
| 157 | return 0; |
| 158 | tprints(", "); |
| 159 | printnum_int(tcp, arg, "%u"); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 160 | break; |
| 161 | |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 162 | /* return a signed long */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 163 | case BLKRAGET: |
| 164 | case BLKFRAGET: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 165 | if (entering(tcp)) |
| 166 | return 0; |
| 167 | tprints(", "); |
Dmitry V. Levin | 2479ef0 | 2015-08-18 14:58:27 +0000 | [diff] [blame] | 168 | printnum_slong(tcp, arg); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 169 | break; |
| 170 | |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 171 | /* returns an unsigned long */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 172 | case BLKGETSIZE: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 173 | if (entering(tcp)) |
| 174 | return 0; |
| 175 | tprints(", "); |
Dmitry V. Levin | 2479ef0 | 2015-08-18 14:58:27 +0000 | [diff] [blame] | 176 | printnum_ulong(tcp, arg); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 177 | break; |
| 178 | |
Dmitry V. Levin | 25caa31 | 2011-08-16 21:36:16 +0000 | [diff] [blame] | 179 | #ifdef HAVE_BLKGETSIZE64 |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 180 | /* returns an uint64_t */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 181 | case BLKGETSIZE64: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 182 | if (entering(tcp)) |
| 183 | return 0; |
| 184 | tprints(", "); |
| 185 | printnum_int64(tcp, arg, "%" PRIu64); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 186 | break; |
Denys Vlasenko | 5bd67c8 | 2011-08-15 11:36:09 +0200 | [diff] [blame] | 187 | #endif |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 188 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 189 | /* takes a pair of uint64_t */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 190 | case BLKDISCARD: |
| 191 | case BLKSECDISCARD: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 192 | case BLKZEROOUT: |
| 193 | tprints(", "); |
| 194 | printpair_int64(tcp, arg, "%" PRIx64); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 195 | break; |
| 196 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 197 | /* More complex types */ |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 198 | case HDIO_GETGEO: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 199 | if (entering(tcp)) |
| 200 | return 0; |
| 201 | else { |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 202 | struct hd_geometry geo; |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 203 | |
| 204 | tprints(", "); |
| 205 | if (!umove_or_printaddr(tcp, arg, &geo)) |
| 206 | tprintf("{heads=%u, sectors=%u, " |
Denys Vlasenko | 61d62cf | 2012-04-16 18:12:27 +0200 | [diff] [blame] | 207 | "cylinders=%u, start=%lu}", |
| 208 | (unsigned)geo.heads, |
| 209 | (unsigned)geo.sectors, |
| 210 | (unsigned)geo.cylinders, |
| 211 | geo.start); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 212 | } |
| 213 | break; |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 214 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 215 | case BLKPG: { |
| 216 | struct blkpg_ioctl_arg blkpg; |
| 217 | |
| 218 | tprints(", "); |
| 219 | if (!umove_or_printaddr(tcp, arg, &blkpg)) |
| 220 | print_blkpg_req(tcp, &blkpg); |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 221 | break; |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 222 | } |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 223 | |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 224 | case BLKTRACESETUP: |
| 225 | if (entering(tcp)) { |
| 226 | struct blk_user_trace_setup buts; |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 227 | |
| 228 | tprints(", "); |
| 229 | if (umove_or_printaddr(tcp, arg, &buts)) |
| 230 | break; |
| 231 | tprintf("{act_mask=%u, buf_size=%u, " |
| 232 | "buf_nr=%u, start_lba=%" PRIu64 ", " |
| 233 | "end_lba=%" PRIu64 ", pid=%u", |
| 234 | (unsigned)buts.act_mask, buts.buf_size, |
| 235 | buts.buf_nr, buts.start_lba, |
| 236 | buts.end_lba, buts.pid); |
| 237 | return 1; |
| 238 | } else { |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 239 | struct blk_user_trace_setup buts; |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 240 | |
| 241 | if (syserror(tcp)) { |
Dmitry V. Levin | 0a87058 | 2015-01-25 01:04:01 +0000 | [diff] [blame] | 242 | tprints("}"); |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 243 | break; |
Dmitry V. Levin | 0a87058 | 2015-01-25 01:04:01 +0000 | [diff] [blame] | 244 | } |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 245 | tprints(", "); |
| 246 | if (umove(tcp, arg, &buts) < 0) { |
| 247 | tprints("???}"); |
| 248 | break; |
| 249 | } |
| 250 | tprints(", name="); |
| 251 | print_quoted_string(buts.name, sizeof(buts.name), |
| 252 | QUOTE_0_TERMINATED); |
| 253 | tprints("}"); |
| 254 | break; |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 255 | } |
Dmitry V. Levin | be284ca | 2011-01-16 23:07:51 +0000 | [diff] [blame] | 256 | |
Mike Frysinger | 5b88608 | 2014-11-21 16:13:16 -0500 | [diff] [blame] | 257 | #ifdef FITRIM |
| 258 | /* First seen in linux-2.6.37 */ |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 259 | case FITRIM: { |
| 260 | struct fstrim_range fstrim; |
| 261 | |
| 262 | tprints(", "); |
| 263 | if (!umove_or_printaddr(tcp, arg, &fstrim)) |
| 264 | tprintf("{start=%#" PRIx64 ", " |
| 265 | "len=%#" PRIx64 ", " |
| 266 | "minlen=%#" PRIx64 "}", |
| 267 | (uint64_t) fstrim.start, |
| 268 | (uint64_t) fstrim.len, |
| 269 | (uint64_t) fstrim.minlen); |
Mike Frysinger | 5b88608 | 2014-11-21 16:13:16 -0500 | [diff] [blame] | 270 | break; |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 271 | } |
Mike Frysinger | 5b88608 | 2014-11-21 16:13:16 -0500 | [diff] [blame] | 272 | #endif |
| 273 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 274 | /* No arguments */ |
| 275 | case BLKRRPART: |
| 276 | case BLKFLSBUF: |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 277 | case BLKTRACESTART: |
| 278 | case BLKTRACESTOP: |
| 279 | case BLKTRACETEARDOWN: |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 280 | #ifdef FIFREEZE |
| 281 | case FIFREEZE: |
| 282 | case FITHAW: |
| 283 | #endif |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 284 | break; |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 285 | default: |
| 286 | return RVAL_DECODED; |
| 287 | } |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 288 | |
Dmitry V. Levin | a0beac1 | 2015-07-05 15:15:03 +0300 | [diff] [blame] | 289 | return RVAL_DECODED | 1; |
Dmitry V. Levin | 4ef6db4 | 2011-01-15 20:15:31 +0000 | [diff] [blame] | 290 | } |