aboutsummaryrefslogtreecommitdiff
path: root/src/sg_turs.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2010-12-06 02:27:23 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2010-12-06 02:27:23 +0000
commit3c60a8b8991001fe80ffdd95ca77bcce40b035eb (patch)
treec853891eab503ca2a6187d4623602f19b8a935be /src/sg_turs.c
parent02f2be1ee0e44a84cbdfa510ea11db9bcb4275ce (diff)
downloadsg3_utils-3c60a8b8991001fe80ffdd95ca77bcce40b035eb.tar.gz
add forwarded sense descriptor; new sg_decode_sense utility
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@365 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_turs.c')
-rw-r--r--src/sg_turs.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sg_turs.c b/src/sg_turs.c
index 933fb66f..f3611702 100644
--- a/src/sg_turs.c
+++ b/src/sg_turs.c
@@ -21,7 +21,7 @@
data transfer (and no REQUEST SENSE command iff the unit is ready)
then this can be used for timing per SCSI command overheads.
- * Copyright (C) 2000-2009 D. Gilbert
+ * Copyright (C) 2000-2010 D. Gilbert
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
@@ -29,7 +29,7 @@
*/
-static char * version_str = "3.27 20090422";
+static char * version_str = "3.28 20101203";
#if defined(MSC_VER) || defined(__MINGW32__)
#define HAVE_MS_SLEEP
@@ -265,7 +265,7 @@ static int process_cl(struct opts_t * optsp, int argc, char * argv[])
int main(int argc, char * argv[])
{
- int sg_fd, k, res, progress;
+ int sg_fd, k, res, progress, pr, rem;
int num_errs = 0;
int reported = 0;
int ret = 0;
@@ -310,9 +310,11 @@ int main(int argc, char * argv[])
if (progress < 0) {
ret = res;
break;
- } else
- printf("Progress indication: %d%% done\n",
- (progress * 100) / 65536);
+ } else {
+ pr = (progress * 100) / 65536;
+ rem = ((progress * 100) % 65536) / 655;
+ printf("Progress indication: %d.%02d%% done\n", pr, rem);
+ }
}
if (opts.do_number > 1)
printf("Completed %d Test Unit Ready commands\n",