Dmitry V. Levin | 27aeaa2 | 2012-03-16 10:43:32 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2007 Vladimir Nadvornik <nadvornik@suse.cz> |
| 3 | * Copyright (c) 2007 Dmitry V. Levin <ldv@altlinux.org> |
| 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 | |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 29 | #include "defs.h" |
Dmitry V. Levin | fdb896e | 2014-02-25 23:04:55 +0000 | [diff] [blame] | 30 | |
| 31 | #ifdef HAVE_SCSI_SG_H |
| 32 | |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 33 | # include <linux/ioctl.h> |
Dmitry V. Levin | fdb896e | 2014-02-25 23:04:55 +0000 | [diff] [blame] | 34 | # include <scsi/sg.h> |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 35 | |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 36 | # include "xlat/sg_io_dxfer_direction.h" |
| 37 | |
| 38 | # ifdef HAVE_LINUX_BSG_H |
| 39 | # include <linux/bsg.h> |
| 40 | # include <sys/uio.h> |
| 41 | # include "xlat/bsg_protocol.h" |
| 42 | # include "xlat/bsg_subprotocol.h" |
| 43 | # endif |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 44 | |
| 45 | static void |
Bart Van Assche | c760251 | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 46 | print_sg_io_buffer(struct tcb *tcp, unsigned long addr, const unsigned int len) |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 47 | { |
| 48 | unsigned char *buf = NULL; |
Dmitry V. Levin | 3ed5d02 | 2014-09-10 13:46:04 +0000 | [diff] [blame] | 49 | unsigned int allocated, i; |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 50 | |
Bart Van Assche | ea6972c | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 51 | tprints("["); |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 52 | if (len == 0) |
Bart Van Assche | ea6972c | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 53 | goto out; |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 54 | allocated = (len > max_strlen) ? max_strlen : len; |
Dmitry V. Levin | 8277ec9 | 2015-07-17 16:00:18 +0000 | [diff] [blame] | 55 | buf = malloc(allocated); |
| 56 | if (!buf || umoven(tcp, addr, allocated, buf) < 0) { |
| 57 | printaddr(addr); |
Bart Van Assche | ea6972c | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 58 | goto out; |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 59 | } |
| 60 | tprintf("%02x", buf[0]); |
| 61 | for (i = 1; i < allocated; ++i) |
| 62 | tprintf(", %02x", buf[i]); |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 63 | if (allocated != len) |
Denys Vlasenko | 60fe8c1 | 2011-09-01 10:00:28 +0200 | [diff] [blame] | 64 | tprints(", ..."); |
Bart Van Assche | ea6972c | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 65 | out: |
| 66 | free(buf); |
| 67 | tprints("]"); |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 68 | } |
| 69 | |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 70 | static int |
| 71 | print_sg_io_v3_req(struct tcb *tcp, const long arg) |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 72 | { |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 73 | struct sg_io_hdr sg_io; |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 74 | |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 75 | if (umove(tcp, arg, &sg_io) < 0) { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 76 | tprints("???}"); |
| 77 | return RVAL_DECODED | 1; |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 78 | } |
| 79 | |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 80 | printxval(sg_io_dxfer_direction, sg_io.dxfer_direction, |
| 81 | "SG_DXFER_???"); |
| 82 | tprintf(", cmd[%u]=", sg_io.cmd_len); |
| 83 | print_sg_io_buffer(tcp, (unsigned long) sg_io.cmdp, sg_io.cmd_len); |
| 84 | tprintf(", mx_sb_len=%d", sg_io.mx_sb_len); |
| 85 | tprintf(", iovec_count=%d", sg_io.iovec_count); |
| 86 | tprintf(", dxfer_len=%u", sg_io.dxfer_len); |
| 87 | tprintf(", timeout=%u", sg_io.timeout); |
| 88 | tprintf(", flags=%#x", sg_io.flags); |
| 89 | |
| 90 | if (sg_io.dxfer_direction == SG_DXFER_TO_DEV || |
| 91 | sg_io.dxfer_direction == SG_DXFER_TO_FROM_DEV) { |
| 92 | tprintf(", data[%u]=", sg_io.dxfer_len); |
| 93 | if (sg_io.iovec_count) |
| 94 | tprint_iov_upto(tcp, sg_io.iovec_count, |
| 95 | (unsigned long) sg_io.dxferp, 1, |
| 96 | sg_io.dxfer_len); |
Bart Van Assche | 791145e | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 97 | else |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 98 | print_sg_io_buffer(tcp, (unsigned long) sg_io.dxferp, |
| 99 | sg_io.dxfer_len); |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 100 | } |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 101 | return 1; |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 102 | } |
| 103 | |
| 104 | static void |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 105 | print_sg_io_v3_res(struct tcb *tcp, const long arg) |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 106 | { |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 107 | struct sg_io_hdr sg_io; |
Bart Van Assche | 0014bb1 | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 108 | |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 109 | if (umove(tcp, arg, &sg_io) < 0) { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 110 | tprints(", ???"); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 111 | return; |
| 112 | } |
| 113 | |
| 114 | if (sg_io.dxfer_direction == SG_DXFER_FROM_DEV || |
| 115 | sg_io.dxfer_direction == SG_DXFER_TO_FROM_DEV) { |
| 116 | uint32_t din_len = sg_io.dxfer_len; |
| 117 | |
| 118 | if (sg_io.resid > 0) |
| 119 | din_len -= sg_io.resid; |
Bart Van Assche | 791145e | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 120 | tprintf(", data[%u]=", din_len); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 121 | if (sg_io.iovec_count) |
| 122 | tprint_iov_upto(tcp, sg_io.iovec_count, |
| 123 | (unsigned long) sg_io.dxferp, 1, |
Bart Van Assche | 791145e | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 124 | din_len); |
| 125 | else |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 126 | print_sg_io_buffer(tcp, (unsigned long) sg_io.dxferp, |
Bart Van Assche | 791145e | 2015-02-06 13:36:26 +0100 | [diff] [blame] | 127 | din_len); |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 128 | } |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 129 | tprintf(", status=%02x", sg_io.status); |
| 130 | tprintf(", masked_status=%02x", sg_io.masked_status); |
| 131 | tprintf(", sb[%u]=", sg_io.sb_len_wr); |
| 132 | print_sg_io_buffer(tcp, (unsigned long) sg_io.sbp, sg_io.sb_len_wr); |
| 133 | tprintf(", host_status=%#x", sg_io.host_status); |
| 134 | tprintf(", driver_status=%#x", sg_io.driver_status); |
| 135 | tprintf(", resid=%d", sg_io.resid); |
| 136 | tprintf(", duration=%d", sg_io.duration); |
| 137 | tprintf(", info=%#x", sg_io.info); |
| 138 | } |
| 139 | |
| 140 | #ifdef HAVE_LINUX_BSG_H |
| 141 | |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 142 | static int |
| 143 | print_sg_io_v4_req(struct tcb *tcp, const long arg) |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 144 | { |
| 145 | struct sg_io_v4 sg_io; |
| 146 | |
| 147 | if (umove(tcp, arg, &sg_io) < 0) { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 148 | tprints("???}"); |
| 149 | return RVAL_DECODED | 1; |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 150 | } |
| 151 | |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 152 | printxval(bsg_protocol, sg_io.protocol, "BSG_PROTOCOL_???"); |
| 153 | tprints(", "); |
| 154 | printxval(bsg_subprotocol, sg_io.subprotocol, "BSG_SUB_PROTOCOL_???"); |
| 155 | tprintf(", request[%u]=", sg_io.request_len); |
| 156 | print_sg_io_buffer(tcp, sg_io.request, sg_io.request_len); |
Dmitry V. Levin | d67ba3e | 2015-02-23 21:35:20 +0000 | [diff] [blame] | 157 | tprintf(", request_tag=%llu", (unsigned long long) sg_io.request_tag); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 158 | tprintf(", request_attr=%u", sg_io.request_attr); |
| 159 | tprintf(", request_priority=%u", sg_io.request_priority); |
| 160 | tprintf(", request_extra=%u", sg_io.request_extra); |
| 161 | tprintf(", max_response_len=%u", sg_io.max_response_len); |
| 162 | |
| 163 | tprintf(", dout_iovec_count=%u", sg_io.dout_iovec_count); |
| 164 | tprintf(", dout_xfer_len=%u", sg_io.dout_xfer_len); |
| 165 | tprintf(", din_iovec_count=%u", sg_io.din_iovec_count); |
| 166 | tprintf(", din_xfer_len=%u", sg_io.din_xfer_len); |
| 167 | tprintf(", timeout=%u", sg_io.timeout); |
| 168 | tprintf(", flags=%u", sg_io.flags); |
Dmitry V. Levin | d67ba3e | 2015-02-23 21:35:20 +0000 | [diff] [blame] | 169 | tprintf(", usr_ptr=%llu", (unsigned long long) sg_io.usr_ptr); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 170 | tprintf(", spare_in=%u", sg_io.spare_in); |
| 171 | tprintf(", dout[%u]=", sg_io.dout_xfer_len); |
| 172 | if (sg_io.dout_iovec_count) |
| 173 | tprint_iov_upto(tcp, sg_io.dout_iovec_count, sg_io.dout_xferp, |
| 174 | 1, sg_io.dout_xfer_len); |
| 175 | else |
| 176 | print_sg_io_buffer(tcp, sg_io.dout_xferp, sg_io.dout_xfer_len); |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 177 | return 1; |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 178 | } |
| 179 | |
| 180 | static void |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 181 | print_sg_io_v4_res(struct tcb *tcp, const long arg) |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 182 | { |
| 183 | struct sg_io_v4 sg_io; |
| 184 | uint32_t din_len; |
| 185 | |
| 186 | if (umove(tcp, arg, &sg_io) < 0) { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 187 | tprints(", ???"); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 188 | return; |
| 189 | } |
| 190 | |
| 191 | tprintf(", response[%u]=", sg_io.response_len); |
| 192 | print_sg_io_buffer(tcp, sg_io.response, sg_io.response_len); |
| 193 | din_len = sg_io.din_xfer_len; |
| 194 | if (sg_io.din_resid > 0) |
| 195 | din_len -= sg_io.din_resid; |
| 196 | tprintf(", din[%u]=", din_len); |
| 197 | if (sg_io.din_iovec_count) |
| 198 | tprint_iov_upto(tcp, sg_io.din_iovec_count, sg_io.din_xferp, |
| 199 | 1, din_len); |
| 200 | else |
| 201 | print_sg_io_buffer(tcp, sg_io.din_xferp, din_len); |
| 202 | tprintf(", driver_status=%u", sg_io.driver_status); |
| 203 | tprintf(", transport_status=%u", sg_io.transport_status); |
| 204 | tprintf(", device_status=%u", sg_io.device_status); |
| 205 | tprintf(", retry_delay=%u", sg_io.retry_delay); |
| 206 | tprintf(", info=%u", sg_io.info); |
| 207 | tprintf(", duration=%u", sg_io.duration); |
| 208 | tprintf(", response_len=%u", sg_io.response_len); |
| 209 | tprintf(", din_resid=%u", sg_io.din_resid); |
| 210 | tprintf(", dout_resid=%u", sg_io.dout_resid); |
Dmitry V. Levin | d67ba3e | 2015-02-23 21:35:20 +0000 | [diff] [blame] | 211 | tprintf(", generated_tag=%llu", (unsigned long long) sg_io.generated_tag); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 212 | tprintf(", spare_out=%u", sg_io.spare_out); |
| 213 | } |
| 214 | |
| 215 | #else /* !HAVE_LINUX_BSG_H */ |
| 216 | |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 217 | static int |
| 218 | print_sg_io_v4_req(struct tcb *tcp, const long arg) |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 219 | { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 220 | tprints("...}"); |
| 221 | return RVAL_DECODED | 1; |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | static void |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 225 | print_sg_io_v4_res(struct tcb *tcp, const long arg) |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 226 | { |
| 227 | } |
| 228 | |
| 229 | #endif |
| 230 | |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 231 | static int |
| 232 | print_sg_io_req(struct tcb *tcp, uint32_t iid, const long arg) |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 233 | { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 234 | tprintf("{'%c', ", iid); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 235 | |
| 236 | switch (iid) { |
| 237 | case 'S': |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 238 | return print_sg_io_v3_req(tcp, arg); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 239 | case 'Q': |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 240 | return print_sg_io_v4_req(tcp, arg); |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 241 | default: |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 242 | tprints("...}"); |
| 243 | return RVAL_DECODED | 1; |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 244 | } |
| 245 | |
| 246 | } |
| 247 | |
| 248 | static void |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 249 | print_sg_io_res(struct tcb *tcp, uint32_t iid, const long arg) |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 250 | { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 251 | switch (iid) { |
| 252 | case 'S': |
| 253 | print_sg_io_v3_res(tcp, arg); |
| 254 | break; |
| 255 | case 'Q': |
| 256 | print_sg_io_v4_res(tcp, arg); |
| 257 | break; |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 258 | } |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 259 | } |
| 260 | |
| 261 | int |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 262 | scsi_ioctl(struct tcb *tcp, const unsigned int code, const long arg) |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 263 | { |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 264 | uint32_t iid; |
| 265 | |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 266 | if (SG_IO != code) |
| 267 | return RVAL_DECODED; |
| 268 | |
| 269 | if (entering(tcp)) { |
| 270 | tprints(", "); |
| 271 | if (!arg || umove(tcp, arg, &iid) < 0) { |
| 272 | printaddr(arg); |
| 273 | return RVAL_DECODED | 1; |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 274 | } else { |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 275 | return print_sg_io_req(tcp, iid, arg); |
| 276 | } |
| 277 | } else { |
| 278 | if (!syserror(tcp)) { |
| 279 | if (umove(tcp, arg, &iid) < 0) |
| 280 | tprints(", ???"); |
| 281 | else |
Bart Van Assche | 67d0a8e | 2015-02-06 13:37:03 +0100 | [diff] [blame] | 282 | print_sg_io_res(tcp, iid, arg); |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 283 | } |
Dmitry V. Levin | 3d0e1f3 | 2015-07-07 21:38:07 +0300 | [diff] [blame] | 284 | tprintf("}"); |
| 285 | return RVAL_DECODED | 1; |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 286 | } |
Dmitry V. Levin | b011af5 | 2007-06-30 11:37:09 +0000 | [diff] [blame] | 287 | } |
Dmitry V. Levin | fdb896e | 2014-02-25 23:04:55 +0000 | [diff] [blame] | 288 | |
| 289 | #endif /* HAVE_SCSI_SG_H */ |