]> granicus.if.org Git - strace/blobdiff - scsi.c
Update NEWS
[strace] / scsi.c
diff --git a/scsi.c b/scsi.c
index dc51dd571cd6af16da0953cd9229255110a4c212..b3c6245308b7e887cfba5cc4b5f2418dacfde3a9 100644 (file)
--- a/scsi.c
+++ b/scsi.c
@@ -114,8 +114,8 @@ print_sg_io_v3_res(struct tcb *tcp, const long arg)
                if (sg_io.iovec_count)
                        tprint_iov_upto(tcp, sg_io.iovec_count,
                                        (unsigned long) sg_io.dxferp,
-                                       IOV_DECODE_STR,
-                                       din_len);
+                                       syserror(tcp) ? IOV_DECODE_ADDR :
+                                       IOV_DECODE_STR, din_len);
                else
                        print_sg_io_buffer(tcp, (unsigned long) sg_io.dxferp,
                                           din_len);
@@ -190,6 +190,7 @@ print_sg_io_v4_res(struct tcb *tcp, const long arg)
        tprintf(", din[%u]=", din_len);
        if (sg_io.din_iovec_count)
                tprint_iov_upto(tcp, sg_io.din_iovec_count, sg_io.din_xferp,
+                               syserror(tcp) ? IOV_DECODE_ADDR :
                                IOV_DECODE_STR, din_len);
        else
                print_sg_io_buffer(tcp, sg_io.din_xferp, din_len);
@@ -275,7 +276,7 @@ scsi_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
                        else
                                print_sg_io_res(tcp, iid, arg);
                }
-               tprintf("}");
+               tprints("}");
                return RVAL_DECODED | 1;
        }
 }