aboutsummaryrefslogtreecommitdiff
path: root/src/sg_sat_identify.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-05-02 04:45:28 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-05-02 04:45:28 +0000
commitd7f5140b8b84eb9e27509a1c0fb6872a782b1fe8 (patch)
treede2e3799b32aa5588ba0183a53ecd18971bd9a10 /src/sg_sat_identify.c
parent891844a52a28d9c5be86bf055e02180cb2b63275 (diff)
downloadsg3_utils-d7f5140b8b84eb9e27509a1c0fb6872a782b1fe8.tar.gz
sg_rep_zones: add experimental --json[=JO] option and generation
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@950 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_sat_identify.c')
-rw-r--r--src/sg_sat_identify.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/sg_sat_identify.c b/src/sg_sat_identify.c
index 92cad466..ef9b3197 100644
--- a/src/sg_sat_identify.c
+++ b/src/sg_sat_identify.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2021 Douglas Gilbert.
+ * Copyright (c) 2006-2022 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.
@@ -54,7 +54,7 @@
#define EBUFF_SZ 256
-static const char * version_str = "1.18 20210630";
+static const char * version_str = "1.19 20220425";
static struct option long_options[] = {
{"ck-cond", no_argument, 0, 'c'},
@@ -136,21 +136,18 @@ do_identify_dev(int sg_fd, bool do_packet, int cdb_len, bool ck_cond,
uint64_t ull;
struct sg_scsi_sense_hdr ssh;
uint8_t inBuff[ID_RESPONSE_LEN];
- uint8_t sense_buffer[64];
- uint8_t ata_return_desc[16];
+ uint8_t sense_buffer[64] = {0};
+ uint8_t ata_return_desc[16] = {0};
uint8_t apt_cdb[SAT_ATA_PASS_THROUGH16_LEN] =
{SAT_ATA_PASS_THROUGH16, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0};
uint8_t apt12_cdb[SAT_ATA_PASS_THROUGH12_LEN] =
{SAT_ATA_PASS_THROUGH12, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0};
- uint8_t apt32_cdb[SAT_ATA_PASS_THROUGH32_LEN];
+ uint8_t apt32_cdb[SAT_ATA_PASS_THROUGH32_LEN] = {0};
const unsigned short * usp;
sb_sz = sizeof(sense_buffer);
- memset(sense_buffer, 0, sb_sz);
- memset(apt32_cdb, 0, sizeof(apt32_cdb));
- memset(ata_return_desc, 0, sizeof(ata_return_desc));
ok = false;
switch (cdb_len) {
case SAT_ATA_PASS_THROUGH32_LEN: /* SAT-4 revision 5 or later */