aboutsummaryrefslogtreecommitdiff
path: root/include/sg_cmds_extra.h
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2018-05-02 22:02:05 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2018-05-02 22:02:05 +0000
commita59b767b38f08c0dafc011a58e8791aa06d4feb0 (patch)
tree8be0500cec5edb562779bc41f0ef7ad46b8c86fc /include/sg_cmds_extra.h
parentf65566c3934a9e22335dee20401cc1cc50865d56 (diff)
downloadsg3_utils-a59b767b38f08c0dafc011a58e8791aa06d4feb0.tar.gz
sg_lib: add sg_ll_inquiry_pt(), sg_ll_test_unit_ready_progress_pt(), sg_ll_request_sense_pt(), sg_ll_send_diag_pt(), sg_ll_receive_diag_pt(); sg_timestamp: add --elapsed, --hex and --no-timestamp options; sg_ses: check for NVMe enclosure bits
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@769 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'include/sg_cmds_extra.h')
-rw-r--r--include/sg_cmds_extra.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/sg_cmds_extra.h b/include/sg_cmds_extra.h
index d7b82320..974d17c1 100644
--- a/include/sg_cmds_extra.h
+++ b/include/sg_cmds_extra.h
@@ -22,6 +22,15 @@ extern "C" {
* commands (e.g. FORMAT UNIT and the Third Party copy commands) can take
* a lot longer than the default timeout. */
+/* Functions with the "_pt" suffix ^^^ take a pointer to an object (derived
+ * from) sg_pt_base rather than an open file descriptor as their first
+ * argument. That object is assumed to be constructed and have a device file
+ * descriptor * associated with it. Caller is responsible for lifetime of
+ * ptp.
+ * ^^^ apart from sg_ll_ata_pt() as 'pass-through' is part of its name. */
+
+struct sg_pt_base;
+
/* Invokes a ATA PASS-THROUGH (12, 16 or 32) SCSI command (SAT). This is
* selected by the cdb_len argument that can take values of 12, 16 or 32
@@ -180,6 +189,10 @@ int sg_ll_receive_diag_v2(int sg_fd, bool pcv, int pg_code, void * resp,
int mx_resp_len, int timeout_secs, int * residp,
bool noisy, int verbose);
+int sg_ll_receive_diag_pt(struct sg_pt_base * ptp, bool pcv, int pg_code,
+ void * resp, int mx_resp_len, int timeout_secs,
+ int * residp, bool noisy, int verbose);
+
/* Invokes a SCSI REPORT IDENTIFYING INFORMATION command. This command was
* called REPORT DEVICE IDENTIFIER prior to spc4r07. Return of 0 -> success,
* SG_LIB_CAT_INVALID_OP -> Report identifying information not supported,
@@ -225,6 +238,11 @@ int sg_ll_send_diag(int sg_fd, int st_code, bool pf_bit, bool st_bit,
bool devofl_bit, bool unitofl_bit, int long_duration,
void * paramp, int param_len, bool noisy, int verbose);
+int sg_ll_send_diag_pt(struct sg_pt_base * ptp, int st_code, bool pf_bit,
+ bool st_bit, bool devofl_bit, bool unitofl_bit,
+ int long_duration, void * paramp, int param_len,
+ bool noisy, int verbose);
+
/* Invokes a SCSI SET IDENTIFYING INFORMATION command. This command was
* called SET DEVICE IDENTIFIER prior to spc4r07. Return of 0 -> success,
* SG_LIB_CAT_INVALID_OP -> Set identifying information not supported,