150
157
"identification, target device only"},
152
159
{VPD_EXT_INQ, 0, -1, 0, "ei", "Extended inquiry data"},
160
{VPD_LB_PROVISIONING, 0, 0, 0, "lbpv", "Logical block provisioning "
153
162
{VPD_MAN_NET_ADDR, 0, -1, 0, "mna", "Management network addresses"},
154
163
{VPD_MODE_PG_POLICY, 0, -1, 0, "mpp", "Mode page policy"},
155
{VPD_LB_PROVISIONING, 0, 0, 0, "lbpv", "Logical block provisioning "
157
164
{VPD_POWER_CONDITION, 0, -1, 0, "po", "Power condition"},
158
165
{VPD_POWER_CONSUMPTION, 0, -1, 0, "psm", "Power consumption"},
159
166
{VPD_PROTO_LU, 0, 0x0, 0, "pslu", "Protocol-specific logical unit "
161
168
{VPD_PROTO_PORT, 0, 0x0, 0, "pspo", "Protocol-specific port information"},
169
{VPD_REFERRALS, 0, 0, 0, "ref", "Referrals (SBC)"},
162
170
{VPD_SOFTW_INF_ID, 0, -1, 0, "sii", "Software interface identification"},
163
171
{VPD_UNIT_SERIAL_NUM, 0, -1, 0, "sn", "Unit serial number"},
164
172
{VPD_SCSI_PORTS, 0, -1, 0, "sp", "SCSI ports"},
165
173
{VPD_SUPPORTED_VPDS, 0, -1, 0, "sv", "Supported VPD pages"},
166
{VPD_RDAC_VAC, 0, -1, 1, "rdac_vac", "RDAC volume access control (IBM)"},
167
{VPD_RDAC_VERS, 0, -1, 1, "rdac_vers", "RDAC software version (IBM)"},
174
{VPD_3PARTY_COPY, 0, -1, 0, "tpc", "Third party copy"},
175
/* Following are vendor specific */
176
{VPD_RDAC_VAC, 0, -1, 1, "rdac_vac", "RDAC volume access control (RDAC)"},
177
{VPD_RDAC_VERS, 0, -1, 1, "rdac_vers", "RDAC software version (RDAC)"},
168
178
{VPD_UPR_EMC, 0, -1, 1, "upr", "Unit path report (EMC)"},
169
179
{0, 0, 0, 0, NULL, NULL},
172
182
static struct option long_options[] = {
183
#if defined(SG_LIB_LINUX) && defined(SG_SCSI_STRINGS)
174
184
{"ata", 0, 0, 'a'},
176
186
{"cmddt", 0, 0, 'c'},
177
187
{"descriptors", 0, 0, 'd'},
188
{"export", 0, 0, 'u'},
178
189
{"extended", 0, 0, 'x'},
179
190
{"help", 0, 0, 'h'},
180
191
{"hex", 0, 0, 'H'},
181
192
{"id", 0, 0, 'i'},
182
193
{"len", 1, 0, 'l'},
183
194
{"maxlen", 1, 0, 'm'},
195
#ifdef SG_SCSI_STRINGS
184
196
{"new", 0, 0, 'N'},
185
197
{"old", 0, 0, 'O'},
186
199
{"page", 1, 0, 'p'},
187
200
{"raw", 0, 0, 'r'},
201
{"vendor", 0, 0, 's'},
188
202
{"verbose", 0, 0, 'v'},
189
203
{"version", 0, 0, 'V'},
190
204
{"vpd", 0, 0, 'e'},
681
#else /* SG_SCSI_STRINGS */
684
process_cl(struct opts_t * optsp, int argc, char * argv[])
686
return process_cl_new(optsp, argc, argv);
689
#endif /* SG_SCSI_STRINGS */
692
/* Local version of sg_ll_inquiry() [found in libsgutils] that additionally
693
* passes back resid. Same return values as sg_ll_inquiry() (0 is good). */
695
ll_inquiry(int sg_fd, int cmddt, int evpd, int pg_op, void * resp,
696
int mx_resp_len, int * residp, int noisy, int verbose)
698
int res, ret, k, sense_cat;
699
unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 0, 0, 0, 0, 0};
700
unsigned char sense_b[SENSE_BUFF_LEN];
702
struct sg_pt_base * ptvp;
708
inqCmdBlk[2] = (unsigned char)pg_op;
709
/* 16 bit allocation length (was 8) is a recent SPC-3 addition */
710
inqCmdBlk[3] = (unsigned char)((mx_resp_len >> 8) & 0xff);
711
inqCmdBlk[4] = (unsigned char)(mx_resp_len & 0xff);
713
fprintf(stderr, " inquiry cdb: ");
714
for (k = 0; k < INQUIRY_CMDLEN; ++k)
715
fprintf(stderr, "%02x ", inqCmdBlk[k]);
716
fprintf(stderr, "\n");
718
if (resp && (mx_resp_len > 0)) {
719
up = (unsigned char *)resp;
720
up[0] = 0x7f; /* defensive prefill */
724
ptvp = construct_scsi_pt_obj();
726
fprintf(stderr, "inquiry: out of memory\n");
729
set_scsi_pt_cdb(ptvp, inqCmdBlk, sizeof(inqCmdBlk));
730
set_scsi_pt_sense(ptvp, sense_b, sizeof(sense_b));
731
set_scsi_pt_data_in(ptvp, (unsigned char *)resp, mx_resp_len);
732
res = do_scsi_pt(ptvp, sg_fd, DEF_PT_TIMEOUT, verbose);
733
ret = sg_cmds_process_resp(ptvp, "inquiry", res, mx_resp_len, sense_b,
734
noisy, verbose, &sense_cat);
736
*residp = get_scsi_pt_resid(ptvp);
737
destruct_scsi_pt_obj(ptvp);
740
else if (-2 == ret) {
742
case SG_LIB_CAT_INVALID_OP:
743
case SG_LIB_CAT_ILLEGAL_REQ:
744
case SG_LIB_CAT_ABORTED_COMMAND:
747
case SG_LIB_CAT_RECOVERED:
748
case SG_LIB_CAT_NO_SENSE:
755
} else if (ret < 4) {
757
fprintf(stderr, "inquiry: got too few bytes (%d)\n", ret);
758
ret = SG_LIB_CAT_MALFORMED;
620
765
static const struct svpd_values_name_t *
621
766
sdp_find_vpd_by_acron(const char * ap)
758
965
"administrative configuration service",
759
"reserved[0x7]", "reserved[0x8]", "reserved[0x9]",
760
"reserved[0xa]", "reserved[0xb]", "reserved[0xc]", "reserved[0xd]",
761
"reserved[0xe]", "reserved[0xf]", "reserved[0x10]", "reserved[0x11]",
762
"reserved[0x12]", "reserved[0x13]", "reserved[0x14]", "reserved[0x15]",
763
"reserved[0x16]", "reserved[0x17]", "reserved[0x18]", "reserved[0x19]",
764
"reserved[0x1a]", "reserved[0x1b]", "reserved[0x1c]", "reserved[0x1d]",
765
"reserved[0x1e]", "reserved[0x1f]",
966
"[0x7]", "[0x8]", "[0x9]", "[0xa]", "[0xb]", "[0xc]", "[0xd]",
967
"[0xe]", "[0xf]", "[0x10]", "[0x11]", "[0x12]", "[0x13]", "[0x14]",
968
"[0x15]", "[0x16]", "[0x17]", "[0x18]", "[0x19]", "[0x1a]",
969
"[0x1b]", "[0x1c]", "[0x1d]", "[0x1e]", "[0x1f]",
768
972
/* VPD_MAN_NET_ADDR */
900
"Reserved [0x4]", "Reserved [0x5]", "Reserved [0x6]", "Reserved [0x7]",
901
"Reserved [0x8]", "Reserved [0x9]", "Reserved [0xa]", "Reserved [0xb]",
902
"Reserved [0xc]", "Reserved [0xd]", "Reserved [0xe]", "Reserved [0xf]",
1104
"[0x4]", "[0x5]", "[0x6]", "[0x7]", "[0x8]", "[0x9]", "[0xa]", "[0xb]",
1105
"[0xc]", "[0xd]", "[0xe]", "[0xf]",
905
1108
static const char * desig_type_arr[] =
907
"vendor specific [0x0]",
908
"T10 vendor identification",
911
"Relative target port",
912
"Target port group", /* spc4r09: _primary_ target port group */
913
"Logical unit group",
914
"MD5 logical unit identifier",
916
"Reserved [0x9]", "Reserved [0xa]", "Reserved [0xb]",
917
"Reserved [0xc]", "Reserved [0xd]", "Reserved [0xe]", "Reserved [0xf]",
1110
"vendor specific [0x0]", /* SCSI_IDENT_DEVICE_VENDOR */
1111
"T10 vendor identification", /* SCSI_IDENT_DEVICE_T10 */
1112
"EUI-64 based", /* SCSI_IDENT_DEVICE_EUI64 */
1113
"NAA", /* SCSI_IDENT_DEVICE_NAA */
1114
"Relative target port", /* SCSI_IDENT_PORT_RELATIVE */
1115
"Target port group", /* SCSI_IDENT_PORT_TP_GROUP */
1116
"Logical unit group", /* SCSI_IDENT_PORT_LU_GROUP */
1117
"MD5 logical unit identifier", /* SCSI_IDENT_DEVICE_MD5 */
1118
"SCSI name string", /* SCSI_IDENT_DEVICE_SCSINAME */
1119
"Protocol specific port identifier", /* spc4r36 */
1120
"[0xa]", "[0xb]", "[0xc]", "[0xd]", "[0xe]", "[0xf]",
920
1123
/* These are target port, device server (i.e. target) and LU identifiers */
1028
1256
case 3: /* NAA */
1029
1257
if (1 != c_set) {
1030
1258
fprintf(stderr, " << expected binary code_set (1)>>\n");
1031
dStrHex((const char *)ip, i_len, 0);
1259
dStrHex((const char *)ip, i_len, -1);
1034
1262
naa = (ip[0] >> 4) & 0xff;
1035
1263
if ((naa < 2) || (naa > 6) || (4 == naa)) {
1036
1264
fprintf(stderr, " << unexpected naa [0x%x]>>\n", naa);
1037
dStrHex((const char *)ip, i_len, 0);
1265
dStrHex((const char *)ip, i_len, -1);
1040
1268
if (2 == naa) { /* NAA IEEE Extended */
1041
1269
if (8 != i_len) {
1042
1270
fprintf(stderr, " << unexpected NAA 2 identifier "
1043
1271
"length: 0x%x>>\n", i_len);
1044
dStrHex((const char *)ip, i_len, 0);
1272
dStrHex((const char *)ip, i_len, -1);
1047
1275
d_id = (((ip[0] & 0xf) << 8) | ip[1]);
1173
1401
printf(" %s\n", (const char *)ip);
1403
case 9: /* Protocol specific port identifier */
1404
/* added in spc4r36, PIV must be set, proto_id indicates */
1405
/* whether UAS (USB) or SOP (PCIe) or ... */
1407
printf(" >>>> Protocol specific port identifier "
1408
"expects protocol\n"
1409
" identifier to be valid and it is not\n");
1410
if (TPROTO_UAS == p_id) {
1411
printf(" USB device address: 0x%x\n", 0x7f & ip[0]);
1412
printf(" USB interface number: 0x%x\n", ip[2]);
1413
} else if (TPROTO_SOP == p_id) {
1414
printf(" PCIe routing ID, bus number: 0x%x\n", ip[0]);
1415
printf(" function number: 0x%x\n", ip[1]);
1416
printf(" [or device number: 0x%x, function number: "
1417
"0x%x]\n", (0x1f & (ip[1] >> 3)), 0x7 & ip[1]);
1419
printf(" >>>> unexpected protocol indentifier: %s\n"
1420
" with Protocol specific port "
1422
sg_get_trans_proto_str(p_id, sizeof(b), b));
1175
1424
default: /* reserved */
1176
dStrHex((const char *)ip, i_len, 0);
1425
dStrHex((const char *)ip, i_len, -1);
1181
1430
fprintf(stderr, "%s VPD page error: around offset=%d\n", leadin, off);
1434
export_dev_ids(unsigned char * buff, int len)
1436
int u, j, m, id_len, c_set, assoc, desig_type, i_len;
1437
int off, d_id, naa, k;
1438
unsigned char * ucp;
1440
const char * assoc_str;
1444
* Cf decode_dev_ids() for details
1456
for (j = 1, off = -1;
1457
(u = sg_vpd_dev_id_iter(buff, len, &off, -1, -1, -1)) == 0;
1462
if ((off + id_len) > len) {
1463
fprintf(stderr, "Device Identification VPD page error: designator "
1464
"length longer than\n remaining response length=%d\n",
1469
c_set = (ucp[0] & 0xf);
1470
assoc = ((ucp[1] >> 4) & 0x3);
1471
desig_type = (ucp[1] & 0xf);
1481
assoc_str = "TARGET";
1484
fprintf(stderr, " Invalid association %d\n", assoc);
1487
switch (desig_type) {
1488
case 0: /* vendor specific */
1490
if ((1 == c_set) || (2 == c_set)) { /* ASCII or UTF-8 */
1491
k = encode_whitespaces(ip, i_len);
1496
printf("SCSI_IDENT_%s_VENDOR=%.*s\n", assoc_str, k, ip);
1498
case 1: /* T10 vendor identification */
1499
k = encode_whitespaces(ip, i_len);
1500
printf("SCSI_IDENT_%s_T10=%.*s\n", assoc_str, k, ip);
1502
case 2: /* EUI-64 based */
1504
fprintf(stderr, " << expected binary code_set (1)>>\n");
1505
dStrHex((const char *)ip, i_len, 0);
1508
printf("SCSI_IDENT_%s_EUI64=", assoc_str);
1509
for (m = 0; m < i_len; ++m)
1510
printf("%02x", (unsigned int)ip[m]);
1515
fprintf(stderr, " << expected binary code_set (1)>>\n");
1516
dStrHex((const char *)ip, i_len, 0);
1519
naa = (ip[0] >> 4) & 0xff;
1520
if ((naa < 2) || (naa > 6) || (4 == naa)) {
1521
fprintf(stderr, " << unexpected naa [0x%x]>>\n", naa);
1522
dStrHex((const char *)ip, i_len, 0);
1527
fprintf(stderr, " << unexpected NAA 2 identifier "
1528
"length: 0x%x>>\n", i_len);
1529
dStrHex((const char *)ip, i_len, 0);
1532
printf("SCSI_IDENT_%s_NAA=", assoc_str);
1533
for (m = 0; m < 8; ++m)
1534
printf("%02x", (unsigned int)ip[m]);
1536
} else { /* NAA IEEE Registered extended */
1538
fprintf(stderr, " << unexpected NAA 6 identifier "
1539
"length: 0x%x>>\n", i_len);
1540
dStrHex((const char *)ip, i_len, 0);
1543
printf("SCSI_IDENT_%s_NAA=", assoc_str);
1544
for (m = 0; m < 16; ++m)
1545
printf("%02x", (unsigned int)ip[m]);
1549
case 4: /* Relative target port */
1550
if ((1 != c_set) || (1 != assoc) || (4 != i_len)) {
1551
fprintf(stderr, " << expected binary code_set, target "
1552
"port association, length 4>>\n");
1553
dStrHex((const char *)ip, i_len, 0);
1556
d_id = ((ip[2] << 8) | ip[3]);
1557
printf("SCSI_IDENT_%s_RELATIVE=%d\n", assoc_str, d_id);
1559
case 5: /* (primary) Target port group */
1560
if ((1 != c_set) || (1 != assoc) || (4 != i_len)) {
1561
fprintf(stderr, " << expected binary code_set, target "
1562
"port association, length 4>>\n");
1563
dStrHex((const char *)ip, i_len, 0);
1566
d_id = ((ip[2] << 8) | ip[3]);
1567
printf("SCSI_IDENT_%s_TARGET_PORT_GROUP=0x%x\n", assoc_str, d_id);
1569
case 6: /* Logical unit group */
1570
if ((1 != c_set) || (0 != assoc) || (4 != i_len)) {
1571
fprintf(stderr, " << expected binary code_set, logical "
1572
"unit association, length 4>>\n");
1573
dStrHex((const char *)ip, i_len, 0);
1576
d_id = ((ip[2] << 8) | ip[3]);
1577
printf("SCSI_IDENT_%s_LOGICAL_UNIT_GROUP=0x%x\n", assoc_str, d_id);
1579
case 7: /* MD5 logical unit identifier */
1580
if ((1 != c_set) || (0 != assoc)) {
1581
fprintf(stderr, " << expected binary code_set, logical "
1582
"unit association>>\n");
1583
dStrHex((const char *)ip, i_len, 0);
1586
printf("SCSI_IDENT_%s_MD5=", assoc_str);
1587
dStrHex((const char *)ip, i_len, -1);
1589
case 8: /* SCSI name string */
1591
fprintf(stderr, " << expected UTF-8 code_set>>\n");
1592
dStrHex((const char *)ip, i_len, -1);
1595
printf("SCSI_IDENT_%s_NAME=%.*s\n", assoc_str, i_len,
1598
case 9: /* PCIe Routing ID */
1599
/* new in spc4r34, looks under-specified, drop through now */
1600
default: /* reserved */
1601
dStrHex((const char *)ip, i_len, -1);
1606
fprintf(stderr, "Device identification VPD page error: "
1607
"around offset=%d\n", off);
1184
1610
/* Transport IDs are initiator port identifiers, typically other than the
1185
initiator port issuing a SCSI command. Code borrowed from sg_persist.c */
1611
initiator port issuing a SCSI command. */
1187
1613
decode_transport_id(const char * leadin, unsigned char * ucp, int len)
1268
1694
case TPROTO_ADT:
1269
1695
printf("%s ADT:\n", leadin);
1270
1696
printf("%s format code: %d\n", leadin, format_code);
1271
dStrHex((const char *)ucp, ((len > 24) ? 24 : len), 0);
1697
dStrHex((const char *)ucp, ((len > 24) ? 24 : len), -1);
1274
1700
case TPROTO_ATA:
1275
1701
printf("%s ATAPI:\n", leadin);
1276
1702
printf("%s format code: %d\n", leadin, format_code);
1277
dStrHex((const char *)ucp, ((len > 24) ? 24 : len), 0);
1703
dStrHex((const char *)ucp, ((len > 24) ? 24 : len), -1);
1707
printf("%s UAS:\n", leadin);
1708
printf("%s format code: %d\n", leadin, format_code);
1709
dStrHex((const char *)ucp, ((len > 24) ? 24 : len), -1);
1713
printf("%s SOP ", leadin);
1714
num = ((ucp[2] << 8) | ucp[3]);
1715
if (0 == format_code)
1716
printf("Routing ID: 0x%x\n", num);
1718
printf(" [Unexpected format code: %d]\n", format_code);
1719
dStrHex((const char *)ucp, 24, -1);
1280
1723
case TPROTO_NONE:
1724
fprintf(stderr, "%s No specified protocol\n", leadin);
1725
/* dStrHex((const char *)ucp, ((len > 24) ? 24 : len), 0); */
1282
1729
fprintf(stderr, "%s unknown protocol id=0x%x "
1283
1730
"format_code=%d\n", leadin, proto_id, format_code);
1912
2410
cp = sg_get_pdt_str(peri_type, sizeof(buff), buff);
1913
2411
if (strlen(cp) > 0)
1914
2412
printf(" Peripheral device type: %s\n", cp);
2415
if (! optsp->do_export)
1917
2416
printf(" Inquiry response length=%d, no vendor, "
1918
2417
"product or revision data\n", act_len);
1920
if (act_len < SAFE_STD_INQ_RESP_LEN)
1921
rsp_buff[act_len] = '\0';
1922
memcpy(xtra_buff, &rsp_buff[8], 8);
1923
xtra_buff[8] = '\0';
2421
if (act_len < SAFE_STD_INQ_RESP_LEN)
2422
rsp_buff[act_len] = '\0';
2423
memcpy(xtra_buff, &rsp_buff[8], 8);
2424
xtra_buff[8] = '\0';
2425
/* Fixup any tab characters */
2426
for (i = 0; i < 8; ++i)
2427
if (xtra_buff[i] == 0x09)
2429
if (optsp->do_export) {
2430
len = encode_whitespaces((unsigned char *)xtra_buff, 8);
2431
printf("SCSI_VENDOR=%s\n", xtra_buff);
2432
encode_string(xtra_buff, &rsp_buff[8], 8);
2433
printf("SCSI_VENDOR_ENC=%s\n", xtra_buff);
1924
2435
printf(" Vendor identification: %s\n", xtra_buff);
2436
if (act_len <= 16) {
2437
if (! optsp->do_export)
1926
2438
printf(" Product identification: <none>\n");
1928
memcpy(xtra_buff, &rsp_buff[16], 16);
1929
xtra_buff[16] = '\0';
2440
memcpy(xtra_buff, &rsp_buff[16], 16);
2441
xtra_buff[16] = '\0';
2442
if (optsp->do_export) {
2443
len = encode_whitespaces((unsigned char *)xtra_buff, 16);
2444
printf("SCSI_MODEL=%s\n", xtra_buff);
2445
encode_string(xtra_buff, &rsp_buff[16], 16);
2446
printf("SCSI_MODEL_ENC=%s\n", xtra_buff);
1930
2448
printf(" Product identification: %s\n", xtra_buff);
2450
if (act_len <= 32) {
2451
if (!optsp->do_export)
1933
2452
printf(" Product revision level: <none>\n");
1935
memcpy(xtra_buff, &rsp_buff[32], 4);
1936
xtra_buff[4] = '\0';
2454
memcpy(xtra_buff, &rsp_buff[32], 4);
2455
xtra_buff[4] = '\0';
2456
if (optsp->do_export) {
2457
len = encode_whitespaces((unsigned char *)xtra_buff, 4);
2458
printf("SCSI_REVISION=%s\n", xtra_buff);
1937
2460
printf(" Product revision level: %s\n", xtra_buff);
1939
if (optsp->do_descriptors) {
1940
for (j = 0, k = 58; ((j < 8) && ((k + 1) < act_len));
1942
vdesc_arr[j] = ((rsp_buff[k] << 8) +
2462
if (optsp->do_vendor && (act_len > 36) && ('\0' != rsp_buff[36]) &&
2463
(' ' != rsp_buff[36])) {
2464
memcpy(xtra_buff, &rsp_buff[36], act_len < 56 ? act_len - 36 :
2466
if (optsp->do_export) {
2467
len = encode_whitespaces((unsigned char *)xtra_buff, 20);
2468
printf("VENDOR_SPECIFIC=%s\n", xtra_buff);
2470
printf(" Vendor specific: %s\n", xtra_buff);
2472
if (optsp->do_descriptors) {
2473
for (j = 0, k = 58; ((j < 8) && ((k + 1) < act_len));
2475
vdesc_arr[j] = ((rsp_buff[k] << 8) +
2478
if ((optsp->do_vendor > 1) && (act_len > 96)) {
2479
memcpy(xtra_buff, &rsp_buff[96], act_len - 96);
2480
if (optsp->do_export) {
2481
len = encode_whitespaces((unsigned char *)xtra_buff,
2483
printf("VENDOR_SPECIFIC=%s\n", xtra_buff);
2485
printf(" Vendor specific: %s\n", xtra_buff);
1947
if (! (optsp->do_raw || optsp->do_hex)) {
2488
if (! (optsp->do_raw || optsp->do_hex || optsp->do_export)) {
1948
2489
if (0 == optsp->resp_len) {
1949
2490
if (0 == fetch_unit_serial_num(sg_fd, xtra_buff,
1950
2491
sizeof(xtra_buff), optsp->do_verbose))
1987
2528
fprintf(stderr, " inquiry: failed requesting %d byte response: ",
2531
snprintf(buff, sizeof(buff), " [resid=%d]", resid);
1989
2534
if (SG_LIB_CAT_INVALID_OP == res)
1990
fprintf(stderr, "not supported (?)\n");
2535
fprintf(stderr, "not supported (?)%s\n", buff);
1991
2536
else if (SG_LIB_CAT_NOT_READY == res)
1992
fprintf(stderr, "device not ready (?)\n");
2537
fprintf(stderr, "device not ready (?)%s\n", buff);
1993
2538
else if (SG_LIB_CAT_ILLEGAL_REQ == res)
1994
fprintf(stderr, "field in cdb illegal\n");
2539
fprintf(stderr, "field in cdb illegal%s\n", buff);
1995
2540
else if (SG_LIB_CAT_UNIT_ATTENTION == res)
1996
fprintf(stderr, "unit attention (?)\n");
2541
fprintf(stderr, "unit attention (?)%s\n", buff);
1997
2542
else if (SG_LIB_CAT_ABORTED_COMMAND == res)
1998
fprintf(stderr, "aborted command\n");
2543
fprintf(stderr, "aborted command%s\n", buff);
2000
fprintf(stderr, "res=%d\n", res);
2545
fprintf(stderr, "res=%d%s\n", res, buff);
2551
#ifdef SG_SCSI_STRINGS
2006
2552
/* Returns 0 if successful */
2008
2554
process_cmddt(int sg_fd, const struct opts_t * optsp)