aboutsummaryrefslogtreecommitdiff
path: root/include/sg_cmds_extra.h
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2018-01-28 06:50:39 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2018-01-28 06:50:39 +0000
commit3a7e1666843ba386946f65d8ea89fe4ddf9ed9bf (patch)
treeec2d3a035ff39e5f5786460ac09f31df45d5469f /include/sg_cmds_extra.h
parent6293187a432dd0bbf85961a897755bd0260f28ad (diff)
downloadsg3_utils-3a7e1666843ba386946f65d8ea89fe4ddf9ed9bf.tar.gz
add sg_seek and sg_stream_ctl utilities; properly identify vendor-specific sense; documentation cleanup
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@747 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'include/sg_cmds_extra.h')
-rw-r--r--include/sg_cmds_extra.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sg_cmds_extra.h b/include/sg_cmds_extra.h
index 2dedf21e..fbc23773 100644
--- a/include/sg_cmds_extra.h
+++ b/include/sg_cmds_extra.h
@@ -349,6 +349,19 @@ int sg_ll_3party_copy_out(int sg_fd, int sa, unsigned int list_id,
int group_num, int timeout_secs, void * paramp,
int param_len, bool noisy, int verbose);
+/* Invokes a SCSI PRE-FETCH(10), PRE-FETCH(16) or SEEK(10) command (SBC).
+ * Returns 0 -> success, 25 (SG_LIB_CAT_CONDITION_MET), various SG_LIB_CAT_*
+ * positive values or -1 -> other errors. Note that CONDITION MET status
+ * is returned when immed=true and num_blocks can fit in device's cache,
+ * somewaht strangely, GOOD status (return 0) is returned if num_blocks
+ * cannot fit in device's cache. If do_seek10==true then does a SEEK(10)
+ * command with given lba, if that LBA is < 2**32 . Unclear what SEEK(10)
+ * does, assume it is like PRE-FETCH. If timeout_secs is 0 (or less) then
+ * use DEF_PT_TIMEOUT (60 seconds) as command timeout. */
+int sg_ll_pre_fetch_x(int sg_fd, bool do_seek10, bool cdb16, bool immed,
+ uint64_t lba, uint32_t num_blocks, int group_num,
+ int timeout_secs, bool noisy, int verbose);
+
#ifdef __cplusplus
}
#endif