aboutsummaryrefslogtreecommitdiff
path: root/testing/sgh_dd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/sgh_dd.cpp')
-rw-r--r--testing/sgh_dd.cpp10
1 files changed, 6 insertions, 4 deletions
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)