aboutsummaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-09-18 02:14:13 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-09-18 02:14:13 +0000
commitccefa8190c1f38cb71384bcdd786599db7de570a (patch)
treea4f0c0db16e15ce55ed98460635040b755a26cf3 /testing
parenteda37108f2a83c7944b1c0f63162647eddc9960d (diff)
downloadsg3_utils-ccefa8190c1f38cb71384bcdd786599db7de570a.tar.gz
sg_inq+sg_vpd: ongoing JSON updates
Probably at the end of the JSON work for sg_inq since it only has four vendor specific VPD pages. sg_vpd has a lot more vendor specific VPD pages which are yet to be 'jsonified'. git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@971 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'testing')
-rw-r--r--testing/sg_mrq_dd.cpp8
-rw-r--r--testing/sgh_dd.cpp10
2 files changed, 11 insertions, 7 deletions
diff --git a/testing/sg_mrq_dd.cpp b/testing/sg_mrq_dd.cpp
index 959a6848..821f2555 100644
--- a/testing/sg_mrq_dd.cpp
+++ b/testing/sg_mrq_dd.cpp
@@ -30,7 +30,7 @@
*
*/
-static const char * version_str = "1.42 20220615";
+static const char * version_str = "1.43 20220910";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -826,7 +826,7 @@ sg_flags_str(int flags, int b_len, char * b)
goto fini;
}
if (SGV4_FLAG_NO_DXFER & flags) { /* 0x10000 */
- n += sg_scnpr(b + n, b_len - n, "NDXFER|");
+ n += sg_scnpr(b + n, b_len - n, "NOXFER|");
if (n >= b_len)
goto fini;
}
@@ -1507,7 +1507,9 @@ sig_listen_thread(struct global_collection * clp)
} else
pr2serr_lk("%s: subsequent stall at pack_id=%d\n",
__func__, pack_id);
- system_wrapper("/usr/bin/dmesg\n");
+ // following command assumes linux bash or similar shell
+ system_wrapper("cat /proc/scsi/sg/debug >> /dev/stderr\n");
+ // system_wrapper("/usr/bin/dmesg\n");
} else
prev_pack_id = pack_id;
} else if (EAGAIN != err)
diff --git a/testing/sgh_dd.cpp b/testing/sgh_dd.cpp
index 83b4e5bc..dd72ffa9 100644
--- a/testing/sgh_dd.cpp
+++ b/testing/sgh_dd.cpp
@@ -36,7 +36,7 @@
* renamed [20181221]
*/
-static const char * version_str = "2.20 20220616";
+static const char * version_str = "2.21 20220911";
#define _XOPEN_SOURCE 600
#ifndef _GNU_SOURCE
@@ -823,7 +823,7 @@ sg_flags_str(int flags, int b_len, char * b)
goto fini;
}
if (SGV4_FLAG_NO_DXFER & flags) { /* 0x10000 */
- n += sg_scnpr(b + n, b_len - n, "NDXFER|");
+ n += sg_scnpr(b + n, b_len - n, "NOXFER|");
if (n >= b_len)
goto fini;
}
@@ -1093,7 +1093,7 @@ tsafe_strerror(int code, char * ebp)
strncpy(ebp, cp, STRERR_BUFF_LEN);
pthread_mutex_unlock(&strerr_mut);
- ebp[strlen(ebp) - 1] = '\0';
+ ebp[strlen(ebp)] = '\0';
return ebp;
}
@@ -1259,7 +1259,9 @@ sig_listen_thread(void * v_clp)
} else
pr2serr_lk("%s: subsequent stall at pack_id=%d\n",
__func__, pack_id);
- system_wrapper("/usr/bin/dmesg\n");
+ // following command assumes linux bash or similar shell
+ system_wrapper("cat /proc/scsi/sg/debug >> /dev/stderr\n");
+ // system_wrapper("/usr/bin/dmesg\n");
} else
prev_pack_id = pack_id;
} else if (EAGAIN != err)