aboutsummaryrefslogtreecommitdiff
path: root/lib/sg_pt_freebsd.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2019-02-11 01:43:25 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2019-02-11 01:43:25 +0000
commit9ddcd0ac08f1c6a46d681bc349f3f523e8da4fcf (patch)
treed15aa1b54d7d769ab510d895a66a529d6532d658 /lib/sg_pt_freebsd.c
parentd491f4c710d6d1d123d421eb0ba7aeddee9cf7d7 (diff)
downloadsg3_utils-9ddcd0ac08f1c6a46d681bc349f3f523e8da4fcf.tar.gz
sg_pt: add sg_get_opcode_translation() to replace global pointer to array; utils/hxascdmp: add -o=<offset> option; testing/sgh_dd fixes
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@811 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_pt_freebsd.c')
-rw-r--r--lib/sg_pt_freebsd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sg_pt_freebsd.c b/lib/sg_pt_freebsd.c
index 596c77aa..a36b45b5 100644
--- a/lib/sg_pt_freebsd.c
+++ b/lib/sg_pt_freebsd.c
@@ -7,7 +7,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-/* sg_pt_freebsd version 1.34 20190113 */
+/* sg_pt_freebsd version 1.35 20190210 */
#include <stdio.h>
#include <stdlib.h>
@@ -892,7 +892,7 @@ get_scsi_pt_duration_ms(const struct sg_pt_base * vp __attribute__ ((unused)))
/* 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;
@@ -1976,7 +1976,7 @@ sntl_rep_opcodes(struct sg_pt_freebsd_scsi * ptp, const uint8_t * cdbp,
case 0: /* all commands */
count = 0;
bump = rctd ? 20 : 8;
- for (offset = 4, oip = sg_opcode_info_arr;
+ for (offset = 4, oip = sg_get_opcode_translation();
(oip->flags != 0xffff) && (offset < a_len); ++oip) {
if (F_INV_OP & oip->flags)
continue;
@@ -1997,7 +1997,7 @@ sntl_rep_opcodes(struct sg_pt_freebsd_scsi * ptp, const uint8_t * cdbp,
case 1: /* one command: opcode only */
case 2: /* one command: opcode plus service action */
case 3: /* one command: if sa==0 then opcode only else opcode+sa */
- for (oip = sg_opcode_info_arr; oip->flags != 0xffff; ++oip) {
+ for (oip = sg_get_opcode_translation(); oip->flags != 0xffff; ++oip) {
if ((req_opcode == oip->opcode) && (req_sa == oip->sa))
break;
}