aboutsummaryrefslogtreecommitdiff
path: root/src/sg_turs.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2018-07-13 05:50:34 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2018-07-13 05:50:34 +0000
commitceb7178cbfe8f784f8148da8725098395abb0578 (patch)
treeb165cb29ba2257b2963980716c4247318a0bc9e4 /src/sg_turs.c
parent50131693f96a5e701f9199b8e276cd0f8b4b5405 (diff)
downloadsg3_utils-ceb7178cbfe8f784f8148da8725098395abb0578.tar.gz
sg_turs: fix exit status when not ready in single case; sg_lib: add sg_ll_start_stop_unit_pt(); sg_tst_context: add --verbose optin, other tweaks
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@782 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_turs.c')
-rw-r--r--src/sg_turs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sg_turs.c b/src/sg_turs.c
index d4ac3b80..b68f1a42 100644
--- a/src/sg_turs.c
+++ b/src/sg_turs.c
@@ -41,7 +41,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "3.43 20180628";
+static const char * version_str = "3.44 20180712";
#if defined(MSC_VER) || defined(__MINGW32__)
#define HAVE_MS_SLEEP
@@ -343,6 +343,7 @@ loop_turs(struct sg_pt_base * ptvp, struct loop_res_t * resp,
case SG_LIB_CAT_NOT_READY:
++resp->num_errs;
if (1 == op->do_number) {
+ resp->ret = sense_cat;
printf("device not ready\n");
resp->reported = true;
}
@@ -544,6 +545,8 @@ main(int argc, char * argv[])
(! resp->reported))
printf("Completed %d Test Unit Ready commands with %d errors\n",
op->do_number, resp->num_errs);
+ if (1 == op->do_number)
+ ret = resp->ret;
}
fini:
if (ptvp)