printxval(sg_io_dxfer_direction, sg_io.dxfer_direction,
"SG_DXFER_???");
tprintf(", cmd[%u]=", sg_io.cmd_len);
- print_sg_io_buffer(tcp, (unsigned long) sg_io.cmdp, sg_io.cmd_len);
+ print_sg_io_buffer(tcp, (kernel_ureg_t) sg_io.cmdp, sg_io.cmd_len);
tprintf(", mx_sb_len=%d", sg_io.mx_sb_len);
tprintf(", iovec_count=%d", sg_io.iovec_count);
tprintf(", dxfer_len=%u", sg_io.dxfer_len);
tprintf(", data[%u]=", sg_io.dxfer_len);
if (sg_io.iovec_count)
tprint_iov_upto(tcp, sg_io.iovec_count,
- (unsigned long) sg_io.dxferp, 1,
+ (kernel_ureg_t) sg_io.dxferp,
+ IOV_DECODE_STR,
sg_io.dxfer_len);
else
- print_sg_io_buffer(tcp, (unsigned long) sg_io.dxferp,
+ print_sg_io_buffer(tcp, (kernel_ureg_t) sg_io.dxferp,
sg_io.dxfer_len);
}
return 1;
tprintf(", data[%u]=", din_len);
if (sg_io.iovec_count)
tprint_iov_upto(tcp, sg_io.iovec_count,
- (unsigned long) sg_io.dxferp, 1,
- din_len);
+ (kernel_ureg_t) sg_io.dxferp,
+ syserror(tcp) ? IOV_DECODE_ADDR :
+ IOV_DECODE_STR, din_len);
else
- print_sg_io_buffer(tcp, (unsigned long) sg_io.dxferp,
+ print_sg_io_buffer(tcp, (kernel_ureg_t) sg_io.dxferp,
din_len);
}
tprintf(", status=%02x", sg_io.status);
tprintf(", masked_status=%02x", sg_io.masked_status);
tprintf(", sb[%u]=", sg_io.sb_len_wr);
- print_sg_io_buffer(tcp, (unsigned long) sg_io.sbp, sg_io.sb_len_wr);
+ print_sg_io_buffer(tcp, (kernel_ureg_t) sg_io.sbp, sg_io.sb_len_wr);
tprintf(", host_status=%#x", sg_io.host_status);
tprintf(", driver_status=%#x", sg_io.driver_status);
tprintf(", resid=%d", sg_io.resid);
printxval(bsg_subprotocol, sg_io.subprotocol, "BSG_SUB_PROTOCOL_???");
tprintf(", request[%u]=", sg_io.request_len);
print_sg_io_buffer(tcp, sg_io.request, sg_io.request_len);
- tprintf(", request_tag=%llu", (unsigned long long) sg_io.request_tag);
+ tprintf(", request_tag=%" PRI__u64, sg_io.request_tag);
tprintf(", request_attr=%u", sg_io.request_attr);
tprintf(", request_priority=%u", sg_io.request_priority);
tprintf(", request_extra=%u", sg_io.request_extra);
tprintf(", din_xfer_len=%u", sg_io.din_xfer_len);
tprintf(", timeout=%u", sg_io.timeout);
tprintf(", flags=%u", sg_io.flags);
- tprintf(", usr_ptr=%llu", (unsigned long long) sg_io.usr_ptr);
+ tprintf(", usr_ptr=%" PRI__u64, sg_io.usr_ptr);
tprintf(", spare_in=%u", sg_io.spare_in);
tprintf(", dout[%u]=", sg_io.dout_xfer_len);
if (sg_io.dout_iovec_count)
tprint_iov_upto(tcp, sg_io.dout_iovec_count, sg_io.dout_xferp,
- 1, sg_io.dout_xfer_len);
+ IOV_DECODE_STR, sg_io.dout_xfer_len);
else
print_sg_io_buffer(tcp, sg_io.dout_xferp, sg_io.dout_xfer_len);
return 1;
tprintf(", din[%u]=", din_len);
if (sg_io.din_iovec_count)
tprint_iov_upto(tcp, sg_io.din_iovec_count, sg_io.din_xferp,
- 1, din_len);
+ syserror(tcp) ? IOV_DECODE_ADDR :
+ IOV_DECODE_STR, din_len);
else
print_sg_io_buffer(tcp, sg_io.din_xferp, din_len);
tprintf(", driver_status=%u", sg_io.driver_status);
tprintf(", response_len=%u", sg_io.response_len);
tprintf(", din_resid=%u", sg_io.din_resid);
tprintf(", dout_resid=%u", sg_io.dout_resid);
- tprintf(", generated_tag=%llu", (unsigned long long) sg_io.generated_tag);
+ tprintf(", generated_tag=%" PRI__u64, sg_io.generated_tag);
tprintf(", spare_out=%u", sg_io.spare_out);
}
if (entering(tcp)) {
tprints(", ");
- if (!arg || umove(tcp, arg, &iid) < 0) {
- printaddr(arg);
+ if (umove_or_printaddr(tcp, arg, &iid)) {
return RVAL_DECODED | 1;
} else {
return print_sg_io_req(tcp, iid, arg);
else
print_sg_io_res(tcp, iid, arg);
}
- tprintf("}");
+ tprints("}");
return RVAL_DECODED | 1;
}
}