diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2018-01-28 06:50:39 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2018-01-28 06:50:39 +0000 |
commit | 3a7e1666843ba386946f65d8ea89fe4ddf9ed9bf (patch) | |
tree | ec2d3a035ff39e5f5786460ac09f31df45d5469f /src/sg_turs.c | |
parent | 6293187a432dd0bbf85961a897755bd0260f28ad (diff) | |
download | sg3_utils-3a7e1666843ba386946f65d8ea89fe4ddf9ed9bf.tar.gz |
add sg_seek and sg_stream_ctl utilities; properly identify vendor-specific sense; documentation cleanup
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@747 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_turs.c')
-rw-r--r-- | src/sg_turs.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/sg_turs.c b/src/sg_turs.c index 2578378d..7b8b0567 100644 --- a/src/sg_turs.c +++ b/src/sg_turs.c @@ -1,8 +1,4 @@ -/* This program sends a user specified number of TEST UNIT READY commands - * to the given sg device. Since TUR is a simple command involing no - * 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-2018 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 @@ -11,6 +7,13 @@ * */ +/* + * This program sends a user specified number of TEST UNIT READY commands + * to the given sg device. Since TUR is a simple command involing no + * data transfer (and no REQUEST SENSE command iff the unit is ready) + * then this can be used for timing per SCSI command overheads. + */ + #include <unistd.h> #include <fcntl.h> #include <stdio.h> @@ -33,7 +36,7 @@ #include "sg_pr2serr.h" -static const char * version_str = "3.37 20180116"; +static const char * version_str = "3.38 20180123"; #if defined(MSC_VER) || defined(__MINGW32__) #define HAVE_MS_SLEEP @@ -83,12 +86,12 @@ usage() " --number=NUM|-n NUM number of test_unit_ready commands " "(def: 1)\n" " --num=NUM|-n NUM same action as '--number=NUM'\n" + " --old|-O use old interface (use as first option)\n" " --progress|-p outputs progress indication (percentage) " "if available\n" " --time|-t outputs total duration and commands per " "second\n" " --verbose|-v increase verbosity\n" - " --old|-O use old interface (use as first option)\n" " --version|-V print version string then exit\n\n" "Performs a SCSI TEST UNIT READY command (or many of them).\n"); } @@ -367,7 +370,7 @@ main(int argc, char * argv[]) } } #ifndef SG_LIB_MINGW - if ((op->do_time) && (start_tm.tv_sec || start_tm.tv_usec)) { + if (op->do_time && (start_tm.tv_sec || start_tm.tv_usec)) { struct timeval res_tm; double den, num; |