aboutsummaryrefslogtreecommitdiff
path: root/src/sg_compare_and_write.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2013-01-18 00:51:54 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2013-01-18 00:51:54 +0000
commitc0a7268d98453fcd8479314e582a5ed7faf29b55 (patch)
tree4cfc9b69bdb76ed5cd2ce8aeb06d4f52ec4ce47b /src/sg_compare_and_write.c
parentff0d7dd14ab7cd482a836d04d7e63c127370354f (diff)
downloadsg3_utils-c0a7268d98453fcd8479314e582a5ed7faf29b55.tar.gz
cleanup for FreeBSD and Win32 prior to 1.35
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@476 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_compare_and_write.c')
-rw-r--r--src/sg_compare_and_write.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/sg_compare_and_write.c b/src/sg_compare_and_write.c
index c6773bf5..c9734bb7 100644
--- a/src/sg_compare_and_write.c
+++ b/src/sg_compare_and_write.c
@@ -9,7 +9,6 @@
#include <string.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
-#include <sys/ioctl.h>
#include <getopt.h>
#ifdef HAVE_CONFIG_H
@@ -21,7 +20,7 @@
/* A utility program for the Linux OS SCSI generic ("sg") device driver.
*
-* Copyright (c) 2012, Kaminario Technologies LTD
+* Copyright (c) 2012-2013, Kaminario Technologies LTD
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -42,14 +41,14 @@
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This command performs a SCSI COMPARE AND WRITE on the given lba.
*
*/
-static const char * version_str = "1.01 20121209";
+static const char * version_str = "1.02 20130117";
#define DEF_BLOCK_SIZE 512
#define DEF_NUM_BLOCKS (1)
@@ -435,11 +434,10 @@ main(int argc, char * argv[])
if (opts.verbose)
fprintf(stderr, "Running COMPARE AND WRITE command with the "
- "following options:\n in=%s device=%s lba=0x%" PRIx64
- " num_blocks=%d xfer_len=%d timeout=%d\n",
- opts.ifilename, opts.device_name,
- (unsigned long)opts.lba, opts.numblocks,
- opts.xfer_len, opts.timeout);
+ "following options:\n in=%s device=%s lba=0x%"
+ PRIx64 " num_blocks=%d xfer_len=%d timeout=%d\n",
+ opts.ifilename, opts.device_name, opts.lba,
+ opts.numblocks, opts.xfer_len, opts.timeout);
infd = open_if(opts.ifilename);
if (infd <=0) {