fiddle with sg_tst_excl2 and sg_tst_excl3
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@531 6180dd3e-e324-4e3e-922d-17de1ae2f315
diff --git a/ChangeLog b/ChangeLog
index ec97ee2..4e4d698 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for sg3_utils-1.38 [20131110] [svn: r530]
+Changelog for sg3_utils-1.38 [20131110] [svn: r531]
- sg_ses: add --dev-slot-num= and --sas-addr=
- sg_inq: add --block=0|1 option to control opens
- sg_luns: guard against garbage response
diff --git a/examples/sg_tst_excl2.cpp b/examples/sg_tst_excl2.cpp
index bf01452..cec1c9e 100644
--- a/examples/sg_tst_excl2.cpp
+++ b/examples/sg_tst_excl2.cpp
@@ -138,8 +138,7 @@
pt_err(int res)
{
if (res < 0)
- fprintf(stderr, " pass through os error: %s\n",
- safe_strerror(-res));
+ fprintf(stderr, " pass through os error: %s\n", safe_strerror(-res));
else if (SCSI_PT_DO_BAD_PARAMS == res)
fprintf(stderr, " bad pass through setup\n");
else if (SCSI_PT_DO_TIMEOUT == res)
@@ -247,8 +246,8 @@
if (res) {
console_mutex.lock();
fprintf(stderr, "READ_16 do_scsi_pt() submission error\n");
- console_mutex.unlock();
res = pt_err(res);
+ console_mutex.unlock();
goto err;
}
cat = get_scsi_pt_result_category(ptp);
@@ -286,8 +285,8 @@
if (res) {
console_mutex.lock();
fprintf(stderr, "WRITE_16 do_scsi_pt() submission error\n");
- console_mutex.unlock();
res = pt_err(res);
+ console_mutex.unlock();
goto err;
}
cat = get_scsi_pt_result_category(ptp);
diff --git a/examples/sg_tst_excl3.cpp b/examples/sg_tst_excl3.cpp
index 078b118..c4052a9 100644
--- a/examples/sg_tst_excl3.cpp
+++ b/examples/sg_tst_excl3.cpp
@@ -144,8 +144,7 @@
pt_err(int res)
{
if (res < 0)
- fprintf(stderr, " pass through os error: %s\n",
- safe_strerror(-res));
+ fprintf(stderr, " pass through os error: %s\n", safe_strerror(-res));
else if (SCSI_PT_DO_BAD_PARAMS == res)
fprintf(stderr, " bad pass through setup\n");
else if (SCSI_PT_DO_TIMEOUT == res)
@@ -253,8 +252,8 @@
if (res) {
console_mutex.lock();
fprintf(stderr, "READ_16 do_scsi_pt() submission error\n");
- console_mutex.unlock();
res = pt_err(res);
+ console_mutex.unlock();
goto err;
}
cat = get_scsi_pt_result_category(ptp);
@@ -295,8 +294,8 @@
if (res) {
console_mutex.lock();
fprintf(stderr, "WRITE_16 do_scsi_pt() submission error\n");
- console_mutex.unlock();
res = pt_err(res);
+ console_mutex.unlock();
goto err;
}
cat = get_scsi_pt_result_category(ptp);