aboutsummaryrefslogtreecommitdiff
path: root/lib/sg_pt_osf1.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2020-07-13 18:30:26 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2020-07-13 18:30:26 +0000
commitec46929f407fa5cc5fd1b276d407c17d1d70c2e5 (patch)
tree3ef97fd1b2554900a3162e7036a1ed4a19ac1c24 /lib/sg_pt_osf1.c
parentb07ad28107659f532c54659f5ecd12eaf086ea0b (diff)
downloadsg3_utils-ec46929f407fa5cc5fd1b276d407c17d1d70c2e5.tar.gz
sg_pt_solaris+sg_pt_osf1: fix problem with clear_scsi_pt_obj() which needs to remember is_nvme and dev_fd values
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@855 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_pt_osf1.c')
-rw-r--r--lib/sg_pt_osf1.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/sg_pt_osf1.c b/lib/sg_pt_osf1.c
index ea758bc3..edf79d11 100644
--- a/lib/sg_pt_osf1.c
+++ b/lib/sg_pt_osf1.c
@@ -30,12 +30,12 @@
#include "sg_lib.h"
#include "sg_pr2serr.h"
-/* Version 2.01 20200415 */
+/* Version 2.02 20200713 */
#define OSF1_MAXDEV 64
#ifndef CAM_DIR_BOTH
-#define CAM_DIR_BOTH 0x0 /* copy value from FreeBSD */
+#define CAM_DIR_BOTH 0x0 /* copy value from FreeBSD */
#endif
struct osf1_dev_channel {
@@ -204,10 +204,16 @@ destruct_scsi_pt_obj(struct sg_pt_base * vp)
void
clear_scsi_pt_obj(struct sg_pt_base * vp)
{
+ bool is_nvme;
+ int dev_fd;
struct sg_pt_osf1_scsi * ptp = &vp->impl;
if (ptp) {
+ is_nvme = ptp->is_nvme;
+ dev_fd = ptp->dev_fd;
bzero(ptp, sizeof(struct sg_pt_osf1_scsi));
+ ptp->dev_fd = dev_fd;
+ ptp->is_nvme = is_nvme;
ptp->dxfer_dir = CAM_DIR_NONE;
}
}
@@ -545,7 +551,7 @@ get_scsi_pt_duration_ms(const struct sg_pt_base * vp)
/* If not available return 0 otherwise return number of nanoseconds that the
* lower layers (and hardware) took to execute the command just completed. */
-uint64_t
+uint64_t
get_pt_duration_ns(const struct sg_pt_base * vp __attribute__ ((unused)))
{
return 0;