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