diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2021-11-20 17:13:42 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2021-11-20 17:13:42 +0000 |
commit | 20315aa4fae1340e5d4b1faae15b90ee34b9ea50 (patch) | |
tree | eb935ed0b6aed4abf787556adcfe9e3cb99c297d /lib/sg_cmds_basic.c | |
parent | 26be8550ae1aad5db9bcf9b0cfe1fdecccd210df (diff) | |
download | sg3_utils-20315aa4fae1340e5d4b1faae15b90ee34b9ea50.tar.gz |
sg_z_act_query: new utility for sending either a Zone activate or Zone query command; sg_rep_zones: add Report zone starting LBA granularity field in REPORT ZONES response [zbc2r12]; sg_decode_sense: add --nodecode option; initialize all sense buffers to 0; rework main README file
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@923 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'lib/sg_cmds_basic.c')
-rw-r--r-- | lib/sg_cmds_basic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sg_cmds_basic.c b/lib/sg_cmds_basic.c index 844018c3..e1773542 100644 --- a/lib/sg_cmds_basic.c +++ b/lib/sg_cmds_basic.c @@ -379,7 +379,7 @@ sg_ll_inquiry_com(struct sg_pt_base * ptvp, int sg_fd, bool cmddt, bool evpd, bool local_cdb = true; int res, ret, sense_cat, resid; uint8_t inq_cdb[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0}; - uint8_t sense_b[SENSE_BUFF_LEN]; + uint8_t sense_b[SENSE_BUFF_LEN] = {0}; uint8_t * up; if (resp == NULL) { @@ -738,7 +738,7 @@ sg_ll_request_sense_com(struct sg_pt_base * ptvp, int sg_fd, bool desc, static const char * const rq_s = "request sense"; uint8_t rs_cdb[REQUEST_SENSE_CMDLEN] = {REQUEST_SENSE_CMD, 0, 0, 0, 0, 0}; - uint8_t sense_b[SENSE_BUFF_LEN]; + uint8_t sense_b[SENSE_BUFF_LEN] = {0}; if (desc) rs_cdb[1] |= 0x1; @@ -837,7 +837,7 @@ sg_ll_report_luns_com(struct sg_pt_base * ptvp, int sg_fd, int select_report, int ret, res, sense_cat; uint8_t rl_cdb[REPORT_LUNS_CMDLEN] = {REPORT_LUNS_CMD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - uint8_t sense_b[SENSE_BUFF_LEN]; + uint8_t sense_b[SENSE_BUFF_LEN] = {0}; rl_cdb[2] = select_report & 0xff; sg_put_unaligned_be32((uint32_t)mx_resp_len, rl_cdb + 6); |