aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/sg_lib.h2
-rw-r--r--include/sg_pt_nvme.h14
2 files changed, 9 insertions, 7 deletions
diff --git a/include/sg_lib.h b/include/sg_lib.h
index 9688991d..80c536c1 100644
--- a/include/sg_lib.h
+++ b/include/sg_lib.h
@@ -278,7 +278,7 @@ int sg_get_designation_descriptor_str(const char * leadin,
* bytes and returns the number of bytes actually written to 'b' but doesn't
* count the trailing null character it always appends (if blen > 0). 'lip'
* is lead-in string (on each line) than may be NULL. skip_prefix avoids
- * outputing ' Locally assigned UUID: ' before the UUID. */
+ * outputting: ' Locally assigned UUID: ' before the UUID. */
int sg_t10_uuid_desig2str(const uint8_t * dp, int dlen, int c_set,
bool do_long, bool skip_prefix,
const char * lip, int blen, char * b);
diff --git a/include/sg_pt_nvme.h b/include/sg_pt_nvme.h
index daca8fce..590b4de9 100644
--- a/include/sg_pt_nvme.h
+++ b/include/sg_pt_nvme.h
@@ -2,7 +2,7 @@
#define SG_PT_NVME_H
/*
- * Copyright (c) 2017-2018 Douglas Gilbert.
+ * Copyright (c) 2017-2019 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
@@ -29,9 +29,9 @@ extern "C" {
* are exceptions, for example the EUI-64 identifiers in the Admin Identify
* response are big endian.
*
- * Code online (e.g. nvme-cli at github.com) seems to like packed strcutures,
- * the author prefers byte offset plus a range of unaligned integer builders
- * such as those in sg_unaligned.h .
+ * Code online (e.g. nvme-cli at github.com) seems to favour packed
+ * structures, while the author prefers byte offset plus a range of unaligned
+ * integer builders such as those in sg_unaligned.h .
*/
#ifdef __GNUC__
@@ -183,8 +183,6 @@ struct sg_opcode_info_t {
/* Vendor specific (sg3_utils) VPD pages */
#define SG_NVME_VPD_NICR 0xde /* NVME Identify controller response */
-extern struct sg_opcode_info_t sg_opcode_info_arr[];
-
/* Given the NVMe Identify Controller response and optionally the NVMe
* Identify Namespace response (NULL otherwise), generate the SCSI VPD
@@ -213,6 +211,10 @@ int sntl_resp_mode_select10(struct sg_sntl_dev_state_t * dsp,
const uint8_t * cdbp, const uint8_t * dop,
int do_len, struct sg_sntl_result_t * resp);
+/* Returns pointer to array of struct sg_opcode_info_t of SCSI commands
+ * translated to NVMe. */
+const struct sg_opcode_info_t * sg_get_opcode_translation(void);
+
#ifdef __cplusplus
}
#endif