aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2019-01-14 04:35:44 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2019-01-14 04:35:44 +0000
commitff7f6c54064cacb61466fc26a31886a7573107f5 (patch)
treea5472f4787b8524a29ef1e41119fb80de905436a
parent0b07dc9a41e495604add3b006c040b36e4ea50c7 (diff)
downloadsg3_utils-ff7f6c54064cacb61466fc26a31886a7573107f5.tar.gz
fixes for osf1, solaris and win32
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@806 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog2
-rw-r--r--lib/sg_pt_osf1.c8
-rw-r--r--lib/sg_pt_solaris.c4
-rw-r--r--lib/sg_pt_win32.c13
4 files changed, 22 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 36c9e849..0cf06b07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for sg3_utils-1.45 [20190113] [svn: r805]
+Changelog for sg3_utils-1.45 [20190113] [svn: r806]
- sg_ses: bug: --page= being overridden when --control
and --data= also given; fix
- sg_opcodes: expand MLU (spc5r20)
diff --git a/lib/sg_pt_osf1.c b/lib/sg_pt_osf1.c
index 6a003022..3114a8b1 100644
--- a/lib/sg_pt_osf1.c
+++ b/lib/sg_pt_osf1.c
@@ -523,6 +523,14 @@ get_scsi_pt_sense_len(const struct sg_pt_base * vp)
return (len > 0) ? len : 0;
}
+uint8_t *
+get_scsi_pt_sense_buf(const struct sg_pt_base * vp)
+{
+ const struct sg_pt_osf1_scsi * ptp = &vp->impl;
+
+ return ptp->sense;
+}
+
int
get_scsi_pt_duration_ms(const struct sg_pt_base * vp)
{
diff --git a/lib/sg_pt_solaris.c b/lib/sg_pt_solaris.c
index 7353b448..e8d71dc6 100644
--- a/lib/sg_pt_solaris.c
+++ b/lib/sg_pt_solaris.c
@@ -346,7 +346,7 @@ get_pt_req_lengths(const struct sg_pt_base * vp, int * req_dinp,
*req_dinp = 0;
}
if (req_doutp) {
- if ((ptp->dxfer_len > 0) && (USCSI_WRITE & flags))
+ if ((dxfer_len > 0) && (USCSI_WRITE & flags))
*req_doutp = dxfer_len;
else
*req_doutp = 0;
@@ -368,7 +368,7 @@ get_pt_actual_lengths(const struct sg_pt_base * vp, int * act_dinp,
*act_dinp = 0;
}
if (act_doutp) {
- if ((ptp->dxfer_len > 0) && (USCSI_WRITE & flags))
+ if ((dxfer_len > 0) && (USCSI_WRITE & flags))
*act_doutp = dxfer_len - ptp->uscsi.uscsi_resid;
else
*act_doutp = 0;
diff --git a/lib/sg_pt_win32.c b/lib/sg_pt_win32.c
index 72c0cc95..e357ff22 100644
--- a/lib/sg_pt_win32.c
+++ b/lib/sg_pt_win32.c
@@ -1279,7 +1279,7 @@ get_pt_req_lengths(const struct sg_pt_base * vp, int * req_dinp,
const struct sg_pt_win32_scsi * psp = vp->implp;
if (req_dinp) {
- if (psp->is_read (&& psp->dxfer_len > 0))
+ if (psp->is_read && (psp->dxfer_len > 0))
*req_dinp = psp->dxfer_len;
else
*req_dinp = 0;
@@ -1299,7 +1299,7 @@ get_pt_actual_lengths(const struct sg_pt_base * vp, int * act_dinp,
const struct sg_pt_win32_scsi * psp = vp->implp;
if (act_dinp) {
- if (psp->is_read (&& psp->dxfer_len > 0))
+ if (psp->is_read && (psp->dxfer_len > 0))
*act_dinp = psp->dxfer_len - psp->resid;
else
*act_dinp = 0;
@@ -1343,6 +1343,15 @@ get_scsi_pt_sense_len(const struct sg_pt_base * vp)
return (len > 0) ? len : 0;
}
+uint8_t *
+get_scsi_pt_sense_buf(const struct sg_pt_base * vp)
+{
+ const struct sg_pt_win32_scsi * psp = vp->implp;
+
+ return psp->sensep;
+}
+
+
int
get_scsi_pt_duration_ms(const struct sg_pt_base * vp __attribute__ ((unused)))
{